/* ==========================================================================
   GDG Dakar — feuille de styles
   Langage visuel repris de l'affiche DevFest Dakar 2026 :
   fond crème, contours à l'encre, couleurs franches, pastilles, accolades.
   Sommaire : 1. Jetons  2. Base  3. Composants  4. Sections  5. Formes  6. Mouvement
   ========================================================================== */

/* ---------- 1. Jetons ---------- */
:root {
  /* Palette : les couleurs de l'affiche. Elles ne changent jamais, quel que soit le thème. */
  --cream: #FDFDF3;
  --ink: #111111;
  --slate: #4A4F55;
  --blue: #1368F0;
  --blue-soft: #DFEBFB;
  --red: #E14C3A;
  --yellow: #FEC303;
  --yellow-warm: #FFD23F;
  --yellow-soft: #FDE9AE;
  --green: #34A853;
  --pink: #FD8CBA;
  --pink-soft: #F9D3D1;
  --white: #FFFFFF;

  /* Jetons de rôle : les seuls que le thème sombre redéfinit (bloc suivant).
     Règle : ce qui est posé sur la page, un bandeau ou une carte utilise ces jetons ;
     ce qui est posé sur une couleur fixe (jaune, rose, bleu, crème du logo, badge) garde --ink et --white. */
  --bg: var(--cream);                /* fond de page, en-tête, encoches du billet */
  --surface: var(--white);           /* cartes, bouton neutre, pastilles neutres */
  --fg: #24272B;                     /* texte courant */
  --fg-strong: var(--ink);           /* titres, strong, .lead */
  --fg-muted: var(--slate);          /* textes secondaires */
  --outline: var(--ink);             /* contours et ombres dures */
  --band-yellow: var(--yellow-soft); /* bandeau « À propos » */
  --band-sky: var(--blue-soft);      /* bandeau « Équipe » */
  --link: var(--blue);               /* liens .link, anneau de focus */

  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.81rem + 0.14vw, 0.92rem);
  --step-0: clamp(1rem, 0.97rem + 0.18vw, 1.1rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.42vw, 1.4rem);
  --step-2: clamp(1.7rem, 1.3rem + 1.9vw, 2.75rem);
  --step-3: clamp(2.3rem, 0.7rem + 6.4vw, 4.4rem);

  --line: 2px;
  --radius: 18px;
  --radius-lg: 26px;
  --pill: 999px;
  --shadow: 5px 5px 0 var(--outline);
  --shadow-lg: 8px 8px 0 var(--outline);
  --wrap: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --header-h: 68px;
}

/* Thème sombre : posé par js/prefs.js sur <html data-theme="dark">. Sans JavaScript, le site reste clair.
   Fond presque noir, contours et ombres dures en crème ; les couleurs franches ne bougent pas. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151513;
  --surface: #22221F;
  --fg: #E9E9DF;
  --fg-strong: var(--cream);
  --fg-muted: #B4B6AE;
  --outline: var(--cream);
  --band-yellow: #2E2810;
  --band-sky: #13213A;
  --link: #7FB0FF;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--fg-strong); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; max-width: 64ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: inherit; }
strong { color: var(--fg-strong); }
/* Un élément masqué le reste, même si un composant lui donne un display. */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg-strong); color: var(--bg); padding: 0.6em 1em; border-radius: 10px; }
.skip:focus { top: 12px; }
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--fg-strong); }
.link { color: var(--link); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--fg-strong); }
.brace { color: var(--blue); }
/* Texte réservé aux lecteurs d'écran. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 3. Composants ---------- */

/* Bouton : pastille à contour d'encre, ombre dure qui s'écrase au clic.
   --btn-line : couleur du contour et de l'ombre ; elle suit le thème, sauf sur un fond de couleur fixe. */
.btn {
  --btn-line: var(--outline);
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 1rem/1.2 var(--font-display);
  padding: 0.85em 1.5em;
  color: var(--fg-strong); background: var(--surface);
  border: var(--line) solid var(--btn-line); border-radius: var(--pill);
  box-shadow: 4px 4px 0 var(--btn-line);
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--btn-line); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--btn-line); }
.btn--blue { background: var(--blue); color: var(--white); }
/* Jaune : toujours posé sur du bleu (billet, pied de page), donc contour et texte à l'encre. */
.btn--yellow { --btn-line: var(--ink); background: var(--yellow-warm); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); box-shadow: none; }
.btn--ghost:hover { transform: none; box-shadow: none; background: var(--white); color: var(--ink); }
.btn--small { font-size: 0.9rem; padding: 0.65em 1.15em; box-shadow: 3px 3px 0 var(--btn-line); }

