/* Polices auto-hébergées (Google Fonts, licence OFL) */
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-greek.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-greek.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrainsmono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Jost';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-italic-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-italic-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-italic-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jost-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jost-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/marcellus-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/marcellus-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================
   Tom Legros — Portfolio
   Un seul thème, sombre.
   ========================================================== */

/* ---------- 1. Couleurs et réglages ---------- */
:root {
    /* Fond et textes */
    --bg: #050505;
    --bg-entete: rgba(5, 5, 5, .82);
    --surface: #0e0e0e;
    --media-vide: #161616; /* bloc image vide des cartes */
    --ombre-carte: 0 0 28px rgba(255, 255, 255, .08); /* carte de projet au survol */
    --texte: #e8e8e8;
    --texte-2: #a3a3a3;
    --texte-3: #858585;
    --ligne: rgba(232, 232, 232, .1);
    --ligne-2: rgba(232, 232, 232, .2);
    --pointilles: rgba(232, 232, 232, .35);

    /* Lumière (survols) */
    --lumiere: #ffffff;
    --lueur: 0 0 14px rgba(255, 255, 255, .55);
    --lueur-bouton: 0 0 28px rgba(255, 255, 255, .35);

    /* La seule couleur du site : les yeux du chat */
    --oeil: #e8c547;
    --oeil-lueur: rgba(232, 197, 71, .45);
    --pupille: #0a0a0a;

    /* Le chat noir (lus par script.js pour dessiner le canvas) */
    --chat-pelage: #0a0a0a;
    --chat-contour: #4a4a4a;
    --chat-ombre: #262626;
    --chat-oreille: #333333;
    --chat-nez: #3d3d3d;
    --chat-poitrail: #2a2a2a;
    --chat-paupiere: #555555;
    --oeil-halo: rgba(232, 197, 71, .9);
    --bulle: #0e0e0e;
    --ombre-bulle: 0 14px 34px rgba(0, 0, 0, .5);
    --chat: 60px; /* taille du chat à l'écran */

    /* Lecteur vidéo */
    --video-fond: #000000;

    /* Boutons */
    --bouton-bg: #ffffff;
    --bouton-texte: #050505;
    --bouton-survol: #ffffff;

    /* Accueil */
    --hero-bg: #000000;
    --hero-filtre: grayscale(1) contrast(1.05) brightness(.6);
    --hero-voile:
        radial-gradient(60% 50% at 50% 50%, rgba(5, 5, 5, .45), rgba(5, 5, 5, 0)),
        linear-gradient(180deg, rgba(5, 5, 5, .45), rgba(5, 5, 5, .15) 45%, rgba(5, 5, 5, .92));
    --hero-texte: #ffffff;
    --hero-texte-2: #d4d4d4;

    /* Photos et vidéos en noir et blanc (mets none pour garder les couleurs) */
    --filtre-media: grayscale(1);

    /* Polices */
    --police-titre: "Marcellus", Georgia, serif;
    --police-texte: "Jost", system-ui, sans-serif;
    --police-mono: "JetBrains Mono", ui-monospace, monospace;

    /* Mise en page */
    --marge: clamp(20px, 5vw, 56px);
    --largeur: 1280px;
    --entete-h: 96px; /* recalculé par script.js */
    --ease: cubic-bezier(.16, 1, .3, 1);
    --duree-image: 6.5s; /* temps d'affichage de chaque image de l'accueil */

    color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: clip;
}

img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; }

a { color: var(--texte); text-decoration: underline; text-decoration-color: var(--ligne-2); text-underline-offset: .22em; }
a:hover { color: var(--lumiere); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--lumiere); outline-offset: 3px; }
::selection { background: var(--lumiere); color: var(--bg); }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

/* Lien d'évitement, visible au clavier */
.evitement {
    position: absolute; left: 12px; top: -80px; z-index: 100;
    padding: 10px 16px; background: var(--bouton-bg); color: var(--bouton-texte);
}
.evitement:focus { top: 12px; }

