@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');

/* =========================================================================
   PORTFOLIO MILO PERROT — DESIGN SYSTEM "CYBER-PASTEL LUMINEUX"
   Stack : HTML5 / CSS3 natif / JS Vanilla
   Esthétique : fond bleu ciel pastel clair, cartes beige, encre bleu nuit,
   accents color-block et ombres solides nettes. Lumineux, apaisant, mais net.
   ========================================================================= */

/* =========================================================================
   1. VARIABLES & PALETTE
   ========================================================================= */
:root {
    /* Fonds clairs */
    --bg-sky:    #E3F2FD;   /* fond principal (bleu ciel pastel) */
    --bg-sky-2:  #CFE7FB;   /* bas du dégradé, un poil plus soutenu */

    /* Encre & bleus */
    --ink:        #16263F;  /* bleu nuit : texte, bordures, ombres */
    --ink-soft:   #46566E;  /* texte secondaire */
    --blue-deep:  #1E4380;  /* bleu titres / liens */
    --azure:      #2F6FE0;  /* bleu vif (accent doux) */
    --green-fir:  #00492C;  /* vert sapin (compat) */

    /* Accents color-block */
    --yellow:   #FBBA16;
    --red:      #00492C;    /* "rouge" remplacé par le vert sapin profond (design cyber-pastel) */
    --sky:      #9BCCDD;
    --pink:     #E2B2B4;
    --mint:     #A7E0C8;
    --lavender: #C9C2F0;

    /* Neutres */
    --cream: #FBF3E1;       /* beige des cartes / cadres d'écriture */
    --white: #ffffff;

    /* Alias rétro-compatibles (anciens styles inline) */
    --primary:   var(--blue-deep);
    --secondary: var(--sky);
    --accent:    var(--yellow);
    --bg-light:  var(--cream);
    --text-dark: var(--ink);
    --slate:     var(--bg-sky);
    --slate-low: var(--bg-sky-2);

    /* Typographies */
    --font-heading: 'Indie Flower', 'Comic Sans MS', cursive;
    --font-body:    'Quicksand', 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Consolas', ui-monospace, monospace;

    /* Ombres solides */
    --shadow-hard:    6px 6px 0 var(--ink);
    --shadow-hard-lg: 9px 9px 0 var(--ink);
    --shadow-soft:    0 14px 30px rgba(22, 38, 63, 0.12);
    --border-block:   3px solid var(--ink);
    --radius: 16px;
}

/* =========================================================================
   2. RESET & BASE
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: linear-gradient(180deg, var(--bg-sky) 0%, var(--bg-sky-2) 100%) fixed;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Chargement de page natif et instantané : aucune transition d'entrée/sortie. */

/* On respecte la préférence "réduire les animations" partout */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;           /* Indie Flower : jambages (g, y, p) bien dégagés */
    letter-spacing: 0.5px;
    color: var(--ink);
}

p { margin-bottom: 1rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

img { max-width: 100%; display: block; }

main { flex: 1 0 auto; }

::selection { background: var(--yellow); color: var(--ink); }

/* Décale les ancres pour qu'elles ne passent pas sous la navbar fixe */
[id] { scroll-margin-top: 100px; }

/* Titre de section générique */
.section-title {
    text-align: center;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    color: var(--ink);
    margin: 0 auto 3rem auto;
    position: relative;
    width: fit-content;
    max-width: 100%;
}
.section-title::after {
    content: "";
    display: block;
    width: 70%;
    height: 6px;
    margin: 0.4rem auto 0;
    background: var(--yellow);
    border-radius: 6px;
}

/* Étiquette terminal (petit easter egg cyber) */
.terminal-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    background: var(--ink);
    color: var(--sky);
    padding: 6px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.terminal-tag .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #ff5f56;        /* feu tricolore authentique d'une fenêtre de terminal */
    box-shadow: 16px 0 0 var(--yellow), 32px 0 0 #4caf50;
    margin-right: 30px;
}

/* =========================================================================
   3. CURSEUR BINAIRE (canvas plein écran, géré par cursor-binary.js)
   ========================================================================= */
#binary-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* =========================================================================
   3bis. FOND DYNAMIQUE — vraies formes organiques (blobs) aux contours nets
   qui flottent, tournent et se déforment lentement. Conteneur injecté en JS
   (main.js) sur toutes les pages, posé derrière tout le contenu (z-index < 0).
   La parallaxe (translateY) est posée en JS sur .blob ; la forme, la couleur
   et l'animation vivent sur ::before pour ne pas entrer en conflit.
   ========================================================================= */
