/* ============================================
   HERO
   ============================================ */

section#hero {
    position: relative;
    overflow: hidden;
    min-height: 120rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 18rem;
    scroll-margin-top: 0;

    /* Dégradé de fond — noir vers accent très subtil */
    background:
        radial-gradient(ellipse at 80% 50%, rgba(179, 228, 18, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 50%, rgba(179, 228, 18, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(179, 228, 18, 0.04) 0%, transparent 50%);
}

.hero-surtitre {
    font-family: var(--font-raleway);
    font-size: var(--fs-header);
    font-weight: var(--fw-bold);
    color: var(--color-text-primary);
    margin-bottom: 4rem;
    line-height: 1;
}

.hero-soustitre {
    font-size: var(--fs-body-hl);
    color: var(--color-text-secondary);
    margin-bottom: 4rem;
}

section#hero h1 {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-text-secondary);
    margin-bottom: 4rem;
}


.scroll-indicator {
    position: absolute;
    bottom: 10rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
}

.scroll-arrow {
    font-size: 2.4rem;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--color-accent) 50%,
        transparent 100%
    );

    background-size: 100% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: scrollLight 3s ease-in-out infinite;
}

@keyframes scrollLight {
    0%   { background-position: 0% -100%; }
    100% { background-position: 0% 200%; }
}

/* ============================================
   SECTION STACK
   ============================================ */

#stack {
    padding-block: 0;
    height: 12rem;
    border-top: 1px solid #252525;
    border-bottom: 1px solid #252525;
    overflow: hidden;
    user-select: none;
    position: relative;
    visibility: hidden;
}

#stack ul {
    display: flex;
    align-items: center;
    gap: 3.2rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding-right: 3.2rem;
    will-change: transform;
}

#stack ul li {
    font-family: var(--font-raleway);
    font-weight: var(--fw-bold);
    font-size: 8.0rem;
    color: var(--color-text-primary);
    white-space: nowrap;
}

#stack ul li::before {
    content: "\2022";
    color: var(--color-accent);
    margin-right: 3.2rem;
}

/* ============================================
   SECTION À PROPOS
   ============================================ */

section#apropos {
    margin-top: 15rem;
}

section#apropos .section-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-accent);
    margin-bottom: 1.6rem;
}

.apropos-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 4rem;
    margin-bottom: 8rem;
}

.apropos-texte {
    flex: 1;
}

.apropos-accroche {
    font-size: var(--fs-body-hl);
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
    margin-bottom: 2.4rem;
    line-height: 1.5;
}

.apropos-texte p:not(.apropos-accroche){
    font-size: var(--fs-body);
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 3.2rem;
}

.services {
    display: flex;
    gap: 0;
}

/* ============================================
   SECTION PORTFOLIO
   ============================================ */

section#portfolio {
    margin-top: 15rem;
}

section#portfolio .section-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-accent);
    margin-bottom: 1.6rem;
}

.projets-grid {
    display: flex;
    gap: 2.4rem;
    margin-top: 4rem;
}

/* ============================================
   SECTION CV
   ============================================ */

section#cv {
    margin-top: 22rem;
}

section#cv .section-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-accent);
    margin-bottom: 1.6rem;
}

/* Le conteneur pin réserve de l'espace vertical pour le scroll
   5 cards × 100vh = assez de scroll pour traverser toutes les cards */
.cv-pin-conteneur {
    height: 500vh;
    margin-top: 4rem;
    position: relative;
}

/* La zone sticky colle en haut du viewport pendant tout le scroll */
.cv-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
}

/* Le track contient toutes les cards côte à côte */
.cv-track {
    display: flex;
    gap: 2.4rem;
    /* Padding pour que la card 01 commence au centre */
    padding-left: calc(50vw - 22.5rem);
    /* Padding fin pour que la card 05 finisse au centre */
    padding-right: calc(50vw - 22.5rem);
    will-change: transform;
}

/* ============================================
   SECTION FAQ
   ============================================ */

section#faq {
    margin-top: 15rem;
}

section#faq .section-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-accent);
    margin-bottom: 1.6rem;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    margin-top: 4rem;
}

.faq-item {
    border: 1px solid #1a1a1a;
    border-radius: 0.8rem;
    padding: 3.2rem;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: var(--color-accent);
}

.faq-item h3 {
    font-size: var(--fs-body-hl);
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
    margin-bottom: 1.6rem;
    line-height: 1.4;
}

.faq-item p {
    font-size: var(--fs-body);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.faq-item .accent {
    font-style: normal;
}

/* ============================================
   SECTION CONTACT
   ============================================ */

section#contact {
    margin-top: 8rem;
}

