/* ===================================================================
   ODALE CRÉATION — Menuiserie Bois Sur Mesure
   Style principal
   =================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-brown: #8B4513;
    --color-brown-dark: #6b3410;
    --color-brown-light: #a0622d;
    --color-black: #1a1a1a;
    --color-white: #ffffff;
    --color-cream: #f5f0eb;
    --color-cream-dark: #e8dfd6;
    --color-gold: #c9a96e;
    --color-gold-light: #d4bc8a;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0d6cc;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Raleway', 'Segoe UI', sans-serif;

    --header-height: 80px;
    --container-width: 1200px;
    --transition: 0.3s ease;
    --transition-slow: 0.6s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn--primary {
    background-color: var(--color-gold);
    color: var(--color-black);
}

.btn--primary:hover {
    background-color: var(--color-brown);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

.btn--large {
    padding: 18px 42px;
    font-size: 1rem;
}

/* ===================================================================
   HEADER
   =================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition);
    background-color: transparent;
}

.header.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    z-index: 1001;
}

.logo__name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-white);
}

.logo__accent {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    color: var(--color-gold);
}

/* Navigation */
.nav__list {
    display: flex;
    gap: 32px;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    padding: 4px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-gold);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.header__cta {
    padding: 10px 24px;
    font-size: 0.8rem;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger__line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: all var(--transition);
    transform-origin: center;
}

.hamburger.active .hamburger__line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.6) 0%,
        rgba(26, 26, 26, 0.4) 50%,
        rgba(26, 26, 26, 0.7) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Scroll indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero__scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.hero__scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--color-gold);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* ===================================================================
   SECTIONS (Global)
   =================================================================== */
.section {
    padding: 100px 0;
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 12px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 16px;
}

.section__title--left {
    text-align: left;
}

.section__subtitle {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================================================
   SERVICES
   =================================================================== */
.services {
    background-color: var(--color-cream);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--color-white);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.1);
    border-color: var(--color-gold);
}

.service-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--color-gold);
    transition: color var(--transition);
}

.service-card:hover .service-card__icon {
    color: var(--color-brown);
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 12px;
}

.service-card__text {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ===================================================================
   RÉALISATIONS / GALERIE
   =================================================================== */
.realisations {
    background-color: var(--color-white);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery__item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery__item:hover img {
    transform: scale(1.1);
}

.gallery__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery__item:hover .gallery__overlay {
    opacity: 1;
}

.gallery__label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-white);
}

.gallery__icon {
    font-size: 1.8rem;
    color: var(--color-gold);
    font-weight: 300;
    line-height: 1;
}

/* Gallery special layout: first two items bigger */
.gallery__item:nth-child(1) {
    grid-column: span 2;
}

.gallery__item:nth-child(4) {
    grid-column: span 2;
}

/* ===================================================================
   LIGHTBOX
   =================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform var(--transition);
}

.lightbox.active .lightbox__img {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 2.5rem;
    color: var(--color-white);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.lightbox__close:hover {
    color: var(--color-gold);
}

/* ===================================================================
   À PROPOS
   =================================================================== */
.apropos {
    background-color: var(--color-cream);
}

.apropos__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.apropos__image {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.apropos__image::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 60%;
    height: 60%;
    border: 3px solid var(--color-gold);
    border-radius: 8px;
    z-index: -1;
}

.apropos__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.apropos__content .section__tag {
    display: block;
    text-align: left;
}

.apropos__text {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.apropos__text strong {
    color: var(--color-brown);
}

.apropos__values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.apropos__value {
    text-align: center;
}

.apropos__value-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: var(--color-gold);
}

.apropos__value h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 6px;
}

.apropos__value p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ===================================================================
   DEVIS (Formulaire)
   =================================================================== */
.devis {
    background-color: var(--color-white);
}

.devis__form {
    max-width: 800px;
    margin: 0 auto;
}

.form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form__group--full {
    grid-column: 1 / -1;
}

.form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form__input {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    background-color: var(--color-cream);
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all var(--transition);
    outline: none;
}

.form__input::placeholder {
    color: #aaa;
}

