/* Page d'accueil d'Éperon — mêmes couleurs que l'appli (frontend/src/design/tokens.css, thème « bois foncé »). */
:root {
  color-scheme: dark;
  --bg: #1d1814;
  --surface: rgba(255, 238, 214, 0.045);
  --surface-strong: rgba(255, 238, 214, 0.075);
  --border: rgba(255, 236, 210, 0.09);
  --border-strong: rgba(255, 236, 210, 0.16);
  --text: #f3ede5;
  --text-2: #c3b8aa;
  --text-3: #9a8f82;
  --accent: #4a8b22;
  --accent-hover: #549a2a;
  --accent-press: #3f7a1c;
  --accent-edge: #2f5d14;
  --accent-text: #9fd06b;
  --accent-soft: rgba(129, 182, 76, 0.16);
  --danger: #e5675d;
  --font-title: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --tap: 44px;
  --marge: 20px;
  --largeur: 1120px;
  --focus-ring: 0 0 0 3px rgba(159, 208, 107, 0.65);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(120, 78, 40, 0.22), transparent 60%),
    repeating-linear-gradient(92deg, rgba(255, 220, 170, 0.018) 0 2px, transparent 2px 9px, rgba(0, 0, 0, 0.12) 9px 10px, transparent 10px 23px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin: 0;
  padding: 0;
}
ol,
ul {
  list-style: none;
}
h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.01em;
}
a {
  color: var(--accent-text);
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid rgba(159, 208, 107, 0.75);
  outline-offset: 3px;
  border-radius: var(--r-md);
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Ce qui est branché se montre ; ce qui ne l'est pas dit « bientôt » (site/reglages.js). */
[data-code='non'] .si-code-oui,
[data-code='oui'] .si-code-non,
[data-avis='non'] .si-avis-oui,
[data-avis='oui'] .si-avis-non,
[data-discussion='non'] .si-discussion-oui,
[data-contact='non'] .si-contact-oui,
[data-contact='oui'] .si-contact-non,
[data-liste='non'] .si-liste-oui,
[data-formulaire='non'] .si-formulaire-oui,
[data-attente='non'] .si-attente-oui,
[data-attente='oui'] .si-attente-non,
[data-appli='non'] .si-appli-oui {
  display: none;
}

/* ---- La barre du haut ---- */
.barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 12px var(--marge);
}
.marque {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.langue {
  min-height: var(--tap);
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.langue:hover {
  color: var(--text);
}

/* ---- Le premier écran ---- */
.hero {
  display: grid;
  gap: 24px;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 12px var(--marge) 0;
}
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
}
.point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-text);
}
h1 {
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-phrase {
  margin-top: 12px;
  max-width: 34em;
  color: var(--text-2);
  font-size: 17px;
  text-wrap: pretty;
}
.hero-boutons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 24px;
}