/* Icônes et autocollants : symboles du code (< >, { }, [ ], //) et pictogrammes au trait */
.sprite { position: absolute; }
.icon { flex: none; width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sticker {
  display: grid; place-items: center; width: 50px; height: 50px;
  background: var(--surface); color: var(--fg-strong);
  border: var(--line) solid var(--outline); border-radius: 15px;
  box-shadow: 3px 3px 0 var(--outline);
  transform: rotate(-5deg);
}
.sticker .icon { width: 27px; height: 27px; }
.sticker--yellow { background: var(--yellow-warm); color: var(--ink); }
.sticker--pink { background: var(--pink); color: var(--ink); }
.sticker--sky { background: var(--blue-soft); color: var(--blue); }
.sticker--blue { background: var(--blue); color: var(--white); }
.sticker--red { background: var(--red); color: var(--white); }
.sticker--green { background: var(--green); color: var(--white); }
/* Autocollant posé dans une ligne de titre : il suit la taille du texte */
.sticker--inline { display: inline-grid; width: 0.84em; height: 0.84em; border-radius: 0.25em; margin-left: 0.32em; vertical-align: 0.04em; transform: rotate(8deg); }
.sticker--inline .icon { width: 0.48em; height: 0.48em; stroke-width: 2.6; }
.hero__actions .sticker { align-self: center; margin-left: 0.3rem; transform: rotate(-9deg); }
/* Collé sur le badge, qui reste clair : contour et ombre à l'encre dans les deux thèmes. */
.badge__sticker { position: absolute; right: -22px; top: 56px; width: 54px; height: 54px; transform: rotate(12deg); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: var(--line) solid var(--outline); }
/* flex-wrap : sans JavaScript, il n'y a pas de menu repliable et les liens passent à la ligne sous le logo. */
.site-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1rem; min-height: var(--header-h); padding-block: 0.5rem; }
/* Le logo provisoire porte un fond crème : il vit sur une pastille crème, invisible en thème clair. */
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; background: var(--cream); border-radius: var(--pill); padding: 6px 16px 6px 12px; margin-left: -12px; }
.brand img { display: block; height: 36px; width: auto; }
.brand__text { font: 700 1.3rem/1 var(--font-display); color: var(--ink); letter-spacing: -0.01em; }
/* L'écart est compté pour que les six liens, le bouton et les outils tiennent sur une ligne à côté du logo,
   en français (les libellés les plus longs), dès 1181 px de large. */
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem clamp(0.8rem, 1.4vw, 1rem); }
.nav a:not(.btn) { font-weight: 500; text-decoration: none; padding: 0.3em 0; border-bottom: 3px solid transparent; }
.nav a:not(.btn):hover { border-bottom-color: var(--yellow); }
/* Page en cours (le lien « Direct » sur direct.html) : son soulignement jaune reste affiché. */
.nav a[aria-current="page"] { border-bottom-color: var(--yellow); }
.menu-btn { display: none; font: 700 0.95rem/1 var(--font-display); background: var(--surface); color: var(--fg-strong); border: var(--line) solid var(--outline); border-radius: var(--pill); padding: 0.7em 1.2em; cursor: pointer; }
/* Outils de l'en-tête (langue, thème) : petites pastilles, affichées par js/main.js */
.tools { display: flex; align-items: center; gap: 0.5rem; }
.tool { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 0.75em; font: 700 0.9rem/1 var(--font-display); background: var(--surface); color: var(--fg-strong); border: var(--line) solid var(--outline); border-radius: var(--pill); cursor: pointer; }
.tool:hover { background: var(--yellow-warm); color: var(--ink); }
.tool--icon { width: 40px; padding: 0; }
.tool .icon { width: 20px; height: 20px; }

