/* --- Police : Outfit, comme l'espace CLIENT du logiciel du chariot (chariot et
   reçu) — une seule police pour les titres et le texte, titres en graisse 500.
   Fichiers embarqués (licence libre SIL OFL, assets/fonts/OFL-Outfit.txt) :
   aucun appel à Google Fonts, l'écran s'affiche aussi hors ligne. ----------- */
@font-face {
  font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../assets/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../assets/fonts/outfit-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* =============================================================================
   Caddige — interface de l'assistant (écran tactile de chariot)
   Couleurs : UNIQUEMENT les variables de charte_caddige.css. Aucune valeur en dur.
   Thème clair par défaut ; sombre via data-theme="dark" sur <html>.
   ============================================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --font: "Outfit", system-ui, "Segoe UI", Arial, sans-serif;
  --font-2: var(--font);
  --tap: 60px;                          /* zone tactile de base */
  --r-l: 32px; --r-m: 20px; --r-s: 14px;
}

html, body { height: 100%; }
body {
  font-family: var(--font); color: var(--fg); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 10% 0%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, var(--accent-soft), transparent 55%),
    var(--base);
  display: grid; place-items: center; padding: 24px; overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.ico { width: 26px; height: 26px; flex: none; }

/* --- Fenêtre de l'assistant ---------------------------------------------- */
.app {
  width: min(1180px, 100%); height: min(760px, 100%);
  background: var(--base); border: 1px solid var(--line); border-radius: 36px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}

/* --- En-tête -------------------------------------------------------------- */
.tete {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none;
}
.marque { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.marque > div { min-width: 0; }
/* Siré : son visage, avec le chariot Caddige en badge (la marque reste visible). */
.marque-ico { position: relative; width: 48px; height: 48px; flex: none; }
.marque-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand-soft); }
.marque-badge { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); padding: 3px; box-shadow: var(--shadow); }
.marque-nom { font: 500 26px/1 var(--font); letter-spacing: -0.02em; }
.marque-sous { font: 500 14px var(--font-2); color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reglages { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex: none; }

.segment { display: inline-flex; background: var(--raised); border: 1px solid var(--line); border-radius: 999px; padding: 4px; flex: none; }
.segment button {
  min-width: 52px; height: 46px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font: 600 16px var(--font); display: grid; place-items: center; padding: 0 12px;
}
.segment button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.segment .ico { width: 22px; height: 22px; }

.pastille, .terminer, .rond {
  height: 54px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; flex: none;
  font: 600 16px var(--font); white-space: nowrap;
}
.pastille { padding: 0 16px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.pastille[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }
.pastille .ico { width: 22px; height: 22px; }
.terminer { padding: 0 18px; border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--fg); }
.terminer .ico { width: 22px; height: 22px; }
.rond { width: 54px; justify-content: center; border: 1px solid var(--line); background: var(--surface); }
.rond .ico { width: 24px; height: 24px; }

/* --- Bandeau d'alerte (alerte la plus grave de la dernière réponse) ------- */
.bandeau {
  margin: 14px 22px 0; display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-radius: 18px; font: 600 18px/1.3 var(--font); flex: none;
}
.bandeau .b-ico { font-size: 26px; line-height: 1; }
.bandeau small { display: block; font: 500 15px var(--font-2); color: var(--muted); margin-top: 2px; }

/* =============================================================================
   ALERTES — jamais confondues : couleur ET forme ET icône ET mot.
     critique (DLC dépassée)        rouge plein, barre gauche
     eleve (allergène)              CADRE rouge épais, fond neutre
     attention (DDM / allergène ?)  orange
     modere (date proche)           orange
     rupture                        neutre atténué (carte)
   ============================================================================= */
.a-critique { background: var(--danger-soft); box-shadow: inset 6px 0 0 var(--danger); }
.a-critique b, .a-critique .titre { color: var(--danger); }
.a-eleve { background: var(--surface); border: 3px solid var(--danger); }
.a-eleve b, .a-eleve .titre { color: var(--danger); }
.a-attention, .a-modere { background: var(--accent-soft); box-shadow: inset 6px 0 0 var(--accent); }

/* --- Accueil -------------------------------------------------------------- */
.accueil { flex: 1; display: grid; grid-template-columns: 400px 1fr; min-height: 0; }
.voix {
  background: var(--night); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 32px 30px; text-align: center; color: var(--surface);
}
[data-theme="dark"] .voix { color: var(--fg); border-right: 1px solid var(--line); }
.voix-titre { font: 500 32px/1.2 var(--font); letter-spacing: -0.02em; }
.voix-texte { font: 400 19px/1.45 var(--font-2); opacity: .8; max-width: 300px; min-height: 56px; }
.micro-heros {
  width: 172px; height: 172px; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center;
  box-shadow: 0 0 0 16px color-mix(in srgb, var(--brand) 22%, transparent),
              0 0 0 34px color-mix(in srgb, var(--brand) 10%, transparent), var(--shadow-glow);
  transition: transform .15s ease;
  margin: 30px 0 18px;   /* le halo déborde de 34 px : il ne doit toucher ni le titre ni le texte */
}
.micro-heros:active { transform: scale(.96); }
.micro-heros .ico { width: 72px; height: 72px; }
.mic-button.active { background: var(--danger); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 22px color-mix(in srgb, var(--danger) 18%, transparent); } }
.ou { font: 600 14px var(--font-2); opacity: .55; text-transform: uppercase; letter-spacing: .12em; }
.ecrire {
  height: 62px; width: 100%; max-width: 300px; border-radius: 999px; background: transparent;
  border: 1.5px solid color-mix(in srgb, currentColor 35%, transparent);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 18px var(--font);
}

