/* Doty — site de gestion. Une seule feuille, sans outil de build.
   Direction « Terracotta » : chaleureuse, artisanale. Toutes les couleurs sont
   ici, en tête : la palette se change à un seul endroit. Chaque couple
   texte / fond utilisé atteint le niveau AA du WCAG (4,5:1, ou 3:1 pour les
   grands chiffres en gras) ; les ratios sont notés à côté des couleurs. */

/* ---------- Police : Nunito, servie par le site lui-même ----------
   Fichiers dans assets/fonts (sous-ensemble « latin », licence SIL OFL dans
   OFL.txt). Même origine : la CSP default-src 'self' les laisse passer. Le texte
   s'affiche tout de suite dans la police système, puis bascule (swap). */
@font-face{font-family:"Nunito";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/nunito-latin-400-normal.woff2") format("woff2");
  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}
@font-face{font-family:"Nunito";font-style:normal;font-weight:600;font-display:swap;
  src:url("fonts/nunito-latin-600-normal.woff2") format("woff2");
  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}
@font-face{font-family:"Nunito";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/nunito-latin-700-normal.woff2") format("woff2");
  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}
@font-face{font-family:"Nunito";font-style:normal;font-weight:800;font-display:swap;
  src:url("fonts/nunito-latin-800-normal.woff2") format("woff2");
  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}
@font-face{font-family:"Nunito";font-style:normal;font-weight:900;font-display:swap;
  src:url("fonts/nunito-latin-900-normal.woff2") format("woff2");
  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}

/* ---------- Palette, mode clair ---------- */
:root{
  color-scheme:light dark;

  /* Surfaces */
  --bg:#FBF1E4;            /* sable, fond de page */
  --card:#FFFFFF;          /* cartes */
  --surface:#F5E6D3;       /* surface alternée (clé, en-têtes) */
  --tile:#FCEADF;          /* tuiles de chiffres, teinte terracotta */
  --line:#E8D5C0;          /* bordures décoratives et séparateurs */
  --field-line:#9C7B66;    /* bord des champs : 3,86:1 sur carte (≥ 3:1) */

  /* Texte */
  --ink:#3A241A;           /* brun foncé : 14,5:1 sur carte, 13,0:1 sur sable */
  --muted:#7A5A48;         /* texte secondaire : 6,2:1 carte, 5,6:1 sable, 5,1:1 surface */

  /* Marque */
  --terracotta:#D9572F;    /* accent : grands chiffres (3,4:1 sur tuile, gras ≥ 24px), logo, filets */
  --terracotta-deep:#B8441F; /* liens, survol, menu actif (blanc dessus : 5,4:1) ; 5,4:1 carte, 4,8:1 sable */
  --terracotta-ink:#8F3214;  /* texte sur teinte terracotta : 6,5:1 */
  --terracotta-soft:#FBE3D6; /* teinte terracotta (pastille espace privé) */
  --mustard:#F2B544;       /* accent secondaire (brun dessus : 7,9:1) */
  --on-accent:#FFFFFF;     /* texte sur --terracotta-deep */

  /* Boutons */
  --btn-bg:#3A241A;        /* bouton principal brun, texte sable : 13,0:1 */
  --btn-ink:#FBF1E4;
  --btn-hover-bg:#B8441F;  /* survol : blanc sur terracotta foncé, 5,4:1 */
  --btn-hover-ink:#FFFFFF;

  /* États */
  --success:#2F7D4F;       /* 5,0:1 sur carte */
  --success-soft:#E3F1E7;
  --success-ink:#1F5E39;   /* 6,6:1 sur sa teinte */
  --danger:#B3261E;        /* 6,5:1 carte, 5,9:1 sable ; blanc dessus 6,5:1 */
  --danger-hover:#8A1C15;
  --danger-soft:#FBE4E1;
  --danger-ink:#8A1C15;    /* 7,7:1 sur sa teinte */
  --warn-soft:#FCEBC4;
  --warn-ink:#5C3A0A;      /* 8,6:1 sur sa teinte */
  --off-soft:#EFE5DC;      /* pastille éteinte (supprimé, retiré, suspendu) */
  --off-ink:#6B5444;       /* 5,7:1 sur sa teinte */
  --off-stripe:#E4D6C8;    /* hachures d'une pastille éteinte ; texte éteint dessus 4,9:1 */
  --soon-stripe:#F3E8DC;   /* hachures « bientôt disponible » ; texte secondaire dessus 5,1:1 */

  --focus:#B8441F;         /* anneau de focus : 5,4:1 carte, 4,8:1 sable (≥ 3:1) */

  /* Formes */
  --radius-card:20px;
  --radius-tile:18px;
  --radius-field:12px;
  --radius-pill:999px;
  --shadow:0 1px 2px rgba(58,36,26,.04),0 10px 30px -18px rgba(58,36,26,.25);

  /* Graisses de Nunito disponibles : 400, 600, 700, 800 et 900 (aucune autre) */
  --font:"Nunito",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,"Cascadia Mono","Segoe UI Mono",Consolas,Menlo,monospace;
}

/* ---------- Palette, mode sombre ---------- */
@media (prefers-color-scheme:dark){
  :root{
    --bg:#1E1410;
    --card:#2A1D17;
    --surface:#33241C;
    --tile:#33241C;
    --line:#4A3328;
    --field-line:#8A6C58;    /* 3,4:1 sur carte */

    --ink:#F6E9DC;           /* 15,1:1 fond, 13,7:1 carte */
    --muted:#C9AE9A;         /* 8,6:1 fond, 7,8:1 carte, 7,1:1 tuile */

    --terracotta:#E8714A;    /* 4,9:1 sur tuile */
    --terracotta-deep:#E8714A; /* liens : 5,9:1 fond, 5,4:1 carte */
    --terracotta-ink:#F6C9B5;  /* 8,8:1 sur sa teinte */
    --terracotta-soft:#4A2618;
    --mustard:#F2B544;       /* 8,9:1 sur carte */
    --on-accent:#1E1410;     /* sur terracotta clair : 5,9:1 */

    --btn-bg:#FBF1E4;        /* bouton principal sable, texte brun : 13,0:1 */
    --btn-ink:#3A241A;
    --btn-hover-bg:#E8714A;
    --btn-hover-ink:#1E1410; /* 5,9:1 */

    --success:#8FD1A6;
    --success-soft:#1F3A28;
    --success-ink:#B6E3C4;   /* 8,7:1 */
    --danger:#F0907A;        /* texte : 7,0:1 carte, 7,7:1 fond */
    --danger-hover:#F6B3A4;
    --danger-soft:#4A1C18;
    --danger-ink:#F7C1BB;    /* 9,1:1 */
    --warn-soft:#463510;
    --warn-ink:#F6D58A;      /* 8,3:1 */
    --off-soft:#3A2A22;
    --off-ink:#C9AE9A;       /* 6,5:1 */
    --off-stripe:#45322A;    /* 5,7:1 */
    --soon-stripe:#30221B;

    --focus:#E8714A;         /* 5,9:1 fond */
    --shadow:0 1px 2px rgba(0,0,0,.25);
  }
}

/* ---------- Base ---------- */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);line-height:1.55;font-size:16px;font-family:var(--font);
  -webkit-font-smoothing:antialiased;font-kerning:normal}
a{color:var(--terracotta-deep);text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
/* Nunito est ronde et plus claire qu'une police système : titres en 800/900, à peine resserrés */
h1{font-size:2.2rem;line-height:1.12;font-weight:900;letter-spacing:-.015em;margin:0 0 1.1rem;overflow-wrap:anywhere}
/* Nom du commerce ou de l'espace, au-dessus du titre de la page */
.context{margin:0 0 4px;color:var(--terracotta-deep);font-weight:800;font-size:.97rem;letter-spacing:.01em;overflow-wrap:anywhere}
h2{font-size:1.25rem;font-weight:800;letter-spacing:-.005em;margin:0 0 1rem}
/* Titre d'une partie de page, entre deux cartes (« Mon compte ») */
h2.part{font-size:1.5rem;margin:2.2rem 0 .5rem}
p{margin:0 0 .75rem}
strong{font-weight:700}
code{font-family:var(--font-mono)}

/* Anneau de focus visible sur tout élément interactif */
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
input:focus,select:focus{outline:3px solid var(--focus);outline-offset:1px}
input[type=radio]:focus:not(:focus-visible){outline:none}

/* ---------- En-tête ---------- */
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:14px 24px;background:var(--card);border-bottom:1px solid var(--line)}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;border-radius:12px;padding:2px 4px 2px 0}
/* Logo officiel (visage et « DOTY », fond transparent) : 36 px de haut, 2x pour les écrans denses.
   Ses couleurs sont celles du fichier fourni (terracotta #EA5632, moutarde #FEB039) ; le mot
   en terracotta reste lisible en grand sur la carte claire (3,6:1) comme sur la sombre (4,6:1). */
.brand-logo{display:block;width:auto;height:36px;flex:none}
.brand-sub{font-size:.72rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  padding-top:5px}
.who{display:flex;align-items:center;gap:14px;font-size:.9rem;color:var(--muted);min-width:0}
.who-email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55vw}
.who form{margin:0;flex:none}
.who .btn-link{display:inline-flex;align-items:center;min-height:38px;padding:6px 16px;border:1px solid var(--field-line);
  border-radius:var(--radius-pill);color:var(--ink);text-decoration:none;font-weight:700;font-size:.9rem;white-space:nowrap}
.who .btn-link:hover{border-color:var(--terracotta-deep);color:var(--terracotta-deep)}
/* Cloche du commerce : 44 px au doigt, le nombre de non lues en pastille sur son coin */
.bell{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;
  border-radius:var(--radius-pill);color:var(--ink);text-decoration:none}
.bell .icon{display:block;width:24px;height:24px}
.bell:hover,.bell[aria-current="page"]{background:var(--surface);color:var(--terracotta-deep)}
.bell-count{position:absolute;top:2px;right:0;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;
  border-radius:var(--radius-pill);background:var(--terracotta-deep);color:var(--on-accent);font-size:.72rem;font-weight:900;
  line-height:20px;text-align:center}