/* Badge : l'élément signature. Un objet clair dans les deux thèmes : seule son ombre suit le thème. */
.badge {
  width: min(300px, 76vw);
  background: var(--white);
  border: var(--line) solid var(--ink); border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  transform: rotate(4deg); transform-origin: 50% 0;
  position: relative;
}
.badge__in { background: var(--pink-soft); border-radius: 14px; padding: 16px 18px 14px; display: flex; flex-direction: column; align-items: center; }
.badge__top { align-self: flex-start; font: 700 1rem/1 var(--font-display); color: var(--ink); margin: 0 0 12px; }
.badge__avatar {
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); border: var(--line) solid var(--ink);
  font: 700 2.6rem/1 var(--font-display); color: var(--ink);
  margin-bottom: 16px;
  transition: background-color 0.2s ease;
}
.badge__avatar.is-filled { background: var(--yellow-warm); }
.badge__field { align-self: stretch; display: flex; align-items: baseline; gap: 0.5em; font-size: 0.95rem; color: var(--ink); margin: 0 0 10px; padding-bottom: 4px; border-bottom: 1.5px dashed var(--ink); max-width: none; }
.badge__field span { flex: none; color: var(--slate); }
.badge__field input { flex: 1; min-width: 0; font: 700 1rem/1.3 var(--font-body); color: var(--ink); background: transparent; border: 0; padding: 0; }
.badge__field input:focus { outline: none; }
.badge__field:focus-within { border-bottom: 2px solid var(--blue); }
.badge__field--static { font-weight: 700; }
.badge__role { align-self: stretch; margin: 8px 0 0; padding: 0.55em 0; background: var(--white); border-radius: 12px; text-align: center; font: 700 1.6rem/1 var(--font-display); color: var(--ink); max-width: none; }
.badge-note { margin: 1.6rem 0 0; text-align: center; font-size: var(--step--1); color: var(--fg-muted); min-height: 3em; }

/* Billet : le prochain événement. Bleu dans les deux thèmes ; son contour et son ombre suivent le thème. */
.ticket {
  display: grid; grid-template-columns: 1fr clamp(170px, 22%, 240px);
  background: var(--blue); color: var(--white);
  border: var(--line) solid var(--outline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.ticket + .ticket { margin-top: 2rem; }
.ticket__main { padding: clamp(1.4rem, 3.5vw, 2.6rem); }
.ticket__visual { position: relative; float: right; width: clamp(160px, 26%, 230px); margin: 0 0 1.6rem 1.8rem; padding: 10px 14px; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); transform: rotate(3deg); }
.ticket__visual img { display: block; width: 100%; height: auto; }
/* Logo de l'autre communauté, collé en rond sur le coin du visuel : l'événement se fait à plusieurs. */
.ticket__with { position: absolute; left: -1.1rem; bottom: -1.1rem; width: 3.7rem; height: 3.7rem; padding: 0.55rem; background: var(--white); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-10deg); }
.ticket .brace { color: var(--yellow-warm); font-weight: 700; }
.ticket__title { font-size: var(--step-2); color: var(--white); letter-spacing: -0.02em; }
.ticket__subtitle { display: inline-block; margin: 0.7rem 0 0; padding: 0.3em 1em; border: var(--line) solid var(--white); border-radius: var(--pill); font: 500 1rem/1.3 var(--font-display); }
.ticket__summary { margin: 1.1rem 0 0; color: #EDF3FE; max-width: 58ch; }
/* Une ligne par journée : pastille de la série, jour, nom de la journée. */
.ticket__days { display: grid; gap: 0.3rem; margin: 1rem 0 0; }
.ticket__daydate { font-weight: 700; }
.ticket__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem 1.5rem; margin: 1.5rem 0 0; }
.ticket__meta dt { display: flex; align-items: center; gap: 0.45rem; font-size: var(--step--1); color: #D5E4FD; }
.ticket__meta .icon { width: 1.25em; height: 1.25em; color: var(--yellow-warm); }
.ticket__meta dd { margin: 0.15rem 0 0; font-weight: 700; line-height: 1.35; }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.ticket__stub {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  background: var(--yellow-warm); color: var(--ink);
  border-left: var(--line) dashed var(--ink);
  padding: 1.5rem 1rem;
}
/* Encoches : deux trous qui laissent voir le fond de page. */
.ticket__stub::before, .ticket__stub::after {
  content: ""; position: absolute; left: -15px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: var(--line) solid var(--outline);
}
.ticket__stub::before { top: -15px; }
.ticket__stub::after { bottom: -15px; }
.ticket__day { font: 700 clamp(2.6rem, 5vw, 3.8rem)/1 var(--font-display); letter-spacing: -0.03em; white-space: nowrap; }
.ticket__month { font: 700 1.05rem/1.2 var(--font-display); }

.empty { background: var(--surface); border: var(--line) dashed var(--outline); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3.5vw, 2.4rem); }
.empty__title { font: 700 var(--step-1)/1.3 var(--font-display); color: var(--fg-strong); margin-bottom: 0.4em; }
.empty .btn { margin-top: 0.6rem; }

