*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --beige: #f0e8e0;
    --beige-light: #f7f2ed;
    --beige-mid: #e8ddd4;
    --brown: #8b7355;
    --dark: #1a1a1a;
    --text: #3a3a3a;
    --text-light: #777;
    --white: #ffffff;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--beige-light);
    border: 1px solid var(--beige-mid);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

#cookie-banner p {
    font-size: 0.7rem;
    color: var(--text);
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-actions button {
    padding: 8px 16px;
    font-size: 0.65rem;
    border: 1px solid var(--dark);
    background: transparent;
    cursor: pointer;
    transition: 0.3s;
}

.cookie-actions button:hover {
    background: var(--dark);
    color: white;
}

/* =====================================================
           LOADER
        ===================================================== */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--beige-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo img {
    height: 90px;
    width: auto;
    animation: loaderPulse 1.8s ease-in-out infinite;
}

@keyframes loaderPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

.loader-bar-wrap {
    width: 110px;
    height: 1px;
    background: var(--beige-mid);
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--brown);
    transition: width 0.3s ease;
}

/* =====================================================
           HEADER
        ===================================================== */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    padding: 20px 36px;
}

header a {
    color: var(--dark);
    transition: opacity 0.25s;
}

header a:hover {
    opacity: 0.5;
}

/* =====================================================
           HERO
        ===================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('img/Hero/hero.webp') center/cover no-repeat;
    opacity: 0.7;
    will-change: transform;
    transform: scale(1.04);
    transition: transform 1.4s var(--ease-out);
}

.hero-bg.ready {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
            rgba(0, 0, 0, 0.04) 0%,
            rgba(0, 0, 0, 0.18) 60%,
            rgba(0, 0, 0, 0.34) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Espacement plus généreux entre les éléments */
    gap: 100px;
    padding: 0 24px;
    text-align: center;
}

.hero-logo {
    animation: fadeDown 1s 0.05s both;
}

.hero-quote {
    animation: fadeUp 1s 0.30s both;
}

.hero-nav {
    animation: fadeUp 1s 0.50s both;
}

/* Logo plus grand et légèrement remonté */
.hero-logo img {
    height: 200px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.22));
    margin-bottom: -12px;
    /* remonte légèrement dans l'espace */
}

.hero-quote p {
    font-family: 'Montserrat', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 3vw, 1.9rem);
    letter-spacing: 0.08em;
    color: var(--white);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hero-nav {
    display: flex;
    gap: 16em;
}

.hero-nav a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    /* Boutons plus grands */
    padding: 14px 44px;
    border: 1.5px solid rgba(0, 0, 0, 0.72);
    background: rgba(255, 255, 255, 0.88);
    color: var(--dark);
    position: relative;
    overflow: hidden;
    transition: color 0.35s var(--ease-out);
}

.hero-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--dark);
    transform: translateY(100%);
    transition: transform 0.35s var(--ease-out);
    z-index: 0;
}

.hero-nav a span {
    position: relative;
    z-index: 1;
}

.hero-nav a:hover {
    color: var(--white);
}

.hero-nav a:hover::before {
    transform: translateY(0);
}

/* =====================================================
           SCROLL-IN
        ===================================================== */
.section,
#contact,
footer {
    position: relative;
    z-index: 1;
}

.section {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.section.show {
    opacity: 1;
    transform: translateY(0);
}

.section.show>*:nth-child(1) {
    transition-delay: 0s;
}

.section.show>*:nth-child(2) {
    transition-delay: 0.08s;
}

.section.show>*:nth-child(3) {
    transition-delay: 0.16s;
}

/* =====================================================
           PRESENTATION
        ===================================================== */
.presentation-wrapper {
    background: #fffbf6;
    position: relative;
    z-index: 1;
}

.presentation {
    display: flex;
    align-items: stretch;
    padding: 72px 60px;
    max-width: 1000px;
    margin: 0 auto;
    gap: 52px;
}

/* Photo carrée, même hauteur que le texte */
.presentation .photo-box {
    flex: 0 0 280px;
    /* Carré : on fixe la largeur et on laisse la hauteur s'adapter */
    aspect-ratio: 1 / 1;
    align-self: flex-start;
    overflow: hidden;
    background: var(--beige-mid);
    flex-shrink: 0;
}

.presentation .photo-box img {
    width: 100%;
    height: 100%;
    object-position: center top;
    display: block;
}

.presentation .pres-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.presentation .pres-text h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
    color: var(--dark);
}

.presentation .pres-text p {
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 10px;
}

.presentation .pres-text p:last-child {
    margin-bottom: 0;
}

