/* Le site de Guillaume Mathen : la salle de cours, lumières éteintes.
   Seuls brillent ce que voient les étudiants : l'écran, le téléphone, les post-it, les plaques des écoles.
   Rayons : boutons en pilule ; écrans, images, plaques et panneaux 10 px ; post-it 2 px. */

@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-weight: 400 760;
  font-stretch: 62% 100%;
  font-display: swap;
  src: url(/polices/roboto-flex-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;
}
@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-weight: 400 760;
  font-stretch: 62% 100%;
  font-display: swap;
  src: url(/polices/roboto-flex-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --salle: #1d1f28;
  --trait: #343848;
  --texte: #ece7da;
  --doux: #a7a8b1;
  --orange: #f09800;
  --creme: #f7f2e2;
  --encre: #333644;
  --souligne: #5a5f76;
  --ombre: rgba(4, 5, 10, .85);
  --gouttiere: max(56px, calc((100% - 1240px) / 2));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--salle);
  color: var(--texte);
  font-family: 'Roboto Flex', Roboto, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
p, li, dd { text-wrap: pretty; }
h1, h2, h3 {
  margin: 0;
  color: var(--texte);
  font-weight: 670;
  font-stretch: 78%;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
}

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.evitement {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--creme); color: var(--encre); padding: 8px 18px; border-radius: 999px; font-weight: 650;
}
.evitement:focus { top: 12px; }
.insecable { white-space: nowrap; }

/* Navigation */
.nav { display: flex; align-items: center; gap: 34px; padding: 22px var(--gouttiere); }
.marque { font-weight: 680; font-stretch: 84%; font-size: 21px; letter-spacing: -.005em; white-space: nowrap; }
.nav nav { margin-left: auto; display: flex; gap: 30px; font-size: 15.5px; color: var(--doux); }
.nav nav a:hover { color: var(--texte); }

/* Boutons et liens */
.btn {
  display: inline-block; background: var(--orange); color: var(--salle); font-weight: 680; font-size: 16.5px;
  line-height: 1.3; padding: 15px 28px; border-radius: 999px; white-space: nowrap;
}
button.btn { border: 0; font-family: inherit; cursor: pointer; }
.btn:hover { background: #ffaa1a; }
.btn:active { transform: translateY(1px); }
.btn-l {
  border: 1.5px solid rgba(236, 231, 218, .35); padding: 8px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.btn-l:hover { border-color: var(--texte); }
.lien-t { font-weight: 620; font-size: 16.5px; border-bottom: 2px solid rgba(240, 152, 0, .65); padding-bottom: 2px; }
.lien-t:hover { border-bottom-color: var(--orange); }
.lien-d { color: var(--doux); text-decoration: underline; text-decoration-color: var(--souligne); text-underline-offset: 5px; }
.lien-d:hover { color: var(--texte); }

/* Pied de page */
.pied {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding: 26px var(--gouttiere);
  font-size: 14.5px; color: var(--doux);
}
.pied .m { color: var(--texte); font-weight: 650; margin-right: auto; }
.pied a:hover { color: var(--texte); }

/* Pages simples : mentions légales, accès aux cours */
.simple { padding: 56px var(--gouttiere) 96px; }
.simple > * { max-width: 68ch; }
.simple > dl { max-width: 86ch; }
.simple h1 { font-size: 56px; line-height: 1; font-weight: 700; font-stretch: 66%; }
.simple .chapo { margin-top: 18px; font-size: 19px; line-height: 1.5; color: var(--doux); }
.simple h2 { margin-top: 52px; font-size: 28px; font-weight: 650; font-stretch: 82%; }
.simple h2 + p, .simple h2 + dl { margin-top: 14px; }
.simple a { text-decoration: underline; text-decoration-color: var(--souligne); text-underline-offset: 4px; }
.simple a:hover { text-decoration-color: var(--orange); }
.fiche-legale { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 0; }
.fiche-legale dt { color: var(--doux); }
.fiche-legale dd { margin: 0; }
.maj { margin-top: 52px; font-size: 14.5px; color: var(--doux); }
.liste-cours { list-style: none; padding: 0; margin: 40px 0 0; }
.simple .liste-cours a {
  display: block; padding: 20px 0; font-size: 23px; line-height: 1.2; font-weight: 620; font-stretch: 86%;
  text-decoration: none;
}
.simple .liste-cours a:hover { color: var(--orange); }

@media (max-width: 960px) {
  :root { --gouttiere: 32px; }
  .nav nav { display: none; }
  .nav .btn-l { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --gouttiere: 20px; }
  .nav { gap: 16px; padding-block: 16px; }
  .marque { font-size: 19px; }
  .pied .m { flex-basis: 100%; }
  .simple { padding-top: 36px; }
  .simple h1 { font-size: 42px; }
  .fiche-legale { grid-template-columns: 1fr; gap: 0; }
  .fiche-legale dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Remonter en haut de la page (scripts/haut.js, 06/11/2026) : un rond discret en bas à droite, qui n'apparaît
   qu'une fois la page défilée d'un écran ; sans JavaScript, il reste visible et le lien marche */
.haut {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; background: #2a2d3a; color: var(--texte); font-size: 22px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 1px rgba(236, 231, 218, .16), 0 14px 30px -12px rgba(4, 5, 10, .9);
  transition: opacity .25s, transform .25s, visibility .25s, background .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
/* le survol, seulement avec une vraie souris : sur téléphone, il resterait collé après le toucher */
@media (hover: hover) and (pointer: fine) {
  .haut:hover { background: var(--orange); color: var(--salle); }
}
.haut:active { background: var(--orange); color: var(--salle); transform: scale(.94); }
html.haut-js .haut:not(.visible) { opacity: 0; visibility: hidden; transform: translateY(10px); }
@media (max-width: 640px) {
  .haut { right: 12px; bottom: 12px; width: 44px; height: 44px; font-size: 20px; }
}
/* Avec le bouton des retours (« Un retour ? », en bas à droite des pages des élèves, 30/11/2026) : le rond se pose juste
   au-dessus de lui, au même bord, et la cale de fin de page grandit pour que le pied passe au-dessus des deux */
body:has(> .retour-flottant) .haut {
  right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 56px);
}
body:has(> .retour-flottant) .retour-cale { height: 104px; }