/* Contenu à compléter par Tom : bien visible */
.a-remplir {
    padding: .05em .4em;
    border: 1px dashed var(--pointilles);
    border-radius: 3px;
    font-family: var(--police-texte);
    font-style: italic;
    font-size: .92em;
    letter-spacing: 0;
    text-transform: none;
    color: var(--texte-2);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Emplacement d'image vide : cadre en pointillés + description */
.attente {
    position: absolute;
    inset: 10px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border: 1px dashed var(--pointilles);
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: var(--texte-2);
}
.attente__fichier { font-size: 12px; letter-spacing: .06em; color: var(--texte-3); }

/* ---------- 3. En-tête ---------- */
.entete {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 0 var(--marge);
    background: var(--bg-entete);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ligne);
    transition: transform .35s var(--ease);
}
/* Petit écran : l'en-tête se retire quand on descend */
.entete.is-cachee { transform: translateY(-100%); }
.entete:focus-within { transform: none; }

.entete__barre {
    max-width: var(--largeur);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "logo" "nav";
    align-items: center;
    column-gap: 20px;
}

.logo {
    grid-area: logo;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--texte);
    text-decoration: none;
    font-family: var(--police-titre);
    font-size: 15px;
    letter-spacing: .26em;
    text-transform: uppercase;
}
.logo:hover { color: var(--texte); }

/* Les yeux du chat en pixels (3 cases : œil, pupille, œil) */
.logo__yeux { display: flex; gap: 6px; }
.logo__oeil {
    width: 9px;
    height: 6px;
    background: linear-gradient(90deg, var(--oeil) 0 33.3%, var(--pupille) 33.3% 66.6%, var(--oeil) 66.6%);
    box-shadow: 0 0 6px var(--oeil-lueur);
    transition: transform .12s ease;
}
.logo.is-closed .logo__oeil { transform: scaleY(.18); }

.nav {
    grid-area: nav;
    display: flex;
    gap: 22px;
    margin: 0 calc(var(--marge) * -1);
    padding: 0 var(--marge);
    overflow-x: auto;
    scrollbar-width: none;
    font-family: var(--police-titre);
    font-size: 12.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
    position: relative;
    flex: none;
    padding: 8px 0 12px;
    color: var(--texte-2);
    text-decoration: none;
    transition: color .2s ease, text-shadow .2s ease;
}

/* Lumière : lien survolé ou section en cours */
.nav a:hover,
.nav a.is-active { color: var(--lumiere); text-shadow: var(--lueur); }
.nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: .18em;
    bottom: 5px;
    height: 1px;
    background: var(--lumiere);
    box-shadow: var(--lueur);
}

@media (min-width: 960px) {
    .entete__barre { grid-template-columns: auto 1fr; grid-template-areas: "logo nav"; column-gap: 36px; }
    .logo { padding: 14px 0; }
    .nav { justify-content: flex-end; gap: 30px; margin: 0; padding: 0; overflow: visible; }
    .nav a { padding: 20px 0; }
    .nav a.is-active::after { bottom: 14px; }
}

/* ---------- 4. Accueil ---------- */
.hero {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--entete-h));
    min-height: calc(100svh - var(--entete-h));
    scroll-margin-top: var(--entete-h);
}

.hero__cadre {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 440px;
    overflow: hidden;
    background: var(--hero-bg);
}

.hero__parallaxe { position: absolute; inset: -3%; will-change: transform; }
.hero__zoom { position: absolute; inset: 0; }

.hero__image {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    z-index: 0;
    transform: scale(1);
    transition: opacity 1.4s ease, transform 9s cubic-bezier(.2, .4, .3, 1);
}
.hero__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--hero-filtre);
}
/* Voile par-dessus chaque image, pour la lisibilité du titre */
.hero__image::after { content: ""; position: absolute; inset: 0; background: var(--hero-voile); }
/* L'image précédente reste visible dessous pendant le fondu */
.hero__image.is-prev { opacity: 1; z-index: 1; }
.hero__image.is-active { opacity: 1; z-index: 2; }

.attente--hero {
    inset: 9% auto auto 7%;
    max-width: min(22em, 86%);
    align-items: flex-start;
    text-align: left;
    font-size: 13px;
}

