/* Studio Joubert : feuille unique. Charte Studio Joubert v1.0 : Joubert Sans (OFL), noir, blanc, or #C9A227 en accent rare.
   Les sections alternent noir et blanc ; en mode sombre, le blanc devient anthracite. */
@font-face { font-family: "Joubert Sans"; src: url("/assets/fonts/joubert-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Joubert Sans"; src: url("/assets/fonts/joubert-sans-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --fond: #fff; --clair: #fff; --pied: #f0f0f0; --texte: #000;
  --t2: rgb(0 0 0 / 0.66); --t3: rgb(0 0 0 / 0.58); --filet: rgb(0 0 0 / 0.12);
  --or: #c9a227; --anneau: #655113;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --marge: clamp(1.25rem, 5vw, 3.5rem);
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #000; --clair: #1c1c1c; --pied: #1c1c1c; --texte: #fff; --t2: rgb(255 255 255 / 0.7); --t3: rgb(255 255 255 / 0.6); --filet: rgb(255 255 255 / 0.16); --anneau: #c9a227; }
}
.noir { --fond: #000; --texte: #fff; --t2: rgb(255 255 255 / 0.7); --t3: rgb(255 255 255 / 0.6); --filet: rgb(255 255 255 / 0.16); --anneau: #c9a227; background: #000; color: #fff; }
.clair { background: var(--clair); }
/* Grain de matière : bruit gris presque invisible, qui éclaire le noir et ternit le blanc (outils/grain.py) */
.noir, .clair { background-image: url("/assets/grain.png"); background-size: 128px; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1rem/1.5 "Joubert Sans", system-ui, sans-serif; word-spacing: 0.04em; -webkit-font-smoothing: antialiased; }
::selection { background: var(--or); color: #000; }
h1, h2, p, dl, dd, ul { margin: 0; }
h1, h2, dt { font-weight: 500; font-feature-settings: "calt" 1, "kern" 1; text-wrap: balance; }
p, dd { text-wrap: pretty; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--anneau); outline-offset: 4px; border-radius: 2px; }
.cadre { width: 100%; max-width: 75rem; margin-inline: auto; padding-inline: var(--marge); }

/* Lien : filet discret, balayage or de gauche à droite */
.lien { position: relative; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.lien::before, .lien::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.14em; height: 1px; pointer-events: none; }
.lien::before { background: currentColor; opacity: 0.28; }
.lien::after { height: 2px; bottom: -0.18em; background: var(--or); transform: scaleX(0); transform-origin: right; transition: transform 420ms var(--ease-in-out); }
.lien:active::after { transform: scaleX(1); transform-origin: left; transition-duration: 160ms; }
@media (hover: hover) and (pointer: fine) { .lien:hover::after { transform: scaleX(1); transform-origin: left; } }

/* Logo et signe. Le j est une copie du f tournée d'un demi-tour ; chacun se trace à travers son masque :
   les deux barres l'une après l'autre, puis les deux crosses presque ensemble, puis le mot. */
.marque { display: block; height: 1.75rem; width: auto; fill: currentColor; overflow: visible; }
.trace { fill: none; stroke: #fff; stroke-width: 9; stroke-dasharray: 1; stroke-dashoffset: 0; }
.joue .barre-f { animation: trace 260ms var(--ease-out) both; }
.joue .barre-j { animation: trace 260ms var(--ease-out) 170ms both; }
.joue .fut-f { animation: trace 520ms var(--ease-out) 360ms both; }
.joue .fut-j { animation: trace 520ms var(--ease-out) 410ms both; }
.joue .mot { animation: mot 300ms var(--ease-out) 820ms both; }
.attend .trace { stroke-dashoffset: 1; }
@keyframes trace { from { stroke-dashoffset: 1; } }
@keyframes mot { from { opacity: 0; transform: translateX(-4px); } }

/* En-tête */
.haut { position: absolute; inset: 0 0 auto; z-index: 2; }
.haut.plein { position: static; }
.haut:not(.plein) { background: none; } /* sur l'accueil, l'en-tête flotte sur le ruban sans le couper */
.entete { display: flex; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
.logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--texte); }
.langue { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.875rem; }
.langue.lien::before, .langue.lien::after { bottom: 0.6rem; }
@media (max-width: 30rem) { .marque { height: 1.5rem; } }

/* Ouverture : noir, le ruban et son épure derrière le titre */
.scene { position: relative; min-height: 100svh; display: grid; padding-top: 5.5rem; overflow: hidden; isolation: isolate; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; touch-action: pan-y; }
.hero { align-self: end; padding-bottom: clamp(3rem, 9vh, 5.5rem); pointer-events: none; }
.hero a { pointer-events: auto; }
.scene h1 { font-size: clamp(3rem, min(8.5vw, 13svh), 7rem); line-height: 1; letter-spacing: -0.045em; }
.ligne { display: block; width: max-content; overflow: hidden; padding-block: 0.04em 0.14em; margin-block: -0.04em -0.14em; }
.ligne > span { display: block; animation: monte 1000ms var(--ease-out) both; animation-delay: 450ms; }
.ligne:nth-child(2) > span { animation-delay: 540ms; }
.ligne:nth-child(3) > span { animation-delay: 630ms; }
@keyframes monte { from { transform: translateY(110%); } }
.phrase { max-width: 30rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--t2); }
.phrase .lien { color: var(--texte); }
.contact { margin-top: clamp(1.25rem, 3.5vh, 2.25rem); font-weight: 500; }
.contact a { display: inline-block; padding-block: 0.6rem; }
.arrive { animation: arrive 800ms var(--ease-out) 950ms both; }
.contact.arrive { animation-delay: 1100ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }

/* Bandeau des disciplines */
.bandeau { overflow: hidden; border-bottom: 1px solid var(--filet); padding-block: clamp(1.25rem, 3vw, 1.75rem); }
.piste { display: flex; width: max-content; animation: defile 52s linear infinite; }
.piste ul { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); padding: 0 clamp(1.5rem, 3vw, 2.75rem) 0 0; list-style: none; }
.piste li { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); font-size: clamp(1.5rem, 4vw, 2.75rem); font-weight: 500; letter-spacing: -0.025em; font-feature-settings: "calt" 1, "kern" 1; white-space: nowrap; }
.piste li::after { content: ""; width: 0.16em; height: 0.16em; border-radius: 50%; background: currentColor; opacity: 0.4; }
@keyframes defile { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .bandeau:hover .piste { animation-play-state: paused; } }