/* ---------- Notifications du commerce ---------- */
.notes{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.note{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--card);min-width:0;overflow-wrap:anywhere}
.note-unread{border-color:var(--terracotta-deep);border-left-width:5px}
.note-title{margin:0;font-weight:800}
.note-body{margin:4px 0 0}
.note-meta{margin:6px 0 0;color:var(--muted);font-size:.88rem}
.note-meta a{font-weight:700}

/* ---------- Structure : menu à gauche, en rubans sur téléphone ---------- */
.shell{display:grid;grid-template-columns:240px minmax(0,1fr);gap:40px;max-width:1220px;margin:0 auto;padding:36px 24px 64px}
.shell-plain{grid-template-columns:minmax(0,1fr)}
main{min-width:0}
.menu-section{margin-bottom:26px}
.menu-title{margin:0 0 8px;padding-left:14px;font-size:.74rem;font-weight:900;text-transform:uppercase;letter-spacing:.12em;
  color:var(--muted);overflow-wrap:anywhere}
.menu ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.menu a{display:block;padding:9px 14px;border-radius:var(--radius-pill);color:var(--ink);text-decoration:none;font-weight:600}
.menu a:hover{background:var(--surface)}
.menu a[aria-current="page"]{background:var(--terracotta-deep);color:var(--on-accent);font-weight:800}

@media (max-width:760px){
  /* En-tête sur une seule ligne : logo à gauche, « Déconnexion » à droite (44 px de haut, au doigt) */
  .top{flex-wrap:nowrap;padding:8px 16px}
  .brand{min-width:0}
  .brand-logo{height:30px}
  .who{gap:10px}
  .who-email{max-width:34vw}
  .who .btn-link{min-height:44px;padding:6px 16px}
  .shell{grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 16px 48px}
  /* Chaque rubrique : son titre, puis ses liens en pastilles qui passent à la ligne,
     toutes visibles sans défilement de côté ; la page affichée reste pleine */
  .menu{padding-bottom:10px;border-bottom:1px solid var(--line)}
  .menu-section{margin-bottom:10px}
  .menu-section:last-child{margin-bottom:0}
  .menu-title{padding-left:2px;margin-bottom:6px;font-size:.7rem}
  .menu ul{display:flex;flex-wrap:wrap;gap:6px}
  .menu li{min-width:0;max-width:100%}
  .menu a{padding:7px 14px;border:1px solid var(--line);background:var(--card);font-size:.92rem;line-height:1.35;
    overflow-wrap:anywhere}
  .menu a[aria-current="page"]{border-color:var(--terracotta-deep)}
  h1{font-size:1.8rem;margin-bottom:.9rem}
}
/* Téléphone étroit : l'adresse du compte laisse la place, la ligne reste unique */
@media (max-width:520px){
  .who-email{display:none}
  .brand-sub{letter-spacing:.1em}
}

/* ---------- Blocs ---------- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-card);padding:26px;margin-bottom:24px;
  box-shadow:var(--shadow)}
.card-narrow{max-width:460px;margin-left:auto;margin-right:auto}
.lead{color:var(--muted);font-size:1.03rem}
.hint{color:var(--muted);font-size:.88rem;margin:6px 0 0}
.notice{padding:12px 16px;border-radius:14px;margin-bottom:18px;border:1px solid transparent;border-left-width:5px}
.notice a{color:inherit}
.notice-ok{background:var(--success-soft);border-color:var(--success);color:var(--success-ink)}
.notice-error{background:var(--danger-soft);border-color:var(--danger);color:var(--danger-ink)}
.notice-warn{background:var(--warn-soft);border-color:var(--mustard);color:var(--warn-ink)}
/* Date d'un relevé, et ce qui a été annulé depuis */
.stamp{color:var(--muted);font-size:.88rem}

@media (max-width:760px){
  .card{padding:20px 18px;border-radius:18px;margin-bottom:18px}
}

/* Pages sans menu (connexion, erreurs) : carte accueillante au centre */
.shell-plain{padding-top:min(9vh,80px)}
.shell-plain .card-narrow{position:relative;padding:38px 36px 32px;overflow:hidden;
  box-shadow:0 1px 2px rgba(58,36,26,.05),0 24px 60px -30px rgba(58,36,26,.35)}
/* Filet terracotta et moutarde en haut de la carte, purement décoratif */
.shell-plain .card-narrow::before{content:"";position:absolute;left:0;right:0;top:0;height:6px;
  background:linear-gradient(90deg,var(--terracotta) 0 70%,var(--mustard) 70% 100%)}
.shell-plain .card-narrow h1{font-size:2rem}
/* Logo en grand au haut de la carte de connexion, centré */
.card-logo{margin:4px 0 22px;text-align:center}
.card-logo img{display:inline-block;width:auto;height:72px;max-width:100%}
@media (max-width:760px){
  .shell-plain{padding-top:24px}
  .shell-plain .card-narrow{padding:30px 22px 24px}
  .card-logo{margin-bottom:18px}
  .card-logo img{height:60px}
}

/* ---------- Formulaires ---------- */
label{display:block;font-weight:700;margin:16px 0 6px;font-size:.95rem}
input[type=text],input[type=email],input[type=tel],input[type=password],input[type=number],input[type=date],input[type=search],select{
  width:100%;height:46px;padding:8px 14px;border:1px solid var(--field-line);border-radius:var(--radius-field);
  font:inherit;background:var(--card);color:var(--ink)}
input[type=text]:hover,input[type=email]:hover,input[type=tel]:hover,input[type=password]:hover,input[type=number]:hover,input[type=date]:hover,
input[type=search]:hover,select:hover{border-color:var(--ink)}
/* Champ de recherche : même allure que les autres (Safari lui impose sinon sa forme arrondie) */
input[type=search]{-webkit-appearance:none;appearance:none}
/* Champ en lecture seule (e-mail de « Mon compte ») : surface alternée, sans survol */
input[readonly],input[readonly]:hover{background:var(--surface);border-color:var(--line);color:var(--muted)}
input[type=radio],input[type=checkbox]{accent-color:var(--terracotta-deep);width:1.05rem;height:1.05rem;vertical-align:-2px}
.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 18px}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;margin-top:20px;min-height:44px;padding:10px 22px;
  border:1px solid var(--btn-bg);border-radius:var(--radius-pill);background:var(--btn-bg);color:var(--btn-ink);
  font:inherit;font-weight:800;letter-spacing:.015em;cursor:pointer;text-decoration:none;line-height:1.2;text-align:center}
