/* © 2026 ACCESS DECO — Tous droits réservés. Application NappAssist, propriété exclusive d'ACCESS DECO (Signes, 83). */
/* NappAssist — sobre et lisible : un téléphone tenu d'une main en rayon, par tous les âges.
   Identité : bleu marine et terracotta du logo. */

:root {
  --fond: #f6f6f4;
  --carte: #ffffff;
  --encre: #1c2b3a;
  --doux: #5d6875;
  --tres-doux: #8a939d;
  --bord: #e4e7ea;
  --bord-fort: #cfd5db;
  --action: #1c2b3a;
  --action-fonce: #0f1a24;
  --action-clair: #eef2f6;
  --alerte: #fdf4e3;
  --alerte-bord: #d49a2a;
  --danger: #b3261e;
  --ok: #2f7a4b;

  /* Accent : le terracotta du logo (trait sous le nom, repères, motif des nappes). */
  --accent: #c2563a;
  --accent-fonce: #9c4029;
  --accent-clair: #f8ece7;

  --rayon: 14px;
  --ombre: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
  --ombre-forte: 0 2px 4px rgba(16, 24, 40, .06), 0 10px 24px rgba(16, 24, 40, .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
/* Appli tenue d'une main : pas de sélection de texte ni de menu « copier » sur les boutons (appui long iPhone et Android). */
button, .bouton, .carte-choix, .couverts, .puce, .sos-bouton, .onglets a, .repli summary, .segment, .menu-ligne {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 18px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none; /* pas de rechargement par erreur en tirant la page vers le bas (Android) */
}

h1 { font-size: 1.55rem; line-height: 1.2; font-weight: 750; letter-spacing: -.022em; margin: .4em 0 .45em; text-wrap: balance; }
h2 { font-size: 1.12rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .3em; }
h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .2em; }
p { margin: 0 0 .8em; }
a { color: var(--action); }
h1:focus, p:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.motifs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ------------------------------------------------------------------ barre du haut */

.barre {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 58px; padding: env(safe-area-inset-top) 8px 0;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--bord);
}
.marque {
  grid-column: 2; display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.12rem; letter-spacing: -.01em; color: var(--encre); text-decoration: none; padding: 6px 4px;
}
.marque img { width: 28px; height: 28px; border-radius: 7px; }
.marque b { font-weight: 750; }
body[data-ecran="accueil"] .barre { display: none; } /* le grand logo est sur l’accueil */
.retour {
  grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 2px;
  min-height: 46px; padding: 0 12px 0 4px; border: 0; border-radius: 12px;
  background: none; color: var(--encre); font: inherit; font-size: .98rem; font-weight: 600; cursor: pointer;
}
.retour:active { background: var(--action-clair); }
.etape-num { grid-column: 3; justify-self: end; white-space: nowrap; font-size: .78rem; font-weight: 600; color: var(--tres-doux); padding-right: 6px; font-variant-numeric: tabular-nums; }

.progression { height: 3px; background: var(--bord); }
.progression span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease-out; }

/* ------------------------------------------------------------------ écrans */

main { max-width: 560px; margin: 0 auto; padding: 10px 16px calc(36px + env(safe-area-inset-bottom)); }
body.avec-onglets main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.ecran { animation: entree .22s ease-out; }
@keyframes entree { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.doux { color: var(--doux); }
.aide { color: var(--doux); font-size: .92rem; margin-top: 14px; }
.astuce { color: var(--tres-doux); font-size: .86rem; text-align: center; margin: 8px 0 18px; }
.titre-bloc { margin: 28px 0 10px; font-size: 1.05rem; }
.sur-titre {
  margin: 30px 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--tres-doux);
}

/* ------------------------------------------------------------------ boutons */

