/* Feuille de style unique du site Le Mansart. Mobile d'abord (375 px), texte ≥ 16 px, contrastes WCAG AA. */
:root {
  --c-fond: #f7f5f1;
  --c-surface: #ffffff;
  --c-texte: #1f2328;
  --c-texte-doux: #4f5660;      /* 7,0:1 sur blanc */
  --c-primaire: #1d4f73;        /* bleu ardoise, 8,4:1 sur blanc */
  --c-primaire-fonce: #143a55;
  --c-primaire-clair: #e3edf4;
  --c-accent: #9a4a12;          /* terre cuite, 6,3:1 sur blanc */
  --c-bordure: #d8d3ca;
  --c-succes: #1e6b3a;  --c-succes-fond: #e5f3ea;
  --c-alerte: #8a5a00;  --c-alerte-fond: #fdf3dc;
  --c-danger: #a52a1f;  --c-danger-fond: #fbe9e7;
  --c-focus: #f2b632;

  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --taille: 1rem;               /* 16 px */
  --taille-petite: 1rem;        /* jamais moins de 16 px */
  --interligne: 1.55;

  --e1: 0.25rem; --e2: 0.5rem; --e3: 0.75rem; --e4: 1rem; --e5: 1.5rem; --e6: 2rem; --e7: 3rem;
  --rayon: 0.5rem;
  --largeur: 46rem;
  --ombre: 0 1px 2px rgb(0 0 0 / 0.06), 0 2px 8px rgb(0 0 0 / 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--police); font-size: var(--taille); line-height: var(--interligne);
  color: var(--c-texte); background: var(--c-fond);
  display: flex; flex-direction: column; min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--c-primaire); text-underline-offset: 0.15em; }
