/* Site vitrine de Bastide : la direction artistique de la console (« Bastide Console », variante E).
   Les jetons et les composants sont ceux de la console, recopiés dans ds/ (un cas vérifie que la
   copie ne dérive pas) ; cette feuille ne pose que la mise en page propre au site. Aucune ressource
   externe : les deux polices sont servies par le site. */

@font-face {
  font-family: "Hanken Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/polices/hanken-grotesk-latin-ext-wght-normal.woff2) format("woff2-variations");
  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;
}

@font-face {
  font-family: "Hanken Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/polices/hanken-grotesk-latin-wght-normal.woff2) format("woff2-variations");
  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: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/polices/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
  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;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--glacier);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  color: var(--encre);
  margin: 0;
  text-wrap: balance;
}

/* Les styles de texte de la console, agrandis pour une page qu'on lit plutôt qu'un écran qu'on pilote. */
h1 {
  font: 600 clamp(2.4rem, 5.6vw, 4.2rem) / 1.04 var(--font-sans);
  letter-spacing: -0.045em;
  max-width: 17ch;
}

h2 {
  font: 600 clamp(1.7rem, 3.2vw, 2.4rem) / 1.12 var(--font-sans);
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}

h3 {
  font: 600 16px/1.3 var(--font-sans);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

p {
  margin: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
}

.enveloppe {
  max-width: calc(var(--cadre-max) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.etroite {
  max-width: 800px;
}

section {
  position: relative;
  padding: 88px 0;
}

.sous-titre {
  color: var(--encre-2);
  font-size: 17px;
  max-width: 60ch;
  margin-bottom: 40px;
}

.visuellement-cache,
.evitement:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.evitement:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
}

/* ── La page : le fond vivant de la console, fixé derrière tout ─────────────── */

.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.page > .c-fond-vivant {
  position: fixed;
  z-index: -1;
}

/* Les cinq gouttes de la console (FondVivant), posées par classe : la politique de contenu du site
   interdit les styles en ligne. */
.g1 {
  --teinte: var(--glacier);
  --derive: derive-a;
  --duree: 38s;
  left: -200px;
  top: -260px;
  width: 900px;
  height: 700px;
}

.g2 {
  --teinte: var(--violet);
  --derive: derive-b;
  --duree: 46s;
  left: 480px;
  top: -300px;
  width: 860px;
  height: 720px;
}

.g3 {
  --teinte: var(--rose);
  --derive: derive-c;
  --duree: 41s;
  left: 1000px;
  top: 60px;
  width: 680px;
  height: 600px;
}

.g4 {
  --teinte: var(--menthe);
  --derive: derive-b;
  --duree: 52s;
  left: -120px;
  top: 460px;
  width: 760px;
  height: 620px;
}

.g5 {
  --teinte: var(--ambre);
  --derive: derive-a;
  --duree: 44s;
  left: 760px;
  top: 560px;
  width: 620px;
  height: 520px;
}

/* ── En-tête : la barre de contexte de la console ───────────────────────────── */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--barre-contexte);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 16px;
  color: var(--encre);
  font: 600 16px var(--font-sans);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.symbole-enceinte {
  fill: var(--encre);
}

.symbole-a {
  stop-color: var(--glacier);
}

.symbole-b {
  stop-color: var(--violet);
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu .c-onglet {
  height: var(--barre-contexte);
}

.menu li:first-child {
  display: none;
}

.navigation > .c-bouton {
  margin-left: auto;
}

@media (max-width: 860px) {
  .menu {
    display: none;
  }
}

/* ── Héros ──────────────────────────────────────────────────────────────────── */

.heros {
  padding: 112px 0 96px;
}

.heros-court {
  padding: 96px 0 24px;
}

.heros .c-statut {
  margin-bottom: 26px;
}

.heros h1 {
  margin-bottom: 26px;
}

.chapeau {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--encre-2);
  max-width: 60ch;
  margin-bottom: 36px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.preuves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

/* ── Grilles et cartes : les cartes de verre de la console ──────────────────── */

.grille-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--espace-4);
}

.deux-colonnes {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 900px) {
  .deux-colonnes {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.carte {
  padding: 24px;
}

.carte p {
  color: var(--encre-2);
  font-size: 15px;
}

.carte .c-tuile {
  --taille: 34px;
  margin-bottom: 18px;
}

.teinte-glacier {
  --teinte: var(--glacier);
}

.teinte-violet {
  --teinte: var(--violet);
}

.teinte-rose {
  --teinte: var(--rose);
}

.teinte-menthe {
  --teinte: var(--menthe);
}

.teinte-ambre {
  --teinte: var(--ambre);
}

.teinte-corail {
  --teinte: var(--corail);
}

.numero {
  display: block;
  margin-bottom: 18px;
  font: 600 13px/1 var(--font-mono);
  color: var(--teinte);
}

/* ── Listes ─────────────────────────────────────────────────────────────────── */

.liste-coche {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 12px;
}

.liste-coche li {
  position: relative;
  padding-left: 30px;
  color: var(--encre-2);
}

.liste-coche li strong {
  color: var(--encre);
  font-weight: 600;
}

.liste-coche li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(120deg, var(--glacier), var(--violet));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.etapes {
  list-style: none;
  counter-reset: etape;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 18px;
}

.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 48px;
  color: var(--encre-2);
}

.etapes li strong {
  color: var(--encre);
}

.etapes li::before {
  content: counter(etape, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--rayon-controle);
  background: color-mix(in srgb, var(--violet) 15%, transparent);
  color: var(--violet);
  font: 600 12px/1 var(--font-mono);
}

.texte h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.025em;
  margin: 56px 0 18px;
}