.bouton {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; margin: 12px 0 0; padding: 12px 20px;
  border: 1.5px solid transparent; border-radius: var(--rayon);
  font: inherit; font-weight: 650; letter-spacing: -.005em; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .08s ease-out, background-color .15s, box-shadow .15s;
  touch-action: manipulation;
}
.bouton:active { transform: scale(.985); }
.bouton.principal { background: var(--action); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 4px 12px rgba(28, 43, 58, .18); }
.bouton.principal:active { background: var(--action-fonce); }
.bouton.principal:disabled { background: #b8c1ca; box-shadow: none; cursor: not-allowed; transform: none; }
.bouton.secondaire { background: var(--carte); color: var(--encre); border-color: var(--bord-fort); }
.bouton.secondaire:active { background: var(--action-clair); }
.bouton.discret { background: none; color: var(--doux); font-weight: 600; min-height: 50px; text-decoration: underline; text-underline-offset: 3px; }
.bouton.geant { min-height: 64px; font-size: 1.12rem; }
.bouton.petit { width: auto; min-height: 46px; margin: 0; padding: 8px 14px; font-size: .92rem; }
.bouton.petit.discret { padding: 8px 6px; }
.pastille:not(:empty) { background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }

/* ------------------------------------------------------------------ accueil */

.hero { padding: 14px 0 4px; }
.logo-accueil { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.logo-accueil > img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--ombre-forte); }
.logo-nom { margin: 0; font-size: 1.9rem; line-height: 1.05; letter-spacing: -.025em; }
.logo-nom b { font-weight: 800; }
.trait-accent { display: block; width: 44px; height: 4px; margin-top: 9px; border-radius: 2px; background: var(--accent); }
.hero h1 { font-size: 1.75rem; margin: 0 0 8px; }
.hero .doux { font-size: 1.02rem; margin-bottom: 18px; }
/* L'accroche tient sur une seule ligne, du plus petit téléphone à l'ordinateur. */
.hero .accroche { white-space: nowrap; font-size: min(1.02rem, 4.3vw); }
.pied { margin-top: 26px; text-align: center; color: var(--tres-doux); font-size: .86rem; }
.pied a { color: var(--doux); }

/* Comment ça marche (accueil) : un filet terracotta, un titre, une phrase. */
.comment { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.comment li { font-size: .92rem; line-height: 1.45; color: var(--doux); }
.comment strong { display: block; margin-bottom: 2px; font-size: 1.02rem; font-weight: 700; color: var(--encre); letter-spacing: -.01em; }
.filet-court { display: block; width: 28px; height: 3px; margin-bottom: 10px; border-radius: 2px; background: var(--accent); }
@media (min-width: 640px) { .comment { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* Menu en liste */
.menu { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.menu-ligne {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px;
  color: var(--encre); text-decoration: none; transition: background-color .15s;
}
.menu-ligne + .menu-ligne { border-top: 1px solid var(--bord); }
.menu-ligne:active { background: var(--action-clair); }
.menu-picto, .carte-picto, .sos-picto, .erreur-picto, .vide-picto {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--action-clair); color: var(--encre);
}
.menu-ligne.mise-en-avant .menu-picto { background: var(--accent-clair); }
.menu-texte { flex: 1; min-width: 0; }
.menu-texte b { display: block; font-weight: 650; }
.menu-texte small { display: block; color: var(--doux); font-size: .86rem; line-height: 1.35; }
.chevron { flex: none; color: var(--tres-doux); }
.picto .a { stroke: var(--accent); }
.picto .af { fill: var(--accent); }

/* ------------------------------------------------------------------ barre d'onglets */

.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--bord);
}
.onglets a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; border-radius: 12px; color: var(--tres-doux); text-decoration: none; font-size: .74rem; font-weight: 600;
}
.onglets a.actif { color: var(--encre); }
.onglets a.actif::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.onglets a:active { background: var(--action-clair); }
.onglet-badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center;
}

/* ------------------------------------------------------------------ choix (un écran = une question) */

