/* Bac Pro CIEL — Lycée Champollion, Figeac
   Style « liquid glass » : panneaux de verre translucide posés sur une aurore
   animée (lime, turquoise, bleu). Corail / bleu ciel / ambre = C · I · EL.
   Toutes les animations s'arrêtent si l'utilisateur a demandé moins de mouvement. */

:root {
    color-scheme: dark;
    --bg: #05060a;
    --text: #f5f6f8;
    --text-2: #a9aeb7;
    --muted: #737a84;
    --accent: #c6f24e;
    --accent-2: #dcff7a;
    --accent-ink: #0b1000;
    --accent-soft: rgba(198, 242, 78, .12);
    --coral: #ff7c6b;
    --sky: #6ec6ff;
    --amber: #ffbf5a;
    --teal: #3ee8c8;
    --violet: #7b8cff;

    /* Verre liquide : plus clair qu'un verre dépoli, avec des reflets intérieurs
       en haut (lumière) et en bas (lumière qui traverse l'épaisseur). */
    --glass: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .025) 55%, rgba(255, 255, 255, .045));
    --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, .06));
    --glass-blur: blur(18px) saturate(190%) brightness(1.06);
    --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 0 14px 22px -18px rgba(255, 255, 255, .35), inset 0 -18px 26px -22px rgba(255, 255, 255, .16);
    --glass-drop: 0 1px 1px rgba(0, 0, 0, .3), 0 12px 28px -14px rgba(0, 0, 0, .7), 0 34px 70px -36px rgba(0, 0, 0, .9);
    --spring: cubic-bezier(.34, 1.45, .64, 1);
    --ease: cubic-bezier(.2, .8, .2, 1);

    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* Angle de la lumière (mis à jour par js/liquid-glass.js selon la souris). */
@property --light { syntax: "<angle>"; inherits: true; initial-value: 160deg; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { flex: 1 0 auto; }

img, svg { max-width: 100%; }

a { color: var(--accent); }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: var(--text);
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}

.icon {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--accent);
    font: 500 12px/1.4 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gradient-text {
    background: linear-gradient(180deg, #fff 25%, rgba(255, 255, 255, .6));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Aurore animée derrière le verre --- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(1200px 700px at 50% -15%, rgba(198, 242, 78, .08), transparent 60%), var(--bg);
}

.aurora i {
    position: absolute;
    width: 62vmax;
    height: 62vmax;
    border-radius: 50%;
    opacity: .55;
    will-change: transform;
}

.aurora i:nth-child(1) { left: -22vmax; top: -26vmax; background: radial-gradient(circle, rgba(198, 242, 78, .42), transparent 62%); animation: drift-a 24s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { right: -24vmax; top: -6vmax; background: radial-gradient(circle, rgba(62, 232, 200, .34), transparent 62%); animation: drift-b 30s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { left: 18vmax; bottom: -34vmax; background: radial-gradient(circle, rgba(123, 140, 255, .32), transparent 62%); animation: drift-c 36s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { right: 6vmax; bottom: -10vmax; width: 34vmax; height: 34vmax; background: radial-gradient(circle, rgba(255, 124, 107, .18), transparent 62%); animation: drift-b 28s ease-in-out infinite alternate-reverse; }

@keyframes drift-a { to { transform: translate(22vmax, 16vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-18vmax, 20vmax) scale(.88); } }
@keyframes drift-c { to { transform: translate(-14vmax, -18vmax) scale(1.18); } }

/* --- Verre liquide (cartes, fenêtres, panneaux) --- */
.spot {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 28px;
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-edge), var(--glass-drop);
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .7s var(--spring), border-color .3s, box-shadow .3s, --light .5s var(--ease);
}

/* Reflet sur l'arête du verre, tourné vers la lumière */
.spot::after,
.glass-rim::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.2px;
    border-radius: inherit;
    background: linear-gradient(var(--light), rgba(255, 255, 255, .75), rgba(255, 255, 255, .16) 18%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, .26));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Lumière qui suit la souris (derrière le contenu de la carte) */
.spot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(480px circle at var(--x, 50%) var(--y, -30%), rgba(255, 255, 255, .09), rgba(198, 242, 78, .05) 30%, transparent 55%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.spot:hover { border-color: rgba(255, 255, 255, .16); box-shadow: var(--glass-edge), var(--glass-drop), 0 30px 80px -40px rgba(198, 242, 78, .35); }
.spot:hover::before { opacity: 1; }

.tile {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03));
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .25), 0 8px 20px -10px rgba(0, 0, 0, .8);
    transition: transform .5s var(--spring);
}

