/* ========================================
   INDEX / HERO PAGE
   (couleurs & typo : voir theme.css)
   ======================================== */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Section héros */
.hero {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #16181d;   /* fallback sombre derrière la photo, quel que soit le mode */
}

/* Calque image séparé → permet le zoom lent (ken burns) */
.hero-bg {
    position: absolute;
    inset: -2%;                 /* déborde un peu pour masquer les bords au scale */
    background-image: url('corrige_par_gpt/img/hero/hero_desktop.jpg');
    background-image: image-set(
        url('corrige_par_gpt/img/hero/hero_desktop.webp') type('image/webp'),
        url('corrige_par_gpt/img/hero/hero_desktop.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: kenburns 24s ease-in-out infinite alternate;
}

/* Fondu d'arrivée du fond aléatoire (piloté par JS) */
.hero-bg.js-fade { opacity: 0; transition: opacity 1.1s ease; }
.hero-bg.js-fade.shown { opacity: 1; }

@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.1); }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.40) 0%,
            rgba(0, 0, 0, 0.62) 100%
        );
}

.overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

/* Entrée chorégraphiée : les éléments arrivent en cascade au chargement */
.hero-tag        { animation: fadeInUp .7s ease-out both .15s; }
.hero-name       { animation: fadeInUp .8s ease-out both .30s; }
.overlay .stripe { animation: stripeGrow .6s ease-out both .58s; }
.hero-subtitle   { animation: fadeInUp .7s ease-out both .74s; }
.hero-nav        { animation: fadeInUp .7s ease-out both .90s; }

/* Sur-titre type "chrono" */
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 22px;
}

.hero-name {
    display: block;
    width: 100%;
    margin: 0;
    line-height: 0;          /* supprime l'espace sous le SVG */
}

.hero-name svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Variante mobile (2 lignes) masquée par défaut */
.hero-name .hero-svg-mobile { display: none; }

.hero-name text {
    font-family: var(--font-title);
    font-variation-settings: "YEAR" 1979;
    font-weight: 400;
    font-size: 90px;          /* en unités du viewBox (hauteur 90) */
    fill: #fff;
}

/* #4 « Accent vivant » : le titre arrive en blanc, puis le C s'allume
   en orange avec un flash lumineux (clin d'œil au « .lights »). */
.hero-name .accent {
    fill: var(--orange);
    animation: lightUp .7s ease-out both 1.15s;
}

@keyframes lightUp {
    0%   { fill: #ffffff; filter: drop-shadow(0 0 0 rgba(238, 165, 39, 0)); }
    55%  { fill: var(--orange); filter: drop-shadow(0 0 3px rgba(238, 165, 39, .45)); }
    100% { fill: var(--orange); filter: drop-shadow(0 0 0 rgba(238, 165, 39, 0)); }
}

/* La bande signature, centrée sous le nom */
.overlay .stripe {
    margin: 26px 0 22px;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 300;
    margin: 0 0 36px 0;
    opacity: 0.92;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.hero-nav {
    display: flex;
    gap: 44px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-nav a {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.15rem;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--t);
}

.hero-nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--orange);
    position: absolute;
    bottom: -4px;
    left: 50%;
    transition: width var(--t), left var(--t);
}

.hero-nav a:hover { color: var(--orange-amber); }

.hero-nav a:hover::after {
    width: 100%;
    left: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-bg {
        background-image: url('corrige_par_gpt/img/hero/hero_mobile.jpg');
        background-image: image-set(
            url('corrige_par_gpt/img/hero/hero_mobile.webp') type('image/webp'),
            url('corrige_par_gpt/img/hero/hero_mobile.jpg') type('image/jpeg')
        );
    }

    .hero-nav {
        flex-direction: row;
        gap: 28px;
    }

    /* Titre sur 2 lignes pleine largeur */
    .hero-name .hero-svg-desktop { display: none; }
    .hero-name .hero-svg-mobile { display: block; }
    .hero-name .hero-svg-mobile + .hero-svg-mobile { margin-top: 3vw; }
}

@media (max-width: 480px) {
    .hero-tag { font-size: 0.68rem; letter-spacing: 0.22em; }
    .hero-subtitle { font-size: 0.8rem; letter-spacing: 0.24em; }
    .hero-nav a { font-size: 1rem; }
}
