/* ══════════════════════════════════════════════════════════════
   STYLE.CSS — La Souche Studio — Refonte UX/UI
   Palettes : #004D4D (vert), #000 (noir), #FFF (blanc)
   Accent discret : #CC5500 (orange brûlé)
   Polices : Oswald (.font-impact) / Open Sans
   ══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────
   RESET & BASE
   ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Oswald Medium → classe .font-impact */
.font-impact {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.font-open { font-family: 'Open Sans', sans-serif; font-weight: 400; }

button { font-family: 'Oswald', sans-serif; font-weight: 500; }

/* ──────────────────────────────────
   ①  TICKER — Bandeau défilant corrigé
       Double conteneur Flexbox — jamais de chevauchement
   ────────────────────────────────── */
.ticker-outer { overflow: hidden; }

.ticker-track {
    display: flex;
    flex-direction: row; /* Force l'alignement horizontal */
    flex-wrap: nowrap;   /* Interdit le retour à la ligne (le bug de ta capture) */
    width: max-content;  /* S'adapte au contenu textuel */
    animation: tickerScroll 25s linear infinite;
}

/* Chaque copie du texte = 50 % de la piste totale
   → quand on décale de -50 %, on revient au début */
.ticker-content {
    display: block;      /* Pour bien accepter le padding */
    white-space: nowrap; /* Sécurité supplémentaire */
    flex-shrink: 0;
    padding: 0 2rem;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 300;
    font-family: 'Open Sans', sans-serif;
}

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause au survol */
.ticker-outer:hover .ticker-track { animation-play-state: paused; }

/* ──────────────────────────────────
   HERO NAME
   ────────────────────────────────── */
#hero-name {
    font-size: 14vw;
    line-height: 0.9;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ──────────────────────────────────
   ②  WORK CLOUD — Cartes flottantes (desktop)
   ────────────────────────────────── */

/* Hauteur du conteneur cloud */
#work-cloud { min-height: 80vh; }
#cloud-container { height: 80vh; }

.floating-item {
    position: absolute;
    width: 185px;
    height: 245px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0,0,0,0.10);
    z-index: 10;
    background: #111;
    will-change: transform;
    /* Transition hover */
    transition: box-shadow 0.35s ease, outline 0.2s ease;
}

.floating-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
    transition: transform 0.5s ease;
}

/* Hover scale via GSAP, mais ajout d'une ombre accentuée + outline orange discret */
.floating-item:hover {
    z-index: 100;
    box-shadow: 0 20px 55px rgba(0,0,0,0.22), 0 0 0 2px #CC5500;
}

.floating-item:hover img { transform: scale(1.06); }

/* Overlay titre — visible uniquement au hover (via JS group / CSS) */
.floating-item .cloud-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.floating-item:hover .cloud-hover-overlay { opacity: 1; }

.cloud-hover-overlay .cloud-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-align: center;
    line-height: 1.5;
}

/* Point de couleur discret sur la carte au hover */
.floating-item::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #CC5500;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    pointer-events: none;
    z-index: 20;
}
.floating-item:hover::after { opacity: 1; }

/* Contenu caché (utilisé pour la modale leaf) */
.leaf-content { display: none; }

/* ──────────────────────────────────
   ③  WORK CLOUD — MOBILE (≤ 768px)
       Grille asymétrique aérée
   ────────────────────────────────── */
@media (max-width: 768px) {

    #work-cloud {
        min-height: unset;
        height: auto !important;
        overflow: visible;
        padding: 60px 20px 40px;
    }

    #cloud-container {
        position: static !important;
        height: auto !important;
        display: grid !important;
        grid-template-columns: 48% 48%;
        grid-auto-rows: 220px;
        gap: 16px;
        justify-content: space-between;
    }

    /* Décalage vertical alterné = effet asymétrique */
    #cloud-container .floating-item:nth-child(2n) {
        margin-top: 36px;
    }

    .floating-item {
        position: static !important;   /* annule le positionnement absolu GSAP */
        transform: none !important;    /* annule toutes les transforms GSAP      */
        width: 100% !important;
        height: 100% !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }

    /* Sur mobile, overlay titre toujours visible à 60 % */
    .floating-item .cloud-hover-overlay {
        opacity: 0.75;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
        align-items: flex-end;
        padding: 12px;
    }

    .cloud-hover-overlay .cloud-title {
        font-size: 9px;
        letter-spacing: 0.15em;
        text-align: left;
    }

    /* Point couleur toujours visible sur mobile */
    .floating-item::after { opacity: 1; }
}