.spot:hover .tile { transform: translateY(-3px) scale(1.06); }
.tile.c { color: var(--coral); }
.tile.i { color: var(--sky); }
.tile.el { color: var(--amber); }
.tile.iot { color: var(--teal); }
.tile.ac { color: var(--accent); }

/* --- Barre de navigation flottante en verre --- */
.nav-bande-bleue {
    position: sticky;
    top: 12px;
    z-index: 30;
    margin-top: 12px;
    padding: 0 12px;
}

.nav-bande-bleue .container {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 1180px;
    min-height: 60px;
    padding: 0 10px 0 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .05));
    -webkit-backdrop-filter: blur(14px) saturate(190%) brightness(1.06);
    backdrop-filter: blur(14px) saturate(190%) brightness(1.06);
    box-shadow: var(--glass-edge), var(--glass-drop);
    transition: max-width .8s var(--spring), min-height .5s var(--ease), padding .5s var(--ease), background-color .3s, box-shadow .3s, --light .5s var(--ease);
    animation: drop-in .9s var(--spring) both;
}

.nav-bande-bleue .container::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.2px;
    border-radius: inherit;
    background: linear-gradient(var(--light), rgba(255, 255, 255, .75), rgba(255, 255, 255, .16) 18%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, .26));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.nav-bande-bleue.scrolled .container {
    min-height: 54px;
    background: linear-gradient(180deg, rgba(30, 33, 40, .55), rgba(14, 15, 20, .45));
}

/* En descendant, la barre se rétracte en capsule (comme la barre d'onglets d'iOS 26). */
.nav-bande-bleue.compact .container { max-width: var(--compact-width, 720px); padding-left: 8px; }
.site-wordmark span { max-width: 240px; overflow: hidden; white-space: nowrap; transition: max-width .6s var(--ease), opacity .3s; }
.nav-bande-bleue.compact .site-wordmark span { max-width: 0; opacity: 0; }
.nav-bande-bleue.compact .site-wordmark { gap: 0; }
.nav-bande-bleue.compact .user-badge { display: none; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-16px) scale(.98); } }

.site-wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    color: var(--text);
    text-decoration: none;
}

.site-wordmark img {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
    transition: transform .6s var(--spring);
}

.site-wordmark:hover img { transform: rotate(-12deg) scale(1.08); }
.site-wordmark span { display: flex; flex-direction: column; line-height: 1.2; }
.site-wordmark strong { font-family: var(--display); font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.site-wordmark small { color: var(--muted); font-size: 12px; }

.nav-links {
    position: relative;
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 4px;
    list-style: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, .22);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), inset 0 -1px 0 rgba(255, 255, 255, .05);
}

.nav-links a {
    position: relative;
    z-index: 1;
    display: block;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active { background: rgba(255, 255, 255, .12); }
.nav-links.has-blob a.active { background: none; }
.nav-links .separator { display: none; }

/* Pastille « liquide » qui glisse sous le lien survolé */
.nav-blob {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .3), inset -1px -1px 0 rgba(255, 255, 255, .06), 0 4px 14px -4px rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

/* --- Statut de connexion --- */
#login-status { display: flex; align-items: center; min-height: 34px; }

.account-login-link,
.account-space-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff, #dfe3e8);
    color: #0a0a0a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 #fff, 0 6px 16px -6px rgba(255, 255, 255, .45);
    transition: transform .35s var(--spring), box-shadow .3s;
}

.account-login-link:hover,
.account-space-link:hover { transform: translateY(-1px) scale(1.03); box-shadow: inset 0 1px 0 #fff, 0 10px 24px -8px rgba(255, 255, 255, .55); }

.account-actions { display: flex; align-items: center; gap: 14px; }

.user-badge {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    line-height: 1.25;
    text-align: right;
}

.user-badge small { color: var(--muted); font-size: 12px; }

.account-logout-link { color: var(--text-2); font-size: 14px; text-decoration: none; transition: color .2s; }
.account-logout-link:hover { color: var(--coral); }

/* --- Boutons (pilules de verre) --- */
.btn-action,
.btn-admin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: transform .4s var(--spring), box-shadow .3s, background-color .2s, border-color .2s;
}