.idees { padding: 30px 32px; display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow: auto; }
.idees-titre { font: 500 24px var(--font); letter-spacing: -0.02em; }
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.idee {
  min-height: 140px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  text-align: left; font: 600 19px/1.25 var(--font); gap: 12px; transition: transform .12s ease;
}
.idee:active { transform: scale(.97); }
.idee-ico { width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); display: grid; place-items: center; font-size: 28px; }
.adieu {
  margin-top: auto; padding: 16px 18px; border-radius: 18px; background: var(--brand-soft); color: var(--brand-text);
  font: 600 18px/1.35 var(--font);
}

/* --- Conversation --------------------------------------------------------- */
.conversation { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 0; }
.fil { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); }
.messages { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.bulle { max-width: 88%; padding: 16px 20px; border-radius: 22px; font: 400 18px/1.5 var(--font-2); overflow-wrap: anywhere; }
.bulle.client { margin-left: auto; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 8px; font-weight: 600; }
.bulle.ia { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 8px; }
.bulle.ia strong { font-weight: 700; }
.bulle .outils { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.lire {
  height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised);
  font: 600 15px var(--font); display: inline-flex; align-items: center; gap: 8px;
}
.lire .ico { width: 20px; height: 20px; }
.lire.speaking { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }
.attente { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 500 16px var(--font-2); }
.points { display: inline-flex; gap: 6px; }
.points i { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: point 1.2s infinite ease-in-out; }
.points i:nth-child(2) { animation-delay: .15s; } .points i:nth-child(3) { animation-delay: .3s; }
@keyframes point { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5px); } }

.bas { padding: 12px 22px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; background: var(--base); }
.puces { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.puces:empty { display: none; }
.puce {
  min-height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: 600 16px var(--font); white-space: nowrap; flex: none;
}
.saisie { display: flex; gap: 10px; align-items: center; }
#user-input {
  flex: 1; min-height: var(--tap); max-height: 130px; resize: none; border-radius: 30px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--fg); padding: 17px 22px; font: 400 18px/1.4 var(--font-2);
}
#user-input::placeholder { color: var(--muted); }
.envoyer, .micro { width: var(--tap); height: var(--tap); border-radius: 999px; border: 0; display: grid; place-items: center; flex: none; }
.envoyer { background: var(--fg); color: var(--base); }
.micro { width: 72px; height: 72px; background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-glow); }
.micro .ico { width: 32px; height: 32px; }
.etat-voix { min-height: 20px; font: 600 15px var(--font-2); color: var(--muted); text-align: center; }
.etat-voix:empty { display: none; }

