/* Charte Prisme de l'application Kumoemaki (dépôt kumoemaki, docs/charte/charte-prisme.md) : mêmes jetons de
   couleur, mêmes polices, la mascotte. Fond blanc, un seul accent violet, arrondis, aucune ombre. Les couleurs du
   logo (violet, cyan) ne servent qu'au décor : le soulignement du titre.
   Contrastes (WCAG 2.2, calculés dans la charte) : texte sur fond 17,6:1, texte secondaire 7,0:1, blanc sur accent
   6,4:1, accent sur accent doux 5,4:1 ; en sombre, texte 16,1:1 et accent 8,1:1. Bords de champs en texte
   secondaire (au moins 3:1, WCAG 1.4.11). */

@font-face {
  font-family: "Sora";
  src: url("/polices/sora.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/polices/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --fond: #FFFFFF;
  --surface: #F7F5FE;
  --texte: #1A1530;
  --texte-2: #5B5670;
  --bordure: #E9E4F7;
  --accent: #6D3BD8;
  --accent-doux: #EFE8FE;
  --sur-accent: #FFFFFF;
  --alerte: #9A6200;
  --erreur: #B3261E;
  --degrade-logo: linear-gradient(120deg, #A35BFF, #6E8BF0, #2ED3E0);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #13111C;
    --surface: #1C1929;
    --texte: #EFEDF7;
    --texte-2: #B1ABC2;
    --bordure: #2F2B3B;
    --accent: #B89AFF;
    --accent-doux: #2A2340;
    --sur-accent: #13111C;
    --alerte: #E3A33B;
    --erreur: #F2766B;
  }

}

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

html {
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 100%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; background: var(--fond); color: var(--texte); }

.entete, main, footer { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }

h1, h2, h3 {
  font-family: "Sora", "Public Sans", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Échelle 1,25 de la charte : 20, 25, 31, 39 px. */
h1 { font-size: 1.9375rem; margin: 2rem 0 1rem; }
h2 { font-size: 1.5625rem; margin: 0 0 1.5rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.5rem; }

@media (min-width: 48rem) {
  h1 { font-size: 2.4375rem; }
  h2 { font-size: 1.9375rem; }
}

p { max-width: 65ch; }

a { color: var(--accent); text-underline-offset: 0.15em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Barre de marque */
.entete { padding-top: 1rem; padding-bottom: 1rem; }
.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--texte);
  font-family: "Sora", "Public Sans", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}
.marque img { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid var(--bordure); }

/* Sections : 72 px entre elles (charte). */
main > section { margin-top: 4.5rem; }

/* Accroche : texte et mascotte côte à côte sur grand écran, mascotte au-dessus sur mobile. */
#accroche { display: grid; gap: 1.5rem; align-items: center; padding-top: 1rem; }
#accroche h1 { margin-top: 0; }
#accroche h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.3rem;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: var(--degrade-logo);
}
.phrase { font-size: 1.25rem; }

.mascotte { display: block; width: 100%; height: auto; }
/* Le fond des images est blanc : fondu dans la page en clair, disque clair en sombre. */
@media (prefers-color-scheme: light) {
  .mascotte { mix-blend-mode: multiply; }
}
@media (prefers-color-scheme: dark) {
  .mascotte { border-radius: 50%; }
}
#accroche .mascotte { order: -1; max-width: 13rem; margin: 0 auto; }

@media (min-width: 48rem) {
  #accroche { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; padding-top: 2.5rem; }
  #accroche .mascotte { order: 0; max-width: 20rem; }
}

/* Pages de retour (merci, confirmée, erreur) : même mise en page. */
.retour { display: grid; gap: 1.5rem; align-items: center; }
.retour .mascotte { order: -1; max-width: 12rem; margin: 1rem auto 0; }

@media (min-width: 48rem) {
  .retour { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; }
  .retour .mascotte { order: 0; max-width: 20rem; margin: 0; }
}

.mention, footer, figcaption { color: var(--texte-2); }

/* Cartes : surface, filet de 1 px, rayon 14 px, aucune ombre. */
.grille {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.grille > li {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 14px;
  padding: 1.5rem;
}
.grille > li p:last-child { margin-bottom: 0; }

figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--bordure); }
figcaption { margin-top: 0.5rem; font-size: 0.9375rem; }
.mention-ia {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.05rem 0.5rem;
  border-radius: 8px;
  background: var(--accent-doux);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.offre { display: flex; flex-direction: column; }
.offre p { margin: 0.25rem 0; }
.prix { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--texte); }

.bouton, button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--sur-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.bouton:hover, button:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, var(--texte)); }
.offre .bouton { margin-top: auto; }
.offre .prix + p { margin-bottom: 0.25rem; }
.offre p:nth-last-of-type(1) { margin-bottom: 1.25rem; }
button:disabled { background: var(--texte-2); cursor: not-allowed; }

details { border-bottom: 1px solid var(--bordure); padding: 1rem 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin-bottom: 0; color: var(--texte-2); }

/* Formulaire */
form fieldset { border: 0; padding: 0; margin: 0; }
.champ { margin: 1.25rem 0; }
.champ label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.champ.case { display: flex; gap: 0.6rem; align-items: flex-start; }
.champ.case label { font-weight: 400; margin: 0; }
.champ.case input { margin-top: 0.3rem; accent-color: var(--accent); }
input[type="radio"] { accent-color: var(--accent); }
input[type="email"], select {
  width: 100%;
  max-width: 28rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  border: 1px solid var(--texte-2);
  border-radius: 8px;
  background: var(--fond);
  color: var(--texte);
}
.choix { margin: 1.25rem 0; }
.choix legend { font-weight: 600; margin-bottom: 0.3rem; }
.choix div { margin: 0.3rem 0; }
.avertissement {
  border-left: 4px solid var(--alerte);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
}
.remise {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--accent-doux);
  font-weight: 600;
}

footer { margin-top: 4.5rem; padding-top: 1.5rem; padding-bottom: 2rem; border-top: 1px solid var(--bordure); }
footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
footer p { margin: 0.5rem 0; }

.visuellement-masque, .piege {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.evitement { position: absolute; left: -999rem; }
.evitement:focus { left: 1rem; top: 1rem; padding: 0.5rem; background: var(--surface); }

.brouillon { border: 2px dashed var(--alerte); border-radius: 8px; padding: 0.75rem; }