.bg-decor {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.blob {
    position: absolute;
    will-change: transform;
}
.blob::before {
    content: "";
    position: absolute;
    inset: 0;
    /* forme organique : le border-radius asymétrique donne un vrai contour,
       le flou reste léger pour qu'on le distingue nettement (pas un dégradé). */
    border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
    filter: blur(5px);
    opacity: 0.5;
    animation: blobDrift 32s ease-in-out infinite, blobMorph 14s ease-in-out infinite;
}
.blob.b1 { top: 6vh;  left: -6vw;  width: 30vw; height: 30vw; }
.blob.b2 { top: 18vh; right: -4vw; width: 26vw; height: 26vw; }
.blob.b3 { top: 60vh; left: 4vw;   width: 24vw; height: 24vw; }
.blob.b4 { top: 50vh; right: 7vw;  width: 21vw; height: 21vw; }
/* Un rond beige, un bleu plus soutenu que le fond, un mint, un lavande. */
.blob.b1::before { background: var(--cream); }
.blob.b2::before { background: #8FB8DE; animation-duration: 38s, 16s; }
.blob.b3::before { background: var(--mint); animation-delay: -8s, -4s; }
.blob.b4::before { background: var(--lavender); opacity: 0.45;
                   animation-duration: 42s, 18s; animation-delay: -14s, -6s; }
@keyframes blobDrift {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    50%  { transform: translate(16px, -22px) rotate(180deg) scale(1.05); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}
@keyframes blobMorph {
    0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
    50%      { border-radius: 63% 37% 38% 62% / 57% 63% 37% 43%; }
}
@media (prefers-reduced-motion: reduce) {
    .blob::before { animation: none; }
}

/* =========================================================================
   4. LOGO FIXE (HAUT GAUCHE)
   ========================================================================= */
.logo-fixed {
    position: fixed;
    top: 22px;
    left: 26px;
    z-index: 10000;
    transition: top 0.35s ease;
}
.logo-fixed img {
    height: 66px;
    width: auto;
    border: var(--border-block);
    border-radius: 14px;
    background: var(--cream);
    padding: 4px;
    box-shadow: var(--shadow-hard);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.logo-fixed:hover img {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: var(--shadow-hard-lg);
}
.logo-fixed.scrolled { top: 14px; }
.logo-fixed.scrolled img { height: 52px; }

/* =========================================================================
   5. NAVBAR (capsule, droite) + TOGGLE LANGUE
   ========================================================================= */
.navbar-custom {
    position: fixed;
    top: 22px;
    right: 26px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--cream);
    border: var(--border-block);
    border-radius: 50px;
    box-shadow: var(--shadow-hard);
    transition: top 0.35s ease, box-shadow 0.25s ease;
}
.navbar-custom.scrolled { top: 14px; box-shadow: 4px 4px 0 var(--ink); }

.nav-links {
    display: flex;
    flex-direction: row;
    gap: 4px;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px solid transparent;
    white-space: nowrap;
}
.nav-links a:hover { background: var(--sky); }
.nav-links a.active {
    background: var(--yellow);
    border-color: var(--ink);
}

/* Bouton langue */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--ink);
    color: var(--cream);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 9px 14px;
    border-radius: 50px;
    transition: transform 0.2s ease, background 0.2s ease;
}
.lang-toggle:hover { transform: scale(1.07); background: var(--blue-deep); }
.lang-toggle .flag { font-size: 1.05rem; line-height: 1; }

/* Burger (mobile) */
.nav-burger {
    display: none;
    background: var(--ink);
    color: var(--cream);
    border: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* =========================================================================
   6. BOUTONS (color-block + ombre solide + scale)
   ========================================================================= */
.btn-main,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 14px 30px;
    border-radius: 50px;
    border: var(--border-block);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin: 6px 8px 6px 0;
}
.btn-main {
    background: var(--yellow);
    color: var(--ink);
    box-shadow: var(--shadow-hard);
}
.btn-main:hover {
    transform: translate(-2px, -3px) scale(1.03);
    box-shadow: var(--shadow-hard-lg);
}
.btn-main:active { transform: translate(0, 0) scale(0.98); box-shadow: 3px 3px 0 var(--ink); }
.btn-secondary {
    background: var(--sky);
    color: var(--ink);
    box-shadow: var(--shadow-hard);
}
.btn-secondary:hover {
    transform: translate(-2px, -3px) scale(1.03);
    box-shadow: var(--shadow-hard-lg);
}
.btn-secondary:active { transform: translate(0, 0) scale(0.98); box-shadow: 3px 3px 0 var(--ink); }
.btn-outline {
    background: transparent;
    color: var(--ink);
    box-shadow: 6px 6px 0 var(--yellow);
    border-color: var(--ink);
}
.btn-outline:hover {
    transform: translate(-2px, -3px) scale(1.03);
    background: var(--cream);
}

/* =========================================================================
   7. HERO (index)
   ========================================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 6rem 1.5rem 3rem;
}
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.4s ease-in-out, transform 7s ease;
    transform: scale(1);
}
.hero-slide.active { opacity: 1; transform: scale(1.08); }
.hero::after {
    content: "";
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(rgba(30,67,128,0.45), rgba(16,35,63,0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    padding: 3rem 2.5rem;
    transform: rotate(-1deg);
}
.hero h4 {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--pink);
    color: var(--ink);
    padding: 4px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.hero h1 {
    font-size: clamp(3rem, 9vw, 6rem);
    color: var(--blue-deep);
    margin-bottom: 0.8rem;
}
.hero h1 .accent { color: var(--red); }
.hero p {
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 1.6rem;
}
.hero-cta { margin-top: 1.5rem; }

.scroll-down {
    position: fixed;
    bottom: 26px; left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    color: var(--cream);
    font-size: 1.6rem;
    cursor: pointer;
    background: var(--ink);
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--cream);
    box-shadow: var(--shadow-hard);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-10px); }
}
/* Une fois scrollé, le bouton pointe vers le haut et arrête de sautiller. */
.scroll-down.to-top { animation: none; transform: translateX(-50%); }

/* Coordonnées GPS easter egg */
.geo-tag {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blue-deep);
    opacity: 0.9;
    margin-top: 1rem;
    letter-spacing: 0.5px;
}

/* =========================================================================
   8. HEADER STANDARD (pages internes)
   ========================================================================= */
.page-header {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 9rem 1.5rem 7rem;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.page-header::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(rgba(30,67,128,0.5), rgba(16,35,63,0.8));
}
.header-content,
.page-header .hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
}
.page-header .header-content {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    padding: 2.5rem 2rem;
    transform: rotate(-1deg);
}
.page-header h1 {
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    color: var(--blue-deep);
    margin-bottom: 0.6rem;
}
.page-header .header-content h1 { color: var(--blue-deep); }
.page-header p { font-size: 1.2rem; color: var(--ink); }
.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    background: var(--red);
    color: var(--cream);
    padding: 4px 14px;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* Bandeau "chemin" technique (~/page) */
.path-crumb {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--blue-deep);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
/* Sur fond photo sombre (headers), le chemin passe en clair */
.page-header .path-crumb,
.header-alternance .path-crumb,
.header-apropos .path-crumb { color: var(--sky); }

/* -------------------------------------------------------------------------
   En-tête SAÉ "tech" : composition 100 % CSS, sans image de fond.
   Fond bleu nuit uni qui fait ressortir la carte beige, plus quatre
   filigranes (icônes + logo IUT) posés dans les coins, derrière la carte.
   ------------------------------------------------------------------------- */