/* Profil et compétences */
.bloc { display: grid; gap: 1.5rem; padding-block: clamp(4.5rem, 10vw, 8rem); }
.bloc > h2 { font-size: 1rem; line-height: 1.5; }
@media (min-width: 52rem) { .bloc { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem; } .bloc > h2 { padding-top: 0.45rem; } }
.accroche { max-width: 38rem; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.4; letter-spacing: -0.012em; }
.domaines { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.domaines div { display: grid; gap: 0.35rem; padding-block: 1.25rem; border-top: 1px solid var(--filet); }
.domaines dt { font-size: 1rem; }
.domaines dd { max-width: 34rem; color: var(--t2); }
@media (min-width: 40rem) { .domaines div { grid-template-columns: 13rem minmax(0, 1fr); gap: 1.5rem; } }

/* Appel : noir, le signe or s'y construit */
.appel { padding-block: clamp(5rem, 12vw, 9rem); }
.appel .cadre { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: end; }
@media (min-width: 52rem) { .appel .cadre { grid-template-columns: minmax(0, 1fr) auto; } }
.appel h2 { max-width: 14ch; font-size: clamp(2.25rem, 6.5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.courriel { display: inline-block; margin-top: clamp(1.75rem, 4vw, 2.5rem); font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 500; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.appel .signe { display: block; width: clamp(4rem, 11vw, 8.5rem); height: auto; fill: var(--or); }
@media (max-width: 51.99rem) { .appel .signe { order: -1; } }

/* Pied : le logo et deux liens, rien d'autre (les informations légales ont leur page) */
.pied { padding-block: clamp(2rem, 5vw, 3rem); background: var(--pied); font-size: 0.875rem; }
.pied-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.pied .marque { height: 1.5rem; }
.pied nav { display: flex; gap: 1.75rem; }
.pied nav a { display: inline-flex; align-items: center; min-height: 44px; }
.pied .lien::before, .pied .lien::after { bottom: 0.6rem; }

/* Mentions légales */
.legal { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem); }
.legal h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.1; letter-spacing: -0.04em; }
.legal .maj { margin-top: 1rem; font-size: 0.875rem; color: var(--t3); }
.legal section { display: grid; gap: 0.5rem; max-width: 46rem; padding-block: 1.5rem; border-top: 1px solid var(--filet); }
.legal section:first-of-type { margin-top: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 52rem) { .legal section { grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; max-width: none; } }
.legal h2 { font-size: 1rem; line-height: 1.5; }
.legal section > div { display: grid; gap: 0.75rem; max-width: 38rem; color: var(--t2); }
.legal strong { font-weight: 500; color: var(--texte); }
.legal .lien { color: var(--texte); }

/* Page introuvable */
.perdu { min-height: 70svh; display: grid; align-content: center; gap: 1.5rem; }
.perdu h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1.05; letter-spacing: -0.04em; }

/* Mouvement réduit : logo fixe, textes en simple fondu, bandeau immobile */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .joue .trace, .joue .mot { animation: none; }
  .ligne > span, .arrive { animation: fondu 400ms ease both; }
  @keyframes fondu { from { opacity: 0; } }
  .piste { animation: none; flex-wrap: wrap; width: auto; }
  .piste ul[aria-hidden] { display: none; }
  .piste ul { flex-wrap: wrap; padding-inline: var(--marge); }
}