.btn-action {
    background: linear-gradient(180deg, var(--accent-2), var(--accent) 55%, #a9d932);
    color: var(--accent-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 6px rgba(60, 90, 0, .25), 0 12px 32px -12px rgba(198, 242, 78, .8);
}

.btn-admin {
    border-color: rgba(255, 255, 255, .14);
    background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
    color: var(--text);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -14px rgba(0, 0, 0, .9);
}

.btn-action:hover,
.btn-admin:hover { transform: translateY(-2px) scale(1.02); }
.btn-action:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 6px rgba(60, 90, 0, .25), 0 18px 40px -12px rgba(198, 242, 78, .95); }
.btn-admin:hover { border-color: rgba(255, 255, 255, .26); }
/* Pression « gel » : le bouton s'écrase puis rebondit. */
.btn-action:active,
.btn-admin:active,
.hero-text-link:active,
.account-login-link:active,
.account-space-link:active { transform: scale(.94); transition-duration: .12s; }

/* Reflet qui balaie le bouton au survol */
.btn-action::before,
.btn-admin::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.btn-action:hover::before,
.btn-admin:hover::before { opacity: 1; animation: sweep .8s var(--ease); }

@keyframes sweep { to { left: 120%; } }

.btn-action::after,
.btn-admin::after { content: "→"; font-weight: 400; transition: transform .4s var(--spring); }
.btn-action:hover::after,
.btn-admin:hover::after { transform: translateX(4px); }

/* --- Grille et halo des en-têtes --- */
.glow { position: relative; isolation: isolate; overflow: hidden; overflow-x: clip; overflow-y: visible; }

.glow::before {
    content: "";
    position: absolute;
    inset: -60px 0 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 0%, #000 15%, transparent 70%);
    mask-image: radial-gradient(ellipse 65% 55% at 50% 0%, #000 15%, transparent 70%);
    animation: grid-pan 30s linear infinite;
    pointer-events: none;
}

@keyframes grid-pan { to { background-position: center 56px; } }

/* --- Accueil : en-tête --- */
.hero-section { padding: 110px 0 60px; text-align: center; }
.hero-section .container { position: relative; display: flex; flex-direction: column; align-items: center; }

/* Tuiles de verre qui flottent autour du titre (elles déforment la grille derrière elles). */
.float-tiles { position: absolute; inset: 0; pointer-events: none; }

.ftile {
    position: absolute;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .02) 60%, rgba(255, 255, 255, .05));
    -webkit-backdrop-filter: blur(6px) saturate(190%) brightness(1.1);
    backdrop-filter: blur(6px) saturate(190%) brightness(1.1);
    box-shadow: var(--glass-edge), 0 26px 44px -22px rgba(0, 0, 0, .95);
    animation: float 9s ease-in-out infinite, rise 1.2s var(--ease) both;
}

.ftile .icon { width: 34px; height: 34px; stroke-width: 1.6; filter: drop-shadow(0 0 10px currentColor); }
.ftile.c { left: 1%; top: 70px; color: var(--coral); --r: -12deg; }
.ftile.i { right: 2%; top: 46px; color: var(--sky); --r: 10deg; animation-delay: -2.5s, .2s; }
.ftile.el { left: 7%; top: 300px; width: 70px; height: 70px; border-radius: 22px; color: var(--amber); --r: 9deg; animation-delay: -5s, .35s; }
.ftile.iot { right: 8%; top: 290px; width: 64px; height: 64px; border-radius: 20px; color: var(--teal); --r: -8deg; animation-delay: -7s, .5s; }
.ftile.el .icon, .ftile.iot .icon { width: 28px; height: 28px; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--r)); }
    50% { transform: translateY(-16px) rotate(calc(var(--r) * -.5)); }
}
.hero-text { display: flex; flex-direction: column; align-items: center; max-width: 880px; }

@keyframes rise {
    from { opacity: 0; translate: 0 22px; filter: blur(8px); }
    to { opacity: 1; translate: 0 0; filter: none; }
}

.hero-text > * { animation: rise 1s var(--ease) both; }
.hero-text > :nth-child(1) { animation-delay: .1s; }
.hero-text > :nth-child(2) { animation-delay: .2s; }
.hero-text > :nth-child(3) { animation-delay: .32s; }
.hero-text > :nth-child(4) { animation-delay: .42s; }
.hero-text > :nth-child(5) { animation-delay: .52s; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 5px 14px 5px 6px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .2);
    color: var(--text-2);
    font-size: 13px;
}

.hero-kicker b {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.hero-kicker b::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(198, 242, 78, .7);
    animation: ping 2s ease-out infinite;
}

@keyframes ping { 70%, 100% { box-shadow: 0 0 0 7px rgba(198, 242, 78, 0); } }