.page-header.saes-header {
    background: var(--blue-deep);          /* #1E4380 : tranche avec le bleu pastel du site */
    min-height: 40vh;
    padding: 7rem 1.5rem 4rem;
}
.page-header.saes-header::after { display: none; }   /* pas de voile sombre : le bleu nuit reste uni */

.saes-deco {
    position: absolute;
    z-index: 1;                            /* derrière la carte beige (z-index 2) */
    color: var(--cream);
    opacity: 0.15;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}
.saes-deco.deco-tl { top: 5rem;    left: 2.5rem;  font-size: 5rem; }
.saes-deco.deco-tr { top: 5rem;    right: 2.5rem; font-size: 4rem; }
.saes-deco.deco-bl { bottom: 1.8rem; left: 2.5rem; font-size: 6rem; transform: rotate(-12deg); }
.saes-deco.deco-br {
    bottom: 1.8rem; right: 2.5rem;
    width: 200px; max-width: 34vw; height: auto;
    opacity: 0.2;
    filter: brightness(0) invert(1);       /* logo IUT1 en blanc filigrane */
}
@media (max-width: 768px) {
    .saes-deco.deco-tl { font-size: 3.4rem; }
    .saes-deco.deco-tr { font-size: 2.8rem; }
    .saes-deco.deco-bl { font-size: 4.2rem; }
    .saes-deco.deco-br { width: 130px; }
}

/* =========================================================================
   9. CARTES COLOR-BLOCK
   ========================================================================= */
#about, .section-pad {
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.card-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--cream);
    color: var(--ink);
    padding: 2.2rem;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
    transform: translate(-3px, -4px) scale(1.02);
    box-shadow: var(--shadow-hard-lg);
}
/* Variantes de couleur des cartes */
.card.c-yellow { background: var(--yellow); }
.card.c-sky    { background: var(--sky); }
.card.c-pink   { background: var(--pink); }
.card.c-red    { background: var(--red); color: var(--cream); }

.card h3 { font-size: 1.9rem; margin-bottom: 0.8rem; }
.card p  { font-size: 1.05rem; }
.icon-card {
    font-size: 2.6rem;
    margin-bottom: 1.2rem;
    display: inline-flex;
    width: 76px; height: 76px;
    align-items: center; justify-content: center;
    background: var(--ink);
    color: var(--cream);
    border-radius: 18px;
}

/* Carte projet (SAE) */
.project-card {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hard);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translate(-3px, -4px) scale(1.01);
    box-shadow: var(--shadow-hard-lg);
}
.card-image { height: 220px; overflow: hidden; border-bottom: var(--border-block); }
/* Les photos de la galerie sont forcées au même gabarit : elles ne débordent plus du cadre. */
.card-image img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.5s ease; }
.project-card:hover .card-image img { transform: scale(1.08); }

/* Toute la carte est cliquable (la balise <article> devient un <a>) */
a.project-card { color: inherit; cursor: pointer; }
a.project-card:hover { color: inherit; }
.project-card .btn-main { margin-top: auto; align-self: flex-start; }

/* Aperçu des compétences sous le titre de chaque carte SAÉ */
.card-skills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 1rem; }
.card-skill {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.78rem;
    background: var(--sky);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 50px;
    padding: 4px 11px;
    text-transform: lowercase;
}
.card-skill::before { content: "#"; color: var(--blue-deep); margin-right: 3px; font-family: var(--font-mono); }
.card-content { padding: 1.8rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.card-content p { font-size: 1.02rem; margin-bottom: 1.2rem; }
.card-content .btn-main { margin-top: auto; align-self: flex-start; }

.card-tag {
    display: inline-block;
    align-self: flex-start;
    background: var(--red);
    color: var(--cream);
    padding: 4px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.project-card.coming-soon {
    background: rgba(255, 255, 255, 0.45);
    border: 3px dashed var(--blue-deep);
    box-shadow: none;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: var(--ink);
}
.project-card.coming-soon h3 { color: var(--ink); }
.project-card.coming-soon:hover { transform: none; box-shadow: none; }

/* =========================================================================
   10. BADGES & PUCES
   ========================================================================= */
.skill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.skill-badge {
    background: var(--white);
    color: var(--ink);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    border: 2px solid var(--ink);
}
.skill-badge.soft { background: var(--pink); }

.tools-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ink);
    color: var(--cream);
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--sky);
    transition: transform 0.2s ease, background 0.2s ease;
}
.tool-chip:hover { transform: translateY(-3px); background: var(--blue-deep); }
.tool-chip i { color: var(--yellow); }

/* =========================================================================
   11. PAGE ALTERNANCE
   ========================================================================= */
.header-alternance {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 4rem;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.header-alternance::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(rgba(30,67,128,0.5), rgba(16,35,63,0.8));
}
.header-alternance .hero-content {
    position: relative; z-index: 2;
    background: var(--cream); color: var(--ink);
    border: var(--border-block); border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    padding: 2.5rem 2rem; max-width: 760px;
    transform: rotate(-1deg);
}
.header-alternance h1 { color: var(--blue-deep); font-size: clamp(2.4rem, 6vw, 4rem); }
.header-alternance p { color: var(--ink); }

/* --- Légende séminaire : apparaît au survol de TOUTE l'image (zone plein header) --- */
.seminaire-hover-zone {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 24px;
    pointer-events: none;       /* ne bloque pas les clics du header */
}
.header-alternance:hover .seminaire-hover-zone .seminaire-text {
    opacity: 1;
    transform: translateY(0);
}
.seminaire-text {
    background: var(--ink);
    color: var(--cream);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.3s ease;
    border: 2px solid var(--yellow);
}

/* --- Mise en page : sommaire latéral sticky + contenu --- */
.alt-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}
.alt-toc {
    position: sticky;
    top: 110px;
    background: var(--cream);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 1.4rem;
}
.alt-toc h2 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--blue-deep);
    margin-bottom: 1rem;
}
.alt-toc ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.alt-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--ink);
    border-left: 3px solid transparent;
}
.alt-toc a .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--blue-deep); }
.alt-toc a:hover { background: var(--sky); }
.alt-toc a.active {
    background: var(--yellow);
    border-left-color: var(--ink);
}
.alt-content { min-width: 0; }
.alt-content > section { margin-bottom: 3.5rem; }

