/* ==========================================================================
   Back-office Les Pieds sous la Table (/mydycast/)
   Même charte que le site, « moderne et clair » : fond blanc cassé, cartes
   blanches à filet de 1 px, Inter, le noir pour l'action, le rouge des
   escarpins pour ce qui demande l'attention (pastilles, erreurs).
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-variable.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --fond: #faf9f7;
  --carte: #ffffff;
  --surface: #f3f1ec;
  --surface-2: #ebe8e1;
  --ligne: #e6e2db;
  --ligne-2: #d3cec5;
  --texte: #141414;
  --texte-2: #4b4b4b;
  --texte-3: #7c7c7c;
  --accent: #e3261a;
  --accent-2: #b51d12;
  --rouge-pale: #fdf1ef;
  --vert: #2f6b3a;
  --vert-pale: #edf5ee;
  --ambre: #8a5a00;
  --ambre-pale: #fdf5e4;
  --bleu: #1f4f8a;
  --bleu-pale: #edf3fb;
  --rayon: 14px;
  --rayon-s: 10px;
  --nav: 248px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--texte); background: var(--fond); font-feature-settings: "cv11", "ss01"; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: clamp(1.55rem, 2.2vw, 2rem); letter-spacing: -.025em; }
h1 em, h2 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .9em; }
small, .discret { color: var(--texte-3); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--ligne); margin: 1.4rem 0; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; }

/* --- Enveloppe -------------------------------------------------------------- */
.bo { display: grid; grid-template-columns: var(--nav) minmax(0, 1fr); min-height: 100vh; }
.bo__nav { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--carte); border-right: 1px solid var(--ligne); padding: 1.1rem .8rem 1rem; display: flex; flex-direction: column; gap: .1rem; scrollbar-width: thin; }
.bo__marque { display: flex; align-items: center; gap: .65rem; text-decoration: none; padding: .1rem .5rem .8rem; margin-bottom: .2rem; border-bottom: 1px solid var(--ligne); }
.bo__marque img { width: 40px; height: 44px; object-fit: contain; }
.bo__marque b { display: block; font: 600 .98rem/1.1 "Fredoka", var(--sans); letter-spacing: -.01em; }
.bo__marque small { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); margin-top: .15rem; }
.bo__rubrique { margin: .8rem .6rem .2rem; font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--texte-3); font-weight: 600; }
.bo__nav a.item { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-radius: 9px; text-decoration: none; color: var(--texte-2); font-weight: 500; font-size: .93rem; }
.bo__nav a.item:hover { background: var(--surface); color: var(--texte); }
.bo__nav a.item.est-actif { background: var(--texte); color: #fff; }
.bo__nav a.item.est-actif .badge { background: #fff; color: var(--texte); }
.bo__nav .badge { margin-left: auto; min-width: 1.45rem; text-align: center; background: var(--accent); color: #fff; border-radius: 999px; padding: .05rem .45rem; font-size: .74rem; font-weight: 700; }
.bo__pied { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--ligne); display: grid; gap: .1rem; }
.bo__pied form { margin: .4rem .6rem 0; }
.bo__compte { font-size: .8rem; color: var(--texte-3); padding: .5rem .6rem 0; }
.bo__principal { min-width: 0; }
.bo__barre { display: none; }
.bo__main { padding: 1.8rem clamp(1rem, 3vw, 2.6rem) 4rem; max-width: 1280px; }
.bo__tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.bo__tete h1 { margin: 0; }
.bo__tete p { margin: .35rem 0 0; color: var(--texte-2); max-width: 70ch; }
.bo__tete-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.fil { font-size: .85rem; color: var(--texte-3); margin-bottom: .5rem; }
.fil a { color: var(--texte-3); }

@media (max-width: 960px) {
  .bo { display: block; }
  .bo__nav { position: fixed; z-index: 50; inset: 0 auto 0 0; width: min(86vw, 300px); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 0 100vmax rgba(20, 20, 20, 0); }
  .bo.nav-ouverte .bo__nav { transform: none; box-shadow: 0 0 0 100vmax rgba(20, 20, 20, .32); }
  .bo__barre { display: flex; align-items: center; gap: .7rem; position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--ligne); padding: .55rem 1rem; }
  .bo__barre img { width: 30px; height: 33px; object-fit: contain; }
  .bo__barre strong { font-size: .95rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bo__barre .bouton { margin-left: auto; }
  .bo__burger { width: 40px; height: 40px; border: 1px solid var(--ligne); border-radius: 10px; background: #fff; display: grid; place-content: center; gap: 4px; cursor: pointer; padding: 0; }
  .bo__burger span { display: block; width: 18px; height: 2px; background: var(--texte); border-radius: 2px; }
  .bo__burger .badge-point { position: absolute; }
  .bo__main { padding: 1.2rem 1rem 3rem; }
}

/* --- Boutons, liens --------------------------------------------------------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .62em 1.15em; border-radius: 999px; border: 1px solid var(--texte); background: var(--texte); color: #fff; font: 600 .92rem/1.15 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.bouton:hover { background: #333; border-color: #333; color: #fff; }
.bouton--ligne { background: #fff; color: var(--texte); border-color: var(--ligne-2); }
.bouton--ligne:hover { background: var(--surface); color: var(--texte); border-color: var(--texte-3); }
.bouton--rouge { background: var(--accent); border-color: var(--accent); }
.bouton--rouge:hover { background: var(--accent-2); border-color: var(--accent-2); }
.bouton--danger { background: #fff; color: var(--accent-2); border-color: #efc2bd; }
.bouton--danger:hover { background: var(--rouge-pale); color: var(--accent-2); border-color: var(--accent); }
.bouton--petit { padding: .4em .85em; font-size: .84rem; }
.bouton--plein { width: 100%; }
.bouton[disabled] { opacity: .45; cursor: default; }
.bouton .ico { width: 16px; height: 16px; }
.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--texte); text-decoration: underline; cursor: pointer; }
.lien--discret { color: var(--texte-3); }
.lien-fleche { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; text-decoration: none; font-size: .9rem; }
.lien-fleche .ico { width: 15px; height: 15px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions--fin { justify-content: flex-end; }
form.en-ligne { display: inline; margin: 0; }

/* --- Cartes, grilles ---------------------------------------------------------- */
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.25rem 1.35rem; margin-bottom: 1.25rem; }
.carte > h2:first-child, .carte__tete { margin-top: 0; }
.carte__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.carte__tete h2 { margin: 0; }
.carte__tete a { font-size: .88rem; }
.carte--plate { background: var(--surface); border-color: transparent; }
.carte--alerte { border-color: #efc2bd; background: var(--rouge-pale); }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grille-principale { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .grille-principale { grid-template-columns: 1fr; } .grille-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grille-2, .grille-3 { grid-template-columns: 1fr; } }

.tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 1100px) { .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tuile { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1rem 1.1rem; text-decoration: none; display: block; }
a.tuile:hover { border-color: var(--texte-3); color: inherit; }
.tuile__lib { font-size: .78rem; color: var(--texte-3); font-weight: 500; }
.tuile__val { display: block; font-size: 2rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; margin: .25rem 0 .15rem; }
.tuile__val small { font-size: .9rem; font-weight: 500; letter-spacing: 0; }
.tuile__info { font-size: .82rem; color: var(--texte-2); }
.tuile--rouge .tuile__val { color: var(--accent-2); }
.variation { font-size: .78rem; font-weight: 600; padding: .05rem .4rem; border-radius: 999px; }
.variation--hausse { color: var(--vert); background: var(--vert-pale); }
.variation--baisse { color: var(--accent-2); background: var(--rouge-pale); }

/* --- Messages -------------------------------------------------------------- */
.alerte { border-radius: var(--rayon-s); padding: .75rem 1rem; margin: 0 0 1rem; border: 1px solid; font-size: .93rem; display: flex; gap: .7rem; align-items: flex-start; }
.alerte p:last-child { margin-bottom: 0; }
.alerte a { font-weight: 600; }
.alerte--ok { background: var(--vert-pale); border-color: #cfe3d2; color: #1e4a27; }
.alerte--erreur { background: var(--rouge-pale); border-color: #efc2bd; color: #7d1610; }
.alerte--info { background: var(--bleu-pale); border-color: #cfdcef; color: #183e6d; }
.alerte--attention { background: var(--ambre-pale); border-color: #f0dfb5; color: #6a4500; }
.alerte__x { margin-left: auto; background: none; border: 0; font-size: 1.1rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }

/* --- Pastilles d'état ---------------------------------------------------------- */
.etat { display: inline-flex; align-items: center; gap: .35em; border-radius: 999px; padding: .12em .65em; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--surface); color: var(--texte-2); }
.etat::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: currentColor; opacity: .8; }
.etat--nouveau { background: var(--rouge-pale); color: var(--accent-2); }
.etat--en-cours, .etat--devis-envoye, .etat--en-attente { background: var(--ambre-pale); color: var(--ambre); }
.etat--confirme, .etat--paye { background: var(--vert-pale); color: var(--vert); }
.etat--termine { background: var(--surface); color: var(--texte-2); }
.etat--annule, .etat--echoue, .etat--rembourse { background: #f1f0ee; color: var(--texte-3); }
.etat--test { background: var(--bleu-pale); color: var(--bleu); }
.type { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-3); }
.type--commande { color: var(--bleu); }

/* --- Formulaires ------------------------------------------------------------ */
label { font-weight: 550; font-size: .88rem; }
.champ { display: grid; gap: .3rem; margin-bottom: .9rem; min-width: 0; }
.champ__aide { font-weight: 400; color: var(--texte-3); font-size: .82rem; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=password], input[type=search], input[type=time], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--texte); background: #fff; border: 1px solid var(--ligne-2); border-radius: 9px; padding: .55rem .7rem; min-height: 40px; }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--texte); outline-offset: 1px; border-color: var(--texte); }
input[type=checkbox], input[type=radio] { accent-color: var(--texte); width: 17px; height: 17px; margin: 0; flex: none; }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.grille-champs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille-champs--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.champ--large { grid-column: 1 / -1; }
@media (max-width: 720px) { .grille-champs, .grille-champs--3, .grille-champs--4 { grid-template-columns: 1fr; } }
.case { display: flex; align-items: center; gap: .55rem; font-weight: 500; cursor: pointer; margin: .2rem 0; }
.case--bloc { padding: .6rem .8rem; border: 1px solid var(--ligne); border-radius: 10px; background: #fff; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .4rem .9rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
legend { font-weight: 650; font-size: 1.02rem; margin-bottom: .6rem; padding: 0; }
.pied-form { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; padding-top: 1rem; margin-top: .4rem; border-top: 1px solid var(--ligne); }
.pied-form--collant { position: sticky; bottom: 0; background: rgba(250, 249, 247, .96); padding: .8rem 0; z-index: 5; }
.recherche { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.recherche input[type=search] { max-width: 320px; }
.recherche select { width: auto; }

/* --- Onglets, filtres ---------------------------------------------------------- */
.onglets { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; border-bottom: 1px solid var(--ligne); }
.onglets a { padding: .55rem .8rem; text-decoration: none; color: var(--texte-2); font-weight: 550; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center; }
.onglets a:hover { color: var(--texte); }
.onglets a.est-actif { color: var(--texte); border-bottom-color: var(--texte); }
.onglets .compte { font-size: .75rem; background: var(--surface); border-radius: 999px; padding: 0 .45rem; color: var(--texte-2); }
.onglets a.est-actif .compte { background: var(--texte); color: #fff; }
.pilules { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pilules a { text-decoration: none; padding: .32rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 550; color: var(--texte-2); }
.pilules a.est-actif { background: #fff; color: var(--texte); box-shadow: 0 0 0 1px var(--ligne); }

/* --- Listes de demandes -------------------------------------------------------- */
.liste { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.liste__ligne { display: grid; grid-template-columns: 4.2rem minmax(0, 1.6fr) minmax(0, 1.2fr) 9rem 7.5rem; gap: .9rem; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--ligne); text-decoration: none; color: inherit; }
.liste__ligne:last-child { border-bottom: 0; }
a.liste__ligne:hover { background: #fcfbf9; color: inherit; }
.liste__ligne--nouveau { box-shadow: inset 3px 0 0 var(--accent); }
.liste__num { font-size: .82rem; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.liste__qui strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste__qui span, .liste__quoi span { font-size: .84rem; color: var(--texte-3); }
.liste__quoi { font-size: .9rem; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; }
.liste__date { font-size: .88rem; }
.liste__date small { display: block; }
.liste__etat { text-align: right; }
.liste__vide { padding: 2.2rem 1.2rem; text-align: center; color: var(--texte-3); }
@media (max-width: 860px) {
  .liste__ligne { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; }
  .liste__num { grid-column: 1; grid-row: 1; }
  .liste__etat { grid-column: 2; grid-row: 1; }
  .liste__qui { grid-column: 1 / -1; }
  .liste__quoi { grid-column: 1 / -1; white-space: normal; }
  .liste__date { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
}

/* --- Tableaux ----------------------------------------------------------------- */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--ligne); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-3); font-weight: 600; white-space: nowrap; }
tbody tr:hover td { background: #fcfbf9; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.court { white-space: nowrap; }
tfoot td { font-weight: 650; border-bottom: 0; }
.tableau-saisie td { padding: .35rem .3rem; vertical-align: middle; }
.tableau-saisie input, .tableau-saisie select { min-height: 36px; padding: .4rem .55rem; font-size: .9rem; }
.tableau-saisie .col-num { width: 6.5rem; }
.tableau-saisie .col-case { width: 4rem; text-align: center; }
.tableau-plats { table-layout: fixed; min-width: 760px; }
.tableau-plats .col-plat { width: 26%; }
.tableau-plats .col-desc { width: 34%; }
.tableau-plats .col-photo { width: 22%; }

/* --- Détail d'une demande ---------------------------------------------------- */
.fiche dl { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .45rem 1rem; margin: 0; }
.fiche dt { color: var(--texte-3); font-size: .88rem; }
.fiche dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 560px) { .fiche dl { grid-template-columns: 1fr; gap: 0; } .fiche dd { margin-bottom: .55rem; } }
.message { white-space: pre-wrap; background: var(--surface); border-radius: var(--rayon-s); padding: .9rem 1rem; margin: 0; font-size: .93rem; }
.journal { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.journal li { padding: .45rem 0 .45rem 1.1rem; border-left: 2px solid var(--ligne); position: relative; }
.journal li::before { content: ""; position: absolute; left: -5px; top: .85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--ligne-2); }
.journal time { display: block; color: var(--texte-3); font-size: .78rem; }
.contact-rapide { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.statuts { display: flex; flex-wrap: wrap; gap: .35rem; }
.statuts button { border: 1px solid var(--ligne-2); background: #fff; border-radius: 999px; padding: .38rem .8rem; font: 550 .85rem var(--sans); cursor: pointer; color: var(--texte-2); }
.statuts button:hover { border-color: var(--texte); color: var(--texte); }
.statuts button.est-actif { background: var(--texte); border-color: var(--texte); color: #fff; }
.lien-paiement { display: flex; gap: .5rem; align-items: center; background: var(--surface); border-radius: var(--rayon-s); padding: .55rem .7rem; }
.lien-paiement input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .82rem; background: #fff; }
.montant-grand { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; }

/* --- Planning ----------------------------------------------------------------- */
.jour { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--ligne); }
.jour:last-child { border-bottom: 0; }
.jour__date strong { display: block; font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.jour__date span { display: block; font-size: .85rem; color: var(--texte-3); }
.jour__date span.jour__semaine { color: var(--texte); font-weight: 550; margin-top: .2rem; }
.jour__date .etiquette { display: inline-block; margin-top: .3rem; font-size: .72rem; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; }
.jour__items { display: grid; gap: .5rem; }
.rdv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .7rem .9rem; border: 1px solid var(--ligne); border-radius: var(--rayon-s); text-decoration: none; background: #fff; }
.rdv:hover { border-color: var(--texte-3); color: inherit; }
.rdv strong { font-weight: 600; }
.rdv span { font-size: .86rem; color: var(--texte-2); }
@media (max-width: 600px) { .jour { grid-template-columns: 1fr; gap: .5rem; } }

/* --- Catalogue, galerie ------------------------------------------------------- */
.produits { display: grid; gap: .6rem; }
.produit { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: .6rem .8rem .6rem .6rem; }
.produit--masque { opacity: .55; }
.produit img, .produit .vignette-vide { width: 76px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--surface); }
.produit__nom { font-weight: 600; }
.produit__info { font-size: .85rem; color: var(--texte-3); }
.produit__actions { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.produit__actions .bouton { padding: .35em .7em; }
@media (max-width: 700px) { .produit { grid-template-columns: 60px minmax(0, 1fr); } .produit img, .produit .vignette-vide { width: 60px; height: 52px; } .produit__actions { grid-column: 1 / -1; justify-content: flex-start; } }
.mur { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.mur__item { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon-s); overflow: hidden; display: flex; flex-direction: column; }
.mur__item--masque { opacity: .55; }
.mur__item--a-legender { border-color: #f0dfb5; }
.mur__image { aspect-ratio: 4 / 3; background: var(--surface); }
.mur__image img, .mur__image video { width: 100%; height: 100%; object-fit: cover; }
.mur__corps { padding: .6rem .7rem .7rem; display: grid; gap: .4rem; }
.mur__corps textarea { min-height: 62px; font-size: .86rem; }
.mur__corps select, .mur__corps input { font-size: .86rem; min-height: 34px; padding: .35rem .5rem; }
.mur__bas { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .82rem; }
.mur__bas input[type=number] { width: 4.6rem; }
.depot { border: 1.5px dashed var(--ligne-2); border-radius: var(--rayon); padding: 1.2rem; background: #fff; }
.depot.est-survol { border-color: var(--texte); background: var(--surface); }
.vignette { width: 100%; max-width: 360px; border-radius: var(--rayon-s); border: 1px solid var(--ligne); }

/* --- Statistiques ------------------------------------------------------------ */
.graphe { width: 100%; height: auto; display: block; overflow: visible; }
.graphe-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
@media (max-width: 760px) { .graphe-defile .graphe { width: 760px; max-width: none; } }
.graphe text { font: 11px var(--sans); fill: var(--texte-3); }
.graphe .axe { stroke: var(--ligne); stroke-width: 1; }
.graphe .grille { stroke: #f0ede7; stroke-width: 1; }
.graphe .barre { fill: #2b2926; transition: fill .12s; }
.graphe__cible { fill: transparent; }
.graphe__col { outline: none; cursor: default; }
.graphe__col:hover .barre, .graphe__col:focus-visible .barre { fill: var(--accent); }
.graphe__col:focus-visible .graphe__cible { fill: rgba(20, 20, 20, .04); }
.graphe .courbe { fill: none; stroke: var(--texte); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graphe .aire { fill: rgba(20, 20, 20, .06); }
.graphe .point-demande { fill: var(--accent); }
.legende-graphe { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--texte-2); margin-top: .5rem; }
.legende-graphe i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.jauge { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .8rem; align-items: center; font-size: .9rem; margin-bottom: .6rem; }
.jauge__barre { grid-column: 1 / -1; height: 6px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.jauge__barre span { display: block; height: 100%; background: var(--texte); border-radius: 99px; }
.jauge b { font-weight: 600; font-variant-numeric: tabular-nums; }
.etincelle { width: 100%; height: 46px; display: block; margin-top: .4rem; }

/* --- Connexion ---------------------------------------------------------------- */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--fond); }
.connexion__boite { width: min(420px, 100%); background: #fff; border: 1px solid var(--ligne); border-radius: 20px; padding: 2rem 1.8rem 1.6rem; }
.connexion__marque { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; margin-bottom: 1.4rem; text-decoration: none; }
.connexion__marque img { width: 74px; height: 82px; object-fit: contain; }
.connexion__marque b { font: 600 1.2rem/1.1 "Fredoka", var(--sans); }
.connexion__marque small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-3); }
.connexion h1 { font-size: 1.35rem; text-align: center; }
.connexion .aide { font-size: .86rem; color: var(--texte-3); text-align: center; margin: 1rem 0 0; }

/* --- Divers ------------------------------------------------------------------- */
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 1rem; }
.pagination > :last-child { justify-self: end; }
.pagination__etat { font-size: .85rem; color: var(--texte-3); }
.vide { text-align: center; padding: 2rem 1rem; color: var(--texte-3); }
.vide strong { display: block; color: var(--texte); font-size: 1.05rem; margin-bottom: .3rem; }
.puce-liste { margin: 0; padding-left: 1.1rem; }
.puce-liste li { margin-bottom: .3rem; }
.code-bloc { background: var(--surface); border-radius: var(--rayon-s); padding: .7rem .9rem; font-family: ui-monospace, monospace; font-size: .82rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.etapes-liste { counter-reset: e; list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.etapes-liste li { counter-increment: e; display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: .5rem; }
.etapes-liste li::before { content: counter(e); width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--texte); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
details.replie { border: 1px solid var(--ligne); border-radius: var(--rayon-s); background: #fff; margin-bottom: .6rem; }
details.replie > summary { cursor: pointer; padding: .75rem 1rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.replie > summary::-webkit-details-marker { display: none; }
details.replie > summary::after { content: "+"; font-weight: 400; color: var(--texte-3); }
details.replie[open] > summary::after { content: "−"; }
details.replie > div { padding: 0 1rem 1rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--texte); color: #fff; padding: .6rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 550; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
.toast.est-visible { opacity: 1; }
.sync-journal { max-height: 260px; overflow-y: auto; }
.apercu-tableau td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media print { .bo__nav, .bo__barre, .pied-form, .actions, form { display: none !important; } .bo { display: block; } .bo__main { padding: 0; } .carte { break-inside: avoid; } }

/* Infobulle des graphiques (une seule, déplacée par bo.js) */
.infobulle { position: fixed; z-index: 90; pointer-events: none; background: #fff; border: 1px solid var(--ligne); border-radius: 10px; padding: .5rem .7rem; box-shadow: 0 8px 24px rgba(20, 20, 20, .12); font-size: .82rem; min-width: 9rem; opacity: 0; transition: opacity .1s; }
.infobulle.est-visible { opacity: 1; }
.infobulle__titre { color: var(--texte-3); font-size: .76rem; margin-bottom: .2rem; }
.infobulle__ligne { display: flex; align-items: center; gap: .45rem; }
.infobulle__ligne { color: var(--texte-2); padding-left: calc(12px + .45rem); }
.infobulle__titre + .infobulle__ligne { font-weight: 650; color: var(--texte); font-size: .9rem; padding-left: 0; }
.infobulle__titre + .infobulle__ligne::before { content: ""; width: 12px; height: 2px; background: #2b2926; border-radius: 2px; }
.vue-tableau { margin-top: .6rem; }
.vue-tableau > summary { cursor: pointer; font-size: .84rem; color: var(--texte-2); }
.vue-tableau table { margin-top: .5rem; }

/* ---------- Suggestions d'adresses (adresse.js, mêmes champs que le site) ---------- */
.autoadresse { position: relative; }
.autoadresse__liste { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 5px; list-style: none; max-height: 300px; overflow: auto; background: var(--carte); border: 1px solid var(--ligne-2); border-radius: var(--rayon-s); box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .25); }
.autoadresse__item { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 7px; cursor: pointer; line-height: 1.35; }
.autoadresse__item:hover, .autoadresse__item[aria-selected="true"] { background: var(--surface); }
.autoadresse__principal { font-size: .92rem; font-weight: 500; color: var(--texte); }
.autoadresse__second { font-size: .8rem; color: var(--texte-3); }

