:root {
  --fond: #f6f7f9;
  --carte: #ffffff;
  --texte: #1a1f2b;
  --discret: #626b7c;
  --trait: #e2e5ea;
  --accent: #1f5fd1;
  --accent-clair: #e9f0fc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0; }
.conteneur { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.conteneur { padding-top: 28px; padding-bottom: 48px; }

.entete { background: var(--carte); border-bottom: 1px solid var(--trait); }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.marque-site { font-weight: 700; color: var(--texte); text-decoration: none; }
.marque-site .logo { display: block; height: 44px; width: auto; }
.entete nav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.entete nav a { text-decoration: none; }
.entete nav form { margin: 0; }
button.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--discret); cursor: pointer; }

.pied { border-top: 1px solid var(--trait); padding: 20px 0 32px; color: var(--discret); font-size: .85rem; }
.pied-liens { margin: 10px 0 0; }
.criteres a.fournisseur { font-weight: 700; text-underline-offset: 3px; }
.portee { margin: 0 0 18px; color: var(--discret); font-size: .85rem; }

.intro { margin-bottom: 28px; }
.intro p { color: var(--discret); max-width: 640px; margin: 0; }
.message { background: var(--accent-clair); border-radius: 8px; padding: 10px 14px; margin: 0 0 20px; }
.message.error { background: #fdecee; color: #8f1d2c; }
.vide { color: var(--discret); }
.retour { margin: 0 0 16px; font-size: .95rem; }

.carte, .produit { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.carte.etroit { max-width: 460px; margin-left: auto; margin-right: auto; }
.carte h2 { margin-bottom: 10px; }
.produit-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.label { background: var(--accent-clair); color: var(--accent); font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.releve { margin: 0; font-size: .85rem; color: var(--discret); }
.releve.ancien { color: #a15c00; }
.criteres { color: var(--discret); font-size: .9rem; margin: 6px 0 0; }
.precaution { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #c2410c; background: rgba(194, 65, 12, .06); border-radius: 6px; }
.origine { color: var(--discret); font-size: .85rem; margin: 4px 0 0; }
.etiquette { align-self: flex-start; white-space: nowrap; background: var(--accent); color: #fff !important; font-size: .72rem !important; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-bottom: 4px; }

.valeurs { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .85rem; color: var(--discret); }
.valeurs li { display: flex; align-items: center; gap: 8px; }
.valeurs svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.valeurs b { display: block; color: var(--texte); }
.valeurs-lien { margin-left: auto; }

.charte { list-style: none; counter-reset: valeur; margin: 18px 0 0; padding: 0; }
.charte li { counter-increment: valeur; position: relative; padding: 0 0 18px 46px; }
.charte li::before { content: counter(valeur); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-clair); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.charte h2 { margin: 0; }
.labels { list-style: none; margin: 14px 0 0; padding: 0; }
.labels li { padding: 12px 0; border-top: 1px solid var(--trait); }
.labels h3 { font-size: 1rem; margin: 0; }
.labels p { margin: 4px 0 0; }
.allegations { list-style: none; margin: 14px 0; padding: 0; }
.allegations li { padding: 12px 0; border-top: 1px solid var(--trait); }
.allegations li:last-child { border-bottom: 1px solid var(--trait); }
.allegations small { display: block; margin-top: 4px; color: var(--discret); }
.idees { font-size: .82rem; color: var(--discret); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -6px !important; }
.idees button { border: 1px dashed var(--accent); background: var(--carte); color: var(--accent); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; text-align: left; }

.offre { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--accent-clair); }
.comparees { color: var(--discret); font-size: .82rem; margin: 8px 0 0; text-align: right; }
dialog.astuce { border: 0; border-radius: 16px; padding: 22px; width: calc(100% - 32px); max-width: 420px; background: var(--carte); color: var(--texte); }
dialog.astuce::backdrop { background: rgba(0, 0, 0, .45); }
dialog.astuce h3 { font-size: 1.1rem; margin: 0 28px 6px 0; }
dialog.astuce p { margin: 0; color: var(--discret); font-size: .95rem; }
.astuce-fermer { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--discret); cursor: pointer; }
.astuce-articles { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.astuce-articles a { display: flex; flex-direction: column; gap: 2px; background: var(--accent-clair); border-radius: 12px; padding: 11px 14px; text-decoration: none; color: var(--texte); }
.astuce-articles span { font-size: .86rem; color: var(--discret); }
dialog.astuce .bouton { display: block; text-align: center; padding: 12px 14px; white-space: normal; }
.desc, .prix { display: flex; flex-direction: column; min-width: 0; }
.desc span, .prix span { font-size: .85rem; color: var(--discret); }
.prix { text-align: right; }
.prix strong { font-size: 1.15rem; white-space: nowrap; color: var(--accent); }
.code b { color: var(--texte); background: #fff; border: 1px dashed var(--discret); border-radius: 4px; padding: 0 5px; }
.affilie { font-style: normal; font-size: .72rem; border: 1px solid var(--trait); border-radius: 4px; padding: 0 4px; background: #fff; }
.note { font-style: italic; }

.bouton { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.bouton:disabled { opacity: .55; cursor: not-allowed; }
.bouton.secondaire { background: var(--carte); color: var(--accent); border: 1px solid var(--trait); }

.coach-tete { display: flex; gap: 18px; align-items: center; margin-bottom: 28px; }
.coach-tete img, .initiale { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.initiale { background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.coach-tete p { margin: 4px 0 0; }
.sous-titre { color: var(--accent); font-weight: 600; }
.reseaux { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.reseaux a { display: inline-block; border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px; font-size: .85rem; font-weight: 600; text-decoration: none; background: var(--carte); }

.sommaire { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 18px; padding-bottom: 6px; }
.sommaire a { flex: none; background: var(--carte); border: 1px solid var(--trait); border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--texte); white-space: nowrap; }
.sommaire a:first-child { border-color: var(--accent); color: var(--accent); }
.sommaire small { font-weight: 400; color: var(--discret); }
.produit { scroll-margin-top: 12px; }

/* Accueil : recherche, rayons, lignes sans relevé */
[hidden] { display: none !important; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.recherche { margin: 0 0 22px; }
.recherche-champ { display: flex; align-items: center; gap: 10px; background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 0 14px; }
.recherche-champ:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-clair); }
.recherche-champ svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--discret); stroke-width: 2; stroke-linecap: round; }
.recherche-champ input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--texte); padding: 12px 0; outline: none; }
.rayons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rayons button { flex: none; background: var(--carte); border: 1px solid var(--trait); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--texte); cursor: pointer; white-space: nowrap; }
.rayons button small { font-weight: 400; color: var(--discret); margin-left: 2px; }
.rayons button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rayons button[aria-pressed="true"] small { color: inherit; opacity: .8; }
.recherche-vide { color: var(--discret); margin: 14px 0 0; }
.rayon-titre { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); margin: 28px 0 10px; }
.rayon-titre:first-of-type { margin-top: 4px; }
.en-attente { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 20px; margin: 28px 0 20px; }
.en-attente summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.en-attente ul { list-style: none; margin: 12px 0 0; padding: 0; columns: 2 260px; column-gap: 28px; }
.en-attente li { break-inside: avoid; padding: 5px 0; font-size: .92rem; }
.en-attente li a { color: var(--texte); }
.tendance { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-top: 6px; }
.tendance svg { display: block; overflow: visible; }
.tendance polyline { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tendance circle { fill: var(--accent); }
.prix .tendance b { font-size: .78rem; color: var(--accent); font-weight: 600; }
.prix .tendance small { font-size: .74rem; color: var(--discret); }
.prix .unitaire b { color: var(--texte); font-weight: 600; }

/* Relevé du matin */
.titre-etape { margin: 26px 0 0; }
.consigne { margin: 12px 0; font-size: .9rem; }
.consigne summary, .second-article summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.consigne pre { white-space: pre-wrap; background: var(--fond); border-radius: 8px; padding: 12px; font-size: .8rem; margin: 10px 0; }
.formulaire textarea[name=collage] { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
.ligne-releve { padding: 16px 18px; margin-bottom: 14px; }
.ligne-releve.en-erreur { border-color: #c0283c; }
.ligne-releve h3 { font-size: 1.02rem; margin: 0 0 10px; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 0 12px; align-items: end; }
.ligne-releve .formulaire p, .ligne-releve p { margin: 0 0 10px; }
.second-article { margin: 4px 0 8px; }
.second-article .grille-champs { margin-top: 10px; }
.article-ligne { border-top: 1px dashed var(--trait); padding-top: 10px; margin-top: 4px; }
.article-ligne[hidden] { display: none; }
.article-ligne .retirer-article { font-size: .85rem; text-decoration: underline; margin-bottom: 10px; }
.ajouter-article { margin-top: 6px; }
.alerte { background: #fdf3e1; color: #7a4500; border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin: 8px 0; }
.alerte ul.errorlist { color: inherit; margin: 0 0 6px; }
.case { display: flex !important; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.apercu-ligne { background: var(--accent-clair); border-radius: 8px; padding: 8px 12px; font-size: .9rem; margin: 8px 0 0 !important; }
.barre-publication { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: var(--fond); border-top: 1px solid var(--trait); padding: 12px 0; margin-top: 18px; }
.barre-publication span { margin-right: auto; font-size: .9rem; color: var(--discret); }

/* Espace coach */
.ordre { list-style: none; counter-reset: rang; margin: 12px 0 0; padding: 0; }
.ordre li { counter-increment: rang; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--trait); }
.ordre li::before { content: counter(rang); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-clair); color: var(--accent); font-weight: 700; font-size: .82rem; display: grid; place-items: center; }
.ordre-nom { flex: 1; min-width: 0; font-size: .92rem; font-weight: 600; }
.ordre-boutons { display: flex; gap: 6px; flex: none; }
.ordre-boutons button { border: 1px solid var(--trait); background: var(--carte); color: var(--accent); border-radius: 8px; min-width: 36px; height: 36px; padding: 0 9px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.ordre li:first-child button[data-vers=premier], .ordre li:first-child button[data-vers=haut], .ordre li:last-child button[data-vers=bas] { opacity: .35; }
.adresse { font-size: 1.15rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adresse a { overflow-wrap: anywhere; }
.etape { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85rem; margin-right: 6px; vertical-align: 2px; }
.photo-ligne { display: flex; gap: 16px; align-items: center; margin: 14px 0; }
.photo-ligne img, .photo-ligne .initiale { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; font-size: 1.7rem; }
.photo-champ { font-size: .9rem; min-width: 0; }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; margin-top: 12px; }
.choix-habillage { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.choix-habillage label { position: relative; display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; margin: 0; }
.choix-habillage input { position: absolute; opacity: 0; }
.apercu { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px; border-radius: 12px; background: var(--f); border: 2px solid var(--trait); }
.apercu i { width: 28px; height: 28px; border-radius: 50%; background: var(--a); flex: none; }
.apercu b { flex: 1; height: 14px; border-radius: 7px; background: var(--c); }
.choix-habillage input:checked + .apercu { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-clair); }
.choix-habillage input:focus-visible + .apercu { outline: 2px solid var(--accent); outline-offset: 2px; }
.h-sauge { --f: #f2f6f1; --a: #2c7a59; --c: #cfe6d9; }
.h-sable { --f: #faf5ee; --a: #b4532a; --c: #f1d5c2; }
.h-miel { --f: #1c2440; --a: #f4b63f; --c: #fff4d6; }
.h-classique { --f: #f6f7f9; --a: #1f5fd1; --c: #cfdcf7; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--trait); }
thead th { border-top: 0; font-size: .8rem; color: var(--discret); font-weight: 600; white-space: nowrap; }
.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.defilement { overflow-x: auto; }
.defilement td:first-child { white-space: nowrap; }

.pilotage-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mois-nav { display: flex; gap: 16px; font-size: .92rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tuile { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.tuile span { font-size: .82rem; color: var(--discret); }
.tuile b, .chiffre { font-size: 1.8rem; line-height: 1.2; font-weight: 700; margin: 0; }
.tuile small { color: var(--discret); }
.deux-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.pastille { font-size: .75rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pastille.ok { background: #e6f4ed; color: #17804f; }
.pastille.attente { background: #fdf3e1; color: #a15c00; }
.bilan { white-space: pre-wrap; background: var(--fond); border-radius: 8px; padding: 14px; font: inherit; margin: 10px 0 0; }
.message-partenariat { width: 100%; box-sizing: border-box; background: var(--fond); border: 1px solid #d8d8d0; border-radius: 8px; padding: 14px; font: inherit; line-height: 1.5; margin: 10px 0; }

.texte h2 { margin-top: 22px; }
.texte h2:first-child { margin-top: 0; }
.texte p { margin: 6px 0 0; }

.formulaire p { margin: 0 0 14px; }
.formulaire label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.formulaire input[type=text], .formulaire input[type=email], .formulaire input[type=password], .formulaire input[type=url], .formulaire input[type=number],
.formulaire textarea, .formulaire select { width: 100%; padding: 9px 10px; border: 1px solid var(--trait); border-radius: 8px; font: inherit; background: #fff; }
.formulaire .helptext, .formulaire .helptext li { display: block; color: var(--discret); font-size: .82rem; }
.formulaire .helptext ul { margin: 4px 0 0; padding-left: 18px; }
.formulaire ul.errorlist { list-style: none; margin: 0 0 6px; padding: 0; color: #c0283c; font-size: .88rem; }
.formulaire div[id^=id_produits] { display: flex; flex-direction: column; gap: 4px; }
.formulaire div[id^=id_produits] label { font-weight: 400; margin: 0; }

@media (max-width: 640px) {
  .offre { grid-template-columns: 1fr; }
  .offre .prix { text-align: left; }
  .offre .tendance { align-items: flex-start; }
  .rayons { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .offre .bouton { justify-self: start; }
  .comparees { text-align: left; }
  dialog.astuce { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: 28px; }
  .coach-tete { align-items: flex-start; }
  .coach-tete img, .initiale { width: 60px; height: 60px; font-size: 1.5rem; }
}

.partage-ligne { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:14px 0; }
.partage-ligne input { min-width:180px; flex:1; padding:10px; border:1px solid var(--trait); border-radius:8px; font:inherit; }
.publication-tete { display:flex; justify-content:space-between; align-items:start; gap:20px; flex-wrap:wrap; }
.publication h2 { margin-top:8px; }
.mesures { display:flex; gap:24px; font-size:.85rem; color:var(--discret); }
.mesures b { display:block; font-size:1.9rem; color:var(--accent); }
.kit-grille { display:grid; grid-template-columns:180px 1fr; gap:24px; margin-top:16px; }
.kit-grille img { width:100%; border:1px solid var(--trait); border-radius:12px; }
.publication summary { cursor:pointer; color:var(--accent); font-weight:600; }
.outils-offre { font-size:.8rem; text-align:right; margin:8px 0; }
.echange-note { border-bottom:1px solid var(--trait); padding:10px 0; }
.formulaire select { width:100%; padding:10px; border:1px solid var(--trait); border-radius:8px; background:white; font:inherit; }
.produit { scroll-margin-top:16px; }
@media (max-width:600px) { .kit-grille { grid-template-columns:1fr; } .kit-grille img { max-width:220px; } .mesures { gap:16px; } .partage-ligne input { width:100%; flex-basis:100%; } }

/* Coût par jour sur la fiche */
.cout-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 10px 0 4px; }
.cout-saisie { display: inline-flex; align-items: center; gap: 8px; }
.cout-saisie input, .cout-saisie select { font: inherit; color: var(--texte); background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; padding: 9px 12px; }
.cout-saisie input { width: 7.5em; }
.cout-saisie input:focus, .cout-saisie select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-clair); }
.cout-saisie input[aria-invalid="true"] { border-color: #b3261e; }
.cout-unite { color: var(--discret); }
.cout-resultat { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 0; }
.cout-resultat div { background: var(--accent-clair); border-radius: 12px; padding: 10px 14px; }
.cout-resultat dt { font-size: .85rem; color: var(--discret); }
.cout-resultat dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 700; }

/* Bandeau du souvenir du coach : « Oui » et « Non » ont exactement le même poids (CNIL). */
.souvenir { background: var(--carte); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin: 0 0 20px; }
.souvenir p { margin: 0 0 10px; }
.souvenir form { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; }
.souvenir .souvenir-plus { margin: 0; font-size: .85rem; }
.pied-souvenir { margin: 10px 0 0; }
.pied-souvenir button.lien { text-decoration: underline; }

/* Page du coach : ce que fait le site, en deux lignes, sous la présentation du coach. */
.resume-site { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; margin: 0 0 18px; }
.resume-site p { margin: 0; color: var(--discret); }
.resume-site .resume-devise { margin-bottom: 4px; font-weight: 700; color: inherit; }
