/* ============================================================
   Feuille de style des pages de documents (charte, confidentialite).
   La page d'accueil garde ses styles en ligne : elle est une affiche,
   ces pages-ci sont des textes longs et n'ont presque rien en commun
   avec elle a part les jetons de couleur et les polices.
   ============================================================ */

/* ---------- polices auto-hebergees, aucune requete vers un tiers ---------- */
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-v26-latin-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('fonts/karla-v33-latin-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('fonts/karla-v33-latin-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- jetons, identiques a la page d'accueil ---------- */
:root {
  color-scheme: light;
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Karla', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;

  --ground:   #FFFCF9;
  --surface:  #FFFFFF;
  --tint-blush: #FFF1EB;
  --tint-sea:   #EAF5F3;

  --ink:      #2B211D;
  --muted:    #7C6C64;
  --rule:     #F0E3DC;

  --coral:    #C03D2A;
  --coral-dim:#C03D2A1A;
  --sea:      #17756D;
  --sea-dim:  #17756D1A;
  --focus:    #17756D;

  --shadow-s: 0 1px 2px rgba(120, 70, 50, 0.05), 0 6px 18px rgba(120, 70, 50, 0.055);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- ossature ---------- */
.wrap { max-width: 46rem; margin-inline: auto; padding-inline: 2rem; }

a { color: var(--coral); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { background: var(--coral-dim); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

/* ---------- en-tete ---------- */
.doc-head { border-bottom: 1px solid var(--rule); padding-block: 1.5rem; }
.doc-head .wrap { display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; }
.mark {
  font-family: var(--serif); font-size: 1.35rem; color: var(--ink);
  letter-spacing: -0.01em; text-decoration: none;
}
.mark:hover { background: none; text-decoration: underline; text-underline-offset: 0.28em; }
.doc-head .back { font-size: 0.9rem; color: var(--muted); }

.doc-title { padding-block: 3.5rem 0; }
.doc-title h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5.5vw, 3.1rem);
  line-height: 1.1; letter-spacing: -0.02em; font-weight: 400;
  margin: 0; text-wrap: balance;
}
.doc-title .version {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--muted); margin: 1.1rem 0 0; text-transform: uppercase;
}

/* bandeau d'avertissement, tant que le document n'est pas finalise */
.draft {
  background: var(--tint-blush); border-radius: 14px;
  padding: 1.15rem 1.4rem; margin-top: 2rem;
  font-size: 0.95rem; color: var(--ink);
}
.draft strong { font-weight: 600; }

/* ---------- sommaire ---------- */
.toc { margin: 3rem 0 0; padding: 1.6rem 1.8rem; background: var(--surface);
       border-radius: 16px; box-shadow: var(--shadow-s); }
.toc h2 {
  font-family: var(--sans); font-size: 0.86rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600; color: var(--coral);
  margin: 0 0 0.9rem;
}
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; display: grid; grid-template-columns: 2rem 1fr; gap: 0.4rem; }
.toc li::before {
  content: counter(toc) "."; font-family: var(--mono); font-size: 0.8rem;
  color: var(--muted); padding-top: 0.28rem;
}
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { background: none; text-decoration: underline; text-underline-offset: 0.22em; }

/* ---------- corps du texte ---------- */
main { padding-block: 1rem 4rem; }

section { padding-top: 3.25rem; }
section > h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 1.95rem); line-height: 1.2;
  letter-spacing: -0.015em; margin: 0 0 1.25rem; text-wrap: balance;
  scroll-margin-top: 1.5rem;
}
h3 {
  font-family: var(--sans); font-size: 1.02rem; font-weight: 600;
  margin: 2rem 0 0.7rem; line-height: 1.4;
}
p { margin: 0 0 1.1rem; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

ul, ol { margin: 0 0 1.1rem; padding-left: 0; list-style: none; }
li { margin-bottom: 0.75rem; }
li:last-child { margin-bottom: 0; }
ul > li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.8rem; align-items: start; }
ul > li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral); margin-top: 0.72rem;
}
ol { counter-reset: num; }
ol > li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; align-items: start; counter-increment: num; }
ol > li::before {
  content: counter(num) "."; font-family: var(--mono); font-size: 0.82rem;
  color: var(--coral); padding-top: 0.24rem;
}

/* la liste d'engagements, en pastille pleine */
.lede {
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.55;
  margin-bottom: 1.6rem;
}

.panel {
  background: var(--surface); border-radius: 16px; padding: 1.9rem 1.8rem;
  box-shadow: var(--shadow-s); margin-bottom: 1.5rem;
}
.panel-sea { background: var(--tint-sea); box-shadow: none; }
.panel-sea ul > li::before { background: var(--sea); }