/* ──────────────────────────────────
   LEAF OVERLAY — Modale projet
   ────────────────────────────────── */
#leaf-overlay {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
}

#leaf-overlay.active { display: flex; }

.leaf-modal {
    border-left: 12px solid #004D4D;
    border-radius: 0;
}

#leaf-modal-body button {
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Oswald', sans-serif;
}
#leaf-modal-body button:hover { background: #000; }

/* ──────────────────────────────────
   NAV BUTTONS
   ────────────────────────────────── */
.nav-btn {
    width: 100%;
    max-width: 1200px;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px;
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
    background: white;
    border: 1px solid transparent;
    border-bottom: 1px solid #f3f4f6;
}

.nav-btn:hover {
    background: #004D4D;
    color: white;
    border-color: #CC5500;         /* touche orange sur le contour au hover */
}

.nav-btn .nav-text {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
    text-transform: uppercase;
}

.nav-btn .nav-sub {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    margin-top: 10px;
    opacity: 0.6;
    font-family: 'Open Sans', sans-serif;
}

/* ──────────────────────────────────
   ④  CAROUSEL — 4 pistes indépendantes
   ────────────────────────────────── */

/* LIGHTBOX : Assombrissement profond */


.carousel-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 40px 0;
}

.carousel-track-wrapper { overflow: hidden; }

.carousel-track {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    width: max-content;
    will-change: transform;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d; /* Force l'accélération matérielle */
    /* Animation définie dynamiquement par JS */
}

.photo-card {
    position: relative;
    flex: 0 0 320px;
    height: 420px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    flex: 0 0 clamp(250px, 20vw, 320px); /* Taille adaptative */
    height: clamp(350px, 30vw, 420px);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
    display: block;
    image-rendering: auto; /* Évite le flou durant l'animation */
}

.photo-card:hover img { transform: scale(1.08); }

/* Hover : bordure orange discrète */
.photo-card:hover {
    outline: 2px solid #CC5500;
    outline-offset: -2px;
}

.exif-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.82);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    pointer-events: none;
}

.photo-card:hover .exif-overlay { opacity: 1; }

/* ──────────────────────────────────
   ④  LIGHTBOX — Redesign total
       Image centrale + padding sécurité
       Titre monumental clamp()
       Fond backdrop-filter profond
   ────────────────────────────────── */

/* Transition globale de la lightbox */
#photo-lightbox {
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.16,1,0.3,1);
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95) !important; /* Plus sombre pour faire ressortir l'image */
    backdrop-filter: blur(25px) brightness(0.3) !important; /* Flou + baisse de luminosité */
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}


#photo-lightbox.lb-active {
    opacity: 1;
}

/* Backdrop flouté profond */
.lightbox-backdrop {
    pointer-events: none;
}

/* Bouton fermer */
.lightbox-close-btn {
    position: absolute;
    top: clamp(16px, 3vw, 36px);
    right: clamp(16px, 3vw, 36px);
    z-index: 30;
    color: white;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    width: clamp(38px, 5vw, 54px);
    height: clamp(38px, 5vw, 54px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 200;
    cursor: pointer;
    transition: transform 0.35s ease, background 0.3s ease, border-color 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lightbox-close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: rgba(204,85,0,0.25);     /* #CC5500 en arrière-plan discret */
    border-color: #CC5500;
}

/* Layout principal de la lightbox */
.lightbox-layout {
    position: relative;
    z-index: 20;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: clamp(16px, 4vw, 48px);
    row-gap: clamp(8px, 2vw, 20px);
}

/* HEADER : label catégorie */
.lightbox-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: clamp(4px, 1vw, 12px);
    padding-right: clamp(50px, 8vw, 100px); /* espace pour la croix */
}

.lightbox-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #CC5500;
    flex-shrink: 0;
}