.hero__contenu {
    position: relative;
    z-index: 3;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 96px var(--marge) 56px;
    text-align: center;
}

.hero__titre {
    margin: 0;
    font-family: var(--police-titre);
    font-weight: 400;
    font-size: clamp(50px, 13.2vw, 232px);
    line-height: .9;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--hero-texte);
    text-wrap: balance;
}

.hero__accroche {
    max-width: 32em;
    margin: clamp(22px, 3.6vh, 38px) 0 clamp(28px, 5vh, 46px);
    font-weight: 300;
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.6;
    color: var(--hero-texte-2);
    text-wrap: balance;
}

.bouton {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 26px 0 28px;
    border-radius: 2px;
    background: var(--bouton-bg);
    color: var(--bouton-texte);
    text-decoration: none;
    font-family: var(--police-titre);
    font-size: 14px;
    letter-spacing: .18em;
    text-transform: uppercase;
    transition: background .3s ease, box-shadow .3s ease;
}
.bouton:hover { background: var(--bouton-survol); color: var(--bouton-texte); box-shadow: var(--lueur-bouton); }
.bouton span { font-family: var(--police-texte); font-size: 18px; letter-spacing: 0; }

/* Onglets Web / Jeu vidéo / Audiovisuel / Hardware */
.hero__onglets { padding: 0 var(--marge); }
.hero__onglets-barre {
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 6px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.hero__onglets-liste { display: flex; flex-wrap: wrap; column-gap: clamp(20px, 3.4vw, 44px); }

.onglet {
    position: relative;
    min-height: 44px;
    margin: 0;
    padding: 12px 0;
    border: 0;
    background: none;
    color: var(--texte-3);
    font-family: var(--police-titre);
    font-size: 12.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .3s ease, text-shadow .3s ease;
}
.onglet:hover { color: var(--texte); }
.onglet.is-active { color: var(--lumiere); text-shadow: var(--lueur); }

.onglet::before,
.onglet__progression { position: absolute; left: 0; right: .22em; bottom: 6px; height: 1px; }
.onglet::before { content: ""; background: var(--ligne-2); }
.onglet__progression {
    background: var(--lumiere);
    box-shadow: var(--lueur);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* Bouton pause / lecture du diaporama */
.hero__pause {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ligne-2);
    border-radius: 50%;
    background: none;
    color: var(--texte-2);
    cursor: pointer;
}
.hero__pause:hover { color: var(--texte); border-color: var(--texte-2); }
.hero__pause span { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hero__pause[aria-pressed="true"] span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent currentColor;
}

/* ---------- 5. Sections ---------- */
.section { padding: 0 var(--marge); scroll-margin-top: var(--entete-h); }

.section__inner {
    max-width: var(--largeur);
    margin: 0 auto;
    padding: clamp(72px, 11vw, 128px) 0;
    border-top: 1px solid var(--ligne);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.section__label {
    margin: 0;
    font-family: var(--police-titre);
    font-size: 12.5px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--texte-2);
}

.section__titre {
    margin: 0;
    font-family: var(--police-titre);
    font-weight: 400;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    color: var(--texte);
    text-wrap: balance;
}

.section__corps { min-width: 0; display: grid; gap: 48px; margin-top: 28px; }

.texte { margin: 0; max-width: 40em; font-weight: 300; color: var(--texte-2); text-wrap: pretty; }
.texte--grand { font-family: var(--police-titre); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; color: var(--texte); }

/* L'étiquette (« Projets », « À propos »…) reste au-dessus du titre, même sur grand écran :
   le contenu prend toute la largeur. */

/* ---------- 5b. À propos ---------- */
/* À propos : le texte (grand et clair) à gauche, une photo à droite */
.apropos { display: grid; gap: 32px; align-items: start; }
.apropos__texte { display: grid; gap: 20px; max-width: 36em; }
.apropos__texte p { margin: 0; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.75; color: var(--texte); text-wrap: pretty; }
/* « jeux exigeants » : aperçu des jeux au survol (ou au toucher sur mobile) */
.jeux {
    position: relative;
    border-bottom: 1px dashed var(--texte-2);
    cursor: help;
}
.jeux:focus { outline: none; }
.jeux:focus-visible { outline: 1px solid var(--texte); outline-offset: 3px; }
.jeux__apercu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 20;
    width: min(340px, 80vw);
    padding: 16px 18px 6px;
    border: 1px solid var(--ligne-2);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    cursor: default;
}
.jeux:hover .jeux__apercu,
.jeux:focus .jeux__apercu,
.jeux:focus-within .jeux__apercu { opacity: 1; visibility: visible; transform: none; }
.jeux__titre {
    display: block;
    margin-bottom: 6px;
    font-family: var(--police-titre);
    font-size: 11.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--texte-3);
}
.jeux__jeu { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ligne); }
.jeux__apercu img { flex: none; width: 44px; height: 58px; object-fit: cover; border-radius: 4px; }
.jeux__texte { display: grid; line-height: 1.4; }
.jeux__texte strong { font-weight: 400; font-size: 16px; color: var(--texte); }
.jeux__texte span { font-size: 13px; color: var(--texte-3); }
/* Petit écran : l'aperçu s'aligne sur le paragraphe, pour ne pas dépasser de l'écran */
@media (max-width: 599px) {
    .apropos__texte p { position: relative; }
    .jeux { position: static; }
    .jeux__apercu { top: calc(100% + 8px); width: 100%; }
}
.apropos__photo {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    width: 100%;
    max-width: 420px;
    justify-self: end;
    overflow: hidden;
    border: 1px solid var(--ligne-2);
    border-radius: 10px;
    background: var(--media-vide);
}
.apropos__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) {
    .apropos { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; }
}