/* Frise des événements passés : une vraie suite chronologique */
.timeline { border-left: var(--line) solid var(--outline); margin-left: 9px; }
.timeline__item { position: relative; display: grid; grid-template-columns: minmax(11rem, 15rem) 1fr; gap: 0.4rem 2rem; padding: 0 0 1.6rem 2rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ""; position: absolute; left: -10px; top: 0.35em; width: 18px; height: 18px; border-radius: 6px; border: var(--line) solid var(--outline); background: var(--surface); }
.timeline__item--devfest::before { background: var(--yellow-warm); }
.timeline__item--build-with-ai::before { background: var(--blue); }
.timeline__date { font-weight: 700; color: var(--fg-strong); }
.timeline__title { font: 700 var(--step-1)/1.25 var(--font-display); }
.timeline__note { margin: 0.2rem 0 0; color: var(--fg-muted); font-size: var(--step--1); }

/* Programme du prochain événement : un bouton par journée, puis la liste des créneaux.
   Rempli par js/main.js ; les sessions en parallèle sont rangées dans une carte par salle. */
.program__note { margin: -0.8rem 0 1.5rem; color: var(--fg-muted); }
.program__days { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.8rem; }
.program__list { border-top: var(--line) solid var(--outline); }
/* Bouton de journée : la journée ouverte est bleue et enfoncée (son ombre disparaît). */
.day {
  display: grid; align-content: start; gap: 0.1rem; min-width: 10rem; padding: 0.65em 1.2em; text-align: left;
  font: 700 1rem/1.25 var(--font-display); color: var(--fg-strong); background: var(--surface);
  border: var(--line) solid var(--outline); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--outline); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.day:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--outline); }
.day[aria-pressed="true"] { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--outline); background: var(--blue); color: var(--white); }
/* Une journée qui a une série prend sa couleur : vert pour PyCon, jaune pour le DevFest, texte à l'encre. */
.day--pycon[aria-pressed="true"] { background: var(--green); color: var(--ink); }
.day--devfest[aria-pressed="true"] { background: var(--yellow-warm); color: var(--ink); }
.day__name { font: 500 var(--step--1)/1.3 var(--font-body); }
/* Pastille de série, sur le billet et dans un bouton de journée. Son contour reste à l'encre :
   elle est toujours posée sur une couleur fixe ou sur sa propre couleur. */
.dot { display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.5em; vertical-align: -0.04em; border-radius: 50%; background: var(--white); border: var(--line) solid var(--ink); }
.dot--pycon { background: var(--green); }
.dot--devfest { background: var(--yellow-warm); }
/* Carte de la journée ouverte : à qui est la journée. Le logo est posé sur du blanc dans les deux thèmes. */
.dayinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin: 0 0 1.6rem; }
.dayinfo__logo { flex: 0 1 auto; min-width: 0; max-width: 100%; height: 4rem; padding: 0.6rem 0.9rem; background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--radius); }
/* La hauteur du cadre est fixe : le logo la remplit, et un logo très large est contenu dans 14rem.
   min(14rem, 100%) : le cadre ne dépasse jamais l'écran, même quand le visiteur a agrandi le texte. */