.alt-lead {
    font-size: 1.2rem;
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-left: 10px solid var(--yellow);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 1.8rem 2rem;
}
.alt-lead .role-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--ink);
    color: var(--cream);
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 1rem;
}
.alt-h2 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    color: var(--blue-deep);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.alt-h2 i { color: var(--red); }

.company-intro {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: var(--cream);
    color: var(--ink);
    padding: 2.5rem;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
}
.company-logo img { max-width: 200px; background: var(--white); padding: 10px; border-radius: 12px; }
.company-details h2 { color: var(--blue-deep); font-size: 2.2rem; margin-bottom: 1rem; }
.company-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    font-weight: 700; color: var(--red); margin-bottom: 1.2rem;
}
.company-meta span { display: inline-flex; align-items: center; gap: 8px; }

.team-card {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 2rem 2.2rem;
}

/* Les 4 grands axes */
.axes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}
.axis-card {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 1.8rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.axis-card:hover { transform: translate(-3px,-4px); box-shadow: var(--shadow-hard-lg); }
.axis-num {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--blue-deep);
    font-size: 0.9rem;
}
.axis-icon {
    font-size: 1.5rem; color: var(--cream); background: var(--blue-deep);
    width: 56px; height: 56px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0.4rem 0 1rem;
}
.axis-card h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.axis-card p { font-size: 1rem; margin-bottom: 0; }

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}
.mission-card {
    background: var(--cream);
    color: var(--ink);
    padding: 2rem;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mission-card:hover { transform: translate(-3px,-4px); box-shadow: var(--shadow-hard-lg); }
.mission-icon {
    font-size: 1.7rem; color: var(--cream); background: var(--blue-deep);
    width: 60px; height: 60px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.mission-card h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.mission-card ul { padding-left: 1.2rem; }
.mission-card li { margin-bottom: 0.6rem; font-size: 1rem; }

.info-box {
    background: var(--cream);
    color: var(--ink);
    padding: 1.8rem;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
}
.info-box h3 { color: var(--blue-deep); font-size: 1.5rem; margin-bottom: 1rem; }

/* Projet Centreon */
.project-block {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 2.2rem;
}
.project-block h3 { color: var(--blue-deep); font-size: 1.8rem; margin-bottom: 1rem; }
.tag-inline {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--ink);
    color: var(--mint);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 0.6rem;
}

/* Encadré gestion de crise */
.crisis-box {
    background: var(--ink);
    color: var(--cream);
    border: var(--border-block);
    border-color: var(--red);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 2.2rem;
    margin-top: 1.6rem;
}
.crisis-box .tag-inline { background: var(--red); color: var(--cream); }
.crisis-box h3 { color: var(--yellow); font-size: 1.7rem; margin-bottom: 1rem; }
.crisis-box p { color: var(--cream); }
.crisis-box strong { color: var(--mint); }

.conclusion-box {
    text-align: center;
    padding: 3rem;
    background: var(--red);
    color: var(--cream);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
}
.conclusion-box h3 { font-size: 2.2rem; margin-bottom: 1rem; color: var(--cream); }
.conclusion-box p { color: var(--cream); font-size: 1.1rem; }

/* =========================================================================
   12. PAGE CV
   ========================================================================= */
.cv-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
}
.cv-sidebar { display: flex; flex-direction: column; gap: 1.8rem; }
.profile-photo-container { text-align: center; }
.cv-photo {
    width: 210px; height: 210px;
    object-fit: cover; border-radius: 50%;
    margin: 0 auto;
    border: var(--border-block);
    box-shadow: var(--shadow-hard);
    transition: transform 0.3s ease;
}
.cv-photo:hover { transform: scale(1.05) rotate(3deg); }

.contact-box, .skills-box, .lang-box {
    background: var(--cream);
    color: var(--ink);
    padding: 1.8rem;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
}
.contact-box h3, .skills-box h3, .lang-box h3 {
    font-size: 1.6rem; color: var(--blue-deep); margin-bottom: 1rem;
}
.contact-box ul { list-style: none; }
.contact-box li { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.contact-box i { color: var(--red); width: 20px; text-align: center; }
.mail-link { font-weight: 700; color: var(--blue-deep); text-decoration: underline; text-decoration-color: var(--yellow); }
.mail-link:hover { color: var(--red); }

.skill-item {
    display: block;
    background: var(--white);
    padding: 9px 14px;
    margin-bottom: 9px;
    border-radius: 10px;
    border: 2px solid var(--ink);
    font-size: 0.98rem;
    font-weight: 600;
}

.cv-main-content section { margin-bottom: 3rem; }
.cv-section-title {
    font-size: 2.2rem;
    color: var(--ink);
    margin-bottom: 1.5rem;
    display: inline-block;
    border-bottom: 5px solid var(--yellow);
    padding-bottom: 6px;
}
.timeline-item {
    background: var(--cream);
    color: var(--ink);
    padding: 1.6rem;
    border: var(--border-block);
    border-radius: var(--radius);
    margin-bottom: 1.4rem;
    box-shadow: var(--shadow-hard);
    transition: transform 0.2s ease;
}
.timeline-item:hover { transform: translateX(8px); }
.timeline-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 0.4rem; }
.timeline-title { font-weight: 700; font-size: 1.15rem; }
.timeline-date { color: var(--red); font-weight: 700; font-size: 0.95rem; }
.timeline-place { font-style: italic; color: var(--blue-deep); font-weight: 600; display: block; margin-bottom: 0.5rem; }
.timeline-link { display: block; }
.timeline-link .timeline-item { border-color: var(--red); }
.timeline-cue { display: inline-block; margin-top: 0.6rem; color: var(--red); font-weight: 700; font-size: 0.95rem; }
.timeline-link:hover .timeline-cue { text-decoration: underline; }

/* =========================================================================
   13. PAGE À PROPOS
   ========================================================================= */