/* ---------- 5c. Projets ---------- */
.filtres__barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.filtre {
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--ligne-2);
    border-radius: 999px;
    background: none;
    color: var(--texte-2);
    font-family: var(--police-titre);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.filtre:hover { color: var(--texte); border-color: var(--texte-2); }
.filtre.is-active { background: var(--texte); border-color: var(--texte); color: var(--bg); }
.filtres__compte { margin: 0; font-size: 14px; color: var(--texte-3); }

/* Cartes de projet : des box de la même taille, alignées sur chaque rangée */
.projets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    grid-auto-rows: 1fr; /* toutes les rangées prennent la hauteur de la plus grande carte */
    gap: 28px;
    margin-top: -12px;
}
.projet {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ligne-2);
    border-radius: 10px;
    background: var(--surface);
    transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease;
}
.projet:hover {
    transform: translateY(-4px);
    border-color: var(--texte-2);
    box-shadow: var(--ombre-carte);
}
.projet[hidden] { display: none; }
@media (min-width: 760px) {
    .projets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Image du projet (bloc vide tant qu'il n'y a pas d'image) */
.projet__media {
    position: relative;
    display: block;
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--media-vide);
}
.projet__media img,
.projet__media video {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--filtre-media);
}
.projet__media video[controls] { object-fit: contain; background: var(--video-fond); }

/* Date, titre, description, stack */
.projet__corps { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 0; }
.projet__date { margin: 0; font-family: var(--police-titre); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--texte-3); }
.projet__titre { margin: 0; font-family: var(--police-titre); font-weight: 400; font-size: clamp(22px, 2.2vw, 26px); line-height: 1.2; color: var(--texte); }
.projet__titre a { color: inherit; text-decoration: none; }
.projet__titre a:hover { color: var(--lumiere); text-shadow: var(--lueur); }
.projet__resume {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 4; /* au-delà de 4 lignes, le texte est coupé avec « … » */
    -webkit-box-orient: vertical;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--texte-2);
}
.projet__stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.projet__stack li {
    padding: 3px 10px;
    border: 1px solid var(--ligne-2);
    border-radius: 999px;
    font-family: var(--police-mono);
    font-size: 11.5px;
    color: var(--texte-2);
}