section#contact .section-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-accent);
    margin-bottom: 1.6rem;
}

section#contact h2 {
    font-size: var(--fs-header);
    line-height: 1.1;
    margin-bottom: 8rem;
}

section#contact h2 .arrow {
    font-size: 0.3em;
    font-style: normal;
    vertical-align: 4rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

section#contact h2 a:hover .arrow {
    transform: translateY(-0.8rem);
}

section#contact h2 a {
    display: inline-block;
    transition: transform 0.2s ease;
}

section#contact h2 a:hover {
    transform: translateX(0.8rem);
}

.contact-infos {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #252525;
    padding-top: 4.8rem;
    padding-bottom: 4.8rem;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.contact-info-item a,
.contact-info-item p {
    font-size: var(--fs-body-hl);
    color: var(--color-text-primary);
}

.contact-info-item a:hover {
    color: var(--color-accent);
    transition: color 0.2s ease;
}


/* ============================================================
   ANIMATIONS & KEYFRAMES  ← toujours à la fin
   ============================================================ */

@keyframes wiggle {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(-8deg); }
    30%  { transform: rotate(8deg); }
    45%  { transform: rotate(-6deg); }
    60%  { transform: rotate(6deg); }
    75%  { transform: rotate(-3deg); }
    90%  { transform: rotate(3deg); }
    100% { transform: rotate(0deg); }
}

.logo img:hover,
.footer-logo img:hover {
    animation: wiggle 0.6s ease;
    /* pas de infinite = s'arrête après 1 cycle */
}

@keyframes progress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ============================================================
   MARQUEE — Bandeau défilement infini
   ============================================================ */
   /* L'animation : on translate de 0% à -100% sur l'axe X
   = la liste glisser vers la gauche de toute sa largeur
   Quand elle atteint -100%, elle repart à 0% -> boucle invisible */