.hero-section h1 {
    margin: 0;
    font-size: clamp(3.3rem, 10vw, 7.2rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: .95;
}

.hero-section h1 span {
    background: linear-gradient(100deg, #9fd02a 10%, var(--accent) 30%, #f4ffc4 45%, var(--accent) 60%, var(--teal) 90%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: sheen 8s ease-in-out infinite;
}

@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.subtitle {
    margin: 24px 0 0;
    color: var(--text);
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 500;
    letter-spacing: -.01em;
}

.subtitle b { font-weight: 750; }
.subtitle .c { color: var(--coral); }
.subtitle .i { color: var(--sky); }
.subtitle .el { color: var(--amber); }

.intro-text { max-width: 58ch; margin: 14px 0 0; color: var(--text-2); font-size: 1.05rem; }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

.hero-text-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -14px rgba(0, 0, 0, .9);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .4s var(--spring), border-color .2s;
}

.hero-text-link:hover { transform: translateY(-2px) scale(1.02); border-color: rgba(255, 255, 255, .26); }
.hero-text-link::after { content: "↓"; font-weight: 400; transition: transform .4s var(--spring); }
.hero-text-link:hover::after { transform: translateY(3px); }

/* --- Apparition au défilement (activée par le script) --- */
html.reveal-on .reveal {
    opacity: 0;
    translate: 0 34px;
    scale: .97;
    filter: blur(6px);
    transition: opacity .9s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s), scale .9s var(--ease) var(--d, 0s), filter .9s var(--ease) var(--d, 0s), transform .6s var(--ease), border-color .3s, box-shadow .3s;
}

html.reveal-on .reveal.is-visible { opacity: 1; translate: 0 0; scale: 1; filter: none; }

.learning-grid .reveal:nth-child(2) { --d: .08s; }
.learning-grid .reveal:nth-child(3) { --d: .16s; }
.learning-grid .reveal:nth-child(4) { --d: .24s; }

/* --- Accueil : la formation --- */
.formation { padding-top: 110px; padding-bottom: 40px; }

.section-head { max-width: 700px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin: 0 0 16px; font-size: clamp(2rem, 4.8vw, 3.2rem); }
.section-head p { margin: 0; color: var(--text-2); font-size: 1.08rem; }

.grid-title { margin: 0 0 16px; color: var(--text-2); font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; }

.learning-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.learning-grid article { padding: 26px 24px 28px; }
.learning-grid strong { position: relative; display: block; margin: 24px 0 6px; font-family: var(--display); font-size: 1.14rem; font-weight: 650; letter-spacing: -.01em; }
.learning-grid p { position: relative; margin: 0; color: var(--text-2); font-size: .97rem; }

.parcours {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr);
    gap: 28px;
    align-items: center;
    margin-top: 16px;
    padding: 30px;
}

.parcours .tile { margin-bottom: 18px; }
.parcours h3 { margin: 0 0 6px; font-size: 1.25rem; }
.parcours p { margin: 0; color: var(--text-2); }

.steps { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }

.steps li {
    position: relative;
    flex: 1;
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .1);
    color: var(--text-2);
    font: 500 13px var(--mono);
    text-align: center;
    white-space: nowrap;
}

.steps li:last-child { border-color: rgba(198, 242, 78, .45); background: var(--accent-soft); color: var(--accent); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .15), 0 0 30px -8px rgba(198, 242, 78, .5); }
.steps .sep { flex: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted); }

/* Les étapes s'allument l'une après l'autre quand la carte apparaît */
html.reveal-on .parcours .steps li:not(.sep) { opacity: .25; transition: opacity .5s, translate .5s var(--spring); translate: 0 6px; }
html.reveal-on .parcours.is-visible .steps li:not(.sep) { opacity: 1; translate: 0 0; }
html.reveal-on .parcours.is-visible .steps li:nth-child(3) { transition-delay: .25s; }
html.reveal-on .parcours.is-visible .steps li:nth-child(5) { transition-delay: .5s; }
html.reveal-on .parcours.is-visible .steps li:nth-child(7) { transition-delay: .75s; }

/* Bandeau d'accès */
.cta-band { padding: 100px 0 120px; }

.cta-band .container > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 68px 32px;
    border-radius: 32px;
    text-align: center;
    --glass: var(--glass-strong);
}

.cta-band .tile { margin-bottom: 22px; }
.cta-band h2 { position: relative; margin: 0 0 12px; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.cta-band p { position: relative; max-width: 52ch; margin: 0 0 30px; color: var(--text-2); }

/* --- Pages intérieures --- */
.page-hero { padding: 72px 0 8px; }
.page-header { max-width: 720px; margin-bottom: 56px; }
.page-header > * { animation: rise .9s var(--ease) both; }
.page-header > :nth-child(2) { animation-delay: .1s; }
.page-header > :nth-child(3) { animation-delay: .2s; }
.page-header h1 { margin: 0 0 16px; font-size: clamp(2.5rem, 6vw, 4.3rem); font-weight: 700; letter-spacing: -.05em; }
.page-header p { margin: 0; color: var(--text-2); font-size: 1.1rem; }
.page-header.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 120px;
}