/* Pied de la carte : « Voir le projet » à gauche, liens annexes à droite */
.projet__pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 22px;
    padding: 14px 24px;
    border-top: 1px solid var(--ligne);
}
.projet__voir {
    font-family: var(--police-titre);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--texte);
    text-decoration: none;
    transition: color .2s ease, text-shadow .2s ease;
}
.projet__voir:hover { color: var(--lumiere); text-shadow: var(--lueur); }
.projet__annexes { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.projet__annexes a { font-size: 13.5px; color: var(--texte-2); text-decoration: none; }
.projet__annexes a:hover { color: var(--lumiere); }

@media (prefers-reduced-motion: reduce) {
    .projet, .projet:hover { transition: none; transform: none; }
}

.projet__liens { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.lien-projet {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--ligne-2);
    border-radius: 2px;
    color: var(--texte);
    text-decoration: none;
    font-family: var(--police-titre);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    transition: border-color .2s ease, color .2s ease;
}
.lien-projet:hover { border-color: var(--lumiere); color: var(--lumiere); }
.lien-projet--principal { background: var(--texte); border-color: var(--texte); color: var(--bg); }
.lien-projet--principal:hover { color: var(--bg); }
.lien-projet.is-vide { border-style: dashed; color: var(--texte-3); }
.lien-projet.is-vide .a-remplir { border: 0; padding: 0; font-size: 12px; }

/* ---------- 5d. Fiches techniques (page Mon matériel et Homelab) ---------- */

/* Liste simple libellé / valeur (les technos sur la page d'un projet) */
.specs { display: grid; margin: 0; font-family: var(--police-mono); font-size: 14px; line-height: 1.55; border-top: 1px solid var(--ligne); }
.specs > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.specs dt { color: var(--texte-3); }
.specs dd { margin: 0; color: var(--texte); }
.specs .a-remplir { font-size: 13px; }

/* La box d'une fiche technique : même style que les cartes de projet */
.fiche {
    padding: 22px 24px 8px;
    border: 1px solid var(--ligne-2);
    border-radius: 10px;
    background: var(--surface);
}
.fiche__titre {
    margin: 0 0 10px;
    font-family: var(--police-titre);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.2;
    color: var(--texte);
}
.fiche__specs { display: grid; margin: 0; }
.fiche__specs > div { display: grid; gap: 2px; padding: 11px 0; border-top: 1px solid var(--ligne); }
.fiche__specs dt {
    font-family: var(--police-titre);
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--texte-3);
}
.fiche__specs dd { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--texte); }
.fiche__pied { padding: 14px 0 10px; border-top: 1px solid var(--ligne); }

/* Section Contact : mêmes lignes que les fiches, sans la box */
.contact { max-width: 40em; border-bottom: 1px solid var(--ligne); }
.contact dd a { font-size: 17px; overflow-wrap: anywhere; }
@media (min-width: 640px) {
    .contact > div { grid-template-columns: 11em minmax(0, 1fr); gap: 18px; align-items: baseline; }
}