a:hover { color: var(--c-primaire-fonce); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: var(--e5) 0 var(--e3); }
h1 { font-size: 1.6rem; margin-top: var(--e4); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
p, ul, ol, dl { margin: 0 0 var(--e4); }

.evitement { position: absolute; left: -999px; }
.evitement:focus { left: var(--e3); top: var(--e3); background: var(--c-surface); padding: var(--e2); z-index: 10; }

/* En-tête et navigation */
.entete { background: var(--c-primaire); color: #fff; }
.entete__barre {
  max-width: var(--largeur); margin: 0 auto; padding: var(--e3) var(--e4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--e3);
}
.marque { color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.marque:hover { color: #fff; }
.marque__nom { font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; }
.marque__sous { font-size: var(--taille-petite); opacity: 0.9; }
.entete__compte { color: #fff; white-space: nowrap; }
.entete__compte:hover { color: #fff; }
.nav {
  max-width: var(--largeur); margin: 0 auto; padding: 0 var(--e2);
  display: flex; gap: var(--e1); overflow-x: auto; scrollbar-width: none;
}
.nav a {
  color: #fff; text-decoration: none; padding: var(--e2) var(--e3); white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a[aria-current="page"] { border-bottom-color: var(--c-focus); font-weight: 600; }

/* Contenu */
.contenu { flex: 1; width: 100%; max-width: var(--largeur); margin: 0 auto; padding: var(--e2) var(--e4) var(--e7); }
.intro { font-size: 1.1rem; color: var(--c-texte-doux); }
.meta { color: var(--c-texte-doux); display: block; }
.pied {
  border-top: 1px solid var(--c-bordure); color: var(--c-texte-doux);
  padding: var(--e5) var(--e4); text-align: center;
}
.pied p { max-width: var(--largeur); margin: 0 auto var(--e2); }

.carte {
  background: var(--c-surface); border: 1px solid var(--c-bordure); border-radius: var(--rayon);
  padding: var(--e4) var(--e4) var(--e2); margin: var(--e5) 0; box-shadow: var(--ombre);
}
.carte h2 { margin-top: 0; }
.carte--cs { border-left: 4px solid var(--c-accent); }
.carte--demo { border-style: dashed; }

.bandeau { padding: var(--e3) var(--e4); border-radius: var(--rayon); margin: var(--e4) 0;
  background: var(--c-primaire-clair); border-left: 4px solid var(--c-primaire); }
.bandeau--succes, .bandeau--success { background: var(--c-succes-fond); border-color: var(--c-succes); }
.bandeau--warning, .bandeau--demo { background: var(--c-alerte-fond); border-color: var(--c-alerte); }
.bandeau--error { background: var(--c-danger-fond); border-color: var(--c-danger); }

.liens, .liste { list-style: none; padding: 0; }
.liens li, .liste li { padding: var(--e3) 0; border-bottom: 1px solid var(--c-bordure); }
.liste li:last-child, .liens li:last-child { border-bottom: 0; }

.fiche { display: grid; grid-template-columns: 1fr; gap: 0 var(--e4); }
.fiche dt { font-weight: 600; margin-top: var(--e3); }
.fiche dd { margin: 0; }

.onglets { display: flex; gap: var(--e2); border-bottom: 1px solid var(--c-bordure); margin-bottom: var(--e4);
  overflow-x: auto; }
.onglets a { padding: var(--e2) var(--e3); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.onglets a[aria-current="page"] { border-bottom-color: var(--c-primaire); font-weight: 600; color: var(--c-texte); }

/* Tableaux */
.tableau-defile { overflow-x: auto; margin-bottom: var(--e4); }
table { border-collapse: collapse; width: 100%; background: var(--c-surface); }
th, td { text-align: left; padding: var(--e2) var(--e3); border-bottom: 1px solid var(--c-bordure); vertical-align: top; }
th { background: var(--c-primaire-clair); font-weight: 600; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Formulaires */
.formulaire { max-width: 32rem; }
.champ { margin-bottom: var(--e4); }
.champ label { display: block; font-weight: 600; margin-bottom: var(--e1); }
.champ--case { display: flex; gap: var(--e2); align-items: flex-start; }
.champ--case label { font-weight: 400; }
.champ--case input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex: none; }
.facultatif { font-weight: 400; color: var(--c-texte-doux); }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; font: inherit; padding: var(--e2) var(--e3); min-height: 2.75rem;
  border: 1px solid #8a8f96; border-radius: var(--rayon); background: #fff; color: var(--c-texte);
}
.champ--erreur input, .champ--erreur select, .champ--erreur textarea { border-color: var(--c-danger); }
.aide { color: var(--c-texte-doux); margin: var(--e1) 0 0; }
.erreur { color: var(--c-danger); font-weight: 600; margin: var(--e1) 0 0; }
fieldset { border: 1px solid var(--c-bordure); border-radius: var(--rayon); padding: var(--e4); margin: 0 0 var(--e4); }
legend { font-weight: 700; padding: 0 var(--e2); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.en-ligne { display: inline-block; margin: 0 var(--e2) var(--e2) 0; }

/* Boutons : cible tactile ≥ 44 px */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: var(--e2) var(--e4); border-radius: var(--rayon); font: inherit; font-weight: 600;
  border: 2px solid var(--c-primaire); background: var(--c-surface); color: var(--c-primaire);
  text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--c-primaire-clair); color: var(--c-primaire-fonce); }
.bouton--principal { background: var(--c-primaire); color: #fff; }
.bouton--principal:hover { background: var(--c-primaire-fonce); color: #fff; }
.bouton--danger { border-color: var(--c-danger); color: var(--c-danger); }
.bouton--danger:hover { background: var(--c-danger-fond); color: var(--c-danger); }
.bouton--petit { min-height: 2.75rem; padding: var(--e1) var(--e3); }

@media (min-width: 40rem) {
  h1 { font-size: 2rem; }
  .fiche { grid-template-columns: max-content 1fr; }
  .fiche dt { margin-top: var(--e2); }
  .fiche dd { margin-top: var(--e2); }
}