.dayinfo__logo img { display: block; height: 100%; width: auto; max-width: min(14rem, 100%); object-fit: contain; }
.dayinfo__text { flex: 1 1 14rem; min-width: 0; }
.dayinfo__title { margin: 0; max-width: none; font: 700 var(--step-1)/1.25 var(--font-display); color: var(--fg-strong); }
.dayinfo__about { margin: 0.15rem 0 0; max-width: none; color: var(--fg-muted); }
/* Créneau : horaire, session, salle. Un bloc en parallèle met ses salles sur toute la largeur. */
.slot { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; grid-template-areas: "time body room"; gap: 0.3rem 1.5rem; align-items: baseline; padding: 1rem 0; border-bottom: var(--line) dashed var(--outline); }
.slot--parallel { grid-template-areas: "time body room" "rooms rooms rooms"; }
.slot__time { grid-area: time; margin: 0; font: 700 1rem/1.4 var(--font-display); color: var(--fg-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot__body { grid-area: body; min-width: 0; }
.slot__title { margin: 0; max-width: none; font: 700 1.05rem/1.4 var(--font-display); color: var(--fg-strong); overflow-wrap: break-word; }
/* Accueil, pauses et transitions : en retrait par rapport aux sessions. */
.slot__title--quiet { font-weight: 500; color: var(--fg-muted); }
.slot__label { grid-area: body; margin: 0; max-width: none; font-weight: 500; color: var(--fg-muted); }
.slot__by { margin: 0.15rem 0 0; max-width: none; color: var(--fg-muted); }
.slot__room { grid-area: room; display: flex; align-items: center; gap: 0.3rem; margin: 0; font-size: var(--step--1); font-weight: 700; color: var(--fg-strong); white-space: nowrap; }
.slot__room .icon { width: 1.15em; height: 1.15em; }
/* min(15rem, 100%) : une carte ne dépasse jamais l'écran, même quand le visiteur a agrandi le texte. */
.rooms { grid-area: rooms; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1.3rem; margin: 0.7rem 0 0.5rem; }
.room { min-width: 0; background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
/* Le nom de la salle est posé sur une couleur fixe : encre ou blanc, dans les deux thèmes. */
.room__name { padding: 0.55rem 1rem; font-size: 1rem; line-height: 1.3; border-bottom: var(--line) solid var(--outline); }
.room__name--blue { background: var(--blue); color: var(--white); }
.room__name--yellow { background: var(--yellow-warm); color: var(--ink); }
.room__name--pink { background: var(--pink); color: var(--ink); }
.talk { padding: 0.85rem 1rem 0.9rem; border-top: var(--line) dashed var(--outline); }
.talk:first-child { border-top: 0; }
.talk__time { margin: 0 0 0.25rem; font: 700 var(--step--1)/1.4 var(--font-display); color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.talk__title { margin: 0; max-width: none; font: 700 1rem/1.4 var(--font-display); color: var(--fg-strong); overflow-wrap: break-word; }
.talk__by { margin: 0.25rem 0 0; color: var(--fg-muted); font-size: var(--step--1); }
/* Petite pastille dans un titre de session : langue du talk, format, « Annulé ». */
.tag { display: inline-block; vertical-align: 0.12em; margin-right: 0.15em; padding: 0.1em 0.6em; font: 700 0.72rem/1.5 var(--font-display); color: var(--fg-strong); background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--pill); white-space: nowrap; }
.tag--kind { background: var(--yellow-warm); color: var(--ink); }
/* À l'encre : le blanc sur ce rouge ne passe pas le contraste AA. */
.tag--cancelled { background: var(--red); color: var(--ink); }
/* Titre d'un talk annulé : barré et en retrait, mais toujours lisible. */
.struck { color: var(--fg-muted); text-decoration-thickness: 2px; }

/* Intervenant qui a une fiche : son nom est un bouton, avec son portrait en rond. Un clic ouvre la fiche. */
.who { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 100%; margin: 0.2rem 0.4rem 0 0; padding: 0.2rem 0.8rem 0.2rem 0.25rem; font: 500 var(--step--1)/1.3 var(--font-body); text-align: left; color: var(--fg-strong); background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--pill); cursor: pointer; }
.who:hover { background: var(--yellow-warm); color: var(--ink); }
.who__photo { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; object-fit: cover; }
/* Sans photo : les initiales, à l'encre sur du jaune dans les deux thèmes. */
.who__photo--initials { display: grid; place-items: center; background: var(--yellow-warm); color: var(--ink); font: 700 0.68rem/1 var(--font-display); }

/* Fiche d'un intervenant : une fenêtre <dialog> ouverte depuis le programme. Elle suit le thème, comme une carte. */
.sheet { width: min(34rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 0; overflow: auto; color: var(--fg); background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
/* Fermée, elle ne s'affiche pas : un navigateur qui ne connaît pas <dialog> la montrerait sinon en bas de page. */
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: rgba(17, 17, 17, 0.62); }
.sheet__body { padding: clamp(1.3rem, 4vw, 2rem); }
/* Barre sans hauteur, collée en haut de la fenêtre : le bouton de fermeture reste visible quand la fiche défile. */
.sheet__bar { position: sticky; top: 0; z-index: 1; height: 0; }
.sheet__close { position: absolute; top: 0.8rem; right: 0.8rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; color: var(--fg-strong); background: var(--surface); border: var(--line) solid var(--outline); border-radius: 50%; cursor: pointer; }
.sheet__close:hover { background: var(--yellow-warm); color: var(--ink); }
/* La marge de droite laisse la place au bouton de fermeture. */
.sheet__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; padding-right: 2.6rem; }
.sheet__photo { flex: none; width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; border: var(--line) solid var(--outline); }
.sheet__photo--initials { display: grid; place-items: center; background: var(--yellow-warm); color: var(--ink); font: 700 1.6rem/1 var(--font-display); }
/* Quand le texte est agrandi, le nom passe sous la photo au lieu de s'écraser à côté d'elle. */
.sheet__who { flex: 1 1 12rem; min-width: 0; }
.sheet__name { font-size: var(--step-1); overflow-wrap: break-word; }
.sheet__role { margin: 0.25rem 0 0; max-width: none; color: var(--fg-muted); overflow-wrap: break-word; }
/* pre-line : une ligne vide dans la bio de js/data.js sépare deux paragraphes. */
.sheet__bio { margin: 1.2rem 0 0; max-width: none; white-space: pre-line; }
.sheet__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1rem 0 0; max-width: none; }
.sheet__talk { margin-top: 1.4rem; padding-top: 1.1rem; border-top: var(--line) dashed var(--outline); }
.sheet__label { margin: 0; max-width: none; font-size: var(--step--1); color: var(--fg-muted); }
.sheet__title { margin: 0.15rem 0 0; max-width: none; font: 700 1.05rem/1.4 var(--font-display); color: var(--fg-strong); overflow-wrap: break-word; }
.sheet__meta { margin: 0.25rem 0 0; max-width: none; font-size: var(--step--1); color: var(--fg-muted); }

/* Partenaires du prochain événement : un titre par niveau, puis une carte par logo.
   La carte reste blanche dans les deux thèmes (les logos sont faits pour un fond clair) ; seule son ombre suit le thème. */
.partners__note { margin: -0.8rem 0 0; color: var(--fg-muted); }
.partners__level { margin: 1.7rem 0 0.9rem; font-size: 1.05rem; line-height: 1.3; }
/* min(11rem, 100%) : une carte ne dépasse jamais l'écran, même quand le visiteur a agrandi le texte. */
.partners__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr)); gap: 1.1rem; }
.partner { min-width: 0; }
.partner__card { display: block; height: 6.5rem; padding: 0.9rem 1.2rem; background: var(--white); color: var(--ink); font-weight: 700; text-align: center; border: var(--line) solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--outline); }
/* La carte a une hauteur fixe : le logo s'y inscrit en entier, quelle que soit sa forme. */
.partner__card img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Une carte qui mène au site du partenaire s'enfonce au survol, comme un bouton. */
.partner__card--link { transition: transform 0.12s ease, box-shadow 0.12s ease; }
.partner__card--link:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--outline); }