.btn:hover{background:var(--btn-hover-bg);border-color:var(--btn-hover-bg);color:var(--btn-hover-ink)}
.btn-small{margin-top:0;min-height:34px;padding:6px 14px;font-size:.88rem}
.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn-danger:hover{background:var(--danger-hover);border-color:var(--danger-hover);color:#fff}
/* Un élément caché (attribut hidden) le reste, quelle que soit sa classe : le bouton
   « Installer l'application » n'apparaît que si assets/pwa.js le montre. */
[hidden]{display:none !important}
.btn-quiet{background:var(--card);color:var(--ink);border-color:var(--field-line)}
.btn-quiet:hover{background:var(--surface);color:var(--ink);border-color:var(--ink)}
@media (prefers-color-scheme:dark){
  /* Danger en sombre : fond rouge foncé du mode clair, texte sable 5,5:1 */
  .btn-danger{background:#B3261E;border-color:#B3261E;color:#F6E9DC}
  .btn-danger:hover{background:#8A1C15;border-color:#8A1C15;color:#F6E9DC}
}
.btn-link{background:none;border:0;padding:0;font:inherit;color:var(--terracotta-deep);text-decoration:underline;
  text-underline-offset:.18em;cursor:pointer}
.form-quiet{margin-top:22px;display:flex;gap:10px 20px;flex-wrap:wrap;font-size:.92rem}
.form-inline{display:inline;margin:0}
.filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-bottom:18px}
.filters label{margin-top:0}
/* Une liste déroulante au libellé très long ne doit pas élargir la page */
.filters>div{min-width:0;max-width:100%}
select{max-width:100%}
.filters .btn{margin-top:0;min-height:46px}
@media (max-width:760px){
  /* Les deux dates côte à côte, les boutons dessous */
  .filters>div{flex:1 1 8.5rem}
}
/* Un seul champ (recherche d'un compte, commerce du journal) : large, bouton à côté ;
   sur téléphone, champ puis bouton, chacun sur toute la largeur */
.filters-one>div{flex:1 1 14rem;max-width:30rem}
@media (max-width:640px){
  .filters-one>div{flex-basis:100%;max-width:none}
  .filters-one .btn{flex:1 1 100%}
}

textarea{width:100%;min-height:92px;padding:10px 14px;border:1px solid var(--field-line);border-radius:var(--radius-field);
  font:inherit;line-height:1.45;background:var(--card);color:var(--ink);resize:vertical}
textarea:hover{border-color:var(--ink)}
/* Mention « (facultatif) » dans un intitulé */
.optional{font-weight:400;color:var(--muted);font-size:.88rem}
/* Champ annoncé mais pas encore disponible : grisé, hachuré, curseur interdit, comme .choice.soon */
.soon-field label{color:var(--muted)}
.soon-field input:disabled{cursor:not-allowed;color:var(--muted);border-style:dashed;
  background:repeating-linear-gradient(-45deg,var(--card) 0 9px,var(--soon-stripe) 9px 18px)}
.soon-field input:disabled:hover{border-color:var(--field-line)}
.soon-field .tag{margin-left:6px}
/* Bouton au-dessus d'une liste (« Nouvelle offre ») */
.actions-top{margin:0 0 14px}
/* Champ de fichier (photo d'une offre) : même cadre que les autres champs, bouton en pilule */
input[type=file]{display:block;width:100%;max-width:100%;padding:9px 12px;border:1px dashed var(--field-line);
  border-radius:var(--radius-field);font:inherit;font-size:.92rem;background:var(--card);color:var(--ink)}
input[type=file]:hover{border-color:var(--ink)}
input[type=file]::file-selector-button{margin-right:12px;padding:6px 14px;border:1px solid var(--field-line);
  border-radius:var(--radius-pill);background:var(--surface);color:var(--ink);font:inherit;font-weight:700;cursor:pointer}
/* Photo actuelle d'une offre dans son formulaire, en 4:3 */
.photo-current{margin:0 0 10px}
.photo-current img{display:block;width:240px;max-width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;
  border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.photo-current figcaption{margin-top:6px;color:var(--muted);font-size:.88rem}
.photo-remove{margin-top:12px}

/* Choix entre plusieurs options, dont certaines annoncées mais pas encore disponibles */
.choices{border:0;margin:0 0 6px;padding:0;min-width:0}
.choices legend{font-weight:700;font-size:.95rem;padding:0;margin-bottom:8px}
.choice{display:block;font-weight:400;margin:8px 0;padding:12px 16px;border:1px solid var(--line);border-radius:14px;
  background:var(--card);cursor:pointer}
.choice:hover{border-color:var(--field-line)}
.choice:has(input:checked){border-color:var(--terracotta-deep);background:var(--tile);box-shadow:inset 0 0 0 1px var(--terracotta-deep)}
.choice input{margin-right:8px}
.choice .hint{display:inline-block;margin:2px 0 0 1.75rem}
/* Indisponible : hachures, bord en pointillés, texte secondaire, curseur interdit
   (sans transparence, pour garder un texte lisible) */
.choice.soon{color:var(--muted);cursor:not-allowed;border-style:dashed;border-color:var(--field-line);
  background:repeating-linear-gradient(-45deg,var(--card) 0 9px,var(--soon-stripe) 9px 18px)}
.choice.soon:hover{border-color:var(--field-line)}
.choice.soon input{cursor:not-allowed}

/* ---------- Leviers de l'espace privé ---------- */
/* Titre d'un formulaire d'ajout dans une carte (« Ajouter un créneau ») */
.form-title{font-size:1.02rem;font-weight:800;margin:22px 0 0}
/* Créneaux boostés : une ligne par créneau, phrase à gauche, suppression en icône à droite ;
   une confirmation ouverte passe sous la phrase */
.slots{list-style:none;margin:0 0 6px;padding:0;border-top:1px solid var(--line)}
.slots li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 14px;padding:8px 0;
  border-bottom:1px solid var(--line)}
.slots .slot-text{flex:1 1 14rem;min-width:0;overflow-wrap:break-word}
.slot-rate{white-space:nowrap}
.slots li:has(details[open]) .row-actions{flex:1 1 100%;justify-content:flex-end}
/* Jours d'un créneau : des cases en pastilles, qui passent à la ligne */
.days{border:0;margin:14px 0 0;padding:0;min-width:0}
.days legend{font-weight:700;font-size:.95rem;padding:0;margin-bottom:8px}
.day-list{display:flex;flex-wrap:wrap;gap:8px}
label.day{display:inline-flex;align-items:center;gap:7px;margin:0;padding:8px 14px;border:1px solid var(--line);
  border-radius:var(--radius-pill);background:var(--card);font-weight:600;cursor:pointer;min-height:44px}
label.day:hover{border-color:var(--field-line)}
label.day:has(input:checked){border-color:var(--terracotta-deep);background:var(--tile);box-shadow:inset 0 0 0 1px var(--terracotta-deep)}
/* Public d'une offre : un peu d'air au-dessus, après l'aide des dates */
.choices.audience{margin-top:18px}
/* Type d'offre, en tête du formulaire */
.choices.kind{margin-bottom:12px}
/* Intitulé d'une valeur affichée sans champ (prix d'un produit à vendre), comme un label */
.field-label{font-weight:700;margin:16px 0 6px;font-size:.95rem}
/* « Options avancées » d'une offre : repliées, ouvertes quand une option est remplie */
details.advanced{margin:18px 0 6px;padding:10px 16px;border:1px solid var(--line);border-radius:14px;background:var(--card)}
details.advanced>summary{cursor:pointer;font-weight:700;min-height:28px}
details.advanced[open]>summary{margin-bottom:8px}

/* ---------- Tableaux : jamais de défilement de côté ----------
   Aucun cadre défilant : chaque tableau tient dans sa carte. Les cellules passent à la ligne,
   et un tableau qui ne tiendrait plus devient une grille compacte (tablette) ou des fiches
   (téléphone), voir plus bas ; .table-wrap ne sert plus qu'à porter ces mises en page. */
.table-wrap{min-width:0;max-width:100%}
table{border-collapse:collapse;width:100%;font-size:.94rem}
th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:break-word}
th{font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.065em;color:var(--muted);
  border-bottom:2px solid var(--line);padding-top:4px}
/* Adresses e-mail : coupées n'importe où plutôt que d'élargir la colonne ou la page */
table.team td:nth-child(2),table.accounts td:nth-child(1),table.managers td:nth-child(1),ul.people li,
table.journal td:nth-child(3),table.ops td:nth-child(2),table.ops td:nth-child(3){overflow-wrap:anywhere}
/* Client et caissier (un prénom, ou une adresse sans prénom) : un prénom tient sur sa ligne */
@media (min-width:1181px){
  table.journal td:nth-child(3),table.ops td:nth-child(2),table.ops td:nth-child(3){min-width:7.5em}
}
/* Colonne des actions : ses icônes sur une ligne */
td.c-actions .row-actions:not(:has(details[open])){flex-wrap:nowrap}
tbody tr:last-child td{border-bottom:0}
/* Ligne de total : filet plus marqué au-dessus, texte en gras */
tfoot th,tfoot td{border-top:2px solid var(--line);border-bottom:0;padding-top:11px;font-weight:800;color:var(--ink)}
tfoot th{font-size:.94rem;text-transform:none;letter-spacing:0}
tbody tr:hover td{background:color-mix(in srgb,var(--surface) 45%,transparent)}
td.num,th.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
td.nowrap{white-space:nowrap}
tr.is-off td{color:var(--muted)}
.empty{color:var(--muted);padding:8px 0}

/* Pastilles. Le libellé porte toujours le sens ; la couleur et la forme le doublent :
   rôle (Gérant, Équipier : .tag-role, ou .tag seul) = teinte terracotta pleine ;
   état valide ou actif = teinte verte, précédée d'un disque plein ;
   état éteint (annulé, suspendu, retiré, quitté, sans gérant) = hachures grises ;
   en attente (invitation) = teinte moutarde, bord en pointillés, cercle vide devant. */
.tag{display:inline-block;padding:2px 10px;border-radius:var(--radius-pill);font-size:.8rem;font-weight:800;letter-spacing:.01em;
  line-height:1.5;background:var(--terracotta-soft);color:var(--terracotta-ink);white-space:nowrap;vertical-align:1px}
.tag-ok{background:var(--success-soft);color:var(--success-ink)}
.tag-ok::before,.tag-pending::before{content:"";display:inline-block;width:.5em;height:.5em;margin-right:.4em;border-radius:50%;
  vertical-align:.08em}
.tag-ok::before{background:currentColor}
.tag-off{color:var(--off-ink);background:repeating-linear-gradient(-45deg,var(--off-soft) 0 5px,var(--off-stripe) 5px 10px)}
.tag-pending{background:var(--warn-soft);color:var(--warn-ink);border:1px dashed currentColor;padding:1px 9px}
.tag-pending::before{border:1.5px solid currentColor;box-sizing:border-box}
/* Bientôt disponible : contour en pointillés, sans fond */
.tag-wait{background:transparent;color:var(--muted);border:1px dashed var(--field-line);padding:1px 9px}
/* Type d'espace dans un tableau : pastille de couleur devant le libellé, qui reste écrit */
td.kind{white-space:nowrap}
td.kind::before{content:"";display:inline-block;width:.7em;height:.7em;margin-right:.5em;border-radius:50%;vertical-align:.02em}
td.kind-private::before{background:var(--terracotta)}
td.kind-shared::before{background:var(--mustard)}

/* Confirmation en texte (« Supprimer mon compte ») ; dans une ligne, le déclencheur est une icône (.act) */
details.confirm summary:not(.act){cursor:pointer;color:var(--danger);text-decoration:underline;text-underline-offset:.18em;white-space:nowrap;
  border-radius:6px;font-size:.92rem}
details.confirm[open] summary:not(.act){margin-bottom:8px}

/* ---------- Actions d'une ligne : boutons en icône, discrets ----------
   Chaque action (lien, bouton, ou summary qui ouvre une confirmation) est une icône au trait en
   currentColor, sans cadre au repos : encre 14,5:1 sur carte (sombre 13,7:1) ; danger 6,5:1
   (sombre 7,0:1), 5,5:1 sur sa teinte au survol.
   Au doigt (par défaut, et sur tout écran tactile) : zone de 44 × 44 px, dont un cadre léger de
   34 px dessiné à l'intérieur (::before) et une icône de 20 px ; le reste est une marge invisible.
   À la souris (hover:hover et pointer:fine) : commande de 30 × 30 px, icône de 17 px, cadre et fond
   au survol et au focus seulement, icônes resserrées.
   Le nom de l'action reste dans la commande en texte masqué (.vh), et dans title pour la souris.
   Une confirmation ouverte se déplie sous la ligne, sur toute sa largeur, avec sa phrase et son
   bouton explicite : elle n'élargit jamais une colonne. */
:root{--act:44px;--act-icon:20px;--act-gap:4px}
@media (hover:hover) and (pointer:fine){
  :root{--act:30px;--act-icon:17px;--act-gap:2px}
}
.vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);
  white-space:nowrap;border:0}
.row-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--act-gap);min-width:0;max-width:100%}
.row-actions>form,.row-actions>details{margin:0;min-width:0;max-width:100%}
.row-actions>details[open]{flex:1 1 auto}
.act{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;
  width:var(--act);height:var(--act);margin:0;padding:0;border:1px solid transparent;border-radius:9px;background:transparent;
  color:var(--ink);font:inherit;line-height:1;cursor:pointer;list-style:none;text-decoration:none;
  -webkit-user-select:none;user-select:none}