/* ---------- tableaux ---------- */
.table-scroll { overflow-x: auto; margin: 0 0 1.4rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.94rem; }
caption { text-align: left; color: var(--muted); font-size: 0.88rem; padding-bottom: 0.6rem; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td { border-bottom: none; }

/* ---------- mentions a completer ---------- */
.todo {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--sea-dim); color: var(--sea);
  padding: 0.1em 0.45em; border-radius: 4px; white-space: nowrap;
}

/* ============================================================
   Formulaire d'inscription
   ============================================================ */

.form-intro { margin-bottom: 0.5rem; }
.form-intro .duree {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}

fieldset {
  border: none; margin: 0 0 1.5rem; padding: 1.9rem 1.8rem;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-s);
}
legend {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.2;
  padding: 0; margin-bottom: 0.4rem; float: left; width: 100%;
}
legend + .note { clear: both; }

.note { color: var(--muted); font-size: 0.94rem; margin: 0 0 1.6rem; }
.note:last-child { margin-bottom: 0; }
.note-fort { color: var(--ink); background: var(--tint-sea); border-radius: 12px; padding: 1rem 1.15rem; }

/* un champ = une etiquette + un controle */
.champ { margin-bottom: 1.5rem; }
.champ:last-child { margin-bottom: 0; }
.champ > label, .groupe > legend, .sous-titre {
  display: block; font-weight: 600; font-size: 0.98rem; margin-bottom: 0.5rem;
}
.aide { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--ground); border: 1px solid var(--rule); border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
textarea { min-height: 5.5rem; resize: vertical; line-height: 1.55; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus);
}
input::placeholder, textarea::placeholder { color: #B6A79F; }

/* groupes de choix */
.groupe { border: none; padding: 0; margin: 0 0 1.5rem; background: none; box-shadow: none; }
.groupe > legend {
  font-family: var(--sans); font-size: 0.98rem; float: none; width: auto;
  margin-bottom: 0.55rem;
}
.choix { display: flex; flex-direction: column; gap: 0.15rem; }
.choix label {
  display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: 0.7rem;
  align-items: start; padding: 0.42rem 0.5rem; border-radius: 8px;
  font-size: 0.98rem; cursor: pointer;
}
.choix label:hover { background: var(--tint-blush); }
.choix input { margin: 0.34rem 0 0; accent-color: var(--coral); width: 1.05rem; height: 1.05rem; }
.choix input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* paire en miroir : ce que je suis / ce que j'accepte */
.miroir {
  display: grid; gap: 0.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  padding: 1.4rem 0; border-top: 1px solid var(--rule);
}
.miroir:first-of-type { border-top: none; padding-top: 0.4rem; }
.miroir .groupe { margin: 0; }
.miroir-titre {
  grid-column: 1 / -1; font-family: var(--serif); font-size: 1.2rem;
  margin: 0 0 0.2rem;
}
.face {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--coral); display: block; margin-bottom: 0.35rem;
}
.face-autre { color: var(--sea); }

/* champs cote a cote */
.duo { display: grid; gap: 1rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }

/* engagements */
.engagement label {
  display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: 0.8rem;
  align-items: start; margin-bottom: 1.1rem; font-size: 0.98rem; cursor: pointer;
}
.engagement input { margin: 0.3rem 0 0; accent-color: var(--sea); width: 1.05rem; height: 1.05rem; }

/* piege a robots : jamais affiche, jamais annonce */
.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* bouton */
.envoi { margin-top: 2rem; }
button[type="submit"] {
  font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer;
  background: var(--coral); color: #FFFFFF; border: none;
  padding: 0.95rem 2.1rem; border-radius: 999px;
  box-shadow: 0 1px 2px rgba(120,70,50,0.05), 0 14px 34px rgba(120,70,50,0.08);
  transition: translate 0.18s ease;
}
button[type="submit"]:hover { translate: 0 -2px; }
button[type="submit"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { button[type="submit"] { transition: none; } }

/* ---------- pied de page ---------- */
footer { border-top: 1px solid var(--rule); padding-block: 2.5rem 3.25rem; font-size: 0.88rem; color: var(--muted); }
footer .row { display: flex; flex-wrap: wrap; gap: 0.7rem 1.9rem; align-items: baseline; }
footer a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 46rem) {
  body { font-size: 16px; }
  .wrap { padding-inline: 1.35rem; }
  .doc-title { padding-block: 2.5rem 0; }
  section { padding-top: 2.5rem; }
  .panel { padding: 1.5rem 1.35rem; }
  .toc { padding: 1.35rem 1.4rem; }
  fieldset { padding: 1.5rem 1.35rem; }
  .miroir { gap: 0.9rem; padding: 1.2rem 0; }
}