.lightbox-category-label {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(7px, 1vw, 10px);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}

.lightbox-counter {
    margin-left: auto;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(10px, 1.2vw, 13px);
    font-weight: 200;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.3);
}

/* ZONE IMAGE — centrage absolu avec padding sécurité */
.lightbox-image-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(8px, 2vw, 24px) clamp(8px, 3vw, 32px);
}

.lightbox-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
    animation: lbZoomIn 0.55s cubic-bezier(0.16,1,0.3,1) both;
    display: block;
}

@keyframes lbZoomIn {
    from { opacity: 0; transform: scale(0.88) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* FOOTER INFO : ligne orange + titre monumental */
.lightbox-footer-info {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vw, 14px);
    padding-bottom: clamp(4px, 1vw, 10px);
}

/* Ligne accent orange brûlé */
.lightbox-accent-bar {
    width: clamp(32px, 5vw, 64px);
    height: 2px;
    background: #CC5500;
    flex-shrink: 0;
}

/* Titre monumental responsive */
.lightbox-title-display {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 6.5rem);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 0.88;
    color: #ffffff;
    margin: 0;
    animation: lbSlideIn 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s both;
    /* Contrôle le débordement sur petits écrans */
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

@keyframes lbSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────
   BENTO GRID (modales catégories)
   ────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 15px;
    width: 100%;
}

.span-2 { grid-column: span 2; }
.row-2  { grid-row: span 2; }
.span-3 { grid-column: span 3; }

/* ──────────────────────────────────
   SMART POPUPS
   ────────────────────────────────── */
.smart-popup {
    position: fixed;
    bottom: 30px;
    right: -450px;
    width: 350px;
    background: white;
    border-left: 8px solid #004D4D;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 5000;
    transition: right 0.6s cubic-bezier(0.19,1,0.22,1);
}

.smart-popup.active { right: 30px; }

.popup-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.popup-text  { font-size: 0.8rem; color: #666; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.05em; }

.popup-link {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #004D4D;
    text-transform: uppercase;
    cursor: pointer;
    /* Soulignement orange discret */
    border-bottom: 2px solid #CC5500;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.popup-link:hover { color: #CC5500; }

/* ──────────────────────────────────
   CLOSE BUTTON (modales)
   ────────────────────────────────── */
.close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: black;
    color: white;
    border-radius: 50%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #CC5500;             /* orange au hover */
}

/* ──────────────────────────────────
   CONTACT INPUTS — Focus orange discret
   ────────────────────────────────── */
.contact-input {
    font-family: 'Open Sans', sans-serif;
    background: transparent;
    transition: border-color 0.3s ease;
}

.contact-input:focus {
    border-color: #CC5500 !important;  /* accent orange au focus */
}

/* ──────────────────────────────────
   FOOTER LINKS — Underline orange discret
   ────────────────────────────────── */
.footer-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.footer-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #CC5500;
    transition: width 0.3s ease;
}

.footer-link:hover::after { width: 100%; }

.footer-email {
    text-decoration: none;
    position: relative;
}
.footer-email::after {
    content: '';
    position: absolute;
    left: 0; bottom: -3px;
    width: 0; height: 2px;
    background: #CC5500;
    transition: width 0.4s ease;
}
.footer-email:hover::after { width: 100%; }

/* ──────────────────────────────────
   ANIMATIONS GÉNÉRALES
   ────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

/* ── Tablette paysage (< 1024px) ── */
@media (max-width: 1024px) {

    #hero-name { font-size: 10vw; }

    .floating-item { width: 150px; height: 200px; }

    .nav-btn { height: 120px; padding: 0 30px; }
    .nav-btn .nav-text { font-size: 2.2rem; }

    .photo-card { flex: 0 0 260px; height: 360px; }

    .bento-grid {
        grid-template-columns: repeat(3,1fr);
        gap: 12px;
    }

    .span-3 { grid-column: span 2; }
}

