/* ADN NUTRITION : compléments de styles.css (repris de la maquette) pour le site en production :
   formulaires réels, erreurs, pagination, connexion, pilotage, avis, accessibilité. */

/* ---------- Accessibilité ---------- */
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; text-decoration: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }

/* ---------- Liens habillés en composants ---------- */
a.chip, a.btn, a.add-mini, a.tile, a.box, a.order, a.tab, .share a { text-decoration: none; }
a.chip { color: var(--ink); }
a.chip.sel { color: var(--accent); }
a.chip.out { color: var(--muted); text-decoration: line-through; cursor: pointer; }
.share a { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--white); display: grid; place-items: center; color: var(--ink-2); }
.share a:hover { border-color: var(--ink); background: var(--accent); color: var(--on-accent); }
.pdp-thumbs a { aspect-ratio: 1 / 1; border-radius: 12px; border: 1.5px solid var(--line); background: var(--mist); overflow: hidden; display: block; }
.pdp-thumbs a.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.zone-inline form, .opt-form { display: contents; }
.opt-form button.opt { text-align: left; font: inherit; cursor: pointer; }
.box-link, .order-link { color: inherit; display: grid; transition: border-color .15s, box-shadow .15s; }
.box-link:hover, .order-link:hover { border-color: var(--ink); box-shadow: var(--shadow); text-decoration: none; }
.btn.disabled { opacity: .45; pointer-events: none; }
.btn.loading { opacity: .7; cursor: progress; }
.btn.danger, .btn-ghost.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }

/* ---------- Photos produits ---------- */
.pv-photo { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--white); }
.pdp-main .pv-photo { border-radius: var(--r-lg); }
.photo-preview { width: 140px; height: 140px; border-radius: 12px; overflow: hidden; background: var(--mist); flex: none; }
.photo-preview svg, .photo-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; }