/* --- Fiches produit (données structurées de l'API) ---------------------- */
.fiches { background: var(--raised); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.fiches-titre { font: 600 14px var(--font-2); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.fiches-liste { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
.fiches-vide { color: var(--muted); font: 500 16px/1.5 var(--font-2); padding: 18px; border: 1.5px dashed var(--line); border-radius: 18px; }
.fiche {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px;
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; box-shadow: var(--shadow);
}
.fiche > div { min-width: 0; }
.fiche.attenuee { opacity: .7; }
.fiche.a-critique, .fiche.a-attention, .fiche.a-modere { box-shadow: var(--shadow); }
.fiche.a-critique { box-shadow: inset 6px 0 0 var(--danger), var(--shadow); }
.fiche.a-eleve { border: 3px solid var(--danger); }
.vignette { width: 72px; height: 72px; border-radius: 16px; background: var(--raised); display: grid; place-items: center; font-size: 34px; overflow: hidden; }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.fiche h3 { font: 500 18px/1.25 var(--font); letter-spacing: -0.01em; }
.fiche .marque-p { color: var(--muted); font: 500 14px var(--font-2); }
.fiche .prix { font: 600 21px var(--font); margin-top: 4px; }
.fiche .prix small { font: 500 13px var(--font-2); color: var(--muted); }
.lieu { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.lieu span { background: var(--raised); border-radius: 10px; padding: 5px 9px; font: 600 13px var(--font-2); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { min-height: 32px; padding: 5px 11px; border-radius: 16px; display: inline-flex; align-items: center; gap: 6px; font: 600 13.5px/1.25 var(--font); }
.badge.dispo { background: var(--brand-soft); color: var(--brand-text); }
.badge.promo { background: var(--brand); color: var(--on-brand); }      /* jamais orange : l'orange = date */
.badge.rupture { background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.badge.critique { background: var(--danger-soft); color: var(--danger); border: 1.5px solid var(--danger); }
.badge.eleve { background: var(--surface); color: var(--danger); border: 2.5px solid var(--danger); }
.badge.attention, .badge.modere { background: var(--accent-soft); color: var(--fg); border: 1.5px solid var(--accent); }

/* --- Fenêtre Caddige ------------------------------------------------------ */
.voile {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--night) 62%, transparent);
}
.fenetre {
  width: min(580px, 100%); background: var(--surface); color: var(--fg); border: 1px solid var(--line);
  border-radius: 30px; padding: 34px; text-align: center; box-shadow: var(--shadow);
}
.fenetre-ico { font-size: 56px; line-height: 1; }
.fenetre h2 { font: 500 28px/1.2 var(--font); letter-spacing: -0.02em; margin: 14px 0 10px; }
.fenetre-texte { color: var(--muted); font: 400 19px/1.5 var(--font-2); white-space: pre-line; }
.fenetre-texte .compte { display: block; font: 600 54px var(--font); color: var(--accent); margin-top: 12px; }
.fenetre-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; margin-top: 26px; }
.gros-btn { min-height: 68px; border-radius: 20px; border: 0; font: 600 19px var(--font); padding: 0 16px; }
.gros-btn.principal { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-glow); }
.gros-btn.second { background: var(--raised); color: var(--fg); border: 1px solid var(--line); }
.aide-liste { text-align: left; display: grid; gap: 10px; margin-top: 6px; }
.aide-liste div { background: var(--raised); border-radius: 14px; padding: 12px 14px; font: 500 17px/1.4 var(--font-2); color: var(--fg); }

/* --- Bouton de lancement (assistant fermé) -------------------------------- */
.lanceur {
  position: fixed; right: 32px; bottom: 32px; height: 76px; padding: 0 28px 0 16px; border-radius: 999px; border: 0;
  background: var(--brand); color: var(--on-brand); display: flex; align-items: center; gap: 12px;
  font: 600 21px var(--font); box-shadow: var(--shadow-glow);
}
.lanceur img { width: 46px; height: 46px; background: var(--surface); border-radius: 50%; padding: 6px; }

/* --- Écrans étroits (fenêtre intégrée au chariot, tablette portrait) ------ */
/* Intégré au chariot (31/10/2026, demande de la propriétaire) : le MÊME écran
   que seul — fenêtre aux bords arrondis sur le fond dégradé — et non plus un
   écran étiré bord à bord. Sur un écran étroit (≤ 820 px), les règles
   ci-dessous passent en plein écran, intégré ou non. */
body.integre { padding: 24px; }
@media (max-width: 820px) { body.integre { padding: 0; } }
@media (max-width: 1100px) {
  .pastille span, .terminer span { display: none; }
  .pastille, .terminer { width: 54px; justify-content: center; padding: 0; }
  .conversation { grid-template-columns: minmax(0, 1fr) 340px; }
  .accueil { grid-template-columns: 340px 1fr; }
  .grille { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  body { padding: 0; }
  .app { border-radius: 0; height: 100%; }
  .marque-sous { display: none; }
  .accueil { grid-template-columns: 1fr; overflow-y: auto; }
  .voix { padding: 24px; }
  .conversation { grid-template-columns: 1fr; }
  .fiches { display: none; }            /* étroit : les fiches passent sous la réponse (script) */
}

/* =============================================================================
   Ajouts du 25/10/2026 : ce que l'ancienne interface avait de bon
   ============================================================================= */

/* --- Lignes de conversation : avatar + bulle + heure ---------------------- */
.ligne { display: flex; align-items: flex-start; gap: 12px; max-width: 100%; }
.ligne.client { flex-direction: row-reverse; }
.ligne .contenu { display: flex; flex-direction: column; gap: 6px; max-width: 86%; min-width: 0; }
.ligne.client .contenu { align-items: flex-end; }
.ligne .bulle { max-width: 100%; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; border: 2px solid var(--surface); box-shadow: var(--shadow); }
.avatar-logo { display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--brand-soft); }
.avatar-logo img { width: 30px; height: auto; }
.lanceur img.lanceur-photo { padding: 0; object-fit: cover; }
.meta { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.heure { font: 500 13px var(--font-2); color: var(--muted); }
.bulle.attente { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 500 16px var(--font-2); }

/* --- Vignette produit : vraie photo quand elle existe --------------------- */
/* Piste de grille fixée : sans elle, `height: 100%` ne se résout pas, l'image
   garde sa hauteur naturelle et une bouteille est coupée (étiquette perdue). */
.vignette { grid-template: 100% / 100%; }
.vignette img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.vignette.sans-photo img { width: 60%; height: auto; opacity: .45; background: transparent; }

/* --- Tiroir « Mes questions » ---------------------------------------------- */
.tiroir-voile { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--night) 45%, transparent); }
.tiroir {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 45; width: min(420px, 92vw);
  background: var(--base); border-right: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px; padding: 20px;
  transform: translateX(-104%); transition: transform .25s ease;
}
.tiroir.ouvert { transform: none; }
.tiroir-tete { display: flex; align-items: center; justify-content: space-between; }
.tiroir-tete h2 { font: 500 26px var(--font); letter-spacing: -0.02em; }
.nouvelle {
  height: 60px; border-radius: 18px; border: 0; background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 18px var(--font); box-shadow: var(--shadow-glow);
}
.recherche {
  height: 56px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  display: flex; align-items: center; gap: 10px; padding: 0 18px; color: var(--muted);
}
.recherche .ico { width: 22px; height: 22px; }
.recherche input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--fg); font: 400 17px var(--font-2); min-width: 0; }
.tiroir-corps { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.tiroir-corps h3 { font: 600 14px var(--font-2); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 8px; }
.liste-q { display: flex; flex-direction: column; gap: 8px; }
.liste-q .vide { color: var(--muted); font: 500 15px var(--font-2); padding: 4px 2px; }
.q { display: flex; align-items: stretch; gap: 8px; }
.q-texte {
  flex: 1; min-height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  text-align: left; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0;
}
.q-texte span { font: 600 16px/1.3 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-texte small { font: 500 12.5px var(--font-2); color: var(--muted); }
.q-etoile { width: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--line); display: grid; place-items: center; flex: none; }
.q-etoile .ico { width: 24px; height: 24px; }
.q-etoile.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.filtres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filtre {
  min-height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  display: flex; align-items: center; gap: 10px; padding: 0 14px; font: 600 16px var(--font); text-align: left;
}
.budget { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.budget label { font: 600 15px var(--font-2); color: var(--muted); }
.budget-ligne { display: flex; gap: 8px; }
.budget-ligne input {
  flex: 1; min-width: 0; height: 60px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--fg); padding: 0 16px; font: 600 19px var(--font-2);
}
.budget-ligne .gros-btn { min-height: 60px; padding: 0 22px; }
.tiroir-note { font: 500 14px/1.4 var(--font-2); color: var(--muted); }

/* --- Suggestions : titre ---------------------------------------------------- */
.puces { align-items: center; }
.puces-titre { font: 600 14px var(--font-2); color: var(--muted); white-space: nowrap; flex: none; }

/* --- Paramètres --------------------------------------------------------------- */
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left;
  padding: 12px 0; border-bottom: 1px solid var(--line); font: 600 17px var(--font); color: var(--fg); flex-wrap: wrap; }