/* Page Mon matériel : le PC fixe (et sa photo), puis une grille de box */
.materiel__principal { display: grid; gap: 28px; }
/* Serveur et portable côte à côte, à la même hauteur */
.materiel__duo { display: grid; gap: 28px; }
.materiel__duo .fiche { height: 100%; }
@media (min-width: 760px) {
    .materiel__duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.photo { position: relative; margin: 0; overflow: hidden; border-radius: 10px; background: var(--media-vide); }
.photo img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.photo--pc { aspect-ratio: 4 / 5; }
.photo--bureau { aspect-ratio: 16 / 9; }

/* Sur grand écran, libellé à gauche et valeur à droite dans les box larges */
@media (min-width: 640px) {
    .materiel__principal .fiche__specs > div { grid-template-columns: 11em minmax(0, 1fr); gap: 18px; align-items: baseline; }
}
@media (min-width: 1000px) {
    /* Sur grand écran, la photo du PC prend la hauteur de sa fiche (pas de trou à côté) */
    .materiel__principal { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: stretch; }
    .materiel__principal .photo--pc { aspect-ratio: auto; min-height: 320px; }
}

/* ---------- 5e. Compétences et contact ---------- */
/* Deux colonnes de box : Stack et Outils à gauche, les compétences (une box par domaine) à droite */
.univers { display: grid; gap: 20px; margin: 0; }
.univers__colonne { display: flex; flex-direction: column; gap: 20px; }
.univers__colonne > div:last-child { flex: 1; } /* la dernière box s'étire : les deux colonnes finissent à la même hauteur */
@media (min-width: 960px) {
    .univers { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
.univers__entete {
    margin: 0 0 -6px;
    font-family: var(--police-titre);
    font-weight: 400;
    font-size: 22px;
    color: var(--texte);
}
.univers__colonne > div {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px 22px;
    border: 1px solid var(--ligne-2);
    border-radius: 10px;
    background: var(--surface);
}
.univers__titre {
    margin: 0;
    font-family: var(--police-titre);
    font-weight: 400;
    font-size: 12.5px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--texte-3);
}

/* Logos de la stack et des outils, sur des cases en verre dépoli, avec leur nom au survol */
/* Les cases s'étirent pour remplir toute la largeur de la box (--colonnes est calculé dans index.php) */
.logos { display: grid; grid-template-columns: repeat(var(--colonnes, 6), minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.logos li {
    position: relative;
    display: grid;
    place-items: center;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.logos li:hover,
.logos li:focus-visible {
    border-color: rgba(255, 255, 255, .28);
    background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
    transform: translateY(-2px);
    outline: none;
}
.logos img { width: 26px; height: 26px; filter: invert(1) brightness(.95); }
/* Petit écran : 5 cases par rangée au maximum, pour qu'elles restent assez larges */
@media (max-width: 599px) {
    .logos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .logos .logos__sigle { font-size: 11px; letter-spacing: 0; text-transform: none; }
}
/* SQL et SSH n'ont pas de logo : leur nom est écrit dans la case */
.logos__sigle { font-family: var(--police-titre); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--texte); }
.logos__nom {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 10;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(20, 20, 20, .6);
    backdrop-filter: blur(12px);
    font-size: 13px;
    white-space: nowrap;
    color: var(--texte);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}
.logos li:hover .logos__nom,
.logos li:focus .logos__nom { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
    .logos li, .logos li:hover { transition: none; transform: none; }
}

/* Compétences : une liste par box, avec une puce discrète */
.competences { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.competences li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.5; color: var(--texte); }
.competences li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--texte-3);
}

/* ---------- 6. Barre de contact, fixée en bas de l'écran ---------- */
:root { --barre-h: 52px; }
body { padding-bottom: var(--barre-h); } /* le bas de la page n'est jamais caché par la barre */

.barre-contact {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 0 var(--marge);
    background: var(--bg-entete);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--ligne);
}
.barre-contact__barre {
    max-width: var(--largeur);
    min-height: var(--barre-h);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
}
.barre-contact__stage {
    margin: 0;
    font-family: var(--police-titre);
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--texte-2);
}
.barre-contact__detail { display: none; }
.barre-contact__liens {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--police-titre);
    font-size: 12.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.barre-contact__liens a { color: var(--texte-2); text-decoration: none; transition: color .2s ease, text-shadow .2s ease; }
.barre-contact__liens a:hover { color: var(--lumiere); text-shadow: var(--lueur); }
.barre-contact__liens .barre-contact__cv {
    padding: 7px 14px;
    border: 1px solid var(--ligne-2);
    border-radius: 999px;
    color: var(--texte);
}
@media (min-width: 760px) {
    .barre-contact__detail { display: inline; }
}
.barre-contact__liens li { white-space: nowrap; }
@media (max-width: 479px) {
    .barre-contact__stage { font-size: 10.5px; letter-spacing: .06em; }
    .barre-contact__liens { gap: 12px; font-size: 10.5px; letter-spacing: .08em; }
    .barre-contact__liens .barre-contact__cv { padding: 5px 10px; }
}

/* ---------- 7. Chat noir ---------- */
.mascotte {
    position: fixed;
    right: clamp(8px, 2vw, 24px);
    bottom: calc(var(--barre-h) + clamp(8px, 2vw, 16px)); /* posé juste au-dessus de la barre de contact */
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none; /* seul le chat est cliquable, jamais la bulle */
}