.form__input:focus {
    border-color: var(--color-gold);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.form__input.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__error {
    display: block;
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: 6px;
    min-height: 1.2em;
}

.form__submit {
    text-align: center;
    margin-top: 36px;
}

.form__success {
    display: none;
    text-align: center;
    padding: 40px;
    margin-top: 30px;
    background-color: #f0f9f0;
    border-radius: 8px;
    border: 1px solid #a8d5a2;
}

.form__success.show {
    display: block;
}

.form__success svg {
    width: 48px;
    height: 48px;
    color: #27ae60;
    margin: 0 auto 16px;
}

.form__success p {
    font-size: 1.05rem;
    color: #2d7a3a;
    font-weight: 500;
}

/* ===================================================================
   CONTACT
   =================================================================== */
.contact {
    background-color: var(--color-black);
    color: var(--color-white);
}

.contact .section__title {
    color: var(--color-white);
}

.contact .section__subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.contact__card {
    text-align: center;
    padding: 30px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all var(--transition);
}

.contact__card:hover {
    border-color: var(--color-gold);
    background-color: rgba(201, 169, 110, 0.05);
}

.contact__icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    color: var(--color-gold);
}

.contact__card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-white);
}

.contact__card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.contact__card a {
    color: rgba(255, 255, 255, 0.7);
}

.contact__card a:hover {
    color: var(--color-gold);
}

.contact__socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact__social {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--color-white);
    transition: all var(--transition);
}

.contact__social svg {
    width: 20px;
    height: 20px;
}

.contact__social:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
    transform: translateY(-3px);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
    background-color: #111111;
    color: rgba(255, 255, 255, 0.7);
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 24px 40px;
}

.logo--footer .logo__name {
    font-size: 1.4rem;
}

.logo--footer .logo__accent {
    font-size: 1.2rem;
}

.footer__desc {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
}

.footer__links h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 20px;
}

.footer__links li {
    margin-bottom: 10px;
}

.footer__links a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition);
}

.footer__links a:hover {
    color: var(--color-gold);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===================================================================
   ANIMATIONS (Fade In on Scroll)
   =================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for grids */
.services__grid .fade-in:nth-child(1) { transition-delay: 0.05s; }
.services__grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.services__grid .fade-in:nth-child(3) { transition-delay: 0.15s; }
.services__grid .fade-in:nth-child(4) { transition-delay: 0.2s; }
.services__grid .fade-in:nth-child(5) { transition-delay: 0.25s; }
.services__grid .fade-in:nth-child(6) { transition-delay: 0.3s; }

.gallery .fade-in:nth-child(1) { transition-delay: 0.05s; }
.gallery .fade-in:nth-child(2) { transition-delay: 0.1s; }
.gallery .fade-in:nth-child(3) { transition-delay: 0.15s; }
.gallery .fade-in:nth-child(4) { transition-delay: 0.2s; }
.gallery .fade-in:nth-child(5) { transition-delay: 0.25s; }

/* ===================================================================
   RESPONSIVE — Tablette (max 1024px)
   =================================================================== */
@media (max-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery__item:nth-child(1),
    .gallery__item:nth-child(4) {
        grid-column: span 1;
    }

    .apropos__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .apropos__image {
        max-width: 600px;
        margin: 0 auto;
    }

    .apropos__content .section__tag,
    .apropos__content .section__title {
        text-align: center;
    }

    .section__title--left {
        text-align: center;
    }

    .apropos__text {
        text-align: center;
    }

    .contact__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===================================================================
   RESPONSIVE — Mobile (max 768px)
   =================================================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 68px;
    }

    .section {
        padding: 70px 0;
    }

    /* Header mobile */
    .hamburger {
        display: flex;
    }

    .header__cta {
        display: none;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-black);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition);
        z-index: 1000;
    }

    .nav.open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }

    .nav__link {
        font-size: 1.1rem;
    }

    /* Mobile overlay */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Services */
    .services__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 30px 24px;
    }

    /* Gallery */
    .gallery {
        grid-template-columns: 1fr;
    }

    /* Apropos values */
    .apropos__values {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .apropos__image::after {
        display: none;
    }

    /* Form */
    .form__grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact__grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer__inner {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

/* ===================================================================
   RESPONSIVE — Small mobile (max 480px)
   =================================================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 0.95rem;
    }

    .btn--large {
        padding: 16px 32px;
        font-size: 0.9rem;
    }

    .section__title {
        font-size: 1.8rem;
    }
}