.reglage:last-child { border-bottom: 0; }

/* --- Taille du texte (accessibilité) : conversation, fiches et idées ------- */
html[data-taille="grand"] .messages, html[data-taille="grand"] .fiches-liste, html[data-taille="grand"] .idees { zoom: 1.15; }
html[data-taille="tres-grand"] .messages, html[data-taille="tres-grand"] .fiches-liste, html[data-taille="tres-grand"] .idees { zoom: 1.3; }

/* --- Arrêter la voix : visible pendant toute lecture -------------------------- */
/* Avant, seul le bouton de la bulle lue pouvait couper la voix ; une fois la
   bulle sortie de l'écran, le client n'avait plus que « Terminer mes courses ». */
.stop-voix { align-self: center; display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--fg); color: var(--base); font: 600 17px var(--font); box-shadow: var(--shadow); }
.stop-voix[hidden] { display: none; }
.stop-voix .ico { width: 22px; height: 22px; }

/* --- Conversation vocale (31/10/2026) ---------------------------------------- */
/* Bandeau visible pendant tout le mode : le client sait que Siré l'écoute et
   qu'un geste suffit pour arrêter. */
.conversation-en-cours { align-self: center; display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 10px 0 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--brand); background: var(--brand-soft); color: var(--brand-text);
  font: 500 16px var(--font); max-width: 100%; text-align: left; }