@keyframes defiler {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* ============================================================
   TEXT REVEAL — Apparition au scroll
   ============================================================ */

/* --- Effet 1 : slide depuis la droite → gauche --- */
.reveal {
    opacity: 0;
    /* On décale l'élément de 80px vers la droite au départ */
    transform: translateX(80px);

    /* La transition anime le passage vers l'état "visible" */
    transition: opacity 0.8s ease, transform 0.8s ease
}

/* État final : quand JS ajoute la classe "visible" */
.reveal.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Effet 2 : bas vers haut, prononcé et lent --- */
.section-label {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.1s ease, transform 1.1s ease;
}
.section-label.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   CURSOR — Luciole lumineux
   ============================================================ */

/* Cache le curseur natif sur toute la page */
* {
    cursor: none !important;
}
.curseur-luciole {
    /* Taille de base de la luciole */
    width: 12px;
    height: 12px;

    /* Position fixe = reste dans le viewport même en scrollant */
    position: fixed;

    /* Centrage - le point d'ancrage est au centre de la luciole */
    transform: translate(-50%, -50%);

    border-radius: 50%;
    background: #b3e412;

    /* Halos lumineux — plusieurs couche de box-shadows */
    box-shadow:
        0 0 8px 3px #b3e412,
        0 0 20px 6px rgba(179, 228, 18, 0.5),
        0 0 40px 10px rgba(179, 228, 18, 0.2);

    /* Passe au-dessus de tout */
    z-index: 9999;

    /* Ne bloque pas les clics sur les élémenta en dessous */
    pointer-events: none;

    /* Transition smooth pour le zoom */
    transition: width 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
}

/* État agrandi - survol d'un élément cliquable */
.curseur-luciole.curseur-agrandi {
    width: 28px;
    height: 28px;

    /* Halo plus intense */
    box-shadow:
        0 0 12px 5px #b3e412,
        0 0 30px 10px rgba(179, 228, 18, 0.6),
        0 0 60px 15px rgba(179, 228, 18, 0.3);
}

/* ============================================================
   FIREFLIES — Lucioles hero
   ============================================================ */

.luciole-hero {
    position: absolute;
    border-radius: 50%;
    background: #b3e412;
    pointer-events: none;

    /* Halo Lumineux */
    box-shadow:
        0 0 6px 2px #b3e412,
        0 0 14px 4px rgba(179, 228, 18, 0.4);

    /* Animation clignotement — utilise nos variables CSS */
    animation: clignoter var(--duree) var(--delai) infinite ease-in-out;

    /* Transition smooth pour le mouvement entre positions */
    transition: left 2.5s ease-in-out, top 2.5s ease-in-out;
}

@keyframes clignoter {
    0%, 100% { opacity: 0.15; transform: scale(0.8); }
    50%       { opacity: 1;   transform: scale(1.3); }
}


/* ============================================================
   RESPONSIVE MOBILE
   ============================================================ */

@media (max-width: 992px) {
    /* curseur luciole désacctivé sur mobile */
    .curseur-luciole {
        display: none;
    }

    * {
        cursor: auto !important;
    }

    .logo img {
        height: 8rem;
    }

    header {
        padding: 0.8rem clamp(2rem, 8vw, 6.4rem);
    }

    section#hero {
        overflow: visible;
        min-height: auto;
        
        background: none;
    }
    .btn {
        position: relative;
        margin-top: 4rem;
        align-self: flex-start;
        display: inline-block;
        width: auto;
        background-clip: border-box;
        bottom: auto;
        right: auto;
    }

    .scroll-indicator {
        display: none;
    }

    #stack ul li {
        font-size: 3.2rem;
    }

    /* JSON */
    .json-viewer {
        max-width: 100%;
        overflow-x: auto;
    }

    .json-viewer pre {
        font-size: 1.1rem;
    }

    /* Services */
    .services {
        flex-direction: column;
    }

    .projets-grid {
        flex-direction: column;
    }

    .projet-card {
        width: 100%;
    }

    .cv-pin-conteneur {
        height: auto !important;
    }

    .cv-sticky {
        position: static !important;
        height: auto !important;
    }

    .cv-track {
        flex-direction: column;
        padding-left: 0;
        padding-right: 0;
    }

    .cv-card {
        min-width: 100%;
        max-width: 100%;
    }

    .contact-infos {
        flex-direction: column;
        gap: 2.4rem;
    }

    section {
        scroll-margin-top: 8rem;
    }

    section#contact h2 {
        font-size: clamp(4.8rem, 15vw, 8rem);
        margin-bottom: 4rem;
    }

    footer {
        flex-direction: column;
        gap: 1.6rem;
        text-align: center;
    }

    .footer-copyright,
    .footer-built {
        text-align: center;
    }

  /* -- NAVIGATION --- */

    .nav-hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 0.8rem;
        cursor: pointer;
        z-index: 200;
        position: relative;
    }

    .nav-hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--color-text-primary);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

  /* Animation hamburger -> croix quand .open */
    nav.open .nav-hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    nav.open .nav-hamburger span:nth-child(2) {
        opacity: 0;
    }
    nav.open .nav-hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .logo {
        position: relative;
        z-index: 200;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.8rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.98);
        padding: 0 clamp(2rem, 8vw, 6.4rem);
        z-index: 150;
        display: flex;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        overflow: hidden;
    }

    /* Menu ouvert */
    nav.open ul {
        transform: translateY(0);
        display: flex;
    }

    nav ul li a {
        font-size: clamp(3.2rem, 5vw, 6.4rem);
        font-weight: var(--fw-bold);
    }

    .nav-contact {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 4rem;
        margin-top: 2.4rem;
        border-top: 1px solid #252525;
        padding-top: 2.4rem;
    }
    .nav-contact a {
        font-family: var(--font-mono);
        font-size: 1.1rem;
        color: var(--color-text-secondary);
        text-transform: lowercase;
    }
    .nav-contact p {
        font-family: var(--font-mono);
        font-size: 1.1rem;
        color: var(--color-text-secondary);
    }

    section#contact h2 .arrow {
        vertical-align: 1rem;
        font-size: 0.4em;
    }

    .wrapper {
        overflow-x: hidden;
    }
}

/* ============================================================
   RESPONSIVE TABLETTE
   ============================================================ */
@media (min-width: 993px) and (max-width: 1279px) {
    .cv-pin-conteneur {
        height: auto !important;
    }

    .cv-sticky {
        position: static !important;
        height: auto !important;
    }

    .cv-track {
        flex-direction: column;
        padding-left: 0;
        padding-right: 0;
    }

    .cv-card {
        min-width: 100%;
        max-width: 100%;
    }

    .curseur-luciole {
        display: none;
    }

    * {
        cursor: auto !important;
    }

    section#hero {
        background: none;
        padding-top: 10rem;
        min-height: 80rem;
    }
}
/* ============================================================
   RESPONSIVE LAPTOP
   ============================================================ */
@media (min-width: 1280px) and (max-width: 1920px) {
    section#hero {
        padding-top: 4rem;
        min-height: 80rem;
    }
    section {
        scroll-margin-top: 10rem;
    }

    .logo img {
        height: 11rem;
    }
    div.cv-card {
        min-height: 55rem !important;
    }

    .cv-sticky {
        top: 11rem;
        height: calc(100vh - 11rem);
    }
}