.pres-quote {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-size: 1rem !important;
    color: var(--brown) !important;
    margin-top: 6px !important;
}

/* =====================================================
           PORTFOLIO
        ===================================================== */
#portfolio {
    background: #e3d3c9;
    padding: 72px 40px 80px;
}

#portfolio>h2 {
    font-family: 'Montserrat', serif;
    text-decoration: underline;
    text-underline-offset: 10px;
    text-decoration-color: #613d29;
    font-weight: 500;
    font-size: 1.9rem;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 48px;
    color: var(--dark);
}

/* Catégories : plus grandes, prennent toute la largeur */
.categories {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-bottom: 48px;
}

.category {
    /* flex: 1 pour occuper tout l'espace disponible */
    flex: 1 1 0;
    max-width: 340px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.35s var(--ease-out);
}

.category:hover {
    transform: translateY(-3px);
}

.cat-img {
    width: 100%;
    /* Plus haute pour un meilleur rendu visuel */
    height: 200px;
    overflow: hidden;
}

.cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s var(--ease-out);
}

.category:hover .cat-img img {
    transform: scale(1.07);
}

.cat-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    padding: 12px 8px;
    background: var(--beige-mid);
    color: var(--text);
    transition: background 0.3s, border-color 0.3s;
    border-bottom: 2px solid transparent;
}

.category.active .cat-label {
    background: #613d29;
    color: white;
    border-bottom-color: var(--brown);
    font-weight: 600;
}

/* Intro texte */
.portfolio-intro {
    text-align: center;
    margin-bottom: 28px;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.portfolio-intro.fading {
    opacity: 0;
    transform: translateY(6px);
}

.portfolio-intro h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--dark);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-intro p {
    font-size: 0.76rem;
    color: var(--text-light);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Galerie — photos non croppées, affichées en entier */
.gallery {
    transition: opacity 0.3s var(--ease-out);
}

.gallery.one-col,
.gallery.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gallery .image {
    overflow: hidden;
    background: var(--beige-mid);
    cursor: zoom-in;
    position: relative;
    /* Pas d'aspect-ratio fixe : la cellule s'adapte à la photo */
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery .image img {
    width: 100%;
    height: auto;
    /* contain pour voir la photo entière, pas de crop */
    object-fit: contain;
    display: block;
    transition: transform 0.55s var(--ease-out), opacity 0.4s ease;
    opacity: 0;
}

.gallery .image img.loaded {
    opacity: 1;
}

.gallery .image:hover img {
    transform: scale(1.03);
}

.gallery .image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery .image:hover::after {
    opacity: 1;
}

/* =====================================================
           LIGHTBOX
        ===================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, 0.93);
}

.lightbox-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 64px 88px 52px;
}

.lightbox-img-wrap {
    max-width: 1100px;
    max-height: 84vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img-wrap img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 84vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
}

.lightbox-img-wrap img.fading {
    opacity: 0;
    transform: scale(0.97);
}

.lb-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, transform 0.25s var(--ease-out);
    z-index: 2;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, transform 0.25s var(--ease-out);
    z-index: 2;
    user-select: none;
}

.lb-arrow.prev {
    left: 20px;
}

.lb-arrow.next {
    right: 20px;
}

.lb-arrow.prev:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%) translateX(-3px);
}

.lb-arrow.next:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%) translateX(3px);
}

.lb-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

/* =====================================================
           CONTACT
        ===================================================== */
#contact {
    background: #fffbf6;
    padding: 80px 40px;
}

#contact h2 {
    font-family: 'Montserrat', serif;
    text-decoration: underline;
    text-underline-offset: 10px;
    text-decoration-color: #613d29;
    font-weight: 500;
    font-size: 1.9rem;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 56px;
    color: var(--dark);
}

#contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.field {
    position: relative;
    margin-bottom: 40px;
}

.field input,
.field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #c0ada0;
    padding: 8px 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--dark);
    outline: none;
    resize: none;
    overflow: hidden;
    transition: border-color 0.3s;
}

.field input:focus,
.field textarea:focus {
    border-bottom-color: var(--brown);
}

.field label {
    position: absolute;
    top: 8px;
    left: 0;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 0.05em;
    pointer-events: none;
    transition: top 0.28s var(--ease-out), font-size 0.28s, color 0.28s, letter-spacing 0.28s;
}

.field input:focus~label,
.field input:not(:placeholder-shown)~label,
.field textarea:focus~label,
.field textarea:not(:placeholder-shown)~label {
    top: -15px;
    font-size: 0.64rem;
    color: var(--brown);
    letter-spacing: 0.12em;
}