/* ---------- Formulaires ---------- */
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.check.invalid span { color: var(--bad); }
.check.invalid input { outline: 2px solid var(--bad); }
.opt-grid:has(input.invalid) .opt, .field .opt-grid + .err { border-color: var(--bad); }
.notice.bad { background: var(--bad-bg); color: #7A1D18; }
.notice.bad svg { color: var(--bad); }
.notice a { font-weight: 600; }
.field .err { display: block; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.bf-step + .bf-step { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.js .bf-step { display: none; }
.js .bf-step.cur { display: block; margin-top: 0; padding-top: 0; border-top: 0; }
.bf-step legend h2 { font-size: 26px; font-weight: 800; }
.bf-step > p { color: var(--muted); margin-top: 6px; }
.form-body { margin-top: 24px; display: grid; gap: 20px; }
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.search-bar .input { flex: 1; min-width: min(100%, 260px); }
.f-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.js .f-actions .btn-primary { display: none; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.inline-form .input.prix { width: 84px; }
.danger-zone { margin-top: 16px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.danger-zone form { display: grid; gap: 12px; margin-top: 12px; }
textarea.input { resize: vertical; min-height: 46px; padding-top: 11px; line-height: 1.45; }

/* ---------- Connexion et compte ---------- */
.auth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; padding-block: 36px 72px; align-items: start; }
.auth-grid .co-section { margin: 0; }
.acct-logout { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 10px 12px; cursor: pointer; width: 100%; border-radius: 10px; }
.acct-logout:hover { background: var(--mist); color: var(--ink); }
.acct-logout svg { width: 18px; height: 18px; }
.coach-note { background: var(--accent-tint); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.coach-note p { margin-top: 6px; color: var(--ink-2); }
.rib .recap b { font-size: 14px; }
.confirm-ico.warn { background: var(--warn-bg); color: var(--warn); }
.slot-form { display: grid; gap: 10px; }

/* ---------- Avis ---------- */
.stars.none { color: var(--muted); font-size: 13px; }
.review-form { display: grid; gap: 10px; margin-top: 18px; }
.rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { font-size: 28px; line-height: 1; color: var(--line-2); cursor: pointer; padding: 0 2px; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #E5A900; }
.rate input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 28px; align-items: center; }
.pager a, .pager b, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; }
.pager a { border: 1.5px solid var(--line-2); color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--ink); }
.pager b { background: var(--ink); color: var(--accent); }
.pager svg { width: 16px; height: 16px; }

/* ---------- Pilotage ---------- */
.bo-tabs .tab { text-decoration: none; }
.tab-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-family: var(--f-mono); margin-left: 4px; }
.sub-nav { margin-bottom: 22px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bo-search { flex: 1; min-width: min(100%, 240px); display: flex; }
.bo-search .input { width: 100%; }
.bo-bar { align-items: center; margin-bottom: 18px; }
.bo-bar .chips { flex: 1; }
.bo-body { display: grid; gap: 22px; padding-block: 28px 72px; }
.bo-body > .co-section, .bo-body > .box { margin: 0; }
.bo-table td.neg { color: var(--bad); font-weight: 600; }
.bo-table td.pos { color: var(--ok); font-weight: 600; }
.bo-table a { font-weight: 600; }
.bo-table tr.new-row td { background: var(--mist); }
/* Déclinaisons d'un produit dans un pack (Pilotage → Catalogue → Packs) : tient dans un écran de téléphone */
.pk-opts { table-layout: fixed; }
.pk-opts th, .pk-opts td { padding: 8px 10px; }
.pk-opts th { font-size: 10.5px; letter-spacing: .02em; white-space: normal; }
.pk-opts th:nth-child(1) { width: 84px; }
.pk-opts th:nth-child(2) { width: 68px; }
.pk-opts th:not(:last-child), .pk-opts td:not(:last-child) { text-align: center; }
.pk-opts .input { width: 100%; min-width: 0; }
.bo-form { display: grid; gap: 18px; }
.bo-form .co-section { margin: 0; }
.checklist ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checklist li svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--bad); }
.checklist li.ok svg { color: var(--ok); }
.checklist li.ok span { color: var(--muted); }
.checklist li form { margin-left: auto; }
.checklist h3 svg { width: 20px; height: 20px; color: var(--warn); }
.zone-set { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 12px; }
.zone-set legend { padding: 0 6px; font-size: 14px; }
.point-form { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.inv-frame { border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; background: var(--white); }
.co-section h2 .mono { font-weight: 500; }
.link-btn { cursor: pointer; }
.stock-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.zones.light .zone-card { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.zones.light .zone-card p { color: var(--ink-2); }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .bo-bar .chips { flex-basis: 100%; }
  .inline-form .input.prix { width: 70px; }
}
@media (max-width: 640px) {
  .auth-grid { padding-block: 24px 48px; }
  .head-actions { width: 100%; }
  .pager a, .pager b, .pager span { min-width: 36px; height: 36px; padding: 0 8px; }
  .recap div { flex-direction: column; gap: 2px; }
  .recap b { text-align: left; }
}
@media print {
  .topbar, .site-header, .site-footer, .bo-tabs, .bo-head, .cookie, .toasts, .head-actions, .sub-nav { display: none !important; }
  .inv-frame { border: 0; }
}

/* Quantité saisissable sur la fiche produit */
.qty input { width: 46px; height: 100%; border: 0; background: none; text-align: center; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Les messages ne bloquent jamais un clic sur la page */
.toasts, .toast { pointer-events: none; }
.checklist h3 { justify-content: flex-start; }
.checklist h3 .pill { margin-left: auto; }

/* Mise en service de Qonto (Pilotage → Réglages → Qonto, choix du 18/11/2026) : étapes numérotées, cochées quand le site les constate */
.qonto-mes { display: block; }
.qonto-mes > * + * { margin-top: 14px; }
.qonto-mes > summary { cursor: pointer; list-style: none; }
.qonto-mes > summary::-webkit-details-marker { display: none; }
.qonto-mes > summary h3 { justify-content: flex-start; }
.qonto-mes > summary h3 .pill { margin-left: auto; }
.qonto-mes > summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: 6px; }
.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; gap: 16px; }
.etapes > li { counter-increment: etape; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; font-size: 14px; }
.etapes > li::before { content: counter(etape); grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--mist); color: var(--ink); border: 1px solid var(--line); }
.etapes > li.ok::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: var(--white); }
.etape-titre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 28px; }
.etape-corps { color: var(--ink-2); display: grid; gap: 6px; }
.etape-corps p { margin: 0; }
.etape-corps ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.etapes > li.ok .etape-corps { color: var(--muted); }
.copie { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; vertical-align: middle; max-width: 100%; }
.copie code { font-family: var(--f-mono); font-size: 12.5px; background: var(--mist); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }

/* Lien « Choisir mon pack nutrition » de l'accueil : le titre reste visible sous l'en-tête collant. */
#packs { scroll-margin-top: 92px; }

/* ---------- Suivi personnalisé (retours du client du 28/10/2026) ---------- */
.courbes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.courbe-box { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--white); min-width: 0; }
.courbe-tete { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 14px; }
.courbe-tete span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.courbe-tete em { font-style: normal; color: var(--accent-ink); font-weight: 600; }
.courbe { width: 100%; height: auto; display: block; margin-top: 6px; }
.courbe-axe { stroke: var(--line); stroke-width: 1; }
.courbe-ligne { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.courbe-pt { fill: var(--white); stroke: var(--ink); stroke-width: 1.5; }
.courbe-fin { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.courbe-txt { font: 600 10px var(--f-mono); fill: var(--muted); }
.courbe-txt.fort { fill: var(--ink); }
.scans { display: grid; gap: 16px; }
.scan { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.scan-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scan-photos, .scan-paire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scan .scan-photos { max-width: 480px; }
.scan-paire { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scan-photos figure, .scan-paire figure { margin: 0; }
.scan-photos img, .scan-paire img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-sm); background: var(--mist); display: block; }
.scan-photos figcaption, .scan-paire figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.scan-obs { white-space: pre-line; margin: 0; color: var(--ink-2); font-size: 15px; }
.scan-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 10px 0; }
.scan-relecture { display: grid; gap: 12px; margin-bottom: 18px; }
.morpho-etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.morpho-etape { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.morpho-etape h3 { margin: 0; }
.morpho-cadre { background: var(--mist); border-radius: var(--r-sm); padding: 10px; display: grid; place-items: center; }
.gabarit { width: 100%; max-width: 160px; }
.gab-cadre { fill: none; stroke: var(--line); stroke-width: 1.5; }
.gab-ligne { stroke: var(--accent-ink); stroke-width: 1.2; stroke-dasharray: 4 3; }
.gab-txt { font: 600 7px var(--f-mono); fill: var(--accent-ink); }
.gab-silhouette { fill: var(--white); stroke: var(--ink-2); stroke-width: 1.2; }
.morpho-apercu { width: 100%; height: auto; border-radius: var(--r-sm); }
.morpho-etat { font-size: 13.5px; color: var(--ok); margin: 0; min-height: 1.2em; }
.morpho-etat.ko { color: var(--warn); }
.repas-jour { border-top: 1px solid var(--line); padding: 12px 0; display: grid; gap: 8px; }
.repas-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.repas-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.repas-ligne .sub { display: block; font-size: 13px; color: var(--muted); }
.plat-res { display: grid; gap: 12px; margin-top: 12px; }
.plat-kcal { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plat-kcal b { font: 800 28px var(--f-display); }
@media (max-width: 760px) {
  .morpho-etapes, .scan-compare { grid-template-columns: 1fr; }
}

/* ---------- Fournisseurs : désactivation en un clic (choix du 20/11/2026) ---------- */
.four-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.four-tete h2 { margin: 0; }
.four-chiffres { margin: 0; color: var(--muted); font-size: 14px; }
.four-coupe > summary { list-style: none; width: max-content; max-width: 100%; }
.four-coupe > summary::-webkit-details-marker { display: none; }
.four-coupe[open] > summary { margin-bottom: 12px; }
.four-bilan { display: grid; gap: 14px; border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; background: var(--mist); }
.four-bilan h3 { margin: 0; font-size: 17px; }
.four-bilan ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.four-etat { align-items: center; flex-wrap: wrap; }
.four-etat > span { flex: 1 1 200px; min-width: 0; }
.four-fiche { display: grid; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.saisie-coupe { color: var(--warn); font-weight: 600; }