/* Page du direct (direct.html) : un bouton par salle (composant .day), puis la scène où joue la vidéo.
   Remplie par js/direct.js. */
/* Une grille plutôt qu'une ligne souple : sur téléphone, le troisième bouton garde la largeur des deux premiers. */
.live__rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr)); gap: 0.9rem; margin-bottom: 1.8rem; }
.live__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-bottom: 0.9rem; }
.live__name { font-size: var(--step-1); }
/* « En direct » : à l'encre sur le rouge, comme « Annulé » (le blanc sur ce rouge ne passe pas le contraste AA). */
.tag--live { margin-right: 0; background: var(--red); color: var(--ink); }
/* La scène : la vidéo ou la carte d'attente, toutes deux en 16:9, pour que la page ne saute pas quand le direct
   commence. La carte grandit si son texte ne tient pas (texte agrandi par le visiteur). */
.live__stage { display: grid; background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
/* Fond à l'encre dans les deux thèmes : les bandes autour d'une image vidéo sont noires. */
.live__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); border-radius: calc(var(--radius-lg) - var(--line)); }
.live__wait { display: grid; place-content: center; justify-items: center; gap: 0.4rem; aspect-ratio: 16 / 9; padding: 1.2rem; text-align: center; }
.live__wait-title { margin: 0; font: 700 var(--step-1)/1.3 var(--font-display); color: var(--fg-strong); }
.live__wait-text { margin: 0; color: var(--fg-muted); }
.live__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.6rem; margin-top: 1.5rem; }
.live__quality { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--fg-strong); }
.live__select { font: 700 0.95rem/1.2 var(--font-display); color: var(--fg-strong); background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--pill); padding: 0.55em 0.9em; cursor: pointer; }

/* Formats : trois cartes en escalier */
.formats { display: grid; gap: 1.3rem; }
.format { background: var(--surface); border: var(--line) solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.3rem 1.15rem; }
.format h3 { font-size: var(--step-1); display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.format h3 .icon { width: 1.5em; height: 1.5em; padding: 0.2em; border: var(--line) solid var(--outline); border-radius: 9px; }
.format--yellow h3 .icon { background: var(--yellow-warm); color: var(--ink); }
.format--blue h3 .icon { background: var(--blue); color: var(--white); }
.format--pink h3 .icon { background: var(--pink); color: var(--ink); }
.format p { margin: 0; }

/* Façons de participer : colonnes sobres, séparées par un pointillé */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); }
.way { padding: 0.2rem clamp(1rem, 2.5vw, 2rem) 0.4rem; border-left: var(--line) dashed var(--outline); }
.way:first-child { padding-left: 0; border-left: 0; }
.way .sticker { margin-bottom: 1.2rem; }
.way:nth-child(2) .sticker { transform: rotate(4deg); }
.way h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }

/* Équipe */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem 2rem; }
.member { display: flex; align-items: center; gap: 0.9rem; }
.member__avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; border: var(--line) solid var(--outline); display: grid; place-items: center; font: 700 1.2rem/1 var(--font-display); color: var(--fg-strong); object-fit: cover; background: var(--surface); }
.member__avatar--blue { background: var(--blue); color: var(--white); }
.member__avatar--red { background: var(--red); color: var(--white); }
.member__avatar--yellow { background: var(--yellow-warm); color: var(--ink); }
.member__avatar--green { background: var(--green); color: var(--white); }
.member__avatar--pink { background: var(--pink); color: var(--ink); }
.member__text { display: flex; flex-direction: column; min-width: 0; }
.member__name { font: 700 1.05rem/1.25 var(--font-display); color: var(--fg-strong); }
.member__role { color: var(--fg-muted); font-size: var(--step--1); }

/* Questions */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem clamp(2rem, 6vw, 5rem); align-items: start; }
.faq__list { border-top: var(--line) solid var(--outline); }
.faq details { border-bottom: var(--line) solid var(--outline); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none; padding: 1.05rem 0; font: 500 var(--step-1)/1.3 var(--font-display); color: var(--fg-strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: var(--line) solid var(--outline); border-radius: 50%; background: var(--surface); font: 700 1.2rem/1 var(--font-display); transition: transform 0.18s ease, background-color 0.18s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--yellow-warm); color: var(--ink); }
.faq details p { padding: 0 3rem 1.2rem 0; margin: 0; }