.field input::placeholder,
.field textarea::placeholder {
    color: transparent;
}

.field .line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--brown);
    transition: width 0.4s var(--ease-out);
}

.field input:focus~.line,
.field textarea:focus~.line {
    width: 100%;
}

#contact-form button {
    display: block;
    margin: 44px auto 0;
    padding: 12px 44px;
    background: transparent;
    border: 1.5px solid var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--dark);
    position: relative;
    overflow: hidden;
    transition: color 0.35s var(--ease-out);
}

#contact-form button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--dark);
    transform: translateY(101%);
    transition: transform 0.35s var(--ease-out);
    z-index: 0;
}

#contact-form button span {
    position: relative;
    z-index: 1;
}

#contact-form button:hover {
    color: var(--white);
}

#contact-form button:hover::before {
    transform: translateY(0);
}

#contact-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#status {
    text-align: center;
    margin-top: 20px;
    font-size: 0.78rem;
    min-height: 1.2em;
    transition: opacity 0.3s;
}

/* =====================================================
           FOOTER
        ===================================================== */
footer {
    background: #e3d3c9;
    border-top: 1px solid var(--beige-mid);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 44px 52px 32px;
}

.footer-left p {
    font-size: 0.72rem;
    font-weight: 300;
    line-height: 2;
    color: var(--text);
}

/* Email cliquable */
.footer-left a.mail-link {
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-left a.mail-link:hover {
    color: var(--brown);
}

/* Téléphone cliquable */
.footer-left a.tel-link {
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-left a.tel-link:hover {
    color: var(--brown);
}

.footer-left a.tel-link i,
.footer-left a.mail-link i {
    font-size: 0.65rem;
}

.footer-center img {
    height: 72px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

.footer-center img:hover {
    transform: scale(1.04);
    opacity: 0.85;
}

.footer-right {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-left: 120px;
}

.footer-right a {
    color: var(--dark);
    transition: color 0.25s, transform 0.25s var(--ease-out);
    display: inline-block;
}

.footer-right a:hover {
    color: var(--brown);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 52px;
    border-top: 1px solid var(--beige-mid);
}

.footer-bottom p,
.footer-bottom a {
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 0.04em;
}

.footer-bottom a {
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--dark);
}

.legal-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 100px 20px;
    background: #f6f3ef;
}

.legal-container {
    max-width: 800px;
    width: 100%;
    background: white;
    padding: 60px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.legal-container h1 {
    font-size: 2rem;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.legal-block {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-block h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #333;
}

.legal-block p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.legal-back {
    display: inline-block;
    margin-top: 30px;
    font-size: 0.85rem;
    text-decoration: none;
    color: black;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.legal-back:hover {
    border-bottom: 1px solid black;
}

/* =====================================================
           KEYFRAMES
        ===================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
           RESPONSIVE
        ===================================================== */
@media (max-width: 900px) {
    .presentation {
        padding: 60px 40px;
        gap: 36px;
    }

    .presentation .photo-box {
        flex: 0 0 220px;
    }

    .categories {
        gap: 10px;
    }
}

@media (max-width: 680px) {

    /* Hero */
    .hero-logo img {
        margin-bottom: 0;
    }

    .hero-content {
        gap: 28px;
    }

    .hero-nav {
        display: flex;
        flex-direction: column;
        gap: 3em;
    }

    .hero-nav a {
        padding: 11px 28px;
        font-size: 0.65rem;
    }

    /* Présentation */
    .presentation {
        flex-direction: column;
        padding: 48px 24px;
        gap: 28px;
    }

    .presentation .photo-box {
        flex: none;
        width: 100%;
        /* Carré responsive : largeur = largeur de l'écran */
        aspect-ratio: 1 / 1;
        align-self: auto;
    }

    /* Catégories */
    .categories {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .category {
        flex: none;
        width: 100%;
        max-width: 400px;
    }

    .cat-img {
        height: 160px;
    }

    /* Galerie */
    .gallery.one-col,
    .gallery.two-col {
        grid-template-columns: 1fr;
    }

    #portfolio {
        padding: 52px 20px;
    }

    /* Lightbox */
    .lightbox-inner {
        padding: 60px 10px 44px;
    }

    .lb-arrow {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .lb-arrow.prev {
        left: 4px;
    }

    .lb-arrow.next {
        right: 4px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 28px;
        padding: 34px 24px 22px;
    }

    .footer-right {
        margin-left: 0;
    }

    .footer-bottom {
        padding: 14px 24px;
    }
}