.mascotte__bulle {
    position: relative;
    width: min(260px, calc(100vw - 32px));
    padding: 12px 16px 13px;
    border: 1px solid var(--ligne-2);
    border-radius: 4px;
    background: var(--bulle);
    box-shadow: var(--ombre-bulle);
    transition: opacity .3s ease, transform .3s ease;
}
.mascotte__bulle.is-hidden { opacity: 0; transform: translateY(6px); }
/* Pointe de la bulle, centrée sur le chat */
.mascotte__bulle::after {
    content: "";
    position: absolute;
    right: calc(var(--chat) / 2 - 6px);
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: var(--bulle);
    border-right: 1px solid var(--ligne-2);
    border-bottom: 1px solid var(--ligne-2);
    transform: rotate(45deg);
}

.mascotte__nom {
    margin: 0 0 4px;
    font-family: var(--police-titre);
    font-size: 11px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--texte-3);
}
.mascotte__replique { margin: 0; min-height: 3em; font-size: 14.5px; line-height: 1.5; color: var(--texte); }

.mascotte__bouton {
    position: relative;
    width: var(--chat);
    height: var(--chat);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
}
.mascotte__canvas { width: 100%; height: 100%; image-rendering: pixelated; }

/* Le chat dort : des « z » au-dessus de la tête */
.mascotte__z {
    position: absolute;
    right: 4px;
    top: -4px;
    width: 30px;
    height: 30px;
    font-family: var(--police-titre);
    color: var(--texte-2);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}
.mascotte__z span { position: absolute; line-height: 1; }
.mascotte__z span:nth-child(1) { left: 0; bottom: 0; font-size: 10px; }
.mascotte__z span:nth-child(2) { left: 9px; bottom: 9px; font-size: 13px; }
.mascotte__z span:nth-child(3) { left: 19px; bottom: 19px; font-size: 16px; }
.mascotte.is-asleep .mascotte__z { opacity: 1; }

@media (min-width: 640px) {
    :root { --chat: 80px; }
}

/* ---------- 8. Animations ---------- */
/* Tout est désactivé si le visiteur demande moins d'animations */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    /* Intro (2,3 s) : obturateur qui s'ouvre depuis une ligne, puis mise au point sur le nom */
    .hero__cadre         { animation: obturateur 1.1s cubic-bezier(.77, 0, .18, 1) .1s backwards; }
    .hero__zoom          { animation: recul 2.2s var(--ease) .1s backwards; }
    .hero__titre         { animation: mise-au-point 1.4s var(--ease) .55s backwards; }
    .hero__accroche      { animation: montee .8s var(--ease) 1.1s backwards; }
    .hero .bouton        { animation: montee .8s var(--ease) 1.25s backwards; }
    .entete              { animation: apparition .8s ease 1.2s backwards; }
    .hero__onglets-barre { animation: montee .8s var(--ease) 1.35s backwards; }
    .mascotte            { animation: montee .7s var(--ease) 1.5s backwards; }

    /* Les « z » montent un par un */
    .mascotte.is-asleep .mascotte__z span { animation: zzz 2.4s ease-in-out infinite backwards; }
    .mascotte.is-asleep .mascotte__z span:nth-child(2) { animation-delay: .8s; }
    .mascotte.is-asleep .mascotte__z span:nth-child(3) { animation-delay: 1.6s; }

    /* Après l'intro (classe is-ready ajoutée par script.js) */
    .hero.is-ready .hero__image.is-active,
    .hero.is-ready .hero__image.is-prev { transform: scale(1.08); }
    .hero.is-ready .onglet.is-active .onglet__progression { animation: progression var(--duree-image) linear forwards; }
    .hero.is-paused .onglet__progression,
    .hero.is-stopped .onglet__progression { animation-play-state: paused; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__image { transition: opacity .3s ease; }
    .onglet.is-active .onglet__progression { transform: scaleX(1); }
    .hero__pause { display: none; }
}