/* ---------- 4. Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--yellow { background: var(--band-yellow); border-block: var(--line) solid var(--outline); }
.section--sky { background: var(--band-sky); border-block: var(--line) solid var(--outline); }
.section__title { font-size: var(--step-2); letter-spacing: -0.02em; max-width: 20ch; margin-bottom: clamp(1.5rem, 3vw, 2.4rem); }
.section__title .sticker { margin-bottom: 1.1rem; }
.section__subtitle { font-size: var(--step-1); margin: clamp(3rem, 6vw, 4.5rem) 0 1.6rem; }
.section__intro { margin-top: -1rem; margin-bottom: 2.4rem; }

.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__text { position: relative; }
.hero__title { font-size: var(--step-3); line-height: 1; letter-spacing: -0.035em; }
.hero__title > span { display: block; }
.hero__title .hero__title-blue { position: relative; width: fit-content; color: var(--blue); margin-top: 0.06em; }
.hero__lede { font-size: var(--step-1); line-height: 1.45; color: var(--fg-muted); margin: 1.6rem 0 0; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero__badge { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 150px; }
.hang { position: relative; display: flex; flex-direction: column; align-items: center; transform-origin: 62% -150px; }
.lanyard { position: absolute; top: -292px; left: calc(50% - 45px); width: 160px; height: 305px; max-width: none; pointer-events: none; }

.about { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about .section__title { max-width: 16ch; }

/* Pied de page : bleu dans les deux thèmes, donc encre et blanc à l'intérieur. */
.site-footer { position: relative; overflow: hidden; background: var(--blue); color: var(--white); border-top: var(--line) solid var(--outline); padding-block: clamp(3.5rem, 8vw, 6rem) 8rem; }
.site-footer__in { position: relative; z-index: 1; }
.site-footer__logo { display: inline-block; background: var(--cream); border: var(--line) solid var(--ink); border-radius: var(--pill); box-shadow: 4px 4px 0 var(--ink); padding: 9px 22px 9px 16px; margin-bottom: 2rem; transform: rotate(-2deg); }
.site-footer__logo img { display: block; height: 32px; width: auto; }
.site-footer__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.site-footer__cta h2 { color: var(--white); font-size: var(--step-2); letter-spacing: -0.02em; max-width: 16ch; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin: clamp(2.5rem, 6vw, 4rem) 0 1.6rem; padding-top: 1.6rem; border-top: var(--line) solid rgba(255, 255, 255, 0.45); }
.site-footer__links a { font-weight: 700; text-underline-offset: 4px; }
.site-footer__legal { font-size: var(--step--1); color: #E3ECFE; max-width: 78ch; margin-bottom: 0.6em; }
.site-footer :focus-visible, .ticket :focus-visible { outline-color: var(--yellow-warm); }

/* ---------- 5. Formes décoratives (affiche DevFest) ---------- */
.shape { position: absolute; pointer-events: none; max-width: none; }
/* Crochet et barres obliques sont posés sur la page : leur trait suit le thème. */
.shape--bracket { left: 14px; top: 46px; width: 62px; stroke: var(--outline); }
.shape--slashes { right: 3.5vw; bottom: -34px; width: 118px; z-index: 2; stroke: var(--outline); }
.shape--sparks { left: calc(100% + 0.06em); top: -0.3em; width: 0.6em; height: auto; }
.shape--arc { left: 0; bottom: 0; width: 110px; opacity: 0.95; }
.shape--arrow { right: 4vw; top: clamp(1.5rem, 4vw, 3rem); width: 96px; }
@media (max-width: 1299px) { .shape--bracket { display: none; } .shape--slashes { width: 84px; } }

/* ---------- 6. Mouvement : un seul moment orchestré, le badge qui se balance ---------- */
@keyframes swing {
  0% { transform: rotate(10deg); }
  28% { transform: rotate(-6deg); }
  52% { transform: rotate(3.5deg); }
  74% { transform: rotate(-1.6deg); }
  100% { transform: rotate(0deg); }
}
.hang { animation: swing 1.9s cubic-bezier(0.33, 0, 0.3, 1) 0.15s both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hang { animation: none; }
  .btn, .day, .partner__card--link, .faq summary::after, .badge__avatar { transition: none; }
}

/* ---------- Écrans étroits ---------- */
@media (max-width: 900px) {
  .hero__in, .about, .faq { grid-template-columns: 1fr; }
  /* En une colonne, le badge pend à une tringle : le cordon est coupé net par le trait. */
  .hero__badge { margin-top: 0.5rem; padding: 118px 0 14px; border-top: var(--line) solid var(--outline); overflow: hidden; }
  .hang { transform-origin: 60% -118px; }
  .hero { padding-bottom: 1.5rem; }
  .site-footer__cta h2 { max-width: none; }
  .shape--arrow { display: none; }
  .ways { grid-template-columns: 1fr; }
  .way, .way:first-child { padding: 1.5rem 0; border-left: 0; border-top: var(--line) dashed var(--outline); }
  .way:first-child { border-top: 0; padding-top: 0; }
  .formats { margin-top: 0.5rem; }
}
@media (min-width: 901px) {
  /* Deux colonnes : le titre doit tenir dans la colonne de gauche. */
  .hero__title { font-size: clamp(3rem, 5.6vw, 4.4rem); }
  .format:nth-child(2) { margin-left: 2rem; }
  .format:nth-child(3) { margin-left: 4rem; }
  .faq .section__title { position: sticky; top: calc(var(--header-h) + 2rem); }
}
/* En-tête : sous ce seuil, les liens, le bouton et les outils ne tiennent plus sur une ligne.
   Le menu repliable a besoin de JavaScript : ses règles ne s'appliquent que sous :root[data-js],
   attribut posé par js/prefs.js. Sans JavaScript, les liens restent visibles et l'en-tête défile avec la page. */
@media (max-width: 1180px) {
  .site-header { position: static; }
  :root[data-js] .site-header { position: sticky; }
  :root[data-js] .menu-btn { display: inline-flex; }
  :root[data-js] .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 0.2rem; background: var(--bg); border-bottom: var(--line) solid var(--outline); padding: 0.8rem var(--gutter) 1.4rem; }
  :root[data-js] .nav.is-open { display: flex; }
  :root[data-js] .nav a:not(.btn) { padding: 0.6em 0; font-size: 1.1rem; }
  :root[data-js] .nav .btn { margin-top: 0.8rem; }
  :root[data-js] .nav .tools { margin-top: 1rem; }
}
@media (max-width: 640px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket__stub { order: -1; flex-direction: row; gap: 0.8rem; align-items: baseline; padding: 1rem; border-left: 0; border-bottom: var(--line) dashed var(--ink); }
  .ticket__stub::before, .ticket__stub::after { display: none; }
  /* La marge de gauche laisse la place à l'autocollant qui dépasse du visuel. */
  .ticket__visual { float: none; width: 190px; margin: 0 0 1.8rem 1.1rem; }
  /* Partenaires : deux cartes par ligne. */
  .partners__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
  .partner__card { height: 5.5rem; padding: 0.8rem; }
  .brand img { height: 30px; }
  .ticket__day { font-size: 2.4rem; }
  .timeline__item { grid-template-columns: 1fr; padding-left: 1.5rem; }
  /* Programme : l'horaire et la salle sur une ligne, la session en dessous. */
  .slot { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time room" "body body"; }
  .slot--parallel { grid-template-areas: "time room" "body body" "rooms rooms"; }
  .day { flex: 1 1 8.5rem; min-width: 0; }
  .faq details p { padding-right: 0; }
  .shape--slashes { display: none; }
  .shape--arc { width: 70px; }
  .site-footer { padding-bottom: 6rem; }
}