.act::-webkit-details-marker{display:none}
.act::marker{content:""}
.act .icon{display:block;width:var(--act-icon);height:var(--act-icon);flex:none;position:relative}
.act-danger{color:var(--danger)}
/* Au doigt : le cadre visible (34 px) est plus petit que la zone touchée (44 px) */
.act::before{content:"";position:absolute;inset:5px;border:1px solid var(--line);border-radius:10px;background:var(--card);
  pointer-events:none}
.act:active::before,details[open]>.act::before{background:var(--surface);border-color:var(--ink)}
.act-danger:active::before,details[open]>.act-danger::before{background:var(--danger-soft);border-color:var(--danger)}
@media (hover:hover) and (pointer:fine){
  .act::before{content:none}
  .act:hover,.act:focus-visible{background:var(--surface);border-color:var(--field-line);color:var(--ink)}
  .act-danger:hover,.act-danger:focus-visible{background:var(--danger-soft);border-color:var(--danger);color:var(--danger)}
  /* Confirmation ouverte : son icône reste enfoncée */
  details[open]>.act{background:var(--surface);border-color:var(--ink);box-shadow:inset 0 1px 2px rgba(58,36,26,.18)}
  details[open]>.act-danger{background:var(--danger-soft);border-color:var(--danger)}
}
.row-actions details>form{margin:6px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;
  background:var(--bg);white-space:normal;text-align:left;width:fit-content;min-width:0;max-width:100%;overflow-wrap:break-word}
.row-actions details>form .hint{margin:0 0 8px}
.row-actions details>form .btn{margin-top:0;white-space:normal;max-width:100%}
/* Action qui mène à la page où l'on gère (« Équipe », « Gérer ») : l'icône et son nom écrit,
   dans un cadre léger toujours visible (c'est un bouton avec du texte) */
.act-text{width:auto;gap:6px;padding:0 13px 0 10px;font-size:.88rem;font-weight:800;white-space:nowrap}
.act-text::before{inset:5px 0}
.act-text .act-label{line-height:1.2;position:relative}
@media (hover:hover) and (pointer:fine){
  .act-text{gap:5px;padding:0 10px 0 7px;font-size:.84rem;border-color:var(--line)}
}
/* Dans un tableau affiché en tableau (bureau), une confirmation ouverte passe sous la ligne,
   sur toute sa largeur, au lieu d'élargir la colonne des actions : la ligne se donne la hauteur
   de l'encadré (--confirm-h, une ligne de texte et le bouton) et l'encadré s'y place, en bas.
   Toutes les actions d'une ligne sont dans la dernière colonne, alignées à droite et centrées
   sur la première ligne de texte : d'une ligne à l'autre, les icônes forment une seule colonne.
   Seuils : ceux où chaque tableau garde sa forme de tableau (voir les grilles plus bas). */
@media (min-width:1220px){
  table.rows-l tr{position:relative}
  table.rows-l td.c-actions{width:1%;text-align:right}
  table.rows-l td.c-actions>.row-actions{justify-content:flex-end;margin-block:calc((1lh - var(--act)) / 2)}
  table.rows-l tr:has(details[open])>td{padding-bottom:calc(11px + var(--confirm-h))}
  table.rows-l .row-actions details>form{position:absolute;left:12px;right:12px;bottom:10px;
    width:auto;margin:0;min-height:calc(var(--confirm-h) - 8px);display:flex;flex-wrap:wrap;align-items:center;
    justify-content:flex-end;gap:6px 16px}
  table.rows-l .row-actions details>form .hint{margin:0}
}
@media (min-width:1181px){
  table.rows-m tr,table.journal tr{position:relative}
  table.rows-m td.c-actions,table.journal td.c-actions{width:1%;text-align:right}
  table.rows-m td.c-actions>.row-actions,table.journal td.c-actions>.row-actions{justify-content:flex-end;margin-block:calc((1lh - var(--act)) / 2)}
  table.rows-m tr:has(details[open])>td,table.journal tr:has(details[open])>td{padding-bottom:calc(11px + var(--confirm-h))}
  table.rows-m .row-actions details>form,table.journal .row-actions details>form{position:absolute;left:12px;right:12px;bottom:10px;
    width:auto;margin:0;min-height:calc(var(--confirm-h) - 8px);display:flex;flex-wrap:wrap;align-items:center;
    justify-content:flex-end;gap:6px 16px}
  table.rows-m .row-actions details>form .hint,table.journal .row-actions details>form .hint{margin:0}
}
@media (min-width:961px){
  table.rows-s tr{position:relative}
  table.rows-s td.c-actions{width:1%;text-align:right}
  table.rows-s td.c-actions>.row-actions{justify-content:flex-end;margin-block:calc((1lh - var(--act)) / 2)}
  table.rows-s tr:has(details[open])>td{padding-bottom:calc(11px + var(--confirm-h))}
  table.rows-s .row-actions details>form{position:absolute;left:12px;right:12px;bottom:10px;
    width:auto;margin:0;min-height:calc(var(--confirm-h) - 8px);display:flex;flex-wrap:wrap;align-items:center;
    justify-content:flex-end;gap:6px 16px}
  table.rows-s .row-actions details>form .hint{margin:0}
}
:root{--confirm-h:3.6rem}
@media (min-width:961px){
  table td.c-actions>.row-actions>details[open]{flex:none}
}
/* Personnes d'une vue d'ensemble (gérants d'un commerce, animateurs d'un espace) : du texte, sans action */
ul.people{list-style:none;margin:0;padding:0}
ul.people li{overflow-wrap:anywhere;margin:0 0 2px}
ul.people li.is-pending{color:var(--muted)}
/* « invitation en attente » : sous l'adresse, en petit, sans pastille (ce n'est qu'une note) */
.pending-note{display:block;font-size:.84rem;font-style:italic;line-height:1.3}
/* Sur bureau, les actions d'un commerce (« Équipe » puis suspendre ou réactiver) tiennent côte à côte ;
   une confirmation ouverte passe sous la ligne */
@media (min-width:1220px){
  /* Opérations (neuf colonnes) : resserrées comme le journal, date sur deux lignes */
  table.ops th,table.ops td{padding-left:7px;padding-right:7px}
  table.ops td:nth-child(1){white-space:normal;width:6em}
  table.shops th,table.shops td{padding-left:9px;padding-right:9px}
  /* Largeurs imposées : quel que soit le contenu, le tableau tient dans sa carte et les actions restent dedans.
     Le nom, l'adresse et l'adresse e-mail passent à la ligne ; les Gérants prennent ce qui reste. */
  table.shops{table-layout:fixed}
  table.shops th:nth-child(1){width:120px}
  table.shops th:nth-child(2){width:88px}
  table.shops th:nth-child(3){width:105px}
  table.shops th:nth-child(4){width:57px}
  table.shops th:nth-child(6){width:98px}
  table.shops th:nth-child(7){width:99px}
  table.shops th:nth-child(8){width:134px}
  table.shops td .nobr{min-width:0;white-space:normal}
  table.shops td.c-actions{width:auto}
}
/* Invitation en attente : la pastille et sa date, dans la colonne « État » */
.pending-until{display:inline}
/* Noms (View::name) : un mot composé ne se coupe pas à son trait d'union, il passe à la ligne entier.
   Bloc en ligne et non white-space:nowrap : plus large que toute sa place, il se coupe quand même
   (dernier recours) au lieu de faire défiler la page de côté. Le soulignement d'un lien le suit. */
.name{text-decoration:inherit}
.nobr{display:inline-block;max-width:100%;overflow-wrap:anywhere;text-decoration:inherit}
/* Dans un tableau, la colonne garde la largeur du mot entier (jusqu'à 14em) quand le tableau se resserre ;
   sans calc-size(), le mot ne se coupe pas du tout dans un tableau (white-space:nowrap) */
@media (min-width:641px){
  td .nobr{min-width:calc-size(max-content,min(size,14em))}
  @supports not (min-width:calc-size(max-content,size)){td .nobr{white-space:nowrap}}
}
@media (min-width:641px) and (max-width:1180px){table.journal td .nobr{min-width:0;white-space:normal}}
/* Tableau trop serré : l'en-tête d'une colonne de chiffres (« Points acceptés ») passe sur deux lignes
   plutôt que de pousser le tableau de côté ; un tableau qui tient garde ses en-têtes sur une ligne */
@media (min-width:641px){th.num{white-space:normal}}
/* Offre d'un achat (opérations, journal) : titre, puis ses points en plus discret */
.offer-points{color:var(--muted);white-space:nowrap}
/* Leviers d'un achat : le bonus sous les points gagnés, les tampons sous l'offre, en plus discret ;
   chacun dans un seul bloc, pour rester une seule valeur dans les fiches (cellules en flex) */
.with-bonus,.offer-levers{display:block}
.stamp-note{display:block;color:var(--muted);font-size:.88rem;line-height:1.4}
.offer+.stamp-note{margin-top:2px}
.pager{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;justify-content:space-between;margin-top:16px;font-size:.92rem}

/* ---------- Journal de la plateforme : dix colonnes, sans défilement de côté ----------
   Colonnes, dans l'ordre du gabarit : 1 date, 2 commerce, 3 client, 4 ticket, 5 payé,
   6 points gagnés, 7 offre, 8 points utilisés, 9 état, 10 action. Sous 640 px : fiches, comme
   les autres tableaux. Au-dessus de 1180 px : un tableau resserré (date sur deux
   lignes, noms qui passent à la ligne, en-têtes sur deux lignes, action compacte).
   Entre les deux, le menu à gauche ne laisse pas la place à neuf colonnes : chaque
   achat tient sur quelques lignes alignées (date, commerce, client à gauche ; état ;
   montants et points à droite, chacun précédé de son intitulé). */