/* ── Tablette portrait / Mobile large (< 768px) ── */
@media (max-width: 768px) {

    #hero-name { font-size: 12vw; flex-wrap: wrap; }
    #hero-bio  { font-size: 14px; padding: 0 30px; }

    section:first-of-type { padding-top: 80px; }

    /* NAV */
    .nav-btn         { height: 100px; padding: 0 20px; }
    .nav-btn .nav-text { font-size: 1.6rem; }
    .nav-btn .nav-sub  { font-size: 0.6rem; margin-top: 5px; }

    /* CAROUSEL — Scroll natif horizontal sur mobile */
    .carousel-section { padding: 20px 0; gap: 12px; }

    .carousel-track-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .carousel-track-wrapper::-webkit-scrollbar { display: none; }

    .carousel-track {
        /* Stop les animations CSS (remplacées par le scroll natif) */
        animation: none !important;
        /* On rend le track non-flex-wrap pour le scroll */
        display: flex;
        width: auto;
        padding: 0 16px;
    }

    .photo-card {
        flex: 0 0 260px;
        height: 340px;
        scroll-snap-align: start;
    }

    /* BENTO */
    .bento-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 10px;
    }
    .span-2, .span-3 { grid-column: span 2; }
    .row-2  { grid-row: span 1; }

    /* POPUPS → Banner bottom */
    .smart-popup {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        border-left: none;
        border-top: 4px solid #004D4D;
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    }
    .smart-popup.active { transform: translateY(0); right: 0 !important; }

    /* MODAL CONTENT */
    .fade-in { padding: 60px 20px 40px !important; }

    /* CLOSE BTN */
    .close-btn { width: 60px; height: 60px; top: 10px; right: 10px; font-size: 24px; }

    /* LEAF MODAL */
    .leaf-modal {
        max-width: 95%;
        padding: 30px 20px;
        max-height: 80vh;
        overflow-y: auto;
    }
    #leaf-modal-body h3 { font-size: 2rem; }

    /* FOOTER */
    footer h3 { font-size: 3rem; }

    /* LIGHTBOX responsive */
    .lightbox-title-display {
        font-size: clamp(1.6rem, 8vw, 3rem);
        line-height: 0.92;
    }

    .lightbox-layout {
        padding: 14px;
        row-gap: 10px;
    }

    .lightbox-image-zone {
        padding: 4px;
    }

    body, * { max-width: 100%; }
    body { overflow-x: hidden; }
}

/* ── Mobile (< 480px) ── */
@media (max-width: 480px) {

    #hero-name  { font-size: 14vw; line-height: 0.85; }
    #hero-bio   { font-size: 13px; padding: 0 20px; }

    section:first-of-type button { padding: 12px 30px; font-size: 10px; }

    .photo-card { flex: 0 0 220px; height: 300px; }

    .bento-grid { grid-template-columns: 1fr !important; }
    .span-2, .span-3, .row-2 { grid-column: span 1 !important; grid-row: span 1 !important; }

    .smart-popup { padding: 15px; }
    .popup-title { font-size: 1rem; }
    .popup-text  { font-size: 0.7rem; }

    #contact-modal .contact-container { padding: 30px 20px; max-width: 95%; }
    #contact-modal h2 { font-size: 2rem; }
    #contact-modal input, #contact-modal textarea { font-size: 11px; }

    footer h3 { font-size: 2.5rem; }
    footer a.footer-link { font-size: 1.2rem; }
}

/* ──────────────────────────────────
   AMÉLIORATIONS UX TACTILES
   ────────────────────────────────── */
@media (max-width: 768px) {
    button, a, .floating-item, .photo-card {
        min-height: 44px;
        min-width: 44px;
    }

    button:active, .nav-btn:active {
        opacity: 0.75;
        transform: scale(0.98);
    }

    /* Sur mobile, hover ne change pas le fond (pas de pointer) */
    .nav-btn:hover  { background: white; color: black; border-color: transparent; }
    .nav-btn:active { background: #004D4D; color: white; }
}

/* Permet le défilement fluide au doigt sur téléphone */
@media (max-width: 770px) {
    .carousel-track-wrapper {
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch; /* Inertie iOS */
        cursor: grab;
    }
    
    .carousel-track-wrapper::-webkit-scrollbar {
        display: none; /* Cache la barre de scroll moche */
    }

    .photo-card {
        scroll-snap-align: center; /* Les photos se calent bien au milieu */
    }
}