.choix { display: grid; gap: 10px; }
.grille-2 { grid-template-columns: 1fr 1fr; }
.carte-choix {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px;
  padding: 14px 52px 14px 14px; border: 1.5px solid var(--bord); border-radius: var(--rayon);
  background: var(--carte); color: var(--encre); font: inherit; text-align: left; cursor: pointer;
  box-shadow: var(--ombre); transition: border-color .15s, background-color .15s, transform .08s;
  touch-action: manipulation;
}
.carte-choix:active { transform: scale(.985); }
.carte-choix.actif { border-color: var(--action); box-shadow: 0 0 0 1px var(--action), var(--ombre); }
.carte-choix b { display: block; font-size: 1.04rem; font-weight: 650; }
.carte-choix small { display: block; color: var(--doux); font-size: .86rem; line-height: 1.35; margin-top: 1px; }
.coche {
  position: absolute; right: 16px; top: 50%; width: 24px; height: 24px; margin-top: -12px;
  border: 1.5px solid var(--bord-fort); border-radius: 50%; background: #fff;
}
.carte-choix.actif .coche {
  border-color: var(--action); background: var(--action)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.grille-2 .carte-choix { flex-direction: column; justify-content: center; text-align: center; min-height: 132px; gap: 10px; padding: 16px 10px; }
.grille-2 .carte-choix .coche { top: 12px; right: 12px; margin-top: 0; width: 20px; height: 20px; }
.grille-2 .carte-choix .carte-picto { width: 56px; height: 56px; }
/* Formes de table : le dessin prend toute la carte. */
.formes .carte-choix { min-height: 150px; padding: 18px 10px 14px; }
.formes .carte-choix .carte-picto { width: 100%; height: auto; background: none; }
.formes .mini-table { max-width: 150px; height: 74px; margin: 0; }
.badge {
  position: absolute; top: -9px; left: 14px; padding: 2px 9px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}

/* ------------------------------------------------------------------ + / − sans clavier */

.stepper { margin: 14px 0 6px; padding: 14px 14px 16px; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.stepper-nom { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tres-doux); margin-bottom: 6px; text-align: center; }
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pas {
  flex: none; width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--bord-fort);
  background: var(--carte); color: var(--encre); font: 500 2rem/1 -apple-system, system-ui, sans-serif; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.pas:active { background: var(--action); border-color: var(--action); color: #fff; }
.valeur { flex: 1; text-align: center; font-size: 2.2rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

/* ------------------------------------------------------------------ puces et couverts */

.puces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 8px; }
.puce {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 58px; padding: 6px 4px; border: 1.5px solid var(--bord); border-radius: 12px;
  background: var(--carte); color: var(--encre); font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer;
  touch-action: manipulation;
}
.puce small { font-weight: 500; font-size: .76rem; color: var(--doux); }
.puce.actif { border-color: var(--action); background: var(--action); color: #fff; }
.puce.actif small { color: rgba(255, 255, 255, .75); }

.couverts {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  min-height: 144px; padding: 14px 10px 12px; border: 1.5px solid var(--bord); border-radius: var(--rayon);
  background: var(--carte); color: var(--encre); font: inherit; cursor: pointer; box-shadow: var(--ombre);
  touch-action: manipulation; transition: border-color .15s, transform .08s;
}
.couverts:active { transform: scale(.985); }
.couverts.actif { border-color: var(--action); box-shadow: 0 0 0 1px var(--action), var(--ombre); }
.mini-table { width: 100%; max-width: 140px; height: 58px; margin-bottom: 8px; }
.couverts-nb { font-size: 1.45rem; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; }
.couverts small { color: var(--doux); font-size: .84rem; }

/* ------------------------------------------------------------------ retombée : dessins et curseur */

.dessin { margin: 6px 0; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px; box-shadow: var(--ombre); }
.dessin svg { display: block; width: 100%; height: auto; }
.dessin-3d { padding: 14px 10px 8px; background: linear-gradient(#fff, #f7f8f9); }
.dessin-3d svg { max-height: 230px; }
.dessin-dessus { margin-top: 14px; }
.dessin-dessus svg { max-height: 250px; }
#retombee .reglage { margin-top: 16px; }

.curseur { width: 100%; height: 44px; margin: 8px 0 0; accent-color: var(--action); -webkit-appearance: none; appearance: none; background: transparent; touch-action: pan-y; }
.curseur::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--bord-fort); }
.curseur::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -14px; border-radius: 50%; background: #fff; border: 2px solid var(--action); box-shadow: 0 2px 8px rgba(16, 24, 40, .2); }
.curseur::-moz-range-track { height: 6px; border-radius: 3px; background: var(--bord-fort); }
.curseur::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--action); box-shadow: 0 2px 8px rgba(16, 24, 40, .2); }
.phrase { text-align: center; color: var(--doux); font-weight: 550; min-height: 2.9em; margin: 6px 0; }

.collant {
  position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 6px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(246, 246, 244, 0), var(--fond) 24px);
}

/* ------------------------------------------------------------------ messages */