.texte h1 + h2,
.texte h2:first-child {
  margin-top: 0;
}

.texte h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 40px;
}

.texte > p {
  color: var(--encre-2);
  margin-bottom: 16px;
}

.texte pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: var(--rayon-menu);
  border: 1px solid var(--bord);
  background: var(--surface-2);
}

.texte pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  line-height: 1.6;
}

.texte blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--bord);
  color: var(--encre);
  font-style: italic;
}

.texte ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--encre-2);
}

.texte li {
  margin-bottom: 8px;
}

.texte hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--bord);
}

.tableau {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--bord);
  border-radius: var(--rayon-menu);
}

.tableau table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tableau th,
.tableau td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bord);
  text-align: left;
  vertical-align: top;
}

.tableau td:first-child {
  white-space: nowrap;
}

.tableau th {
  background: var(--surface-2);
  font-weight: 600;
}

.tableau tr:last-child td {
  border-bottom: 0;
}

.note {
  margin: 8px 0 0;
  padding: 14px 16px;
  border-radius: var(--rayon-menu);
  border: 1px solid color-mix(in srgb, var(--ambre) 35%, transparent);
  background: color-mix(in srgb, var(--ambre) 7%, transparent);
  color: var(--encre-2);
  font-size: 14.5px;
}

/* ── L'enceinte : trois coins, le passage ouvert, le lot en dégradé ─────────── */

.terminal {
  padding: 0;
  overflow: visible;
}

.terminal-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--bord);
  font: 400 12.5px var(--font-mono);
  color: var(--encre-3);
}

.terminal-corps {
  padding: 18px;
  display: grid;
  gap: 12px;
  font: 400 13px/1.6 var(--font-mono);
}

.terminal-corps p {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  color: var(--encre);
}

.invite {
  color: var(--rose);
}

.invite.agent {
  color: var(--violet);
}

.terminal-corps .legende {
  color: var(--encre-2);
}

/* ── FAQ ────────────────────────────────────────────────────────────────────── */

details {
  margin-bottom: 10px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon-carte);
  background: color-mix(in srgb, var(--surface) var(--voile-carte), transparent);
  -webkit-backdrop-filter: blur(var(--flou-carte)) saturate(150%);
  backdrop-filter: blur(var(--flou-carte)) saturate(150%);
}

summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--encre);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font: 400 20px/1 var(--font-mono);
  color: var(--encre-3);
}

details[open] summary::after {
  content: "−";
}

details p {
  padding: 0 20px 18px;
  color: var(--encre-2);
}

/* ── Appel final : une carte au bord en dégradé, l'ombre de la production ───── */

.appel .c-carte {
  padding: 56px 32px;
  text-align: center;
}

.appel h2 {
  margin: 0 auto 14px;
  max-width: 22ch;
}

.appel p {
  color: var(--encre-2);
  margin-bottom: 28px;
}

.appel .actions {
  justify-content: center;
}

/* ── Formulaire : les champs de la console ──────────────────────────────────── */

.formulaire {
  padding: 28px;
  display: grid;
  gap: 16px;
}

.formulaire h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.formulaire .c-libelle {
  margin: 0;
  color: var(--encre-2);
}

.formulaire textarea.c-champ {
  height: auto;
  min-height: 104px;
  padding-block: 8px;
  resize: vertical;
}

.formulaire select.c-champ {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--encre-3) 50%),
    linear-gradient(135deg, var(--encre-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.formulaire select.c-champ option {
  background: var(--surface);
  color: var(--encre);
}

.facultatif {
  color: var(--encre-3);
}

.case {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  font-size: 13.5px;
  color: var(--encre-2);
}

.case input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--violet);
}

.formulaire > .c-bouton {
  justify-self: start;
}

.pot-de-miel {
  position: absolute;
  left: -9999px;
}

/* ── Pied de page ───────────────────────────────────────────────────────────── */

.pied {
  border-top: 1px solid var(--bord);
  padding: 48px 0 56px;
  font-size: 14px;
  color: var(--encre-2);
  background: color-mix(in srgb, var(--fond) 55%, transparent);
}

.pied-grille {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

@media (max-width: 720px) {
  .pied-grille {
    grid-template-columns: 1fr;
  }
}

.pied .marque {
  margin-bottom: 12px;
}

.pied-liens {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.pied-liens a {
  color: var(--encre-2);
  text-decoration: none;
}

.pied-liens a:hover {
  color: var(--encre);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
