/*
 * eaudemaville.fr : une seule feuille, sans framework.
 * Identité volontairement éloignée de celle de l'État (contrainte n°5) : sarcelle et sable, jamais de
 * bleu-blanc-rouge, pas de Marianne. Texte de base 18 px, contrastes WCAG AA (vérifiés ci-dessous).
 */
:root {
  --encre: #1c2426;        /* texte : 15,1:1 sur --fond, 13,1:1 sur --sable */
  --encre-douce: #4a5558;  /* texte secondaire : 7,4:1 sur --fond */
  --fond: #fbfaf7;
  --surface: #ffffff;
  --sable: #efe9dc;
  --trait: #d9d3c4;
  --sarcelle: #0b5560;     /* liens, titres : 8,1:1 sur --fond, 7,0:1 sur --sable, 7,3:1 sur --sarcelle-clair */
  --sarcelle-fonce: #073b43;
  --sarcelle-clair: #e3f0f1;
  --conforme: #1d6a3a;     /* 6,6:1 sur blanc */
  --vigilance: #7a4f00;    /* 7,1:1 sur blanc */
  --alerte: #9b1c1c;       /* 8,2:1 sur blanc, 7,0:1 sur --alerte-fond ; réservé aux non-conformités officielles */
  --alerte-fond: #fbeaea;
  --mesure: 46rem;
  --rayon: 6px;
  font-size: 112.5%;       /* 18 px */
}

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--sarcelle); text-underline-offset: 0.15em; }
a:hover { color: var(--sarcelle-fonce); }

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

h1, h2, h3 { line-height: 1.25; color: var(--sarcelle-fonce); }
h1 { font-size: 1.9rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.6rem; }

p, ul, ol { margin: 0 0 1rem; }

/* Accès clavier : lien d'évitement visible au focus */
.lien-evitement {
  position: absolute; left: 0.5rem; top: -3rem; z-index: 10;
  background: var(--surface); padding: 0.5rem 1rem; border: 2px solid var(--sarcelle);
}
.lien-evitement:focus { top: 0.5rem; }

/* En-tête et bandeau d'indépendance (sur chaque page) */
.entete { background: var(--surface); border-bottom: 1px solid var(--trait); }
.entete-interieur { max-width: 70rem; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 1.2rem; color: var(--sarcelle-fonce); text-decoration: none; }
.logo-goutte { width: 1.6rem; height: 1.6rem; fill: var(--sarcelle); }
.logo-tld { color: var(--encre-douce); font-weight: 400; }
.bandeau-independance {
  margin: 0; padding: 0.35rem 1rem; text-align: center;
  background: var(--sable); color: var(--encre); font-size: 0.85rem;
}

/* Contenu */
.page { display: block; max-width: var(--mesure); margin: 0 auto; padding: 1rem 1rem 3rem; }
.page:focus { outline: none; }
.chapo { font-size: 1.1rem; }

.fil-ariane ol { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-wrap: wrap; font-size: 0.85rem; color: var(--encre-douce); }
.fil-ariane li + li::before { content: "›"; margin: 0 0.45rem; }