.header-apropos {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 4rem;
    background-size: cover;
    background-position: center 30%;
    overflow: hidden;
}
.header-apropos::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(rgba(30,67,128,0.4), rgba(16,35,63,0.78));
}
.header-apropos .hero-content {
    position: relative; z-index: 2;
    background: var(--cream); color: var(--ink);
    border: var(--border-block); border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    padding: 2.5rem 2rem; max-width: 760px;
    transform: rotate(-1deg);
}
.header-apropos h1 { color: var(--blue-deep); font-size: clamp(2.4rem, 6vw, 4rem); }
.header-apropos p { color: var(--ink); }

/* Section "Qui suis-je ?" */
.qsj-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 1rem;
}
.qsj-card {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    padding: 2.6rem;
}
.qsj-card h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--blue-deep);
    margin-bottom: 1.2rem;
}
.qsj-card p { font-size: 1.12rem; }
.qsj-card p:last-child { margin-bottom: 0; }
.qsj-card .accent-word { color: var(--red); font-weight: 700; }

/* Hobbies */
.hobbies-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1rem;
}
.hobbies-section > h2 {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    color: var(--ink);
    margin-bottom: 0.5rem;
}
.hobbies-section > p { color: var(--ink-soft); margin-bottom: 2rem; max-width: 60ch; }
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}
.hobby {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--cream);
    border: var(--border-block);
    border-radius: 14px;
    box-shadow: var(--shadow-hard);
    padding: 1.1rem 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hobby:hover { transform: translate(-2px, -3px); box-shadow: var(--shadow-hard-lg); }
.hobby-ico {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--yellow);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.hobby:nth-child(3n+1) .hobby-ico { background: var(--blue-deep); color: var(--mint); }
.hobby:nth-child(3n+2) .hobby-ico { background: var(--ink); color: var(--sky); }
.hobby:nth-child(3n)   .hobby-ico { background: var(--red);  color: var(--cream); }
.hobby h4 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: 2px; }
.hobby p { font-size: 0.9rem; margin: 0; color: var(--ink-soft); line-height: 1.45; }

.about-container {
    max-width: 1150px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3.5rem;
}
.about-divider {
    max-width: 1100px;
    margin: 3rem auto 0;
    padding: 0 1.5rem;
}
.about-divider span {
    display: block;
    border-top: 3px dashed var(--blue-deep);
    opacity: 0.5;
}
.about-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    margin: 3rem 0;
}
.about-photos img {
    width: 100%; height: 260px; object-fit: cover;
    border: var(--border-block); border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
}
.about-sidebar { display: flex; flex-direction: column; gap: 1.8rem; }
.about-sidebar .info-box.dark { background: var(--blue-deep); color: var(--cream); }
.about-sidebar .info-box.dark h3 { color: var(--yellow); }
.about-sidebar .info-box.dark p { color: var(--cream); }
.about-sidebar img.zoomable { border: var(--border-block); border-radius: 12px; cursor: zoom-in; margin-top: 0.5rem; }

/* L'ancienne section parapente garde ses titres lisibles sur fond clair */
.about-main .cv-section-title { color: var(--ink); }
.about-main .learn-title { color: var(--blue-deep); }
.about-main .date-note { color: var(--blue-deep); font-style: italic; margin-bottom: 1.5rem; }

/* =========================================================================
   14. DÉTAIL SAE (cybersécurité)
   ========================================================================= */
.sae-detail {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.sae-block {
    background: var(--cream);
    color: var(--ink);
    padding: 2.5rem;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
}
.sae-block h2 {
    font-size: 2.2rem;
    color: var(--blue-deep);
    margin-bottom: 1.2rem;
    display: flex; align-items: center; gap: 12px;
}
.sae-block h2 i { color: var(--red); }
.sae-block h3 { font-size: 1.5rem; color: var(--red); margin: 1.2rem 0 0.8rem; }
.sae-block p { font-size: 1.1rem; }
.sae-block ul { padding-left: 1.4rem; }
.sae-block li { margin-bottom: 0.6rem; font-size: 1.05rem; }
.sae-block a { color: var(--blue-deep); font-weight: 700; text-decoration: underline; text-decoration-color: var(--yellow); }
.sae-block a:hover { color: var(--red); }

.competence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.competence-col { background: var(--sky); border: var(--border-block); border-radius: var(--radius); padding: 1.6rem; }
.competence-col.soft { background: var(--pink); }
.competence-col h3 { color: var(--ink); margin-top: 0; }

.sae-figure { margin: 0; }
.img-frame {
    border: var(--border-block); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-hard);
}
.img-placeholder {
    background: var(--blue-deep); color: var(--cream);
    min-height: 240px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    text-align: center; font-weight: 600;
}
.img-placeholder i { font-size: 2.4rem; color: var(--yellow); }
.sae-figure figcaption { margin-top: 0.8rem; font-style: italic; color: var(--ink-soft); text-align: center; }

/* Liens "double accès" en haut des SAE */
.sae-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem;
    margin-bottom: 1rem;
}
.sae-link-card {
    background: var(--cream); color: var(--ink);
    border: var(--border-block); border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 1.6rem;
    display: flex; flex-direction: column; gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sae-link-card:hover { transform: translate(-3px,-4px); box-shadow: var(--shadow-hard-lg); }
.sae-link-card h3 { color: var(--blue-deep); font-size: 1.4rem; }
.sae-link-card .go { color: var(--red); font-weight: 700; }

/* Vignettes illustrations SAE */
.sae-thumbs { display: flex; flex-direction: column; gap: 1rem; }
.sae-thumb {
    display: flex; gap: 14px; align-items: center;
    background: var(--white); border: 2px solid var(--ink);
    border-radius: 12px; padding: 10px; cursor: zoom-in;
    transition: transform 0.2s ease;
}
.sae-thumb:hover { transform: translateX(6px); }
.sae-thumb img { width: 130px; height: 90px; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); }
.sae-thumb h6 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--ink); }
.sae-thumb small { color: var(--blue-deep); }

/* Intro de la galerie SAÉ */
.saes-intro {
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 0 1.5rem;
}
.saes-intro .intro-card {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-left: 10px solid var(--mint);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 1.8rem 2rem;
}
.saes-intro .intro-card p { font-size: 1.12rem; margin: 0; }
.saes-intro .intro-card .tag-inline { margin-bottom: 0.7rem; }