@keyframes obturateur    { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0); } }
@keyframes recul         { from { transform: scale(1.2); } }
@keyframes mise-au-point { from { opacity: 0; filter: blur(22px); transform: scale(1.08); } }
@keyframes montee        { from { opacity: 0; transform: translateY(14px); } }
@keyframes apparition    { from { opacity: 0; } }
@keyframes progression   { to { transform: scaleX(1); } }
@keyframes zzz           { 0% { opacity: 0; transform: translate(-6px, 6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(4px, -6px); } }

/* ---------- 9. Corrections et ajouts (version PHP) ---------- */

/* Menu mobile : les 5 liens passent sur deux lignes au lieu de défiler hors de l'écran */
@media (max-width: 959px) {
    .nav { flex-wrap: wrap; row-gap: 0; overflow: visible; }
}

/* Bulle du chat sur mobile : plus étroite, et masquée pendant l'accueil
   (classe ajoutée par script.js) pour ne jamais cacher les onglets */
@media (max-width: 639px) {
    .mascotte__bulle { width: min(210px, calc(100vw - 32px)); padding: 10px 12px 11px; }
    .mascotte__replique { min-height: 0; font-size: 13.5px; }
    .mascotte.sur-accueil .mascotte__bulle { display: none; }
}


/* ---------- 10. Pages projet (projet.php) ---------- */

.retour {
    font-family: var(--police-titre);
    color: var(--texte-2);
    text-decoration: none;
    transition: color .2s ease;
}
.retour:hover { color: var(--lumiere); }

/* La page commence sous l'en-tête, sans l'accueil plein écran */
.page-projet .section__inner { padding-top: clamp(40px, 7vw, 80px); }
.page-projet .section__titre { margin-top: 6px; }

.page-projet__media { aspect-ratio: 16 / 9; }

.page-projet__corps { display: grid; gap: 32px; }
.page-projet__texte { display: grid; gap: 18px; max-width: 64ch; }
.page-projet__infos { display: grid; gap: 20px; align-content: start; }

@media (min-width: 900px) {
    .page-projet__corps { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 56px; }
}

/* Lien vers le projet suivant, en bas de page */
.page-projet__suivant {
    display: grid;
    gap: 6px;
    padding: 28px 0 0;
    border-top: 1px solid var(--ligne);
    text-decoration: none;
}
.page-projet__suivant-label {
    font-family: var(--police-titre);
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--texte-3);
}
.page-projet__suivant-titre {
    font-family: var(--police-titre);
    font-size: clamp(24px, 3vw, 34px);
    color: var(--texte);
    transition: color .2s ease, text-shadow .2s ease;
}
.page-projet__suivant:hover .page-projet__suivant-titre { color: var(--lumiere); text-shadow: var(--lueur); }

/* Dans la page projet, le titre est dans le corps : il ne doit pas suivre la grille de la section */
.page-projet .section__corps { gap: 28px; }
.page-projet .section__corps .section__titre { grid-column: auto; margin-top: -16px; }
/* Sur sa propre page, le projet s'affiche en couleur */
.page-projet__media img,
.page-projet__media video { filter: none; }
#projet .bouton { justify-self: start; }

/* ---------- Refonte (oct. 2026) : accueil plus direct, intertitres des projets ---------- */

/* Deux boutons côte à côte (accueil et contact) */
.hero__boutons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero__boutons--gauche { justify-content: flex-start; }

/* Bouton secondaire : seulement un contour */
.bouton--contour {
    background: transparent;
    color: var(--hero-texte);
    border: 1px solid currentColor;
}
.bouton--contour:hover { background: transparent; color: var(--hero-texte); }
.section .bouton--contour,
.section .bouton--contour:hover { color: var(--texte); }

/* Intertitres dans la page d'un projet (paragraphes qui commencent par "## ") */
.page-projet__intertitre {
    margin: 18px 0 -6px;
    font-family: var(--police-titre);
    font-weight: 400;
    font-size: 13px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--texte-3);
}
.page-projet__intertitre:first-child { margin-top: 0; }

/* Les outils, sous le texte de l'À propos */
#profil .univers { margin-top: 12px; }