/* Encadrés (prêts pour les pages de données) */
.encart { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.encart-info { background: var(--sarcelle-clair); border-color: #c4dfe1; }
.bandeau-alerte { background: var(--alerte-fond); border-left: 6px solid var(--alerte); padding: 1rem 1.25rem; margin: 1rem 0 1.5rem; border-radius: var(--rayon); }
.bandeau-alerte strong { color: var(--alerte); }
.citation-officielle { border-left: 4px solid var(--sarcelle); margin: 1rem 0; padding: 0.25rem 0 0.25rem 1rem; font-style: italic; }
.source { font-size: 0.85rem; color: var(--encre-douce); }

/* Tableaux de résultats : défilement horizontal sur petit écran, sans casser la page */
.tableau-conteneur { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-weight: 600; }
thead th { background: var(--sable); }
td.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.statut { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.statut-conforme { color: var(--conforme); }
.statut-vigilance { color: var(--vigilance); }
.statut-alerte { color: var(--alerte); }
.statut-neutre { color: var(--encre-douce); }

/* Recherche de commune (combobox) */
.recherche { position: relative; margin: 1.5rem 0; }
.recherche label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.recherche-ligne { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.recherche input { flex: 1 1 16rem; min-width: 0; font: inherit; padding: 0.6rem 0.75rem; border: 2px solid var(--encre-douce); border-radius: var(--rayon); background: var(--surface); color: var(--encre); }
.recherche button { font: inherit; font-weight: 600; padding: 0.6rem 1.1rem; border: 0; border-radius: var(--rayon); background: var(--sarcelle); color: #fff; cursor: pointer; }
.recherche button:hover { background: var(--sarcelle-fonce); }
.suggestions { position: absolute; z-index: 5; left: 0; right: 0; margin: 0.25rem 0 0; padding: 0.25rem 0; list-style: none; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); max-height: 20rem; overflow-y: auto; }
.suggestions [role="option"] a { display: block; padding: 0.45rem 0.75rem; text-decoration: none; color: var(--encre); }
.suggestions [aria-selected="true"] a, .suggestions [role="option"] a:hover { background: var(--sarcelle-clair); }
.suggestion-vide { padding: 0.45rem 0.75rem; color: var(--encre-douce); }
.liste-resultats { padding-left: 1.2rem; }

/* Chiffres de l'accueil */
.tuiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; }
.tuiles li { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 0.9rem 1rem; color: var(--encre-douce); font-size: 0.95rem; }
.tuile-valeur { display: block; font-size: 1.6rem; font-weight: 700; color: var(--encre); font-variant-numeric: tabular-nums; }

/* Page commune */
.h1-cp { font-weight: 400; color: var(--encre-douce); }
.reponse { margin: 1rem 0 1.5rem; }
.verdict { font-size: 1.1rem; padding: 0.75rem 1rem; border-left: 6px solid var(--trait); background: var(--surface); border-radius: var(--rayon); margin-bottom: 0.6rem; }
.verdict-conforme { border-left-color: var(--conforme); }
.verdict-derogation { border-left-color: var(--vigilance); }
.verdict-non_conforme { border-left-color: var(--alerte); }
.reseau { border-top: 1px solid var(--trait); margin-top: 2rem; padding-top: 0.5rem; }
.reseau-infos { color: var(--encre-douce); }
.citation-officielle blockquote { margin: 0; }
.citation-officielle blockquote p { margin: 0; }
.citation-officielle figcaption { font-size: 0.85rem; color: var(--encre-douce); font-style: normal; margin-top: 0.35rem; }
.note { font-size: 0.95rem; background: var(--sarcelle-clair); padding: 0.6rem 0.9rem; border-radius: var(--rayon); }
caption { text-align: left; font-size: 0.9rem; color: var(--encre-douce); padding-bottom: 0.4rem; }
.discret { color: var(--encre-douce); font-size: 0.9em; }
.liste-colonnes { columns: 2 14rem; padding-left: 1.2rem; }

/* Graphiques (série : sarcelle #008c99 validée ; grille et axes récessifs ; limite en pointillés gris étiquetée) */
.graphique-cadre { margin: 1.5rem 0; }
.graphique-titre { font-weight: 600; margin-bottom: 0.25rem; }
.graphique { width: 100%; height: auto; display: block; background: var(--surface); border-radius: var(--rayon); }
.g-grille { stroke: #e7e2d6; stroke-width: 1; }
.g-axe { fill: var(--encre-douce); font-size: 12px; font-family: inherit; }
.g-ligne { fill: none; stroke: #008c99; stroke-width: 2; stroke-linejoin: round; }
.g-marque { fill: #008c99; stroke: var(--surface); stroke-width: 2; }
.g-creux { fill: var(--surface); stroke: #008c99; stroke-width: 2; }
.g-cible { fill: transparent; }
.g-point:hover .g-marque, .g-point:hover .g-creux { stroke: var(--encre); }
.g-limite { stroke: var(--encre-douce); stroke-width: 1.5; stroke-dasharray: 6 4; }
.g-limite-texte { fill: var(--encre-douce); font-size: 12px; font-family: inherit; }
.graphique-legende { font-size: 0.85rem; color: var(--encre-douce); margin: 0.4rem 0; }
.legende-plein, .legende-creux { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid #008c99; vertical-align: -0.05rem; margin: 0 0.2rem 0 0.6rem; }
.legende-plein { background: #008c99; }
.legende-limite { display: inline-block; width: 1.2rem; border-top: 2px dashed var(--encre-douce); vertical-align: 0.25rem; margin: 0 0.2rem 0 0.6rem; }
details summary { cursor: pointer; color: var(--sarcelle); }

/* Recommandations et questionnaire */
.recommandation { background: var(--surface); border: 1px solid var(--trait); border-left: 6px solid var(--sarcelle); border-radius: var(--rayon); padding: 0.75rem 1rem; margin: 0.75rem 0; }
.recommandation-complementaire { border-left-color: var(--alerte); }
.recommandation-etiquette { font-size: 0.85rem; font-weight: 600; color: var(--encre-douce); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.35rem; }
.recommandation p:last-child { margin-bottom: 0; }
.a-relire { color: var(--vigilance); font-weight: 700; text-transform: none; letter-spacing: 0; }
.liste-rappels { padding-left: 1.2rem; }
.questionnaire fieldset { border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--surface); padding: 0.75rem 1rem 1rem; margin: 0 0 1rem; }
.questionnaire legend { font-weight: 700; padding: 0 0.35rem; }
.questionnaire .recherche { margin: 0; }
.questionnaire input[type="text"], .questionnaire select { font: inherit; padding: 0.5rem 0.65rem; border: 2px solid var(--encre-douce); border-radius: var(--rayon); background: var(--surface); color: var(--encre); width: 100%; max-width: 28rem; }
.questionnaire button { font: inherit; font-weight: 600; padding: 0.65rem 1.25rem; border: 0; border-radius: var(--rayon); background: var(--sarcelle); color: #fff; cursor: pointer; }
.choix { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.35rem 0; }
.choix input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; flex: none; }
.question { margin: 0.75rem 0 0.25rem; font-weight: 600; }
.types-filtre li { margin-bottom: 0.6rem; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Guides, départements */
.bandeau-relecture { background: #fff4d6; border: 2px dashed var(--vigilance); color: var(--encre); padding: 0.6rem 0.9rem; border-radius: var(--rayon); font-weight: 600; }
.texte h2 { margin-top: 2rem; }
.texte table { margin: 1rem 0; }
.lettres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem; }
.lettres a { font-weight: 600; display: inline-block; min-width: 2.2rem; min-height: 2.2rem; line-height: 2.2rem; text-align: center; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--surface); text-decoration: none; }

/* Pied de page */
.pied { background: var(--surface); border-top: 1px solid var(--trait); }
.pied-interieur { max-width: var(--mesure); margin: 0 auto; padding: 1.5rem 1rem 2rem; font-size: 0.9rem; color: var(--encre-douce); }
.pied-mention { margin-bottom: 0.75rem; }
.pied-mention strong { color: var(--encre); }
.pied-liens { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.pied-sobre { margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .entete-interieur, .pied-liens, .lien-evitement { display: none; }
  body { background: #fff; }
  a { color: inherit; }
}

/* Blocs produits (étape 7) : l'information d'abord, les produits ensuite, sobres ; aucune image ni texte d'Amazon */
.produits { border-top: 1px solid var(--trait); margin-top: 1.5rem; padding-top: 0.25rem; }
.produits-liste { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; }
.produit { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 0.75rem 1rem; }
.produit p { margin: 0 0 0.5rem; }
.produit-niveau { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--encre-douce); }
.produit-nom { font-weight: 700; }
.produit-certifs { font-size: 0.9rem; padding-left: 1.1rem; margin-bottom: 0.5rem; }
.produit-entretien { font-size: 0.9rem; }
.bouton-amazon { display: inline-block; min-height: 2.75rem; padding: 0.6rem 1rem; border: 2px solid var(--sarcelle); border-radius: var(--rayon); font-weight: 600; text-decoration: none; background: var(--surface); }
.bouton-amazon:hover { background: var(--sarcelle-clair); }
.mention-affiliation { font-size: 0.85rem; color: var(--encre-douce); }
.bon-plan { background: var(--sable); border-radius: var(--rayon); padding: 0.5rem 0.9rem; font-size: 0.95rem; }
.reseau-communes { font-size: 0.95rem; color: var(--encre-douce); }