/* =========================================================================
   15. TERMINAL INTERACTIF (accueil)
   ========================================================================= */
.terminal-section {
    width: 100%;
    padding: 5rem 1.5rem 6rem;
}
.terminal-head {
    max-width: 1100px;
    margin: 0 auto 1.6rem;
    text-align: center;
}
.terminal-head h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--ink);
}
.terminal-head h2 .accent { color: var(--red); }
.terminal-head p { color: var(--ink-soft); }

.terminal-wrap { max-width: 1100px; margin: 0 auto; }
.terminal {
    background: #0D1B2A;
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    overflow: hidden;
    font-family: var(--font-mono);
}
.term-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0A1420;
    border-bottom: 2px solid #22344A;
    padding: 10px 16px;
}
.term-dots { display: flex; gap: 8px; }
.term-dots span { width: 13px; height: 13px; border-radius: 50%; display: block; }
.term-dots .d-red { background: #ff5f56; }
.term-dots .d-yellow { background: #ffbd2e; }
.term-dots .d-green { background: #27c93f; }
.term-title {
    color: #6E8AA6;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.term-body {
    padding: 1.4rem 1.5rem 1.6rem;
    min-height: 360px;
    max-height: 60vh;
    overflow-y: auto;
    color: #CFE3F7;
    font-size: 0.95rem;
    line-height: 1.55;
}
.term-body::-webkit-scrollbar { width: 10px; }
.term-body::-webkit-scrollbar-thumb { background: #22344A; border-radius: 6px; }
.term-ascii {
    color: var(--yellow);
    white-space: pre;
    font-size: clamp(0.5rem, 1.7vw, 0.92rem);
    line-height: 1.1;
    margin-bottom: 0.8rem;
    overflow-x: auto;
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.muted { color: #7E9BB8; }
.term-line .ok { color: var(--mint); }
.term-line .warn { color: var(--yellow); }
.term-line .err { color: #ff7a72; }
.term-line .cmd-echo { color: #CFE3F7; }
.term-line .accent { color: #5BC8FF; }
.term-line a, .term-link { color: #5BC8FF; text-decoration: underline; }
.term-line a:hover { color: var(--yellow); }
.term-prompt { color: var(--mint); font-weight: 700; }
.term-prompt .tilde { color: #5BC8FF; }
/* Invite root : couleur d'alerte authentique d'un shell élevé */
.term-prompt.term-root { color: #ff7a72; }
.term-prompt.term-root .tilde { color: #ff7a72; }

.term-input-line { display: flex; align-items: baseline; gap: 8px; }
.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #CFE3F7;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    caret-color: var(--mint);
    padding: 0;
}
.term-hint {
    max-width: 1100px;
    margin: 0.9rem auto 0;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

/* =========================================================================
   16. FOOTER (riche : marque + navigation + contact)
   ========================================================================= */
footer {
    flex-shrink: 0;
    background: var(--ink);
    color: var(--cream);
    border-top: 6px solid var(--yellow);
    margin-top: 4rem;
    padding: 3rem 1.5rem 1.8rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2rem;
}
.footer-brand .footer-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--cream);
    margin-bottom: 0.6rem;
}
.footer-brand .footer-name .accent { color: var(--yellow); }
.footer-brand p { color: #BFD0E4; font-size: 0.98rem; max-width: 38ch; }
.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--yellow);
    margin-bottom: 1rem;
}
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #D8E4F2;
    font-weight: 600;
    font-size: 0.98rem;
}
.footer-nav a i { color: var(--sky); width: 18px; text-align: center; transition: transform 0.2s ease; }
.footer-nav a:hover { color: var(--yellow); transform: translateX(4px); }
.footer-nav a:hover i { color: var(--yellow); }

.footer-connect .social-links { margin-bottom: 1rem; display: flex; }
.footer-connect .footer-mail {
    display: inline-flex; align-items: center; gap: 8px;
    color: #D8E4F2; font-weight: 600; font-size: 0.95rem;
}
.footer-connect .footer-mail:hover { color: var(--yellow); }

.social-links a {
    display: inline-flex;
    width: 48px; height: 48px;
    align-items: center; justify-content: center;
    color: var(--ink);
    background: var(--cream);
    font-size: 1.3rem;
    margin: 0 7px 0 0;
    border-radius: 12px;
    border: 2px solid var(--cream);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-links a:hover { transform: translateY(-4px) scale(1.05); background: var(--yellow); }

.footer-bottom {
    border-top: 2px solid #2A3B52;
    padding-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-bottom p { color: #9FB3CB; margin: 0; font-size: 0.9rem; }
.footer-bottom .footer-built { font-family: var(--font-mono); }

/* =========================================================================
   17. LIGHTBOX
   ========================================================================= */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;                 /* au-dessus de la navbar (10000) */
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 2vmin;
    cursor: zoom-out;
}
.lightbox-modal.open { display: flex; }
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;            /* l'image s'adapte proportionnellement à l'écran */
    border: var(--border-block);
    border-radius: 8px;
    background: var(--cream);
    box-shadow: var(--shadow-hard-lg);
    cursor: default;
    animation: zoomIn 0.25s ease;
}
.lightbox-close {
    position: fixed;
    top: 18px; right: 26px;
    width: 54px; height: 54px;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink);
    background: var(--cream);
    border: var(--border-block);
    border-radius: 50%;
    box-shadow: var(--shadow-hard);
    font-size: 32px; font-weight: bold; line-height: 1;
    cursor: pointer;
    z-index: 10002;
}
.lightbox-close:hover { background: var(--yellow); transform: scale(1.05); }
@keyframes zoomIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================================================
   18. SCROLL REVEAL — apparition douce au défilement (IntersectionObserver)
   Le voile ne s'applique QUE si JS a posé .reveal-on sur <html> : si le script
   ne tourne pas, le contenu reste visible (progressive enhancement).
   ========================================================================= */
.reveal-on .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--reveal-i, 0) * 70ms);
    will-change: opacity, transform;
}
.reveal-on .reveal.active { opacity: 1; transform: none; }
/* Retards fixes pour les éléments marqués à la main (en-tête du terminal…) */
.reveal-on .reveal-delay-1 { transition-delay: 0.12s; }
.reveal-on .reveal-delay-2 { transition-delay: 0.24s; }
.reveal-on .reveal-delay-3 { transition-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) {
    .reveal-on .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =========================================================================
   19. PROJETS PERSO (LABS) — panneaux empilés au scroll
   ========================================================================= */
.labs-header {
    padding: 7.5rem 1.5rem 1.5rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}
.labs-header .path-crumb { color: var(--blue-deep); }
.labs-header h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--blue-deep); margin-bottom: 0.4rem; }
.labs-header p { color: var(--ink-soft); }

.labs-intro {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 0.5rem;
    text-align: center;
}
.labs-intro p { font-size: 1.05rem; color: var(--ink-soft); font-family: var(--font-mono); }

.labs-stage { position: relative; }

.lab-panel {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;       /* les cartes remontent vers le haut de l'écran */
    justify-content: center;
    padding: 12vh 1.5rem 3vh;       /* ~12vh du haut : dévoilées bien plus tôt au scroll */
}

.lab-card {
    position: relative;
    width: 100%;
    max-width: 940px;
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard-lg);
    padding: 2.6rem 2.8rem;
    overflow: hidden;
    /* visible par défaut ; le JS réduit la carte courante quand la suivante la recouvre */
    will-change: transform, opacity;
}

.lab-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 12px;
}
.lab-panel:nth-child(1) .lab-card::before { background: var(--yellow); }
.lab-panel:nth-child(2) .lab-card::before { background: var(--sky); }
.lab-panel:nth-child(3) .lab-card::before { background: var(--mint); }
.lab-panel:nth-child(4) .lab-card::before { background: var(--red); }

.lab-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.lab-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1;
    color: var(--cream);
    background: var(--ink);
    width: 84px; height: 84px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lab-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--blue-deep); }
.lab-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.82rem;
    background: var(--blue-deep);
    color: var(--cream);
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 0.4rem;
}
.lab-card p { font-size: 1.08rem; }
.lab-card ul { padding-left: 1.3rem; margin: 0.6rem 0 1rem; }
.lab-card li { margin-bottom: 0.5rem; }
/* On borne la hauteur des captures dans les cartes Labs pour qu'une carte
   reste lisible d'un coup d'œil, même à 100 % de zoom (cf. carte 03). */