/* ---- Les boutons : un seul plein par écran, le reste plus discret ---- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-lg);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms var(--ease), background-color 120ms var(--ease);
}
.bouton:active {
  transform: translateY(2px);
}
.bouton-principal {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 0 var(--accent-edge);
}
.bouton-principal:hover {
  background: var(--accent-hover);
}
.bouton-principal:active {
  background: var(--accent-press);
  box-shadow: 0 1px 0 var(--accent-edge);
}
.bouton-principal:disabled {
  opacity: 0.7;
  cursor: default;
}
.bouton-second {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.bouton-second:hover {
  background: rgba(255, 238, 214, 0.11);
}
.bouton-lien {
  justify-content: flex-start;
  min-height: var(--tap);
  padding: 0;
  color: var(--accent-text);
  font-weight: 700;
  white-space: normal;
}
.bouton-lien::after {
  content: '›';
  margin-left: 6px;
  font-size: 20px;
  line-height: 1;
}
.bouton-lien:hover {
  color: #b7e086;
}

/* ---- Les photos de l'appli : des images, pas des boutons ---- */
.hero-image,
.ecran-seance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ecran {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  user-select: none;
}
.ecran.fondu {
  border-bottom-color: transparent;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: none;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
figcaption,
.note {
  color: var(--text-3);
  font-size: 14px;
}
figcaption {
  text-align: center;
}

/* ---- Les rubriques : le titre à gauche, le contenu à droite (ordinateur) ---- */
.bloc {
  display: grid;
  gap: 20px;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 56px var(--marge) 0;
}
h2 {
  font-size: 28px;
  line-height: 1.15;
}
.bloc-phrase {
  max-width: 36em;
  color: var(--text-2);
  text-wrap: pretty;
}
.bloc-tete .bloc-phrase {
  margin-top: 8px;
}
.ecran-seance {
  margin-top: 20px;
}
.ecran-seance .ecran {
  max-width: 380px;
}
.groupe {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.groupe > li,
.groupe > details {
  padding: 16px;
}
.groupe > li + li,
.groupe > details + details {
  border-top: 1px solid var(--border);
}
h3 {
  font-size: 17px;
  line-height: 1.3;
}
.groupe p {
  margin-top: 4px;
  color: var(--text-2);
  text-wrap: pretty;
}
.etapes > li {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.numero {
  flex: none;
  width: 1ch;
  color: var(--text-3);
  font-family: var(--font-title);
  font-weight: 800;
}
/* Les lignes qui s'ouvrent, façon Réglages : un toucher, le détail se déplie. */
.plis > details {
  padding: 0;
}
.plis summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  cursor: pointer;
  list-style: none;
}
.plis summary::-webkit-details-marker {
  display: none;
}
.plis summary::after {
  content: '›';
  flex: none;
  color: var(--text-3);
  font-size: 22px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 200ms var(--ease);
}
.plis details[open] summary::after {
  transform: rotate(-90deg);
}
.plis summary:hover {
  background: var(--surface);
}
.plis details > p {
  margin: 0;
  padding: 0 16px 16px;
}
.suite {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
}
.suite.haut {
  margin-top: 0;
}
.suite.haut + .note {
  margin-top: 12px;
  max-width: 36em;
}
.bientot {
  margin-top: 16px;
  color: var(--text-2);
}
#avis .bloc-phrase + .bloc-phrase {
  margin-top: 12px;
}
#liste .bientot,
#liste .si-appli-oui {
  margin-top: 0;
}
#liste .si-appli-oui {
  margin-bottom: 16px;
}

/* ---- La liste d'attente ---- */
.carte-liste {
  padding: 16px;
}
.carte-liste label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
}
.champ-ligne {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.carte-liste input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
}
.carte-liste input::placeholder {
  color: var(--text-3);
}
.carte-liste input:focus-visible {
  border-color: var(--accent-text);
  outline-offset: 1px;
}
.carte-liste input[aria-invalid='true'] {
  border-color: var(--danger);
}
.carte-liste input[readonly] {
  opacity: 0.7;
}
.groupe .note {
  margin-top: 12px;
  color: var(--text-3);
}
.message:empty {
  display: none;
}
.groupe .message {
  margin-top: 10px;
  font-weight: 550;
  color: var(--danger);
}
.groupe .message.reussite {
  margin-top: 0;
  color: var(--accent-text);
}
form[data-fait='oui'] {
  display: none;
}

/* ---- Le pied ---- */
.pied {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 64px max(var(--marge), calc((100% - var(--largeur)) / 2 + var(--marge))) 0;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 14px;
}
.pied p + p {
  margin-top: 8px;
  max-width: 44em;
}
.pied .marque {
  min-height: 0;
  margin-bottom: 6px;
  font-size: 17px;
  color: var(--text-2);
}
.pied .langue {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: var(--tap);
  padding: 0;
  font-size: 17px;
}

/* ---- Ordinateur ---- */
@media (min-width: 900px) {
  :root {
    --marge: 32px;
    --largeur: 1200px;
  }
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 56px;
    min-height: calc(100vh - 150px);
    padding-top: 24px;
    padding-bottom: 0;
  }
  h1 {
    font-size: 60px;
  }
  .hero-phrase {
    margin-top: 20px;
    font-size: 19px;
  }
  .hero-boutons {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 32px;
  }
  .hero .bouton-principal {
    min-height: 60px;
    padding: 0 32px;
  }
  .hero .ecran {
    max-width: 440px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  }
  .bloc {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: start;
    padding-top: 96px;
  }
  h2 {
    font-size: 36px;
  }
  .bloc-phrase {
    font-size: 19px;
  }
  .bloc-tete .bloc-phrase {
    margin-top: 12px;
  }
  .ecran-seance {
    align-items: flex-start;
    margin-top: 28px;
  }
  .groupe > li {
    padding: 20px;
  }
  .plis summary {
    min-height: 60px;
    padding: 8px 20px;
  }
  .plis details > p {
    padding: 0 20px 20px;
  }
  .suite {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .champ-ligne {
    flex-direction: row;
  }
  .champ-ligne .bouton {
    flex: none;
  }
  .carte-liste {
    padding: 20px;
  }
}

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