@media (min-width:641px){
  table.journal td{overflow-wrap:break-word}
}
@media (min-width:1181px){
  table.journal{font-size:.9rem}
  table.journal th,table.journal td{padding-left:7px;padding-right:7px}
  table.journal th{white-space:normal}
  table.journal td:nth-child(1){white-space:normal;width:6em}
}
@media (min-width:641px) and (max-width:1180px){
  table.journal,table.journal tbody{display:block}
  table.journal thead{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  table.journal tr{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(11.5em,auto);column-gap:14px;
    grid-template-areas:"date state ticket" "shop shop paid" "client client earned" "offer offer used" "act act act";
    align-items:baseline;padding:12px 0;border-bottom:1px solid var(--line)}
  table.journal tbody tr:last-child{border-bottom:0}
  table.journal tbody tr:hover{background:color-mix(in srgb,var(--surface) 45%,transparent)}
  table.journal tbody tr:hover td{background:none}
  table.journal td{padding:0;border:0;min-width:0}
  table.journal td:nth-child(1){grid-area:date;font-weight:800;white-space:normal}
  table.journal td:nth-child(2){grid-area:shop;font-weight:700}
  table.journal td:nth-child(3){grid-area:client;color:var(--muted)}
  table.journal td:nth-child(9){grid-area:state}
  table.journal td:nth-child(10){grid-area:act;padding-top:6px}
  table.journal td:nth-child(4){grid-area:ticket;font-weight:800}
  table.journal td:nth-child(5){grid-area:paid}
  table.journal td:nth-child(6){grid-area:earned}
  table.journal td:nth-child(7){grid-area:offer}
  table.journal td:nth-child(8){grid-area:used}
  table.journal td.c-offer:empty{display:none}
  table.journal td.c-offer::before{content:attr(data-label) " ";font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em;color:var(--muted)}
  /* Montants et points : intitulé à gauche, valeur à droite */
  table.journal td.num{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
  table.journal td.num::before{content:attr(data-label);font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em;color:var(--muted);white-space:nowrap}
}

/* ---------- Autres tableaux sur tablette : une ligne par fiche compacte, comme le journal ----------
   Au-dessus du seuil, rien ne change (le tableau tient). En dessous, et jusqu'à 641 px
   (où prennent le relais les fiches du téléphone), chaque ligne devient une petite grille,
   sans défilement de côté. Seuil choisi selon la largeur qu'il faut au tableau :
     .rows-l  jusqu'à 1219 px : commerces de la plateforme, opérations d'un commerce
              (sept et huit colonnes ; à 1220 px et plus, la page a sa largeur de bureau) ;
     .rows-m  jusqu'à 1180 px : comptes, relevé de compensation ;
     .rows-s  jusqu'à 960 px : équipe, espaces mutualisés, tableaux de bord, commerces d'un espace.
   Les règles communes sont répétées pour chaque seuil ; la disposition propre à chaque
   tableau (.shops, .ops, …) suit, rangée par colonne du gabarit (nth-child). */
@media (min-width:641px) and (max-width:1219px){
  table.rows-l,table.rows-l tbody,table.rows-l tfoot{display:block}
  table.rows-l thead{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  table.rows-l tr{display:grid;column-gap:14px;row-gap:2px;align-items:baseline;padding:12px 0;border-bottom:1px solid var(--line)}
  table.rows-l tbody tr:last-child{border-bottom:0}
  table.rows-l tbody tr:hover{background:color-mix(in srgb,var(--surface) 45%,transparent)}
  table.rows-l tbody tr:hover td{background:none}
  table.rows-l td{padding:0;border:0;min-width:0;white-space:normal;overflow-wrap:break-word}
  table.rows-l td .nobr{min-width:0;white-space:normal}
  table.rows-l td.num{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
  table.rows-l td.num::before{content:attr(data-label);font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em;color:var(--muted);white-space:nowrap}
}
@media (min-width:641px) and (max-width:1180px){
  table.rows-m,table.rows-m tbody,table.rows-m tfoot{display:block}
  table.rows-m thead{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  table.rows-m tr{display:grid;column-gap:14px;row-gap:2px;align-items:baseline;padding:12px 0;border-bottom:1px solid var(--line)}
  table.rows-m tbody tr:last-child{border-bottom:0}
  table.rows-m tbody tr:hover{background:color-mix(in srgb,var(--surface) 45%,transparent)}
  table.rows-m tbody tr:hover td{background:none}
  table.rows-m td,table.rows-m tfoot th{padding:0;border:0;min-width:0;white-space:normal;overflow-wrap:break-word}
  table.rows-m td .nobr{min-width:0;white-space:normal}
  table.rows-m td.num{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
  table.rows-m td.num::before{content:attr(data-label);font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em;color:var(--muted);white-space:nowrap}
}
@media (min-width:641px) and (max-width:960px){
  table.rows-s,table.rows-s tbody{display:block}
  table.rows-s thead{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  table.rows-s tr{display:grid;column-gap:14px;row-gap:2px;align-items:baseline;padding:12px 0;border-bottom:1px solid var(--line)}
  table.rows-s tbody tr:last-child{border-bottom:0}
  table.rows-s tbody tr:hover{background:color-mix(in srgb,var(--surface) 45%,transparent)}
  table.rows-s tbody tr:hover td{background:none}
  table.rows-s td{padding:0;border:0;min-width:0;white-space:normal;overflow-wrap:break-word}
  table.rows-s td .nobr{min-width:0;white-space:normal}
  table.rows-s td.num{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
  table.rows-s td.num::before{content:attr(data-label);font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em;color:var(--muted);white-space:nowrap}
}
/* Commerces de la plateforme (vue d'ensemble) : nom et état ; adresse et taux ; gérants et nombre
   d'équipiers ; actions (« Équipe », suspendre ou réactiver) */
@media (min-width:641px) and (max-width:1219px){
  table.shops tr{grid-template-columns:minmax(0,1fr) minmax(9em,auto);
    grid-template-areas:"title badge" "sub rate" "plan plan" "owners staff" "act act"}
  table.shops td:nth-child(2){grid-area:plan}
  table.shops td:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800}
  table.shops td:nth-child(3){grid-area:sub;color:var(--muted)}
  table.shops td:nth-child(4){grid-area:rate}
  table.shops td:nth-child(5){grid-area:owners;padding-top:8px}
  table.shops td:nth-child(6){grid-area:staff;padding-top:8px}
  table.shops td:nth-child(7){grid-area:badge;justify-self:end}
  table.shops td:nth-child(8){grid-area:act;padding-top:10px}
  table.shops tr.is-off td:nth-child(1){color:var(--muted)}
}
/* Espaces mutualisés (vue d'ensemble) : nom à gauche, taux et nombre de commerces à droite ;
   animateurs dessous ; « Gérer » */
@media (min-width:641px) and (max-width:960px){
  table.spaces tr{grid-template-columns:minmax(0,1fr) minmax(9em,auto);grid-template-areas:"title rate" "title count" "people people" "act act"}
  table.spaces td:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800}
  table.spaces td:nth-child(2){grid-area:rate}
  table.spaces td:nth-child(3){grid-area:count}
  table.spaces td:nth-child(4){grid-area:people;padding-top:8px}
  table.spaces td:nth-child(5){grid-area:act;padding-top:10px}
}
/* Personnes d'une vue d'ensemble (gérants, animateurs) : intitulé au-dessus, puis la liste */
@media (min-width:641px) and (max-width:1219px){
  table.shops td.c-block::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:.7rem;font-weight:900;
    text-transform:uppercase;letter-spacing:.065em;color:var(--muted)}
}
@media (min-width:641px) and (max-width:960px){
  table.spaces td.c-block::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:.7rem;font-weight:900;
    text-transform:uppercase;letter-spacing:.065em;color:var(--muted)}
}
/* Animateurs d'un espace (plateforme) : adresse et pastille ; action dessous */
@media (min-width:641px) and (max-width:960px){
  table.managers tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title badge" "act act"}
  table.managers td:nth-child(1){grid-area:title;font-weight:800}
  table.managers td:nth-child(2){grid-area:badge;justify-self:end}
  table.managers td:nth-child(3){grid-area:act;padding-top:6px}
}
/* Opérations d'un commerce : à gauche date, client, caissier et état ; à droite montants et points ;
   l'offre, s'il y en a une, sur toute la largeur en dessous */
@media (min-width:641px) and (max-width:1219px){
  table.ops tr{grid-template-columns:minmax(0,1fr) minmax(11.5em,auto);
    grid-template-areas:"date ticket" "client paid" "cashier earned" "state used" "offer offer"}
  table.ops td:nth-child(1){grid-area:date;font-weight:800}
  table.ops td:nth-child(2){grid-area:client;font-weight:700}
  table.ops td:nth-child(3){grid-area:cashier;color:var(--muted)}
  table.ops td:nth-child(3)::before,table.ops td.c-offer::before{content:attr(data-label) " ";font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em}
  table.ops td:nth-child(4){grid-area:ticket;font-weight:800}
  table.ops td:nth-child(5){grid-area:paid}
  table.ops td:nth-child(6){grid-area:earned}
  table.ops td:nth-child(7){grid-area:offer}
  table.ops td:nth-child(8){grid-area:used}
  table.ops td:nth-child(9){grid-area:state;padding-top:2px}
  table.ops td.c-offer:empty{display:none}
}
/* Comptes : prénom et points ; e-mail ; rôles ; action. Sans prénom, l'e-mail devient le titre. */
@media (min-width:641px) and (max-width:1180px){
  table.accounts tr{grid-template-columns:minmax(0,1fr) minmax(8em,auto);grid-template-areas:"name points" "email email" "roles roles" "act act"}
  table.accounts td:nth-child(1){grid-area:email;color:var(--muted)}
  table.accounts td:nth-child(2){grid-area:name;font-size:1.05rem;font-weight:800}
  table.accounts td:nth-child(2):empty{display:none}
  table.accounts tr:has(> td:nth-child(2):empty) td:nth-child(1){grid-area:name;color:var(--ink);font-size:1.05rem;font-weight:800}
  table.accounts td:nth-child(3){grid-area:roles;padding-top:4px}
  table.accounts td:nth-child(3):not(:has(*)){display:none}
  table.accounts td:nth-child(4){grid-area:points}
  table.accounts td:nth-child(5){grid-area:act;padding-top:6px}
  table.accounts td:nth-child(5):not(:has(*)){display:none}
}
/* Relevé de compensation : le commerce sur toute la largeur, puis achats à gauche et,
   à droite, chaque total de points suivi de sa valeur en euros ; total en bas, en gras */
@media (min-width:641px) and (max-width:1180px){
  table.comp tr{grid-template-columns:minmax(0,1fr) minmax(10.5em,auto) minmax(5.5em,auto);
    grid-template-areas:"title title title" "buys earned earned-e" ". redeemed redeemed-e" ". gap gap-e"}
  table.comp tr>:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800;padding-bottom:4px}
  table.comp td:nth-child(2){grid-area:buys;justify-content:flex-start}
  table.comp td:nth-child(3){grid-area:earned}
  table.comp td:nth-child(4){grid-area:earned-e}
  table.comp td:nth-child(5){grid-area:redeemed}
  table.comp td:nth-child(6){grid-area:redeemed-e}
  table.comp td:nth-child(7){grid-area:gap}
  table.comp td:nth-child(8){grid-area:gap-e}
  table.comp td.c-euros{justify-content:flex-end;color:var(--muted)}
  table.comp td.c-euros::before{content:none}
  table.comp tfoot tr{border-top:2px solid var(--line);border-bottom:0;font-weight:800}
  table.comp tfoot th{text-align:left;color:var(--ink)}
  table.comp tfoot td{font-weight:800;color:var(--ink)}
}
/* Équipe : personne et rôle ; e-mail ; état (invitation en attente) ; actions côte à côte.
   Sans prénom, l'e-mail devient le titre. */
@media (min-width:641px) and (max-width:960px){
  table.team tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title badge" "sub sub" "state state" "act act"}
  table.team td:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800}
  table.team td:nth-child(1):empty{display:none}
  table.team td:nth-child(2){grid-area:sub;color:var(--muted)}
  table.team tr:has(> td:nth-child(1):empty) td:nth-child(2){grid-area:title;color:var(--ink);font-size:1.05rem;font-weight:800}
  table.team td:nth-child(3){grid-area:badge;justify-self:end}
  table.team td:nth-child(4){grid-area:state;padding-top:4px}
  table.team td:nth-child(4):empty{display:none}
  table.team td:nth-child(5){grid-area:act;padding-top:6px}
  table.team td:nth-child(5):not(:has(*)){display:none}
}
/* Offres : titre et état ; description et public ; période et coût ; limite et utilisations ; stock ; actions */
td .sub{display:block;margin-top:2px;color:var(--muted);font-size:.88rem;font-weight:400;line-height:1.4}
span.nowrap{white-space:nowrap}
table.offers td:nth-child(1){font-weight:700}
/* Vignette 4:3 de la photo : au-dessus du titre (colonne étroite), à sa gauche sur téléphone (fiche large) */
.offer-thumb{display:block;width:96px;height:72px;margin-bottom:8px;object-fit:cover;border-radius:10px;background:var(--surface)}
@media (max-width:640px){
  .offer-head{display:flex;align-items:flex-start;gap:12px;min-width:0}
  .offer-head>div{flex:1 1 auto;min-width:0}
  .offer-thumb{flex:none;width:80px;height:60px;margin-bottom:0}
}
@media (min-width:1220px){
  table.offers th,table.offers td{padding-left:8px;padding-right:8px}
  table.offers td:nth-child(3){white-space:nowrap}
}
@media (min-width:641px) and (max-width:1219px){
  table.offers tr{grid-template-columns:minmax(0,1fr) minmax(12em,auto);
    grid-template-areas:"title badge" "period cost" "limit uses" ". stock" "act act"}
  table.offers td:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800}
  table.offers td:nth-child(2){grid-area:badge;justify-self:end}
  table.offers td:nth-child(3){grid-area:cost}
  table.offers td:nth-child(4){grid-area:period}
  table.offers td:nth-child(5){grid-area:limit}
  table.offers td:nth-child(6){grid-area:uses}
  table.offers td:nth-child(7){grid-area:stock}
  table.offers td:nth-child(8){grid-area:act;padding-top:8px}
  table.offers td:nth-child(8):not(:has(*)){display:none}
  table.offers td.c-line::before{content:attr(data-label) " ";font-size:.7rem;font-weight:900;text-transform:uppercase;
    letter-spacing:.065em;color:var(--muted)}
  table.offers tr.is-off td:nth-child(1){color:var(--muted)}
}
/* Téléphone : l'état reste sur la ligne du titre */
@media (max-width:640px){
  table.offers .c-title{flex:1 1 0}
}
/* Tableau de bord d'un commerce : espace et points émis ; type et points acceptés */
@media (min-width:641px) and (max-width:960px){
  table.by-space tr{grid-template-columns:minmax(0,1fr) minmax(11.5em,auto);grid-template-areas:"title earned" "kind redeemed"}
  table.by-space td:nth-child(1){grid-area:title;font-weight:800}
  table.by-space td:nth-child(2){grid-area:kind;color:var(--muted)}
  table.by-space td:nth-child(3){grid-area:earned}
  table.by-space td:nth-child(4){grid-area:redeemed}
}
/* Tableau de bord d'un espace : commerce à gauche ; achats et points à droite */
@media (min-width:641px) and (max-width:960px){
  table.by-shop tr{grid-template-columns:minmax(0,1fr) minmax(11.5em,auto);grid-template-areas:"title buys" "title earned" "title redeemed"}
  table.by-shop td:nth-child(1){grid-area:title;font-weight:800}
  table.by-shop td:nth-child(2){grid-area:buys}
  table.by-shop td:nth-child(3){grid-area:earned}
  table.by-shop td:nth-child(4){grid-area:redeemed}
}
/* Commerces d'un espace : nom et état ; adresse et action */
@media (min-width:641px) and (max-width:960px){
  table.members tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title badge" "sub act"}
  table.members td:nth-child(1){grid-area:title;font-weight:800}
  table.members tr.is-off td:nth-child(1){color:var(--muted)}
  table.members td:nth-child(2){grid-area:sub;color:var(--muted)}
  table.members td:nth-child(3){grid-area:badge;justify-self:end}
  table.members td:nth-child(4){grid-area:act;justify-self:end;text-align:right}
}

/* ---------- Facturation ----------
   Relevés d'un mois (.bills) : commerce et facture à gauche ; total, abonnement, points dépensés
   et commission à droite. Factures et avoirs (.invoices, .my-invoices) : numéro et état ; commerce
   ou mois, total et échéance ; actions. Totaux par mois (.months) : mois, puis les trois montants. */
td.c-total{font-weight:800}
.bill-ref{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;white-space:nowrap}
.tag-failed{background:var(--danger-soft);color:var(--danger-ink)}
form.issue{margin-top:18px}
form.issue .btn{margin-top:0}
form.issue .hint{margin:8px 0 0}
h3.form-part{margin:1.6rem 0 0;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
h3.form-part:first-of-type{margin-top:.4rem}
/* Confirmation qui demande une saisie (date et moyen d'un paiement, motif d'un avoir) : champs compacts */
.row-actions details>form.confirm-fields{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.confirm-fields label{margin:0;font-size:.88rem}
.confirm-fields input[type=date],.confirm-fields input[type=text],.confirm-fields select{width:auto;height:36px;padding:4px 10px;
  min-width:0;max-width:100%;font-size:.92rem}
.confirm-fields input[type=text]{flex:1 1 14rem}
@media (min-width:641px) and (max-width:1180px){
  table.bills tr{grid-template-columns:minmax(0,1fr) minmax(11.5em,auto);
    grid-template-areas:"title total" "plan sub" "invoice spent" "invoice com" "act act"}
  table.bills td:nth-child(2){grid-area:plan}
  table.bills tr>:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800}
  table.bills td:nth-child(3){grid-area:sub}
  table.bills td:nth-child(4){grid-area:spent}
  table.bills td:nth-child(5){grid-area:com}
  table.bills td:nth-child(6){grid-area:total}
  table.bills td:nth-child(7){grid-area:invoice;padding-top:4px}
  table.bills td:nth-child(8){grid-area:act;padding-top:6px}
  table.bills td:empty,table.bills td.c-actions:not(:has(*)){display:none}
  table.bills tr.is-off>:nth-child(1){color:var(--muted)}
  table.bills tfoot tr{border-top:2px solid var(--line);border-bottom:0}
  table.bills tfoot th{text-align:left;color:var(--ink);padding:0}
  table.bills tfoot td{font-weight:800;color:var(--ink)}
  table.invoices tr,table.my-invoices tr{grid-template-columns:minmax(0,1fr) minmax(11.5em,auto);
    grid-template-areas:"title badge" "sub total" "sub due" "act act"}
  table.invoices td:nth-child(1),table.my-invoices td:nth-child(1){grid-area:title;font-size:1.05rem;font-weight:800}
  table.invoices td:nth-child(2),table.my-invoices td:nth-child(2){grid-area:sub;color:var(--muted)}
  table.invoices td:nth-child(3),table.my-invoices td:nth-child(3){grid-area:total}
  table.invoices td:nth-child(4),table.my-invoices td:nth-child(4){grid-area:due;display:flex;justify-content:space-between;gap:12px}
  table.invoices td:nth-child(4)::before,table.my-invoices td:nth-child(4)::before{content:attr(data-label);font-size:.7rem;font-weight:900;
    text-transform:uppercase;letter-spacing:.065em;color:var(--muted);white-space:nowrap}
  table.invoices td:nth-child(4):empty,table.my-invoices td:nth-child(4):empty{display:none}
  table.invoices td:nth-child(5),table.my-invoices td:nth-child(5){grid-area:badge;justify-self:end}
  table.invoices td:nth-child(6),table.my-invoices td:nth-child(6){grid-area:act;padding-top:6px}
  table.invoices tr.is-off td:nth-child(1),table.my-invoices tr.is-off td:nth-child(1){color:var(--muted)}
}
@media (min-width:641px) and (max-width:960px){
  table.months tr{grid-template-columns:minmax(0,1fr) minmax(11.5em,auto);grid-template-areas:"title billed" "count collected" ". pending"}
  table.months td:nth-child(1){grid-area:title;font-weight:800}
  table.months td:nth-child(2){grid-area:count;justify-content:flex-start}
  table.months td:nth-child(3){grid-area:billed}
  table.months td:nth-child(4){grid-area:collected}
  table.months td:nth-child(5){grid-area:pending}
}
/* Téléphone : la facture d'un relevé et le total du pied restent lisibles en fiche */
@media (max-width:640px){
  .table-wrap table.bills tfoot td:empty{display:none}
}

/* ---------- Tableaux en fiches sur téléphone ----------
   Sous 640 px, chaque ligne devient une fiche, sans défilement de côté. Le
   tableau reste un vrai tableau dans le HTML ; seule sa mise en page change.
   L'en-tête est masqué à l'œil mais reste lu par les lecteurs d'écran ; chaque
   cellule affiche devant sa valeur l'intitulé de sa colonne (data-label).
   Rôle d'une cellule dans la fiche :
     .c-title   identité de la ligne (personne, commerce, date) : titre, sans intitulé
     .c-badge   pastille d'état ou de rôle, sur la ligne du titre
     .c-sub     précision sous le titre (adresse, e-mail, type), sans intitulé ;
                devient le titre si la cellule titre est vide (invitation sans prénom)
     .c-amount  montant mis en avant sous le titre (ticket d'un achat)
     .c-pair / .c-euros  points puis leur valeur en euros, sur une même ligne
     .c-block   contenu sur plusieurs lignes (personnes, rôles) : intitulé au-dessus
     .c-actions actions de la ligne, en bas de la fiche, sur toute la largeur
   Les autres cellules sont des lignes « intitulé … valeur ». Une cellule vide ne
   laisse pas de ligne. */
@media (max-width:640px){
  .table-wrap{overflow:visible;margin:0;padding:0}
  .table-wrap table,.table-wrap tbody,.table-wrap tfoot{display:block}
  .table-wrap thead{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  .table-wrap tr{display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;margin:0 0 12px;padding:14px 16px 12px;
    background:var(--card);border:1px solid var(--line);border-radius:16px}
  .table-wrap tbody tr:last-child{margin-bottom:0}
  /* Achat annulé, commerce suspendu : bord en pointillés, en plus du texte éteint */
  .table-wrap tr.is-off{border-style:dashed;border-color:var(--field-line)}
  .table-wrap tbody tr:hover td{background:none}

  .table-wrap td,.table-wrap tfoot th{order:3;flex:1 1 100%;min-width:0;display:flex;justify-content:space-between;
    align-items:baseline;gap:4px 14px;padding:4px 0;border:0;text-align:right;white-space:normal;overflow-wrap:anywhere}
  .table-wrap td[data-label]:not(.c-title,.c-sub,.c-badge,.c-euros,.c-actions)::before{content:attr(data-label);flex:none;
    max-width:55%;text-align:left;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.065em;
    color:var(--muted);overflow-wrap:normal}
  .table-wrap td:empty,.table-wrap td.c-actions:not(:has(*)),.table-wrap td.c-block:not(:has(*)){display:none}

  .table-wrap .c-title{order:0;flex:1 1 auto;display:block;padding:0 0 2px;text-align:left;font-size:1.05rem;font-weight:800;
    line-height:1.35;color:var(--ink);overflow-wrap:break-word}
  .table-wrap tr.is-off .c-title{color:var(--muted)}
  .table-wrap .c-badge{order:1;flex:0 0 auto;display:block;padding:0 0 2px}
  .table-wrap .c-sub{order:2;display:block;padding:0 0 6px;text-align:left;color:var(--muted);font-size:.9rem;
    overflow-wrap:break-word}
  /* Pas de prénom : l'e-mail devient le titre */
  .table-wrap tr:has(> .c-title:empty) > .c-sub{order:0;flex:1 1 0;padding:0 0 2px;font-size:1.05rem;font-weight:800;
    color:var(--ink)}
  .table-wrap .c-amount{order:2;justify-content:flex-start;align-items:baseline;gap:10px;padding:0 0 6px;font-size:1.3rem;
    font-weight:900;letter-spacing:-.01em;color:var(--ink)}
  .table-wrap tr.is-off .c-amount{color:var(--muted)}
  /* Points et euros côte à côte ; les euros en colonne étroite, alignés à droite */
  .table-wrap .c-pair{flex:1 1 calc(100% - 6.5em)}
  .table-wrap .c-pair::before{max-width:none;white-space:nowrap}
  .table-wrap .c-euros{flex:0 0 5.6em;display:block;color:var(--muted)}
  .table-wrap .c-block{order:4;display:block;text-align:left;padding:8px 0 4px}
  .table-wrap .c-block::before{display:block;max-width:none;margin-bottom:4px}
  .table-wrap .c-actions{order:5;display:block;text-align:left;margin-top:10px;padding:12px 0 0;border-top:1px solid var(--line)}

  /* Ligne de total : fiche de synthèse, teinte terracotta */
  .table-wrap tfoot{margin-top:16px}
  .table-wrap tfoot tr{background:var(--tile);border:2px solid var(--terracotta);margin:0}
  .table-wrap tfoot th.c-title{font-size:1.05rem;font-weight:900;color:var(--terracotta-ink);text-transform:none;letter-spacing:0}
  .table-wrap tfoot td{font-weight:800}

  /* Actions en bas de la fiche : une rangée d'icônes de 44 px ; une confirmation ouverte
     prend toute la largeur, son bouton aussi (au moins 44 px de haut) */
  .table-wrap .row-actions>details[open]{flex:1 1 100%}
  .table-wrap details form{min-width:0;width:auto}
  .table-wrap details .btn{display:flex;width:100%;min-height:44px;font-size:.94rem}
  .table-wrap .c-actions>.hint{display:block;margin:0;text-align:center}
}

/* ---------- Chiffres d'un tableau de bord : tuiles chaudes ---------- */
.figures{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:24px}
.figure{background:var(--tile);border-radius:var(--radius-tile);padding:18px 18px 20px;min-width:0}
/* Petit trait moutarde au-dessus du libellé, décoratif, hors du texte */
.figure::before{content:"";display:block;width:26px;height:5px;border-radius:var(--radius-pill);background:var(--mustard);
  margin-bottom:12px}
.figure-label{font-size:.76rem;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
/* Grand chiffre : ≥ 24px en gras, terracotta sur tuile 3,4:1 (grand texte) */
.figure-value{font-size:2.15rem;line-height:1.1;font-weight:900;letter-spacing:-.02em;color:var(--terracotta);
  margin-top:8px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.figure-note{font-size:.86rem;color:var(--muted);margin-top:4px}
@media (max-width:760px){
  .figures{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .figure{padding:14px 14px 16px}
  .figure-value{font-size:1.8rem}
}

.plain-list{margin:0 0 .75rem;padding-left:1.2rem}
/* Clé d'une application d'authentification, à recopier à la main */
.key{display:inline-block;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);
  font-size:1.1rem;letter-spacing:.08em;overflow-wrap:anywhere}


/* ---------- Connexion avec Google et Apple ---------- */
/* Séparateur « ou » entre le formulaire de l'e-mail et les boutons */
.or{display:flex;align-items:center;gap:12px;margin:22px 0 4px;color:var(--muted);font-size:.88rem;font-weight:700}
.or::before,.or::after{content:"";flex:1;border-top:1px solid var(--line)}
.social{display:flex;flex-direction:column;gap:10px;margin-top:14px}
/* Boutons aux couleurs imposées par chaque marque, logo à gauche, toute la largeur de la carte.
   Google : blanc bordé de gris, texte #1F1F1F (clair) ; #131314 bordé de #8E918F, texte #E3E3E3 (sombre).
   Apple : noir, logo et texte blancs (clair) ; blanc, logo et texte noirs (sombre). */
.social-btn{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:10px 18px;
  border:1px solid transparent;border-radius:var(--radius-pill);font-weight:700;font-size:1rem;line-height:1.2;
  text-decoration:none;text-align:center;overflow-wrap:anywhere}
.social-btn:hover{text-decoration:none}
.social-logo{flex:none}
.social-google{background:#FFFFFF;border-color:#747775;color:#1F1F1F}
.social-google:hover{background:#F2F2F2;color:#1F1F1F}
.social-apple{background:#000000;border-color:#000000;color:#FFFFFF}
.social-apple:hover{background:#333333;border-color:#333333;color:#FFFFFF}
@media (prefers-color-scheme:dark){
  .social-google{background:#131314;border-color:#8E918F;color:#E3E3E3}
  .social-google:hover{background:#2A2A2C;color:#E3E3E3}
  .social-apple{background:#FFFFFF;border-color:#FFFFFF;color:#000000}
  .social-apple:hover{background:#E6E6E6;border-color:#E6E6E6;color:#000000}
}
/* « Comptes liés » de « Mon compte » : une ligne par compte, le bouton à droite, dessous sur un écran étroit */
.linked{list-style:none;margin:0;padding:0}
.linked li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 0;
  border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.linked li:first-child{padding-top:0}
.linked li>span{min-width:0;flex:1 1 220px}

/* ---------- Offres Doty (Free, Premium, Pro) ----------
   Page Facturation : trois cartes côte à côte, l'une sous l'autre sur téléphone ; l'offre
   actuelle encadrée comme un choix coché. « Choisir cette offre » ouvre sa confirmation. */
.plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:6px 0 18px}
.plan{border:1px solid var(--line);border-radius:var(--radius-tile);padding:16px 16px 18px;min-width:0;overflow-wrap:anywhere}
.plan.is-current{border-color:var(--terracotta-deep);background:var(--tile);box-shadow:inset 0 0 0 1px var(--terracotta-deep)}
.plan h3{margin:0 0 6px;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.plan-price{margin:0;font-size:1.5rem;line-height:1.2;font-weight:900;color:var(--terracotta)}
.plan-price small{font-size:.85rem;font-weight:700;color:var(--muted)}
.plan ul{margin:10px 0 14px;padding-left:1.1rem}
.plan li{margin:4px 0}
details.choose>summary{list-style:none}
details.choose>summary::-webkit-details-marker{display:none}
details.choose[open]>summary{margin-bottom:10px}
details.choose form p{margin:0 0 8px}
/* Colonne « Offre » des commerces et des relevés de la plateforme : intitulé devant sur tablette */
@media (min-width:641px) and (max-width:1219px){
  table.shops td.c-plan::before,table.bills td.c-plan::before{content:attr(data-label) " ";font-size:.7rem;font-weight:900;
    text-transform:uppercase;letter-spacing:.065em;color:var(--muted)}
}
/* Fonction incluse dans Premium et Pro, vue d'un commerce en Free : visible mais désactivée,
   hachurée comme ce qui n'est pas encore disponible (.choice.soon) */
fieldset.locked{border:0;margin:0;padding:0;min-width:0}
fieldset.locked:disabled{color:var(--muted)}
fieldset.locked:disabled :is(input,select,textarea,button,summary){cursor:not-allowed}
fieldset.locked:disabled .btn{opacity:.55}
fieldset.locked:disabled :is(input[type=text],select,textarea){border-style:dashed;
  background:repeating-linear-gradient(-45deg,var(--card) 0 9px,var(--soon-stripe) 9px 18px)}
.choice.locked{color:var(--muted);cursor:not-allowed;border-style:dashed;border-color:var(--field-line);
  background:repeating-linear-gradient(-45deg,var(--card) 0 9px,var(--soon-stripe) 9px 18px)}
.notice-plan{background:var(--tile);border-color:var(--mustard);color:var(--ink)}
/* En Free, un levier encore réglé : une ligne d'explication et son action « Désactiver » */
.lever-off{margin:0 0 14px}
.lever-off .hint{margin:0 0 6px}


/* ---------- Pages publiques (accueil d'un visiteur, clients, commerçants, confidentialité) ----------
   Mise en page templates/public/layout.php : en-tête de navigation, contenu centré sur une
   colonne, pied de page. Téléphone d'abord : la navigation passe sous le logo, en pastilles. */
.site-top{background:var(--card);border-bottom:1px solid var(--line)}
.site-bar{display:flex;align-items:center;gap:8px 24px;flex-wrap:wrap;max-width:1080px;margin:0 auto;padding:10px 16px}
.site-bar .brand{order:1}
.site-login{order:2;margin-left:auto;display:inline-flex;align-items:center;min-height:44px;padding:6px 18px;
  border:1px solid var(--btn-bg);border-radius:var(--radius-pill);background:var(--btn-bg);color:var(--btn-ink);
  font-weight:800;font-size:.92rem;text-decoration:none;white-space:nowrap}
.site-login:hover{background:var(--btn-hover-bg);border-color:var(--btn-hover-bg);color:var(--btn-hover-ink)}
.site-nav{order:3;flex:1 1 100%}
.site-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.site-nav a{display:inline-flex;align-items:center;min-height:40px;padding:6px 14px;border-radius:var(--radius-pill);
  color:var(--ink);text-decoration:none;font-weight:700}
.site-nav a:hover{background:var(--surface)}
.site-nav a[aria-current="page"]{background:var(--terracotta-deep);color:var(--on-accent)}
@media (min-width:761px){
  .site-bar{flex-wrap:nowrap;padding:14px 24px}
  .site-nav{order:2;flex:1 1 auto}
  .site-nav ul{justify-content:center}
  .site-login{order:3;margin-left:0}
}

.site-main{max-width:1080px;margin:0 auto;padding:24px 16px 48px}
@media (min-width:761px){
  .site-main{padding:40px 24px 64px}
}
.site-section{margin-bottom:40px}
.site-h2{font-size:1.6rem;font-weight:900;margin:0 0 .9rem}
.site-intro{color:var(--muted);max-width:44rem}
.kicker{margin:0 0 6px;color:var(--terracotta-deep);font-weight:900;font-size:.8rem;text-transform:uppercase;letter-spacing:.12em}

/* Bandeau d'ouverture : filet terracotta et moutarde, comme la carte de connexion */
.hero{position:relative;overflow:hidden;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-card);
  padding:32px 22px 28px;margin-bottom:40px;box-shadow:var(--shadow);text-align:center}
.hero::before{content:"";position:absolute;left:0;right:0;top:0;height:6px;
  background:linear-gradient(90deg,var(--terracotta) 0 70%,var(--mustard) 70% 100%)}
.hero h1{font-size:2rem;max-width:36rem;margin-left:auto;margin-right:auto}
.hero-logo{margin:0 0 16px}
.hero-logo img{display:inline-block;width:auto;height:60px;max-width:100%}
.hero-lead{color:var(--muted);font-size:1.08rem;max-width:40rem;margin:0 auto 4px}
.hero-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:0 12px;margin:0}
.hero-small{text-align:left}
.hero-small h1,.hero-small .hero-lead{margin-left:0}
.hero-small .hero-actions{justify-content:flex-start}
@media (min-width:761px){
  .hero{padding:48px 40px 40px}
  .hero h1{font-size:2.6rem}
  .hero-logo img{height:72px}
}

/* Étapes numérotées : une colonne sur téléphone, côte à côte au-delà */
.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:14px;counter-reset:step}
.steps>li{position:relative;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-tile);
  padding:18px 18px 16px 70px;counter-increment:step;min-width:0;overflow-wrap:break-word}
.steps>li::before{content:counter(step);position:absolute;left:18px;top:16px;width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;background:var(--terracotta-deep);color:var(--on-accent);font-weight:900}
.steps h3,.features h3{margin:0 0 4px;font-size:1.05rem;font-weight:800}
.steps p,.features p{margin:0;color:var(--muted)}
.steps-plain>li{background:var(--surface);border-color:transparent}
@media (min-width:761px){
  .steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .steps-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1000px){
  .steps-4{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* Atouts en tuiles chaudes, avec le petit trait moutarde des chiffres du tableau de bord */
.features{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}
.features>li{background:var(--tile);border-radius:var(--radius-tile);padding:18px;min-width:0;overflow-wrap:break-word}
.features>li::before{content:"";display:block;width:26px;height:5px;border-radius:var(--radius-pill);background:var(--mustard);margin-bottom:12px}

/* Deux cartes côte à côte (clients, commerçants), l'une sous l'autre sur téléphone */
.split{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px}
.split-card{margin-bottom:0}
.site-cta{text-align:center}
.site-cta p{max-width:40rem;margin-left:auto;margin-right:auto}

.merchant-list{list-style:none;margin:0 0 12px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:8px}
.merchant-list li{padding:10px 14px;border:1px solid var(--line);border-radius:var(--radius-field);min-width:0;overflow-wrap:break-word}
.merchant-city{display:block;color:var(--muted);font-size:.9rem}
.soon-stores{font-weight:800;font-size:1.1rem}

/* Questions fréquentes : chaque question s'ouvre au clic, sans script */
.faq{display:grid;gap:10px}
.faq details{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-tile);padding:0 18px}
.faq summary{cursor:pointer;padding:12px 0;font-weight:800;min-height:44px}
.faq details[open] summary{border-bottom:1px solid var(--line);margin-bottom:10px}
.faq details p{color:var(--muted)}

.plans-public .plan{background:var(--card)}

/* Champ piège du formulaire de contact : hors de l'écran pour une personne, rempli par un robot */
.contact{position:relative}
.trap{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}

/* La politique de confidentialité, plus large qu'une carte de connexion */
.site .legal{max-width:760px}

.site-foot{border-top:1px solid var(--line);background:var(--card);color:var(--muted);font-size:.9rem}
.site-foot-in{max-width:1080px;margin:0 auto;padding:20px 16px 28px}
.site-foot p{margin:0 0 6px}

/* ---------- Demandes de contact (plateforme) ---------- */
.contact-requests{list-style:none;margin:0;padding:0}
.contact-request{padding:16px 0;border-bottom:1px solid var(--line);overflow-wrap:break-word}
.contact-request:first-child{padding-top:0}
.contact-request.is-handled{color:var(--muted)}
.contact-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-bottom:4px}
.contact-head h2{margin:0;font-size:1.1rem}
.contact-city{font-weight:600;color:var(--muted);font-size:.95rem}
.contact-meta{margin:0 0 8px}
.contact-message{background:var(--surface);border-radius:var(--radius-field);padding:10px 14px}

/* ---------- Commandes et créneaux de retrait ---------- */
.pickup-slots .slot-capacity{display:inline-flex;align-items:center;gap:4px}
.pickup-slots .slot-capacity input{width:4.5rem;min-height:var(--act);margin:0;padding:4px 8px}
.pickup-slots .slot-text .tag{margin-left:6px}
.orders-day{margin:26px 0 0;font-size:1.15rem}
.orders-day:first-of-type{margin-top:8px}
.orders-slot .sub{font-weight:600;color:var(--muted)}
.print-only{display:none}

/* La page Commandes s'imprime : ni en-tête, ni menu, ni filtres, ni actions ; des lignes qui ne se coupent pas. */
@media print{
  .top,.menu,.no-print,.notice-ok{display:none !important}
  .print-only{display:block;color:#000}
  body{background:#fff;color:#000}
  .shell{display:block;max-width:none;padding:0}
  .card{border:0;box-shadow:none;padding:0;background:#fff}
  .orders-sheet table{width:100%;border-collapse:collapse}
  .orders-sheet tr{break-inside:avoid}
  .orders-sheet th,.orders-sheet td{border-bottom:1px solid #999;padding:4px 6px;color:#000}
  .orders-slot{break-after:avoid}
  .tag{background:none !important;border:1px solid #666;color:#000}
}

/* « Mes clients » : les tranches d'âge, cases à cocher côte à côte dans les filtres */
.bands{border:0;margin:0;padding:0;min-width:0;flex:1 1 100%}
.bands legend{font-weight:700;font-size:.95rem;padding:0;margin-bottom:6px}
.bands label{display:inline-flex;align-items:center;gap:6px;font-weight:400;margin:0 16px 6px 0}