.lab-card .shot-img { max-height: 52vh; object-fit: contain; }

/* Emplacements photo (à remplir plus tard) */
.lab-shots { display: grid; gap: 1rem; margin: 1.2rem 0 0.4rem; }
.lab-shots.two { grid-template-columns: 1fr 1fr; }
.lab-shot {
    border: 3px dashed var(--blue-deep);
    border-radius: 12px;
    background: rgba(30, 67, 128, 0.06);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--blue-deep);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}
.lab-shot i { font-size: 1.8rem; }
.lab-shot small { font-family: var(--font-mono); font-weight: 600; opacity: 0.75; font-size: 0.75rem; }

/* indicateur de progression latéral */
.lab-progress {
    position: fixed;
    right: 22px; top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex; flex-direction: column; gap: 12px;
}
.lab-progress span {
    width: 13px; height: 13px;
    border-radius: 50%;
    background: rgba(22, 38, 63, 0.18);
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
.lab-progress span.active { background: var(--yellow); transform: scale(1.35); }

/* =========================================================================
   20bis. TOOLTIPS / INFOBULLES (acronymes techniques)
   ========================================================================= */
abbr[title],
.tooltip {
    position: relative;
    text-decoration: none;
    border-bottom: 2px dotted var(--blue-deep);
    cursor: help;
    font-weight: 700;
}
abbr[title] { cursor: help; }
/* Bulle au survol : on s'appuie sur l'attribut title via un pseudo-élément maison */
.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    min-width: 180px;
    max-width: 280px;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
    padding: 9px 12px;
    border-radius: 10px;
    border: 2px solid var(--yellow);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 10001;
    white-space: normal;
}
.tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--yellow);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 10001;
}
.tooltip:hover::after,
.tooltip:focus::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.tooltip:hover::before,
.tooltip:focus::before { opacity: 1; }
/* Sur les cadres sombres (crisis-box), l'infobulle garde de bons contrastes */
.crisis-box .tooltip { border-bottom-color: var(--mint); }

/* =========================================================================
   20ter. BLOC TITRE QUI S'EFFACE AU SCROLL (révèle la photo de fond)
   ========================================================================= */
.header-fade { transition: opacity 0.15s linear; will-change: opacity; }

/* =========================================================================
   20quater. NAVIGATION INTERNE DES FICHES SAÉ
   (sommaire, badges de compétences, menu rapide, pager) — injectés en JS
   ========================================================================= */

/* Mise en page des fiches SAÉ : sommaire latéral fixé à gauche (modèle alternance) */
.sae-detail.sae-shell {
    max-width: 1180px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}
.sae-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
/* Le <aside> généré reprend la classe .alt-toc : exactement le design de la page alternance. */
.sae-toc .toc-label { display: inline; }