.alerte { margin: 12px 0; padding: 12px 14px 12px 16px; border: 1px solid #f0dcb4; border-left: 4px solid var(--alerte-bord); border-radius: 12px; background: var(--alerte); font-size: .96rem; }
.alerte p { margin: 0; }
.alerte p + p { margin-top: 6px; }
.alerte.piste { border-color: var(--bord); border-left-color: var(--action); background: var(--action-clair); }
.alerte.forte { border-color: #f1c9c5; border-left-color: var(--danger); background: #fdf0ee; }
.encart { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--action-clair); font-size: .96rem; }
.encart.cristal { background: #edf5f9; }
.encart.cristal h2 { font-size: 1rem; }
.encart ul { margin: 0 0 6px; padding-left: 1.2em; }
.lien-fleche { display: inline-flex; align-items: center; min-height: 46px; font-weight: 650; text-underline-offset: 3px; }
.lien-fleche::after { content: "›"; font-size: 1.4em; line-height: 1; margin-left: 6px; color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--encre); color: #fff; font-weight: 600; font-size: .95rem; box-shadow: var(--ombre-forte); z-index: 20;
}

/* ------------------------------------------------------------------ résultat */

.ticket-carte {
  position: relative; overflow: hidden; padding: 22px 18px 18px; border-radius: 18px; text-align: center; color: #fff;
  background: linear-gradient(160deg, #c95d40, var(--accent-fonce)); box-shadow: 0 2px 4px rgba(156, 64, 41, .2), 0 12px 28px rgba(156, 64, 41, .25);
}
.ticket-sur { margin: 0; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .85); }
.ticket-longueur { margin: 4px 0 0; font-size: 3.6rem; font-weight: 800; line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ticket-matiere { margin: 4px 0 8px; font-weight: 650; }
.ticket-piece { margin: 0; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .4); color: rgba(255, 255, 255, .85); font-size: .9rem; }

.details { margin: 16px 0 6px; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 2px 14px; box-shadow: var(--ombre); }
.details div { display: grid; gap: 1px; padding: 11px 0; }
.details div + div { border-top: 1px solid var(--bord); }
.details dt { color: var(--tres-doux); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.details dd { margin: 0; font-weight: 600; }
.dessin-plan { margin-top: 14px; }
.dessin-plan svg { max-height: 210px; }
figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: .82rem; color: var(--doux); }
.cle { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--doux); vertical-align: -2px; margin-right: 2px; }
.cle-nappe { background: var(--accent); opacity: .55; }
.cle-chute { background: repeating-linear-gradient(45deg, #c9bba6 0 2px, #f3ede4 2px 6px); }
.cle-table { border: 2px dashed var(--encre); }
.bouton.centre { margin-top: 12px; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.recouper-ici { margin-top: 10px; }
.resultat-actions { display: grid; gap: 10px; margin-top: 18px; }

/* ------------------------------------------------------------------ ticket */

.lignes { list-style: none; margin: 0; padding: 0; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.ligne { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 14px 8px 14px 14px; }
.ligne + .ligne { border-top: 1px solid var(--bord); }
.ligne-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-clair); color: var(--accent-fonce); font-weight: 750; font-size: .9rem; }
.ligne-texte b { display: block; font-weight: 650; }
.ligne-texte small, .ligne-matiere { display: block; font-size: .84rem; color: var(--doux); line-height: 1.35; }
.ligne-matiere { color: var(--encre); font-weight: 550; margin-top: 2px; }
.ligne-coupe { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.retirer { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--tres-doux); cursor: pointer; }
.retirer:active { background: var(--action-clair); }
.total { display: grid; gap: 4px; margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--action-clair); font-size: .95rem; }

.vide { text-align: center; padding: 28px 0 8px; color: var(--doux); }
.vide-picto { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; }

/* ------------------------------------------------------------------ écran vendeur */

body[data-ecran="vendeur"] { background: #fff; }
body[data-ecran="vendeur"] .barre, body[data-ecran="vendeur"] .progression { display: none; }
.ecran-vendeur { padding-top: 22px; }
.vendeur-titre { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; margin-bottom: 14px; }
.vendeur-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.vendeur-liste li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 16px; border: 2px solid var(--encre); border-radius: 16px; }
.v-matiere { font-size: 1.05rem; font-weight: 800; letter-spacing: .03em; }
.v-matiere, .v-laize, .v-piece { grid-column: 1; }
.v-laize { font-weight: 650; }
.v-coupe { grid-column: 2; grid-row: 1 / span 3; font-size: 2.8rem; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.v-piece { color: var(--doux); }

/* ------------------------------------------------------------------ mes tables */

.mes-tables { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.carte-table { padding: 14px; border-radius: var(--rayon); background: var(--carte); border: 1px solid var(--bord); box-shadow: var(--ombre); }
.carte-table-tete { display: flex; align-items: center; gap: 12px; }
.carte-table-texte { flex: 1; min-width: 0; }
.carte-table-texte b { display: block; font-size: 1.04rem; font-weight: 650; }
.carte-table-texte small { display: block; color: var(--doux); font-size: .86rem; line-height: 1.4; }
.bloc { white-space: nowrap; }
.carte-table-coupe { flex: none; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.carte-table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bord); }
.carte-table-actions .supprimer { margin-left: auto; width: 46px; padding: 0; color: var(--doux); text-decoration: none; }
.etiquette-ok { display: inline-flex; align-items: center; min-height: 46px; padding: 0 12px; border-radius: 12px; background: #e9f4ed; color: var(--ok); font-weight: 650; font-size: .9rem; }

/* ------------------------------------------------------------------ SOS taches */

.sos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sos-bouton {
  display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 12px;
  border: 1.5px solid var(--bord); border-radius: var(--rayon); background: var(--carte); color: var(--encre);
  font: inherit; font-size: .95rem; font-weight: 650; line-height: 1.25; text-align: left; cursor: pointer;
  box-shadow: var(--ombre); touch-action: manipulation;
}
.sos-bouton .sos-picto { width: 40px; height: 40px; border-radius: 11px; }
.sos-bouton:active { transform: scale(.985); }
.sos-bouton.actif { border-color: var(--action); box-shadow: 0 0 0 1px var(--action), var(--ombre); }
.sos-reponse { margin-top: 12px; padding: 16px; border-radius: var(--rayon); background: var(--carte); border: 1px solid var(--bord); border-top: 4px solid var(--accent); box-shadow: var(--ombre-forte); scroll-margin: 80px; }
.sos-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sos-tete h2 { margin: 0; }
.geste { font-size: 1.02rem; }
.eviter { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdf0ee; font-size: .95rem; }
.eviter b { color: var(--danger); }

.quotidien { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-clair); font-size: .94rem; }

/* ------------------------------------------------------------------ volets de l'entretien (erreurs, cristal, recouper) */

.replis { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.repli + .repli { border-top: 1px solid var(--bord); }
.repli summary { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px; list-style: none; cursor: pointer; scroll-margin-top: 70px; }
.repli summary::-webkit-details-marker { display: none; }
.repli summary:active { background: var(--action-clair); }
.repli .chevron { transition: transform .2s; }
.repli[open] .chevron { transform: rotate(180deg); }
.repli-corps { padding: 0 14px 14px; }

.erreurs, .astuces { list-style: none; margin: 0; padding: 0; }
.erreur { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 10px 0; }
.erreur + .erreur, .astuces li + li { border-top: 1px solid var(--bord); }
.erreur b { display: block; font-size: .96rem; font-weight: 650; line-height: 1.3; }
.erreur .solution { display: block; color: var(--ok); font-weight: 600; font-size: .9rem; margin-top: 2px; }
.astuces li { padding: 10px 0; color: var(--doux); font-size: .94rem; line-height: 1.4; }
.astuces b { display: block; color: var(--encre); font-weight: 650; }
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: var(--action-clair); }
.segment { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--doux); font: inherit; font-size: .92rem; font-weight: 650; cursor: pointer; }
.segment.actif { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }
.repli-corps .etapes { padding: 0 0 0 1.6em; border: 0; box-shadow: none; background: none; }
.erreur .solution::before { content: "✓  "; }
.erreur-picto { position: relative; width: 40px; height: 40px; border-radius: 11px; }
.croix { position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; }

/* ------------------------------------------------------------------ recouper, confidentialité */

.etapes { margin: 0; padding: 14px 16px 6px 2.4em; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.etapes li { margin-bottom: 10px; padding-left: 4px; }
.etapes li::marker { font-weight: 800; color: var(--accent); }
.texte-legal p { font-size: .95rem; color: var(--doux); }
.texte-legal strong { color: var(--encre); }
.legal-pied { font-size: .86rem; }
.case-stats { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; font-weight: 600; }
.case-stats input { width: 22px; height: 22px; accent-color: var(--action); }

/* ------------------------------------------------------------------ petits écrans et mouvements réduits */

@media (max-width: 360px) {
  body { font-size: 17px; }
  .pas { width: 56px; height: 56px; }
  .valeur { font-size: 1.9rem; }
  .puces { grid-template-columns: repeat(2, 1fr); }
  .sos { grid-template-columns: 1fr; }
  /* Pendant le calcul, le nom laisse la place à « Étape x sur 6 » ; l'icône reste. */
  body.avec-etape .marque span { display: none; }
  .ligne { grid-template-columns: 1fr auto auto; gap: 8px; padding-left: 12px; }
  .ligne-num { display: none; }
  .bouton.petit { padding-left: 11px; padding-right: 11px; }
  .bouton.centre { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