.conversation-en-cours[hidden] { display: none; }
.conversation-en-cours .arreter { flex: none; padding: 8px 16px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-weight: 600; }
.onde { display: inline-flex; align-items: center; gap: 3px; height: 22px; flex: none; }
.onde i { width: 4px; height: 8px; border-radius: 2px; background: currentColor; animation: onde 1s ease-in-out infinite; }
.onde i:nth-child(2) { animation-delay: .15s; }
.onde i:nth-child(3) { animation-delay: .3s; }
@keyframes onde { 50% { height: 20px; } }
@media (prefers-reduced-motion: reduce) { .onde i { animation: none; height: 14px; } }
.ecrire-conversation { margin-top: 10px; }
/* « Nouvelle conversation » : le message de confirmation se voit. */
.voix-texte.nouvelle-ok { color: var(--brand); font-weight: 600; }
@media (max-width: 520px) { .conversation-en-cours span[data-i18n="conv.active"] { font-size: 14px; } }

/* =============================================================================
   En-tête : « Siré · Assistante IA » TOUJOURS lisible (31/10/2026)
   Règle commune avec le logiciel du chariot : le mot « IA » ne disparaît
   jamais. Avec le bouton « Conversation vocale », le sous-titre était coupé
   (« Assist… ») sur la tablette de 10 pouces, et le prénom disparaissait en
   portrait. La marque ne rétrécit plus : ce sont les boutons qui se compactent,
   puis passent à la ligne.
   ============================================================================= */
.marque { flex: 1 0 auto; }
.marque-sous { overflow: visible; text-overflow: clip; }
/* Les paliers suivent la largeur de la FENÊTRE de Siré (requêtes de conteneur),
   pas celle de l'écran : avec la fenêtre arrondie (1180 px au plus), un grand
   écran affichait tous les libellés et la fenêtre coupait « J'ai fini mes
   questions » et la croix (relevé par la propriétaire le 31/10/2026). */
.app { container: app / inline-size; }
@container app (max-width: 1400px) {
  .pastille span { display: none; }
  .pastille { width: 54px; justify-content: center; padding: 0; }
}
@container app (max-width: 1060px) {
  .terminer span { display: none; }
  .terminer { width: 54px; justify-content: center; padding: 0; }
}
@container app (max-width: 900px) {
  .tete { flex-wrap: wrap; row-gap: 10px; padding: 12px 14px; }
  .reglages { width: 100%; justify-content: space-between; gap: 6px; }
  .rond, .pastille, .terminer { width: 48px; height: 48px; }
  .segment button { min-width: 44px; height: 40px; padding: 0 8px; }
  .marque-sous { display: block; }
}
@container app (max-width: 560px) {
  .reglages { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
}

/* =============================================================================
   Colonne du micro sur un écran BAS (31/10/2026)
   Sur un portable (1366×768 : ~657 px utiles dans le navigateur), « Discuter à
   voix haute » sortait de la fenêtre. Le micro se compacte quand la hauteur
   manque ; et si elle manque encore, la colonne défile au lieu de couper.
   ============================================================================= */
.voix { overflow-y: auto; justify-content: safe center; }
@media (max-height: 820px) {
  .voix { gap: 14px; padding: 22px 26px; }
  .micro-heros { width: 128px; height: 128px; margin: 22px 0 12px;
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--brand) 22%, transparent),
                0 0 0 24px color-mix(in srgb, var(--brand) 10%, transparent), var(--shadow-glow); }
  .micro-heros .ico { width: 56px; height: 56px; }
  .voix-titre { font-size: 28px; }
  .voix-texte { font-size: 17px; min-height: 0; }
  .ecrire { height: 54px; }
  .ecrire-conversation { margin-top: 4px; }
}
/* Écran étroit : l'accueil entier défile, pas la colonne du micro seule. */
@media (max-width: 820px) { .voix { overflow: visible; } }