/* Images "à remplir" : balises <img> complètes (modale, marge, ombre). Coller le chemin dans src. */
.shot-grid { display: grid; gap: 1.2rem; margin: 1.4rem 0 0.2rem; }
.shot-grid.two   { grid-template-columns: repeat(2, 1fr); }
.shot-grid.three { grid-template-columns: repeat(3, 1fr); }
.shot-fig { margin: 0; }
.shot-img {
    width: 100%;
    height: auto;
    display: block;
    border: var(--border-block);
    border-radius: 12px;
    box-shadow: var(--shadow-hard);
    background: var(--white);
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shot-img:hover { transform: translate(-2px, -3px); box-shadow: var(--shadow-hard-lg); }
/* Tant que le chemin n'est pas collé (src vide), on garde un cadre pointillé propre. */
.shot-img[src=""],
.shot-img:not([src]) {
    min-height: 190px;
    border-style: dashed;
    border-color: var(--blue-deep);
    box-shadow: none;
    cursor: default;
    background: rgba(30, 67, 128, 0.06);
}
.shot-fig figcaption {
    margin-top: 0.6rem;
    font-style: italic;
    color: var(--ink-soft);
    text-align: center;
    font-size: 0.95rem;
}
/* Variante sur fond sombre (encadré gestion de crise) */
.crisis-box .shot-img[src=""],
.crisis-box .shot-img:not([src]) { border-color: var(--mint); background: rgba(167, 224, 200, 0.08); }
.crisis-box .shot-fig figcaption { color: var(--mint); }

/* Menu rapide vers les autres SAÉs */
.sae-quicknav {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 1.6rem 1.8rem;
}
.sae-quicknav h2 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--blue-deep);
    margin-bottom: 1rem;
}
.sae-quicknav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.sae-quicknav-grid a {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background 0.2s ease;
}
.sae-quicknav-grid a:hover { transform: translate(-2px, -3px); background: var(--sky); }
.sae-quicknav-grid a .qn-emoji { font-size: 1.25rem; line-height: 1; }
.sae-quicknav-grid a.current { background: var(--yellow); cursor: default; }
.sae-quicknav-grid a.current:hover { transform: none; }
.sae-quicknav-grid a small { display: block; font-weight: 600; font-size: 0.78rem; color: var(--ink-soft); }

/* Pager : projet précédent / retour galerie */
.sae-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}
.sae-pager .pager-prev,
.sae-pager .pager-gallery {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    box-shadow: var(--shadow-hard);
    border-radius: var(--radius);
    padding: 0.9rem 1.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sae-pager a:hover { transform: translate(-2px, -3px); box-shadow: var(--shadow-hard-lg); }
.sae-pager .pager-kicker {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--blue-deep);
}
.sae-pager .pager-title { font-weight: 700; font-size: 1.05rem; }
.sae-pager .pager-gallery { margin-left: auto; text-align: right; }

/* Emplacement photo générique (slots à remplir) */
.photo-slot {
    border: 3px dashed var(--blue-deep);
    border-radius: 12px;
    background: rgba(30, 67, 128, 0.06);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--blue-deep);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    padding: 1.2rem;
    margin: 1.3rem 0 0.2rem;
}
.photo-slot i { font-size: 1.8rem; }
.photo-slot small { font-family: var(--font-mono); font-weight: 600; opacity: 0.75; font-size: 0.75rem; }
.crisis-box .photo-slot { border-color: var(--mint); color: var(--mint); background: rgba(167, 224, 200, 0.08); }

/* Missions en récit (alternance) */
.mission-story {
    background: var(--cream);
    color: var(--ink);
    border: var(--border-block);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 2rem 2.2rem;
}
.mission-story + .mission-story { margin-top: 1.6rem; }
.mission-story h3 {
    color: var(--blue-deep);
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    display: flex; align-items: center; gap: 10px;
}
.mission-story .story-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--blue-deep);
    margin-bottom: 0.8rem;
}
.mission-story p:last-child { margin-bottom: 0; }

/* Pôles de l'équipe IT (page alternance) */
.team-poles { list-style: none; margin: 1rem 0; padding: 0; }
.team-poles li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.7rem;
    line-height: 1.55;
}
.team-poles li:last-child { margin-bottom: 0; }
.team-poles li::before {
    content: "\25B9";            /* ▹ */
    position: absolute; left: 0; top: 0;
    color: var(--blue-deep);
    font-weight: 700;
}
.team-poles strong { color: var(--blue-deep); }

/* Lien stylisé "Voir ma gestion de crise" (section veille) */
.crisis-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.1rem;
    padding: 9px 18px;
    background: var(--ink);
    color: var(--cream);
    border: 2px solid var(--ink);
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--blue-deep);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.crisis-link:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--blue-deep); }
.crisis-link i { color: var(--yellow); }

@media (max-width: 768px) {
    .sae-pager .pager-gallery { margin-left: 0; text-align: left; }
    .shot-grid.two, .shot-grid.three { grid-template-columns: 1fr; }
}

/* =========================================================================
   20. RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
    .cv-container { grid-template-columns: 1fr; }
    .about-container { grid-template-columns: 1fr; }
    .alt-shell { grid-template-columns: 1fr; }
    .sae-detail.sae-shell { grid-template-columns: 1fr; }
    .alt-toc {
        position: static;
        display: flex;
        flex-direction: column;
    }
    .alt-toc ul { flex-direction: row; flex-wrap: wrap; }
    .alt-toc a { border-left: none; border-bottom: 3px solid transparent; }
    .alt-toc a.active { border-left: none; border-bottom-color: var(--ink); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    body { font-size: 1.1rem; }
    .logo-fixed img { height: 52px; }

    .navbar-custom { left: 14px; right: 14px; top: 14px; justify-content: flex-end; }
    .nav-burger { display: inline-flex; align-items: center; justify-content: center; order: 2; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--cream);
        border: var(--border-block);
        border-radius: var(--radius);
        box-shadow: var(--shadow-hard);
        padding: 12px;
        min-width: 220px;
        gap: 6px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1rem; text-align: center; }

    .company-intro { flex-direction: column; text-align: center; }
    .company-meta { justify-content: center; }
    .competence-grid { grid-template-columns: 1fr; }
    .sae-links { grid-template-columns: 1fr; }
    .about-photos { grid-template-columns: 1fr; }
    .hero-content, .page-header .header-content,
    .header-alternance .hero-content, .header-apropos .hero-content { transform: none; padding: 2rem 1.4rem; }
    .sae-block { padding: 1.8rem; }
    .qsj-card { padding: 1.8rem; }
    .lab-card { padding: 1.8rem; }
    .lab-num { width: 64px; height: 64px; font-size: 2.2rem; }
    .lab-shots.two { grid-template-columns: 1fr; }
    .lab-progress { display: none; }

    .footer-cols { grid-template-columns: 1fr; gap: 1.8rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .term-body { min-height: 300px; }
}