.grid-container > .section-card { animation: rise 1s .25s var(--ease) both; }
.grid-container > .section-card + .section-card { animation-delay: .38s; }

.section-card { padding: 10px; }

.section-head-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 18px 20px; }
.section-head-row h2 { margin: 0; font-size: 1.35rem; }
.section-head-row p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }

.content-box {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 16px;
    margin-top: 8px;
    padding: 20px 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(0, 0, 0, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: background-color .3s, border-color .3s, translate .5s var(--spring);
}

.content-box:hover { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); translate: 4px 0; }
.content-box .tile { grid-row: span 3; width: 40px; height: 40px; border-radius: 12px; }
.content-box h3 { margin: 6px 0 2px; font-size: 1.08rem; letter-spacing: -.01em; }
.content-box p { margin: 0 0 16px; color: var(--text-2); font-size: .97rem; }
.content-box button { justify-self: start; }

/* --- Connexion --- */
.auth-panel { max-width: 440px; margin: 0 auto 120px; padding: 34px; border-radius: 28px; animation: rise 1s .25s var(--ease) both; --glass: var(--glass-strong); }
.auth-panel h2 { position: relative; margin: 0 0 4px; font-size: 1.35rem; }
.auth-panel > p { position: relative; margin: 0; color: var(--text-2); }
.auth-panel form { position: relative; }

.field { display: block; margin-top: 18px; color: var(--text-2); font-size: 14px; font-weight: 500; }

.field input {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 7px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(0, 0, 0, .28);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45);
    color: var(--text);
    font: inherit;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.field input::placeholder { color: #5d636c; }
.field input:focus { outline: none; border-color: rgba(198, 242, 78, .7); background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45), 0 0 0 4px rgba(198, 242, 78, .14); }

.auth-actions { display: grid; gap: 10px; margin-top: 26px; }
.auth-help { margin: 18px 0 0; font-size: 14px; text-align: center; }
.auth-help a { color: var(--text-2); transition: color .2s; }
.auth-help a:hover { color: var(--accent); }
#message-auth:empty { display: none; }

/* --- Pied de page --- */
.footer-credits {
    margin-top: auto;
    padding: 28px 0;
    border-top: 1px solid rgba(255, 255, 255, .07);
    background: rgba(5, 6, 10, .5);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--muted);
    font-size: 14px;
}

.footer-flex { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.text-credits p { margin: 0; }
.site-logo { display: block; width: 38px; height: 38px; border-radius: 50%; background: #fff; opacity: .9; transition: transform .6s var(--spring); }
.site-logo:hover { transform: rotate(-12deg) scale(1.08); }

/* Un libellé garde sa couleur et sa taille dans les blocs qui stylent leurs paragraphes. */
p.label { margin: 0 0 16px; color: var(--accent); font-size: 12px; }

/* --- Responsive --- */
@media (max-width: 1100px) {
    .user-badge { display: none; }
    .float-tiles { display: none; }
}

@media (max-width: 1000px) {
    .learning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .parcours { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-bande-bleue { top: 8px; margin-top: 8px; padding: 0 8px; }
    .nav-bande-bleue .container { flex-wrap: wrap; gap: 10px 14px; padding: 10px 10px 10px 12px; border-radius: 28px; }
    .nav-links { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
    .nav-links::-webkit-scrollbar { display: none; }
    .grid-container { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .nav-bande-bleue { position: relative; top: 0; }
    .hero-section { padding-top: 52px; }
    .hero-kicker { flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .hero-actions { flex-direction: column; align-self: stretch; }
    .learning-grid { grid-template-columns: 1fr; }
    .steps { flex-wrap: wrap; }
    .steps .sep { display: none; }
    .steps li { flex: 1 1 40%; }
    .formation { padding-top: 88px; }
    .page-hero { padding-top: 44px; }
    .auth-panel { padding: 26px 20px; }
    .footer-flex { flex-direction: column-reverse; align-items: flex-start; }
}

/* Navigateur sans flou d'arrière-plan : panneaux opaques pour rester lisible. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .spot, .nav-bande-bleue .container, .hero-kicker, .btn-admin, .hero-text-link { background: rgba(18, 20, 26, .94); }
}

/* Moins de mouvement demandé : tout s'affiche directement, sans animation. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
