/* =====================================================================
   Composants — chrome type Adobe : rail d'icônes, barre de commandes,
   panneau d'inspection à droite, barre d'état. Densité compacte.
   ===================================================================== */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  background: var(--gray-50);
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.muted { color: var(--gray-600); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- Shell */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  /* Sans ligne de grille bornée, l'unique ligne implicite s'étire au contenu
     de .main (qui devient alors plus haut que la fenêtre) au lieu de rester
     à la hauteur de .shell : plus aucun enfant ne peut faire défiler, et le
     bas des pages devient inaccessible. Le bloc mobile plus bas fixait déjà
     ça pour son propre grid-template-rows ; on l'aligne ici pour le rendu
     ordinateur. */
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  transition: padding-right .16s ease;
}
body.panel-open .shell { padding-right: var(--panel-w); }

.rail {
  background: var(--rail-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-3) 0;
  gap: var(--sp-1);
  z-index: 20;
}
.rail .brand {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-size: 18px; margin-bottom: var(--sp-3);
  transition: background .16s ease;
}
.rail-btn {
  width: 60px; height: auto; padding: 10px 0; border: 0; border-radius: 12px;
  background: transparent; color: #8a93a0;
  display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative;
  font-size: 17px; line-height: 1;
}
.rail-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.rail-btn.active { background: var(--accent); color: var(--on-accent); }
.rail-btn .lbl {
  position: static; opacity: 1; translate: none;
  background: none; border: 0; padding: 0; box-shadow: none;
  font-size: 10px; font-weight: 600; color: inherit; white-space: nowrap;
}

/* min-height:0 opte cet enfant de grille hors de la taille minimale
   automatique basée sur son contenu : c'est ce qui laisse .canvas (flex:1;
   overflow:auto) réellement se limiter à la hauteur disponible et défiler,
   au lieu que .main grandisse indéfiniment avec le contenu de la page. */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ------------------------------------------------------ Barre de commandes */
.cmdbar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-3);
  height: 44px; flex: 0 0 44px;
  background: var(--gray-75);
  border-bottom: 1px solid var(--gray-300);
}
.cmdbar .title { font-size: 13px; font-weight: 700; letter-spacing: .1px; }
.cmdbar .sub { font-size: 11.5px; color: var(--gray-600); }
.cmdbar .sep { width: 1px; height: 22px; background: var(--gray-300); }
.cmdbar .titleblock { display: flex; flex-direction: column; line-height: 1.25; }

.canvas { flex: 1; overflow: auto; padding: var(--sp-4); }

.statusbar {
  display: flex; align-items: center; gap: var(--sp-4);
  height: 26px; flex: 0 0 26px; padding: 0 var(--sp-3);
  background: var(--gray-75); border-top: 1px solid var(--gray-300);
  font-size: 11.5px; color: var(--gray-600);
}
.statusbar b { color: var(--gray-800); font-weight: 600; }
.statusbar .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* -------------------------------------------------------------- Boutons */
.btn {
  height: var(--ctrl-h); padding: 0 var(--sp-3);
  border-radius: var(--r-2); border: 1px solid transparent;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 12.5px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { background: var(--accent-down); }
.btn.secondary { background: transparent; color: var(--gray-800); border-color: var(--gray-400); }
.btn.secondary:hover { background: var(--gray-100); border-color: var(--gray-500); }
.btn.quiet { background: transparent; color: var(--gray-700); }
.btn.quiet:hover { background: var(--gray-100); color: var(--gray-800); }
.btn.negative { background: var(--neg); color: #fff; }
.btn.negative:hover { filter: brightness(1.08); }
.btn.positive { background: var(--pos); color: #fff; }
.btn.positive:hover { filter: brightness(1.08); }
.btn.sm { height: 22px; padding: 0 8px; font-size: 11.5px; border-radius: var(--r-1); }
.btn.lg { height: 50px; font-size: 15px; border-radius: 13px; box-shadow: 0 8px 20px var(--accent-shadow); }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.iconbtn {
  width: var(--ctrl-h); height: var(--ctrl-h);
  border-radius: var(--r-2); border: 1px solid var(--gray-400);
  background: transparent; color: var(--gray-800);
  display: grid; place-items: center; font-size: 14px; line-height: 1;
}
.iconbtn:hover { background: var(--gray-100); }

/* Contrôle segmenté */
.seg {
  display: inline-flex; background: var(--gray-100);
  border: 1px solid var(--gray-300); border-radius: var(--r-2); padding: 2px; gap: 2px;
}
.seg button {
  border: 0; background: transparent; color: var(--gray-600);
  padding: 0 10px; height: 22px; border-radius: var(--r-1);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.seg button:hover { color: var(--gray-800); }
.seg button.active { background: var(--accent); color: var(--on-accent); }

/* --------------------------------------------------------------- Champs */
.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: var(--sp-3); }
.field > label, .flabel {
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase; color: var(--gray-600);
}
input[type="text"], input[type="tel"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="email"], select, textarea {
  height: var(--ctrl-h); padding: 0 8px;
  background: var(--gray-100); color: var(--gray-800);
  border: 1px solid var(--gray-400); border-radius: var(--r-2);
  width: 100%; outline: none;
}
textarea { height: auto; padding: 6px 8px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}
input::placeholder { color: var(--gray-500); }
select { appearance: none; padding-right: 22px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gray-600) 50%),
                    linear-gradient(135deg, var(--gray-600) 50%, transparent 50%);
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-2); }
.check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.check input { width: 14px; height: 14px; accent-color: var(--accent); }

/* Sélecteur de jours (créneaux récurrents) : cases à cocher stylées en puces,
   pour choisir plusieurs jours d'un coup au lieu de rejouer tout le
   formulaire par jour. */
.daypicker { display: flex; flex-wrap: wrap; gap: 6px; }
.daychip {
  position: relative; display: inline-flex; align-items: center;
  height: var(--ctrl-h); padding: 0 12px; border-radius: var(--r-2);
  border: 1px solid var(--gray-400); background: var(--gray-100);
  color: var(--gray-700); font-size: 12.5px; font-weight: 600;
  cursor: pointer; user-select: none;
}
.daychip input { position: absolute; opacity: 0; pointer-events: none; }
.daychip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.daychip.all { font-weight: 700; }

/* ------------------------------------------------------------- Panneau */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel-w);
  background: var(--gray-75); border-left: 1px solid var(--gray-300);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .16s ease;
  z-index: 60; box-shadow: var(--shadow-2);
}
.panel.open { transform: none; }
.panel > header {
  padding: var(--sp-3); border-bottom: 1px solid var(--gray-300);
  display: flex; align-items: flex-start; gap: var(--sp-2);
}
.panel > header .p-title { font-size: 14px; font-weight: 700; }
.panel > header .p-sub { font-size: 11.5px; color: var(--gray-600); margin-top: 1px; }
.panel .body { padding: var(--sp-3); overflow-y: auto; flex: 1; }
.panel .x {
  width: 24px; height: 24px; border: 0; border-radius: var(--r-1);
  background: transparent; color: var(--gray-600); font-size: 14px; line-height: 1;
}
.panel .x:hover { background: var(--gray-200); color: var(--gray-800); }

.scrim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .16s; z-index: 50;
}
.scrim.open { opacity: 1; pointer-events: auto; }
@media (min-width: 901px) { .scrim.open { opacity: 0; pointer-events: none; } }

.section-t {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--gray-600); margin: var(--sp-4) 0 var(--sp-2);
  padding-bottom: 4px; border-bottom: 1px solid var(--gray-300);
}
.section-t:first-child { margin-top: 0; }

/* --------------------------------------------------- Boîtes de message */
.hint { font-size: 11.5px; color: var(--gray-600); margin: var(--sp-1) 0; }
.errbox, .warnbox, .okbox {
  border-radius: var(--r-2); padding: 8px 10px; font-size: 12px;
  border: 1px solid; margin: var(--sp-2) 0;
}
.errbox { background: var(--neg-bg); border-color: var(--neg); }
.warnbox { background: var(--warn-bg); border-color: var(--warn); }
.okbox { background: var(--pos-bg); border-color: var(--pos); }

.alerts { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-3); }
.alert {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  background: var(--neg-bg); border: 1px solid var(--neg);
  border-radius: var(--r-2); padding: 6px 10px;
}
.alert.warn { background: var(--warn-bg); border-color: var(--warn); }
.alert .k { font-weight: 700; flex-shrink: 0; }
/* Le texte doit pouvoir se réduire et passer à la ligne : sans min-width:0,
   un flex item déborde plutôt que de wrapper (défaut CSS peu intuitif). */
.alert > span:not(.k):not(.spacer) { min-width: 0; }
.alert .alert-conv {
  height: 24px; width: auto; max-width: 200px; font-size: 12px;
  border-color: var(--neg); flex-shrink: 0;
}

.badge {
  display: inline-block; padding: 1px 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  border: 1px solid var(--gray-400); color: var(--gray-600);
}
.badge.confirme { border-color: var(--pos); color: var(--pos); }
.badge.demande { border-color: var(--warn); color: var(--warn); border-style: dashed; }
.badge.refuse { border-color: var(--neg); color: var(--neg); }
.badge.role { border-color: var(--accent); color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 40px; translate: -50% 12px;
  background: var(--gray-100); border: 1px solid var(--gray-400);
  color: var(--gray-800); padding: 8px 14px; border-radius: var(--r-2);
  box-shadow: var(--shadow-2); font-size: 12.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .16s, translate .16s; z-index: 90;
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast.err { border-color: var(--neg); background: var(--neg-bg); }

/* ------------------------------------------------- Login (C1 du handoff) */
.login-wrap {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  background: #0b2f5c; overflow: hidden;
}
/* 96px dans le design = 60px de zone d'état iOS + 36px de marge. */
.login-hero {
  padding: max(96px, calc(env(safe-area-inset-top) + 36px)) 30px 0;
  position: relative; flex-shrink: 0; color: #fff;
}
/* Câble et cabine : décor du design, purement visuel. */
.login-cable {
  position: absolute; top: 150px; left: -40px; right: -40px; height: 1px;
  background: rgba(255, 255, 255, .28); transform: rotate(-9deg);
}
.login-cab {
  position: absolute; top: 132px; left: 212px; width: 34px; height: 26px;
  border-radius: 6px; background: #2680eb; box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}
.login-gap { height: 74px; }
.login-tag { font: 600 11px/1 var(--mono); letter-spacing: .14em; color: #7fb2f5; }
.login-hero h1 {
  margin: 12px 0 6px; font: 700 34px/1.1 var(--font); letter-spacing: -.5px; color: #fff;
}
.login-hero .tag {
  margin: 0; font: 400 15px/1.5 var(--font); color: rgba(255, 255, 255, .66);
}
.login-card {
  margin-top: auto; width: 100%; max-width: 480px; margin-left: auto; margin-right: auto;
  background: #fff; border-radius: 26px 26px 0 0;
  padding: 26px 24px max(34px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}
.login-block { display: flex; flex-direction: column; gap: 9px; }
.login-block.ident { gap: 8px; }
.login-lbl {
  font: 600 10px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase;
  color: #8a93a0;
}
.login-lbl .hint {
  font: 400 11px/1 var(--font); letter-spacing: 0; text-transform: none; color: #8a93a0;
}
/* Pavé PIN : 6 cases, l'input réel reste dans le flux (clavier numérique du
   téléphone, gestion du collage) mais invisible — les cases le reflètent. */
.login-pin { position: relative; }
.login-cells { display: flex; gap: 10px; }
.login-cell {
  flex: 1; height: 56px; border: 1.5px solid #cfd5dd; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font: 600 26px/1 var(--mono); color: #10151b;
}
.login-cell.on { border: 2px solid var(--accent); background: #eaf2fe; }
.login-pin input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  border: 0; background: none; font-size: 16px; padding: 0; margin: 0;
}
.login-ident {
  height: 52px; border: 1.5px solid #e4e7ec; background: #f6f7f9; border-radius: 12px;
  padding: 0 14px; font: 400 16px/1 var(--font); color: #10151b; width: 100%; outline: none;
}
.login-ident::placeholder { color: #9aa3af; }
.login-ident:focus { border-color: var(--accent); }
.login-btn {
  height: 56px; border: 0; border-radius: 14px; background: var(--accent); color: #fff;
  font: 600 17px/1 var(--font); box-shadow: 0 8px 20px rgba(38, 128, 235, .32);
  display: flex; align-items: center; justify-content: center; width: 100%;
}
.login-btn:hover { background: var(--accent-hover); }
.login-note {
  font: 400 12.5px/1.5 var(--font); color: #8a93a0; text-align: center; margin: 0;
}

/* ------------------------------------------------------ Jauges & mètres */
.meter { height: 4px; border-radius: 2px; background: var(--gray-300); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--pos); border-radius: 2px; }
.meter.mid > i { background: var(--warn); }
.meter.full > i { background: var(--neg); }

/* --------------------------------------------------------------- Gantt */
.gantt {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); overflow-x: auto;
}
/* Largeur posée en ligne par le JS (échelle px/minute) pour que chaque
   barre soit dimensionnée à sa vraie durée — cf. GANTT_INNER_PX. */
.gantt-inner { min-width: 860px; }
.g-head, .g-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); }
.g-head { border-bottom: 1px solid var(--gray-300); background: var(--gray-100); }
.g-row { border-bottom: 1px solid var(--gray-200); }
.g-row:last-child { border-bottom: 0; }
.daycell { padding: 8px 10px; border-right: 1px solid var(--gray-300); position: relative; }
.daycell .dow { font-weight: 700; font-size: 12.5px; text-transform: capitalize; }
.daycell .dnum { font-size: 11px; color: var(--gray-600); }
.daycell.ext { box-shadow: inset 3px 0 0 var(--accent-line); }
.daycell.today { background: var(--accent-soft); }
.track { position: relative; height: 62px; }
.g-head .track { height: 26px; }
.track .tick {
  position: absolute; top: 6px; font-size: 10.5px; color: var(--gray-500);
  border-left: 1px solid var(--gray-300); padding-left: 4px; height: 16px;
}
.g-row .track::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 6 - 1px),
              var(--gray-200) calc(100% / 6 - 1px), var(--gray-200) calc(100% / 6));
}
.bar {
  /* largeur/position posées en ligne par le JS, proportionnelles à la vraie
     durée (heure_debut → heure_fin) — la barre s'arrête au bon endroit */
  position: absolute; top: 8px; height: 46px;
  border-radius: var(--r-2); border: 1px solid var(--gray-400);
  background: var(--gray-100); padding: 4px 7px; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  overflow: hidden;
  transition: transform .1s, border-color .12s;
}
.bar:hover { transform: translateY(-1px); border-color: var(--accent); }
.bar.empty { border-style: dashed; opacity: .72; }
.bar.low { border-color: var(--pos); background: var(--pos-bg); }
.bar.mid { border-color: var(--warn); background: var(--warn-bg); }
.bar.full { border-color: var(--neg); background: var(--neg-bg); }
.bar.demande { border-style: dashed; }
.bar.warn { box-shadow: 0 0 0 1px var(--neg) inset; }
/* Créneau hors modèle habituel (créé via une demande exceptionnelle) : le
   pointillé seul est ambigu (déjà utilisé par .empty et .demande pour autre
   chose) — la couleur d'accent + l'icône 🚨 dans .b-top lèvent l'ambiguïté. */
.bar.hors-modele { border-style: dashed; border-width: 2px; border-color: var(--accent); }
.slotrow.hors-modele { border-style: dashed; border-color: var(--accent); }
.ticket.hors-modele { border-style: dashed; border-color: var(--accent); }
.bar .b-top { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-600); }
.bar .occ { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar .conv { font-size: 10.5px; color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .tag-conv-missing { color: var(--neg); font-weight: 700; }
.arrow.up { color: var(--montee); font-weight: 800; }
.arrow.down { color: var(--descente); font-weight: 800; }

.legend {
  display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center;
  margin-bottom: var(--sp-3); font-size: 11.5px; color: var(--gray-600);
}
.legend .sw { display: inline-flex; align-items: center; gap: 5px; }
.legend .dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------- Billets */
.tk-board { display: grid; grid-template-columns: repeat(7, minmax(158px, 1fr)); gap: var(--sp-2); }
.tk-col {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); display: flex; flex-direction: column; min-width: 0;
}
.tk-col.ext { border-top: 2px solid var(--accent); }
.tk-col.today { box-shadow: 0 0 0 1px var(--accent) inset; }
.tk-col-head { padding: 8px 10px; border-bottom: 1px solid var(--gray-300); position: relative; }
.tk-col-head .dow { font-weight: 700; font-size: 12px; text-transform: capitalize; }
.tk-col-head .dnum { font-size: 11px; color: var(--gray-600); }
.tk-col-head .badge-ext { font-size: 10px; color: var(--accent); font-weight: 700; }
.tk-add {
  position: absolute; top: 7px; right: 7px; width: 20px; height: 20px;
  border: 1px solid var(--gray-400); border-radius: var(--r-1);
  background: transparent; color: var(--gray-600); line-height: 1; font-size: 12px;
}
.tk-add:hover { border-color: var(--accent); color: var(--accent); }
.tk-col-body { padding: var(--sp-2); display: flex; flex-direction: column; gap: 6px; }
.tk-empty { color: var(--gray-500); font-size: 11.5px; text-align: center; padding: 10px 0; }

.ticket {
  display: grid; grid-template-columns: minmax(0, 1fr) 74px;
  background: var(--gray-100); border: 1px solid var(--gray-300);
  border-radius: var(--r-2); overflow: hidden; cursor: pointer;
  transition: border-color .12s, transform .1s;
}
.ticket:hover { border-color: var(--accent); transform: translateY(-1px); }
.ticket.montee { border-left: 3px solid var(--montee); }
.ticket.descente { border-left: 3px solid var(--descente); }
.ticket.demande { border-style: dashed; }
.tk-main { padding: 6px 8px; min-width: 0; }
.tk-head { font-size: 9.5px; letter-spacing: .6px; color: var(--gray-500); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.tk-route { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; margin: 2px 0; }
.tk-route span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-when { font-size: 11px; color: var(--gray-600); }
.tk-pax { font-size: 11.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-nb { color: var(--accent); font-weight: 700; }
.tk-stub {
  border-left: 1px dashed var(--gray-400); background: var(--gray-75);
  padding: 6px; font-size: 10px; color: var(--gray-600);
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0;
}
.tk-stub > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ref { font-weight: 700; color: var(--gray-800); font-family: var(--mono); }
.tk-warn { color: var(--neg); font-weight: 700; }
.ticket.compact { grid-template-columns: 1fr; }
.ticket.compact .tk-stub { display: none; }

.tk-list { display: flex; flex-direction: column; gap: 4px; }
.tkl-row { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.tkl-head { position: sticky; top: 0; background: var(--gray-50); z-index: 5; padding-bottom: 4px; }
.tkl-rowlabel { font-size: 11px; color: var(--gray-500); display: grid; place-items: center; }
.tkl-daycol {
  font-size: 11.5px; font-weight: 700; text-transform: capitalize; text-align: center;
  padding: 5px; background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: var(--r-1);
}
.tkl-daycol.ext { border-color: var(--accent-line); }
.tkl-cell { min-height: 30px; }

/* -------------------------------------------------- Passagers (panneau) */
.pax {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 7px 8px; border: 1px solid var(--gray-300); border-radius: var(--r-2);
  background: var(--gray-100); margin-bottom: 5px;
}
.pax .nm { font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.pax .meta { font-size: 11px; color: var(--gray-600); }
.pax .spc {
  font-weight: 800; font-size: 12px; color: var(--accent);
  font-variant-numeric: tabular-nums; margin-left: auto;
}
.pax-names { margin: 4px 0 0 0; padding-left: 14px; font-size: 11.5px; color: var(--gray-600); }
.pax-names li { margin: 1px 0; }

/* Saisie nominative répétée. Cinq champs sur une ligne ne tiennent pas dans un
   panneau de 360 px : chaque personne occupe trois rangs, le bouton « retirer »
   couvrant la hauteur. */
.paxrow { display: grid; grid-template-columns: 1fr 1fr 22px; gap: 5px; margin-bottom: 5px; }
.paxrow.wide {
  grid-template-columns: 1fr 1fr 28px;
  grid-template-areas: "nom prenom del" "ent tel del" "mail mail del";
  grid-auto-rows: var(--ctrl-h);   /* sinon le rang de l'e-mail se tasse */
  padding-bottom: 7px; margin-bottom: 7px;
  border-bottom: 1px solid var(--gray-200);
}
.paxrow.wide .px-nom { grid-area: nom; }
.paxrow.wide .px-prenom { grid-area: prenom; }
.paxrow.wide .px-ent { grid-area: ent; }
.paxrow.wide .px-tel { grid-area: tel; }
.paxrow.wide .px-mail { grid-area: mail; }
/* Entreprise déjà connue (verrouillée) : la ligne « ent » disparaît, tél/mail
   remontent d'un rang plutôt que de laisser un vide. */
.paxrow.wide.no-ent { grid-template-areas: "nom prenom del" "tel mail del"; }
.paxrow .del {
  border: 1px solid var(--gray-400); background: transparent; color: var(--gray-600);
  border-radius: var(--r-1); height: var(--ctrl-h); font-size: 12px; line-height: 1;
}
.paxrow.wide .del { grid-area: del; height: 100%; }
.paxrow .del:hover { border-color: var(--neg); color: var(--neg); }

/* ------------------------------------------------------- Chalet (nuits) */
.nightplan {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); overflow-x: auto; padding-bottom: var(--sp-2);
}
.np-inner { min-width: 760px; }
.np-head, .np-row { display: grid; grid-template-columns: 190px repeat(7, minmax(0, 1fr)); }
.np-head { border-bottom: 1px solid var(--gray-300); background: var(--gray-100); }
.np-cellhead { padding: 6px 4px; text-align: center; border-left: 1px solid var(--gray-300); }
.np-cellhead .dow { font-size: 11.5px; font-weight: 700; text-transform: capitalize; }
.np-cellhead .dnum { font-size: 10.5px; color: var(--gray-600); }
.np-cellhead .occ { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.np-cellhead.ext { box-shadow: inset 0 2px 0 var(--accent-line); }
.np-cellhead.today { background: var(--accent-soft); }
.np-corner { padding: 6px 10px; font-size: 11px; color: var(--gray-600); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.np-row { border-bottom: 1px solid var(--gray-200); min-height: 40px; }
.np-row:last-child { border-bottom: 0; }
.np-label { padding: 6px 10px; border-right: 1px solid var(--gray-300); min-width: 0; }
.np-label .nm { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-label .meta { font-size: 10.5px; color: var(--gray-600); }
.np-cell { border-left: 1px solid var(--gray-200); position: relative; }
.np-bar {
  position: absolute; inset: 6px 0; background: var(--accent-soft);
  border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent);
  cursor: pointer; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--accent);
}
.np-bar.start { border-left: 1px solid var(--accent); border-radius: var(--r-2) 0 0 var(--r-2); margin-left: 3px; }
.np-bar.end { border-right: 1px solid var(--accent); border-radius: 0 var(--r-2) var(--r-2) 0; margin-right: 3px; }
.np-bar.demande { border-style: dashed; }
.np-bar:hover { filter: brightness(1.25); }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-2); }
.room {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); padding: var(--sp-3);
}
.room .nm { font-weight: 700; font-size: 13px; }
.room .cap { font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.room.off { opacity: .5; }

/* ---------------------------------------------- Plan de sièges (chambres/lits) */
/* Plan des lits — une chambre par ligne, pastilles nommées (écran C5). */
.seat-room {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: 14px; padding: 13px 14px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.seat-room-head { display: flex; align-items: center; justify-content: space-between; }
.seat-room .nm { font: 600 13.5px/1 var(--font); color: var(--gray-900); }
.seat-room .libres { font: 400 11.5px/1 var(--mono); color: #8a93a0; }
.seat-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.seat {
  width: 52px; height: 44px; border-radius: 10px; border: 1.5px solid var(--gray-400);
  background: var(--gray-75); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; transition: border-color .1s;
}
.seat .n { font: 600 12px/1 var(--mono); color: var(--gray-900); }
.seat .e { font: 400 8.5px/1 var(--mono); color: #8a93a0; }
.seat.libre:hover { border-color: var(--accent); }
.seat.pris {
  background: var(--gray-200); border-color: var(--gray-200); cursor: not-allowed;
}
.seat.pris .n, .seat.pris .e { color: var(--gray-500); }
.seat.choisi { background: var(--accent); border-color: var(--accent); }
.seat.choisi .n { color: #fff; }
.seat.choisi .e { color: rgba(255, 255, 255, .8); }
/* Le lit de la personne en cours de saisie : liseré plus marqué. */
.seat.actif { box-shadow: 0 0 0 2px var(--accent-soft); }

/* Ligne « personne » du séjour, comme .paxrow.wide mais avec un indicateur de
   lit à la place d'un champ de saisie de plus — cliquable pour l'activer. */
.seatrow {
  display: grid; grid-template-columns: 1fr 1fr 28px; gap: 5px; margin-bottom: 7px;
  padding: 6px; border-radius: var(--r-2); border: 1px solid transparent; cursor: pointer;
}
.seatrow.actif { border-color: var(--accent); background: var(--accent-soft); }
.seatrow .seat-lit { grid-column: 1 / -2; font-size: 11px; color: var(--gray-700); padding: 2px 0; }
.seatrow .del { grid-row: 1 / 4; }

.reglement-box {
  max-height: 220px; overflow-y: auto; border: 1px solid var(--gray-400);
  border-radius: var(--r-2); padding: var(--sp-2); background: var(--gray-100);
  font-size: 12px; line-height: 1.6; white-space: pre-wrap;
}

.card {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); padding: var(--sp-3); margin-bottom: var(--sp-2);
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: var(--accent); }
.card .ttl { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.card .meta { font-size: 11.5px; color: var(--gray-600); margin-top: 2px; }

.kpis { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.kpi {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-2); padding: 6px 12px; min-width: 92px;
}
.kpi .v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-600); }

/* -------------------------------------------------------------- Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--gray-600); font-weight: 700; padding: 6px 8px;
  border-bottom: 1px solid var(--gray-300); position: sticky; top: 0; background: var(--gray-50);
}
.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.tbl tr.off td { opacity: .5; }
/* `width:100%` (règle globale des champs) écrase la largeur naturelle de
   chaque contrôle par la largeur de sa cellule — et comme les cellules n'ont
   pas de contenu propre pour se dimensionner (l'auto-layout ne "voit" pas la
   valeur d'un input), le tableau s'écrase à son `min-width` plancher et
   chaque champ finit à ~40px, illisible. `width:auto` restaure la taille
   naturelle du contrôle (le tableau s'élargit et défile dans sa carte comme
   prévu) au lieu de comprimer le texte qu'il contient. */
.tbl input, .tbl select { height: 24px; width: auto; min-width: 64px; }
.tbl .actions { display: flex; gap: 4px; justify-content: flex-end; }

/* `overflow-x:auto` + `flex-wrap:nowrap` dès le bureau : avec assez d'onglets
   (Notifications en a ajouté un 7e), la rangée ne tient plus dans le panneau
   et doit défiler plutôt que réduire ou faire déborder ses boutons. */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--gray-300); margin-bottom: var(--sp-3);
  /* `overflow-y: hidden` explicite : sans lui, la spec CSS force cet axe à
     `auto` dès que overflow-x n'est pas `visible`, et le bandeau devient
     scrollable verticalement aussi (constaté sur mobile). */
  overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap;
}
.tabs button {
  border: 0; background: transparent; color: var(--gray-600);
  padding: 7px 12px; font-size: 12.5px; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  flex: 0 0 auto; white-space: nowrap;
}
.tabs button:hover { color: var(--gray-800); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------- Vue « Jours » / « Nuits » (mobile) */
.daycard {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); margin-bottom: var(--sp-2); overflow: hidden;
}
.daycard.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.daycard.ext { border-left: 3px solid var(--accent-line); }
.dc-head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 8px 10px; background: var(--gray-100); border-bottom: 1px solid var(--gray-300);
}
.dc-head .dow { font-weight: 700; font-size: 13px; text-transform: capitalize; }

.slotrow {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; background: transparent; border: 0;
  border-bottom: 1px solid var(--gray-200); text-align: left; color: inherit;
}
.slotrow:last-child { border-bottom: 0; }
.slotrow:active { background: var(--gray-100); }
.slotrow .h { font-weight: 700; font-variant-numeric: tabular-nums; width: 40px; }
.slotrow .lbl { flex: 1; min-width: 0; font-size: 12.5px; }
.slotrow .cv {
  display: block; font-size: 11px; color: var(--gray-600);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slotrow .occ { font-weight: 800; font-variant-numeric: tabular-nums; }
.slotrow.full { background: var(--neg-bg); }
.slotrow.mid { background: var(--warn-bg); }

.daysep {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--gray-600); margin: var(--sp-3) 0 var(--sp-1);
}
.daysep:first-child { margin-top: 0; }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 900px) {
  body.panel-open .shell { padding-right: 0; }
  .panel { width: min(440px, 100%); }
  .tk-board { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .canvas { padding: var(--sp-3); }
  .row3 { grid-template-columns: 1fr 1fr; }
}

/* ---- Mobile : le rail passe en barre d'onglets basse ---- */
@media (max-width: 760px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .rail {
    grid-row: 2; flex-direction: row; justify-content: space-around;
    width: 100%; height: auto; padding: 6px 2px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    background: var(--gray-75); border-top: 1px solid var(--gray-300);
  }
  .rail .spacer { display: none; }
  .rail-btn {
    width: auto; flex: 1; height: 44px; flex-direction: column; gap: 4px;
    font-size: 15px; padding: 0 2px; min-width: 0;
    background: transparent; color: var(--gray-500);
  }
  .rail-btn.active { background: transparent; color: var(--accent); }
  .rail-btn .ic { line-height: 1; }
  .rail-btn .lbl {
    font-size: 10.5px; font-weight: 600; color: inherit;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }

  .main { grid-row: 1; min-height: 0; }
  .statusbar { display: none; }          /* la place verticale est trop précieuse */

  .cmdbar.stacked {
    height: auto; flex: 0 0 auto; flex-direction: column;
    align-items: stretch; gap: 0; padding: 0;
  }
  .cmdrow {
    display: flex; align-items: center; gap: var(--sp-2);
    padding: 5px var(--sp-3); min-height: 40px;
  }
  .cmdrow.tools {
    border-top: 1px solid var(--gray-200); gap: var(--sp-2);
    overflow-x: auto; scrollbar-width: none;
  }
  .cmdrow.tools::-webkit-scrollbar { display: none; }
  .cmdrow.tools > .btn, .cmdrow.tools > .seg { flex-shrink: 0; }
  /* flex:0 0 auto (pas flex:1) : les boutons gardent leur largeur naturelle
     et ne s'écrasent jamais sous leur texte — s'ils ne tiennent pas tous,
     .cmdrow.tools défile horizontalement (overflow-x:auto ci-dessus) au
     lieu de faire chevaucher leur libellé sur les boutons voisins. */
  .cmdrow .seg { flex: 0 0 auto; }
  .cmdrow .seg button { flex: 0 0 auto; }
  .weeklbl .title { font-size: 12px; }
  .weeklbl .sub { font-size: 10.5px; }

  .canvas { padding: var(--sp-2); }
  .tk-board { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .rooms { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .kpis .kpi { flex: 1; min-width: 0; }
  .paxrow.wide { grid-template-columns: 1fr 1fr 32px; }
  .legend { gap: var(--sp-2); font-size: 11px; }
  /* Les tableaux de Paramètres défilent dans leur carte, jamais la page. */
  .card > .tbl, .tbl { min-width: 560px; }
  /* overflow-x/flex-wrap/white-space déjà posés dans la règle de base ;
     seule la barre de défilement (inutile au doigt) est masquée ici. */
  .tabs { scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
}

/* ---- Doigt plutôt que souris : cibles plus grandes, pas de zoom iOS ----
   Deux déclencheurs : un écran étroit (presque toujours un téléphone) OU un
   pointeur grossier (tablette, écran tactile de bureau). */
@media (max-width: 760px), (pointer: coarse) {
  :root { --ctrl-h: 38px; }
  input[type="text"], input[type="tel"], input[type="password"],
  input[type="number"], input[type="date"], select, textarea {
    font-size: 16px;      /* < 16px déclenche un zoom automatique sur iOS */
  }
  .btn { height: 36px; padding: 0 14px; }
  .btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
  .seg button { height: 30px; }
  .iconbtn { width: 36px; height: 36px; }
  .panel .x { width: 34px; height: 34px; font-size: 16px; }
  .tk-add { width: 28px; height: 28px; }
  .paxrow .del { height: var(--ctrl-h); }
  .check input { width: 18px; height: 18px; }
  .tbl input, .tbl select { height: 32px; }
}

/* Le panneau doit dégager la barre d'onglets et l'encoche. */
@media (max-width: 760px) {
  .panel .body { padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom)); }
}

/* =====================================================================
   Appli mobile client (rôle externe) — écrans dédiés du handoff de design
   (C1-C6) : coquille plein écran, pas de rail/panneau. Préfixe `c-`.
   ===================================================================== */
.capp { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--gray-50); }
/* Chrome rend les conteneurs défilables focusables au clavier et leur dessine
   un anneau de focus : sur une zone de contenu plein écran, c'est un cadre bleu
   parasite qui n'existe pas dans le design. Le défilement reste possible. */
.cscreen { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; outline: none; }
.c-body { padding: var(--sp-4) 20px 28px; display: flex; flex-direction: column; gap: 16px; max-width: 560px; width: 100%; margin: 0 auto; box-sizing: border-box; }

.c-header {
  padding: max(28px, env(safe-area-inset-top)) 20px 16px; background: var(--gray-75);
  border-bottom: 1px solid var(--gray-300); flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
}
/* En-tête chalet : titre, puis les deux dates, puis la note (design C5). */
.c-header.chalet {
  background: var(--accent-dark); border-bottom: 0;
  flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 16px;
}
.c-header-row { display: flex; align-items: center; gap: 12px; }
.c-header .c-title { font: 600 17px/1.2 var(--font); color: var(--gray-900); }
.c-header.chalet .c-title { color: #fff; }
.c-hi { display: flex; flex-direction: column; gap: 3px; }
.c-hi-hello { font: 400 13px/1 var(--font); color: var(--gray-600); }
.c-hi-name { font: 600 21px/1.2 var(--font); color: var(--gray-900); }
.c-avatar {
  margin-left: auto; width: 42px; height: 42px; border-radius: 21px;
  background: var(--accent-soft); color: var(--accent-down);
  display: grid; place-items: center; font: 600 14px/1 var(--mono);
}
/* `margin-left:auto` pousse l'avatar à droite dans l'en-tête d'accueil ; sur
   une carte où il vient en premier, il doit rester à gauche. */
.c-avatar.lg { width: 52px; height: 52px; border-radius: 26px; font-size: 16px; margin-left: 0; }

.c-back {
  width: 34px; height: 34px; border: 0; border-radius: 10px; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-700);
  font: 500 17px/1 var(--font); display: grid; place-items: center;
}
.c-back.on-accent { background: rgba(255, 255, 255, .16); color: #fff; }

.c-eyebrow { font: 600 10px/1 var(--mono); letter-spacing: .09em; color: #8a93a0; }
.c-eyebrow.on-accent { color: rgba(255, 255, 255, .66); }
/* Sur l'en-tête vert du chalet, le design utilise un vert très clair. */
.c-header.chalet .c-eyebrow.on-accent, .c-header.chalet .c-note.on-accent { color: #a8dcc7; }
.c-eyebrow-row { display: flex; align-items: baseline; justify-content: space-between; }
.c-note { font: 400 12px/1.45 var(--font); color: #8a93a0; }
.c-note.center { text-align: center; }
.c-mono { font: 500 11.5px/1 var(--mono); color: var(--gray-700); }
.c-mono.lg { font-size: 19px; font-weight: 600; }

.c-chip {
  font: 600 9.5px/1 var(--mono); padding: 5px 8px; border-radius: 20px;
  background: var(--gray-200); color: var(--gray-700);
}
.c-chip.pos { background: var(--pos-bg); color: var(--pos); }
.c-chip.neg { background: var(--neg-bg); color: var(--neg); }
.c-chip.neutral { background: var(--gray-100); color: var(--gray-700); }
.c-chip.warn { background: var(--warn-bg); color: var(--warn); }
.c-chip.cabine { background: #eaf2fe; color: #0d66d0; }
.c-chip.chalet { background: #e8f5ef; color: #1f7a5c; }
.c-chip.on-accent { background: rgba(255, 255, 255, .16); color: #fff; font-size: 10.5px; padding: 4px 8px; }

.c-section { display: flex; flex-direction: column; gap: 10px; }
.c-fieldset { display: flex; flex-direction: column; gap: 11px; }
.c-link {
  align-self: flex-start; border: 0; background: none; padding: 2px 0;
  font: 600 12.5px/1 var(--font); color: var(--accent-down);
}

/* ---- Icônes géométriques neutres (placeholders du handoff) ----
   Carré = cabine, losange = chalet, anneau = liste, rond plein = profil. */
.c-ic { display: inline-block; width: 22px; height: 22px; border-radius: 6px; background: currentColor; flex-shrink: 0; box-sizing: border-box; }
.c-ic-diamond { transform: rotate(45deg); width: 20px; height: 20px; border-radius: 4px; }
.c-ic-circle { border-radius: 11px; border: 2.5px solid currentColor; background: none; }
.c-ic-dot { border-radius: 11px; }
.c-ic.accent { color: #2680eb; }
.c-ic.chalet { color: #2d9d78; }
/* Format des deux grandes entrées de l'accueil. */
.c-ic.big { width: 30px; height: 24px; }
.c-ic.big.c-ic-diamond { width: 26px; height: 26px; border-radius: 6px; }

/* ---- Accueil : carte héro + CTA ---- */
.c-hero {
  border-radius: 18px; background: var(--accent-down); padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 14px; cursor: pointer;
  box-shadow: 0 10px 24px rgba(13, 102, 208, .24);
}
.c-hero.empty { align-items: flex-start; gap: 10px; }
.c-hero-top { display: flex; align-items: center; justify-content: space-between; }
.c-hero-time { display: flex; align-items: flex-end; gap: 14px; }
.c-hero-h { font: 600 40px/1 var(--mono); color: #fff; letter-spacing: -1px; }
.c-hero-lbl { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; font: 600 15px/1.2 var(--font); color: #fff; }
.c-hero-lbl .muted2 { font: 400 13px/1.2 var(--font); color: #a9cdfb; }
.c-hero-actions { display: flex; gap: 10px; }
.c-hero-cta {
  flex: 1; height: 46px; border-radius: 11px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 600 15px/1 var(--font); color: var(--accent-down);
}
.c-hero-more {
  width: 46px; height: 46px; border-radius: 11px; background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  font: 400 20px/1 var(--font); color: #fff; border: 0; flex-shrink: 0;
}
.c-hero.empty .c-hero-cta { background: rgba(255, 255, 255, .16); color: #fff; padding: 0 16px; flex: 0 0 auto; }

.c-ctagrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.c-ctacard {
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 16px;
  padding: 16px 15px 18px; display: flex; flex-direction: column; gap: 26px; cursor: pointer;
  transition: border-color .12s;
}
.c-ctacard:hover { border-color: var(--gray-400); }
.c-ctacard-txt { display: flex; flex-direction: column; gap: 3px; }
.c-ctacard-t { font: 600 15.5px/1.25 var(--font); color: var(--gray-900); }
.c-ctacard-s { font: 400 12.5px/1.3 var(--font); color: var(--gray-600); }

.c-newcard {
  background: var(--gray-75); border: 1.5px dashed var(--gray-400); border-radius: 14px;
  padding: 15px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer;
  font: 600 13.5px/1 var(--font); color: var(--gray-800);
}
.c-newcard-arrow { margin-left: auto; color: var(--gray-500); }

/* ---- Rangée « dossier » (accueil, cabine, chalet) ---- */
.c-row {
  display: flex; align-items: center; gap: 13px; cursor: pointer;
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 12px;
  padding: 13px 14px; margin-bottom: 8px;
}
.c-row.pending { border-style: dashed; border-color: var(--gray-400); }
.c-row-bar { width: 4px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.c-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.c-row-t { font: 600 14px/1.3 var(--font); color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-row-s { font: 400 12.5px/1.3 var(--font); color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Barre d'onglets (mobile client) ---- */
.c-tabbar {
  flex-shrink: 0; background: var(--gray-75); border-top: 1px solid var(--gray-300);
  display: flex; justify-content: space-around; align-items: center;
  padding: 11px 8px max(11px, env(safe-area-inset-bottom));
}
.c-tabbtn {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center;
  gap: 6px; min-width: 60px; color: #8a93a0; font: 500 11px/1 var(--font);
}
.c-tabbtn .c-ic { color: #b0b8c3; }
.c-tabbtn.active { color: var(--accent); font-weight: 600; }
.c-tabbtn.active .c-ic { color: var(--accent); }

/* ---- Assistant de réservation (C3) ---- */
.c-wizhead { flex-shrink: 0; background: var(--gray-75); border-bottom: 1px solid var(--gray-300); padding: max(28px, env(safe-area-inset-top)) 20px 14px; display: flex; flex-direction: column; gap: 13px; }
.c-wizrow { display: flex; align-items: center; gap: 12px; }
.c-progress { display: flex; gap: 6px; align-items: center; }
.c-progress-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--gray-300); }
.c-progress-seg.on { background: var(--accent); }
.c-progress-lbl { font: 500 11px/1 var(--mono); color: #8a93a0; min-width: 66px; text-align: right; }

/* Mois affiché au-dessus de la grille de jours — les cellules ne montrent
   que le quantième, ce libellé porte le mois (et l'année si besoin). */
.c-monthlbl, .wc-monthlbl {
  font: 700 13px/1 var(--font); color: var(--gray-900); text-transform: capitalize;
  margin: 2px 0 10px;
}
.wc-monthlbl { font-size: 14px; margin: 4px 0 12px; }

.c-daygrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.c-daygrid.ouvres { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.c-daycell {
  border-radius: 12px; padding: 11px 4px 12px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; cursor: pointer; border: 1.5px solid var(--gray-300); background: var(--gray-75);
}
.c-daycell-lbl { font: 500 11px/1 var(--font); color: #8a93a0; text-transform: capitalize; }
.c-daycell-num { font: 600 19px/1.1 var(--mono); color: var(--gray-900); }
.c-daycell-tag { font: 500 9px/1 var(--mono); color: #8a93a0; }
.c-daycell.on { background: var(--accent); border-color: var(--accent); }
.c-daycell.on .c-daycell-num { color: #fff; }
.c-daycell.on .c-daycell-lbl, .c-daycell.on .c-daycell-tag { color: #c7deff; }
/* Jour fermé aux extérieurs : visible mais éteint, et non cliquable. */
.c-daycell.off { background: var(--gray-100); cursor: not-allowed; }
.c-daycell.off .c-daycell-num { color: var(--gray-500); }
/* Jour fermé mais ouvrable sur acceptation du disclaimer : ni ouvert (bleu),
   ni mort (gris plat) — bordure ambrée en pointillés, le vocabulaire que
   l'app emploie déjà pour « possible mais exceptionnel ». */
.c-daycell.off.derog, .wc-day.off.derog {
  cursor: pointer; background: var(--warn-bg);
  border-style: dashed; border-color: var(--warn);
}
.c-daycell.off.derog .c-daycell-num, .wc-day.off.derog .wc-day-n { color: var(--warn-fg); }
.c-daycell.off.derog .c-daycell-tag, .wc-day.off.derog .wc-day-tag,
.c-daycell.off.derog .c-daycell-lbl, .wc-day.off.derog .wc-day-l { color: var(--warn); }
.c-daycell.off.derog.on, .wc-day.off.derog.on { background: var(--warn); border-style: solid; }
.c-daycell.off.derog.on .c-daycell-num, .wc-day.off.derog.on .wc-day-n,
.c-daycell.off.derog.on .c-daycell-tag, .wc-day.off.derog.on .wc-day-tag,
.c-daycell.off.derog.on .c-daycell-lbl, .wc-day.off.derog.on .wc-day-l { color: #fff; }

.c-seg2 { display: flex; gap: 8px; background: var(--gray-200); padding: 4px; border-radius: 13px; }
.c-seg2-opt {
  flex: 1; height: 44px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font: 600 14.5px/1 var(--font); color: var(--gray-700);
}
.c-seg2-opt.on { background: var(--gray-75); color: var(--accent-down); box-shadow: var(--shadow-1); }
/* Trois options plutôt que deux (Origine de la demande exceptionnelle) : le
   même composant, juste un peu plus dense pour que les libellés tiennent. */
.c-seg2.triple .c-seg2-opt { height: 40px; font-size: 12.5px; padding: 0 4px; text-align: center; }

.c-crcard {
  border-radius: 14px; padding: 14px 15px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; margin-bottom: 8px; border: 1.5px solid var(--gray-300); background: var(--gray-75);
}
.c-crcard.on { border-color: var(--accent); background: var(--accent-soft); }
.c-crcard.full { opacity: .6; cursor: default; }
.c-crcard-h { font: 600 21px/1 var(--mono); color: var(--gray-900); min-width: 62px; }
.c-crcard.on .c-crcard-h { color: var(--accent-down); }
.c-crcard-mid { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.c-crcard-sens { font: 600 13.5px/1.2 var(--font); color: var(--gray-900); }
.c-crcard-dispo { font: 400 11.5px/1 var(--font); color: var(--gray-600); }

.c-meter { height: 5px; border-radius: 3px; background: var(--gray-300); overflow: hidden; }
.c-meter.h6 { height: 6px; background: var(--gray-200); }
.c-meter i { display: block; height: 100%; border-radius: 3px; transition: width .15s; }

.c-recap {
  background: var(--accent-soft); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; font: 500 13px/1.3 var(--font); color: var(--accent-down);
}
.c-recap-h { font: 600 17px/1 var(--mono); color: var(--accent-down); }

.c-checkbox {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center;
  border: 1.5px solid var(--gray-400); background: var(--gray-75); color: #fff; font: 600 13px/1 var(--font);
}
.c-checkbox.on { background: var(--accent); border-color: var(--accent); }

/* Ligne « personne » cochable de l'écran QUI MONTE ? (C3 écran 2). */
.c-personrow {
  border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; margin-bottom: 8px;
  border: 1.5px solid var(--gray-300); background: var(--gray-75);
}
.c-personrow.on { border-color: var(--accent); background: var(--accent-soft); }
.c-personrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.c-personrow-n { font: 600 14px/1.3 var(--font); color: var(--gray-900); }
.c-personrow-e { font: 400 12px/1.3 var(--font); color: var(--gray-600); }
.c-personrow-bed { font: 500 12px/1.3 var(--mono); color: var(--gray-700); flex-shrink: 0; text-align: right; }
.c-personrow-bed .muted { color: var(--gray-500); font-family: var(--font); font-weight: 400; }
.c-adderow {
  border: 1.5px dashed #b9c1cc; border-radius: 12px; padding: 13px; width: 100%;
  min-height: 50px; text-align: center; font: 600 14px/1 var(--font);
  color: var(--gray-700); background: none; cursor: pointer;
}

.c-actionbar {
  flex-shrink: 0; padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  background: var(--gray-75); border-top: 1px solid var(--gray-300);
  display: flex; gap: 10px; align-items: center;
}
.c-actionbar .c-btn.secondary { flex: 0 0 auto; padding: 0 20px; }
/* Étape 1 du parcours « Nouveau billet » (admin) : pas de « Continuer » tant
   qu'aucun créneau n'est choisi ; une fois choisi, un + rond apparaît plutôt
   qu'un bouton pleine largeur — l'écran a déjà dit ce qui va se passer. */
.c-actionbar.right { justify-content: flex-end; }
.c-actionfab {
  width: 56px; height: 56px; border-radius: 28px; border: 0; flex-shrink: 0;
  background: var(--accent); color: #fff; box-shadow: 0 8px 20px var(--accent-shadow);
  display: grid; place-items: center; cursor: pointer; font: 400 28px/1 var(--font);
}
.c-actionfab:hover { background: var(--accent-hover); }

/* Bascule de semaine dans l'assistant « Réserver un trajet » (C3 mobile,
   WC2 web, parcours client) — flanque le libellé « QUEL JOUR ? » / la note
   de semaine déjà présente en web. */
.book-weeknav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.book-weekbtn {
  width: 38px; height: 38px; border: 0; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-down); font: 700 17px/1 var(--font);
  display: grid; place-items: center; cursor: pointer;
  transition: background .12s, transform .1s;
}
.book-weekbtn:hover { background: var(--accent-line); }
.book-weekbtn:active { transform: scale(.92); }
.book-weekbtn:disabled {
  background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; transform: none;
}
.book-weeknav-lbl {
  font: 600 12.5px/1 var(--mono); color: var(--gray-800); min-width: 92px; text-align: center;
}

.c-btn {
  height: 54px; border-radius: 14px; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16.5px/1 var(--font); color: #fff; background: var(--accent);
  box-shadow: 0 8px 20px var(--accent-shadow); text-decoration: none;
}
.c-btn.block { width: 100%; flex: 1; }
/* Dans une colonne, un bouton pleine largeur ne doit ni grandir ni s'écraser. */
.c-body > .c-btn, .c-confirm > .c-btn { flex: 0 0 auto; }
.c-btn.secondary { background: var(--gray-100); color: var(--gray-800); box-shadow: none; }
.c-btn.negative { background: var(--neg-bg); color: var(--neg); box-shadow: none; }
.c-btn.ghost { background: var(--gray-75); color: var(--gray-700); border: 1.5px solid var(--gray-300); box-shadow: none; }
/* Ambre « exceptionnel » — même vocabulaire que les jours/créneaux hors modèle
   (bordure/fond ambrés) ailleurs dans l'appli, pour qu'une action rare se
   distingue visuellement d'une action secondaire ordinaire. */
.c-btn.warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
/* Bouton d'accent sans halo — le design n'en met que sur les CTA plein écran. */
.c-btn.flat { box-shadow: none; }
.c-btn.disabled, .c-btn[disabled] { background: var(--gray-300); color: var(--gray-500); box-shadow: none; cursor: not-allowed; }
.c-actionrow { display: flex; gap: 8px; flex-wrap: wrap; }
.c-actionrow .c-btn { height: 50px; border-radius: 13px; font-size: 14.5px; flex: 1; min-width: 100px; }

/* ---- Confirmation ---- */
.c-confirm { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 14px; text-align: center; }
.c-confirm-check {
  width: 64px; height: 64px; border-radius: 32px; background: var(--pos-bg);
  display: grid; place-items: center;
}
.c-confirm-check i { width: 24px; height: 24px; border-radius: 12px; background: #2d9d78; }
.c-confirm-txt { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.c-confirm-t { font: 600 20px/1.25 var(--font); color: var(--gray-900); }
.c-confirm-s { font: 400 13.5px/1.5 var(--font); color: var(--gray-600); max-width: 30ch; }
.c-confirm-card {
  width: 100%; background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.c-dossier { font: 500 12px/1 var(--mono); letter-spacing: .12em; color: var(--gray-700); }
.c-calbtn {
  width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--gray-100);
  font: 600 14.5px/1 var(--font); color: var(--gray-800); cursor: pointer;
}
/* QR : damier assumé par le handoff tant qu'aucun générateur n'est branché. */
.c-qr {
  width: 148px; height: 148px; border-radius: 10px; position: relative;
  background: conic-gradient(var(--gray-900) 0 25%, #fff 0 50%, var(--gray-900) 0 75%, #fff 0) 0 0/16px 16px;
}
.c-qr span {
  position: absolute; inset: 52px; background: #fff; border-radius: 6px;
  display: grid; place-items: center; font: 600 10px/1 var(--mono); color: var(--gray-900);
}
.c-qr.lg { width: 168px; height: 168px; }
.c-qr.lg span { inset: 60px; }

/* ---- Billet (C4) ---- */
.c-tickethead {
  flex-shrink: 0; padding: max(30px, env(safe-area-inset-top)) 20px 22px; background: var(--accent-down);
  display: flex; flex-direction: column; gap: 18px;
}
.c-tickethead.pending { background: var(--gray-700); }
.c-tickethead-row { display: flex; align-items: center; gap: 12px; }
.c-tickethead-t { font: 600 17px/1.2 var(--font); color: #fff; }
.c-tickethead-time { display: flex; align-items: flex-end; gap: 14px; }
.c-tickethead-h { font: 600 44px/1 var(--mono); color: #fff; letter-spacing: -1.5px; }
.c-tickethead-d { font: 400 14px/1.3 var(--font); color: #a9cdfb; padding-bottom: 6px; }
/* La carte du billet monte sous l'en-tête plein : coins hauts droits. */
.c-body.ticket { padding-top: 0; }
.c-ticketcard {
  background: var(--gray-75); border-radius: 0 0 18px 18px; padding: 22px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: var(--shadow-2);
}
.c-ticketgrid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }
.c-ticketgrid > div { display: flex; flex-direction: column; gap: 3px; }
.c-ticketgrid .c-eyebrow { font-size: 9.5px; }
.c-ticketval { font: 600 14px/1.3 var(--font); color: var(--gray-900); }
.c-ticketval.mono { font-family: var(--mono); }
.c-hr { width: 100%; height: 1px; background: var(--gray-300); }
.c-pax-line { font: 400 13px/1.6 var(--font); color: var(--gray-800); }
.c-bullets { display: flex; flex-direction: column; gap: 9px; }
.c-bullets > div {
  padding-left: 16px; position: relative; font: 400 13.5px/1.5 var(--font); color: var(--gray-800);
}
.c-bullets > div::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 7px;
  border-radius: 4px; background: var(--accent);
}

/* ---- Chalet (C5) ---- */
.c-daterow { display: flex; gap: 10px; }
.c-datepick {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, .12); border-radius: 12px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer;
}
.c-datepick input[type="date"] {
  background: none; border: 0; padding: 0; height: auto; color: #fff; min-width: 0;
  font: 600 16px/1.2 var(--font); width: 100%;
}
.c-datepick input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
/* Occupation des nuits couvertes par le séjour, une carte par nuit. */
.c-nuitrow { display: flex; gap: 10px; overflow-x: auto; }
.c-nuitcard {
  flex: 1; min-width: 128px; background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: 12px; padding: 12px 13px; display: flex; flex-direction: column; gap: 7px;
}
.c-nuitcard-v { font: 600 17px/1 var(--mono); }

/* Encart « cabine incluse » — bleu cabine même en section chalet. */
.c-cabinecard {
  background: #eaf2fe; border: 1px solid #c7deff; border-radius: 14px;
  padding: 14px 15px; display: flex; gap: 12px;
}
.c-cabinecard .c-ic { width: 26px; height: 20px; border-radius: 5px; margin-top: 2px; color: #2680eb; }
.c-cabinecard-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.c-cabinecard-t { font: 600 13.5px/1.35 var(--font); color: #0d3f7d; }
.c-cabinecard-s { font: 400 12.5px/1.45 var(--font); color: #0d66d0; }
.c-cabinecard-sel { display: flex; gap: 8px; margin-top: 8px; }
.c-cabinecard-sel select {
  flex: 1; min-width: 0; height: 40px; border-radius: 10px; padding: 0 10px;
  border: 1px solid #c7deff; background: #fff; color: var(--gray-900);
  font: 500 13px/1 var(--font);
}

/* Résumé à gauche du bouton d'action (design C5). */
.c-actionsum { display: flex; flex-direction: column; gap: 2px; min-width: 96px; }
.c-actionsum-s { font: 400 11.5px/1 var(--font); color: #8a93a0; }
.c-actionsum-t { font: 600 14px/1 var(--mono); color: var(--gray-900); }

/* ---- Dossier (C6) : ligne de vie ---- */
.c-tl-row { display: flex; gap: 14px; }
.c-tl-rail { display: flex; flex-direction: column; align-items: center; width: 22px; flex-shrink: 0; }
/* Couleurs figées : la ligne de vie mêle les deux sections, l'accent courant
   ne peut donc pas les départager (relevé sur C6). */
.c-tl-dot { width: 14px; height: 14px; border-radius: 8px; background: #2680eb; flex-shrink: 0; }
.c-tl-dot.chalet { background: #2d9d78; border-radius: 3px; transform: rotate(45deg); }
.c-tl-dot.cabine.dashed { background: none; border: 2px dashed var(--gray-400); box-sizing: border-box; }
.c-tl-line { flex: 1; width: 2px; background: var(--gray-300); margin-top: 2px; }
.c-tl-row:last-child .c-tl-line { display: none; }
.c-tl-content { flex: 1; padding-bottom: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* La ligne de vie n'a pas d'écart entre ses étapes : le rail doit être continu. */
.c-body.tl { gap: 0; padding-top: 18px; }
.c-tl-card {
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 14px;
  padding: 14px 15px; display: flex; align-items: center; gap: 13px;
}
.c-tl-card.col { flex-direction: column; align-items: stretch; gap: 10px; }
.c-tl-card.dashed { border-style: dashed; border-color: #b9c1cc; }
.c-tl-cardrow { display: flex; align-items: center; gap: 13px; }
.c-tl-h { font: 600 19px/1 var(--mono); color: var(--accent-down); }
.c-tl-h.muted { color: var(--gray-700); }
.c-tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.c-tl-t { font: 600 14px/1.2 var(--font); color: var(--gray-900); }
.c-tl-s { font: 400 12.5px/1.45 var(--font); color: var(--gray-600); }
.c-tl-s.warn { color: var(--warn); }
.c-tl-badge {
  width: 34px; height: 34px; border-radius: 9px; background: var(--pos-bg); flex-shrink: 0;
  display: grid; place-items: center;
}
.c-tl-badge::before {
  content: ""; width: 14px; height: 14px; border-radius: 3px;
  background: #2d9d78; transform: rotate(45deg);
}
.c-hr.light { background: #eef0f3; }
.c-headtxt { display: flex; flex-direction: column; gap: 2px; }
.c-headsub { font: 400 12.5px/1 var(--mono); color: var(--gray-600); }

.c-card {
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 14px;
  padding: 14px 15px; display: flex; flex-direction: column; gap: 10px;
}
.c-card.row { flex-direction: row; align-items: center; gap: 13px; }
.c-card.dashed { border-style: dashed; }

/* =====================================================================
   Console web d'exploitation (W1 du handoff) — préfixe `w-`.
   ===================================================================== */
.w-shell { display: grid; grid-template-columns: 78px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; }
.w-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.w-content { flex: 1; overflow: auto; min-height: 0; }
.w-pad { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }

/* ---- Rail ---- */
.w-rail { background: var(--rail-bg); display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 8px; }
/* Le logo et le CTA de la barre restent bleus même dans la section chalet :
   ils appartiennent à l'application, pas à la section (relevé sur W1-chalet). */
.w-logo { width: 40px; height: 40px; border-radius: 12px; background: #2680eb; margin-bottom: 12px; flex-shrink: 0; }
.w-topbar .w-btn.primary { background: #2680eb; }
.w-topbar .w-btn.primary:hover { background: #1473e6; }
.w-railbtn {
  width: 60px; padding: 10px 0; border: 0; border-radius: 12px; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font: 600 10px/1 var(--font); color: #8a93a0;
}
.w-railbtn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.w-railbtn.active { color: #fff; }
.w-railbtn.active.cabine { background: #2680eb; }
.w-railbtn.active.chalet { background: #2d9d78; }
.w-railic { width: 22px; height: 18px; border-radius: 5px; background: currentColor; display: block; }
.w-railic.di { width: 18px; height: 18px; transform: rotate(45deg); border-radius: 4px; }
.w-railic.ci { width: 20px; height: 20px; border-radius: 50%; background: none; border: 2.5px solid currentColor; box-sizing: border-box; }
.w-railic.ci-plain { width: 20px; height: 20px; border-radius: 50%; background: #4b535e; }

/* ---- Barre supérieure ---- */
.w-topbar {
  height: 60px; flex-shrink: 0; background: var(--gray-75); border-bottom: 1px solid var(--gray-300);
  display: flex; align-items: center; gap: 16px; padding: 0 22px;
}
.w-titleblock { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-title { font: 600 15px/1.2 var(--font); color: var(--gray-900); white-space: nowrap; }
.w-sub { font: 400 12px/1 var(--font); color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-vsep { width: 1px; height: 26px; background: var(--gray-300); flex-shrink: 0; }
.w-weeknav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.w-iconbtn {
  width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--gray-100);
  color: var(--gray-700); font: 500 15px/1 var(--font); display: grid; place-items: center;
}
.w-iconbtn:hover { background: var(--gray-200); }
.w-weeklbl { display: flex; flex-direction: column; gap: 1px; }
.w-weeknum { font: 600 13px/1 var(--mono); color: var(--gray-900); }
.w-weekrange { font: 400 11px/1 var(--font); color: var(--gray-600); white-space: nowrap; }
.w-chip {
  height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--gray-100);
  font: 500 12.5px/1 var(--font); color: var(--gray-800); white-space: nowrap;
}
.w-chip:hover { background: var(--gray-200); }
.w-seg { display: flex; gap: 3px; background: var(--gray-100); padding: 3px; border-radius: 9px; flex-shrink: 0; }
.w-seg button {
  height: 26px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  font: 600 12px/1 var(--font); color: var(--gray-700);
}
.w-seg button.on { background: var(--gray-75); color: var(--gray-900); box-shadow: var(--shadow-1); }
.w-alert {
  height: 32px; padding: 0 14px; border-radius: 9px; background: var(--warn-bg);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  font: 500 12.5px/1 var(--font); color: var(--warn-fg); white-space: nowrap;
}
.w-diamond { width: 8px; height: 8px; background: var(--warn); transform: rotate(45deg); flex-shrink: 0; }
/* En marqueur inline (heure d'une rotation hors créneaux), le losange doit
   garder sa place dans le flux du texte sans décaler la ligne de base. */
.w-rot-h .w-diamond, .w-res-cr-h .w-diamond { display: inline-block; margin-right: 6px; vertical-align: middle; }
.w-user { display: flex; align-items: center; gap: 8px; padding-left: 6px; font: 500 12.5px/1 var(--font); color: var(--gray-800); white-space: nowrap; }
.w-avatar { width: 28px; height: 28px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-down); display: grid; place-items: center; font: 600 11px/1 var(--mono); }

.w-btn {
  height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--gray-100);
  font: 600 12.5px/1 var(--font); color: var(--gray-800); white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.w-btn:hover { background: var(--gray-200); }
.w-btn.primary { background: var(--accent); color: #fff; }
.w-btn.primary:hover { background: var(--accent-hover); }
.w-btn.ghost { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-800); }
.w-btn.ghost:hover { background: var(--gray-100); }
.w-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.w-btn.block { width: 100%; height: 46px; font-size: 14.5px; border-radius: 12px; }
.w-btn.off { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; }

/* ---- Barre d'état ---- */
.w-statusbar {
  height: 34px; flex-shrink: 0; background: var(--gray-75); border-top: 1px solid var(--gray-300);
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  font: 400 11.5px/1 var(--mono); color: var(--gray-600);
}
.w-statususer { display: flex; align-items: center; gap: 7px; }
.w-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); display: inline-block; }

/* ---- Grille hebdomadaire + panneau d'inspection ---- */
.w-split { display: flex; min-height: 100%; }
.w-grille-wrap { flex: 1; padding: 20px 22px; min-width: 0; }
.w-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.w-daycol { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.w-dayhead { display: flex; align-items: baseline; gap: 7px; padding-bottom: 7px; border-bottom: 2px solid var(--gray-300); }
.w-dayhead.ext { border-bottom-color: var(--accent); }
.w-dayname { font: 600 13px/1 var(--font); color: var(--gray-900); text-transform: capitalize; }
.w-daytag { font: 500 10px/1 var(--mono); color: var(--gray-500); }
.w-daytag.ext { color: var(--accent); }

.w-rot {
  border-radius: 11px; padding: 10px 11px; display: flex; flex-direction: column; gap: 7px;
  cursor: pointer; border: 1.5px solid var(--gray-300); background: var(--gray-75);
  transition: border-color .12s, background .12s;
}
.w-rot:hover { border-color: var(--gray-400); }
.w-rot.vide { background: #f9fafb; border-style: dashed; }
.w-rot.dem { border-style: dashed; }
.w-rot.noconv { border-color: var(--warn-line); }
.w-rot.sel { background: var(--accent-soft); border-color: var(--accent); border-style: solid; }
.w-rot-top { display: flex; align-items: baseline; justify-content: space-between; }
.w-rot-h { font: 600 13px/1 var(--mono); color: var(--gray-900); }
.w-rot.sel .w-rot-h { color: var(--accent-down); }
.w-rot-sens { font: 500 10.5px/1 var(--mono); color: var(--gray-600); }
.w-rot-bot { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.w-rot-occ { font: 600 11px/1 var(--mono); color: var(--gray-800); }
.w-rot-conv { font: 500 9.5px/1 var(--mono); color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-rot-conv.warn { color: var(--warn); }
.w-meter { height: 5px; border-radius: 3px; background: var(--gray-200); overflow: hidden; }
.w-meter i { display: block; height: 100%; border-radius: 3px; }

.w-legend { margin-top: 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font: 400 11.5px/1 var(--font); color: var(--gray-600); }
.w-legend span { display: flex; align-items: center; gap: 6px; }
.w-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-sizing: border-box; }
.w-legend .sw.dashed { border: 1.5px dashed var(--gray-400); }

.w-inspect {
  width: 380px; flex-shrink: 0; background: var(--gray-75); border-left: 1px solid var(--gray-300);
  display: flex; flex-direction: column; position: sticky; top: 0; align-self: flex-start; height: 100%;
}
.w-inspect-empty { padding: 20px; color: var(--gray-600); font-size: 12.5px; }
.w-inspect-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--gray-300); display: flex; flex-direction: column; gap: 12px; }
.w-inspect-title { display: flex; align-items: flex-end; gap: 12px; }
.w-inspect-h { font: 600 30px/1 var(--mono); color: var(--accent-down); }
.w-inspect-sens { font: 600 14px/1.2 var(--font); color: var(--gray-900); }
/* Date complète : seule l'initiale prend la majuscule (« Mar 18 août 2026 »),
   pas chaque mot — `capitalize` donnerait « Mar 18 Août 2026 ». */
.w-inspect-jour { font: 400 12px/1.2 var(--font); color: var(--gray-600); }
.w-inspect-jour::first-letter { text-transform: uppercase; }
.w-tiles { display: flex; gap: 10px; }
.w-tile { flex: 1; background: var(--gray-100); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.w-tile.warn { background: var(--warn-bg); }
.w-tile-k { font: 600 9px/1 var(--mono); letter-spacing: .08em; color: var(--gray-500); }
.w-tile-v { font: 600 15px/1 var(--mono); color: var(--gray-900); }
.w-tile-v.sm { font: 600 12.5px/1.1 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-tile.warn .w-tile-v { color: var(--warn-fg); }
.w-select {
  height: 34px; border-radius: 9px; border: 1.5px solid var(--gray-300); background: var(--gray-75);
  padding: 0 10px; font: 500 12.5px/1 var(--font); color: var(--gray-800); width: 100%;
}
/* `width:100%` l'emporterait sur l'attribut `hidden` : le sélecteur de
   convoyeur ne se déplie qu'au bouton « Affecter convoyeur ». */
.w-select[hidden] { display: none; }
.w-inspect-body { flex: 1; overflow: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; }
.w-eyebrow { font: 600 10px/1 var(--mono); letter-spacing: .09em; color: var(--gray-500); }
.w-paxrow, .w-demrow, .w-sejrow {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; background: var(--gray-100);
}
.w-paxrow.dem { background: var(--warn-bg); }
.w-demrow, .w-sejrow { background: var(--gray-75); border: 1.5px dashed var(--gray-400); flex-wrap: wrap; }
.w-sejrow { border-style: solid; border-color: var(--gray-300); cursor: pointer; }
.w-sejrow:hover { border-color: var(--accent); }
.w-paxn { font: 600 11px/1 var(--mono); color: var(--gray-500); min-width: 16px; }
.w-paxmain { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.w-paxnom { font: 600 13px/1.25 var(--font); color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-paxent { font: 400 11.5px/1.25 var(--font); color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-paxtel { font: 500 11px/1 var(--mono); color: var(--gray-500); }
.w-inspect-foot { padding: 14px 20px 18px; border-top: 1px solid var(--gray-300); display: flex; flex-direction: column; gap: 9px; }
.w-inspect-actions { display: flex; gap: 9px; }
.w-inspect-actions .w-btn { flex: 1; height: 40px; border-radius: 10px; font-size: 13px; }
.w-foot-note { font: 400 11.5px/1.4 var(--font); color: var(--gray-500); }

/* ---- Gantt du jour ---- */
.w-gantt-wrap { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.w-gantt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.w-daychips { display: flex; gap: 6px; flex-wrap: wrap; }
.w-daychip {
  height: 30px; padding: 0 11px; border-radius: 8px; border: 1.5px solid var(--gray-300);
  background: var(--gray-75); display: flex; align-items: center; gap: 7px;
  font: 600 12px/1 var(--font); color: var(--gray-800); text-transform: capitalize;
}
.w-daychip.on { background: var(--gray-900); border-color: var(--gray-900); color: #fff; }
.w-daychip-tag { font: 500 9.5px/1 var(--mono); color: var(--gray-500); }
.w-daychip.on .w-daychip-tag { color: #8a93a0; }
.w-gantt-resume { font: 400 11.5px/1 var(--font); color: var(--gray-600); }

.w-gantt { background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 14px; overflow: hidden; }
.w-ghead { display: flex; height: 32px; background: #fbfcfd; border-bottom: 1px solid var(--gray-300); }
.w-ghours { flex: 1; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); }
.w-ghour { border-left: 1px solid var(--gray-300); display: flex; align-items: center; padding-left: 6px; font: 500 10px/1 var(--mono); color: var(--gray-500); }
.w-ggroup { padding: 8px 14px; background: #fbfcfd; border-top: 1px solid var(--gray-300); font: 600 9.5px/1 var(--mono); letter-spacing: .1em; color: var(--gray-500); }
.w-grow { display: flex; border-top: 1px solid var(--gray-50); }
.w-glabel { width: 200px; flex-shrink: 0; padding: 10px 14px; border-right: 1px solid var(--gray-300); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-glabel.head { justify-content: center; font: 600 9.5px/1 var(--mono); letter-spacing: .1em; color: var(--gray-500); padding: 0 14px; }
.w-glabel-t { font: 600 12.5px/1.2 var(--font); color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-glabel-s { font: 400 11px/1.25 var(--font); color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-gtrack {
  flex: 1; position: relative; height: 46px;
  background: repeating-linear-gradient(to right, var(--gray-200) 0 1px, transparent 1px 7.6923%);
}
.w-bar {
  position: absolute; top: 9px; height: 28px; border-radius: 8px; box-sizing: border-box;
  display: flex; align-items: center; gap: 7px; padding: 0 9px; overflow: hidden;
  border: 1.5px solid transparent;
}
.w-bar-t { font: 600 11px/1 var(--mono); white-space: nowrap; }
.w-bar-s { font: 500 11px/1 var(--font); white-space: nowrap; }

/* ---- Vue Chalet ---- */
.w-nuits { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.w-nuit {
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 14px;
  padding: 14px 13px; display: flex; flex-direction: column; gap: 11px; cursor: pointer; min-width: 0;
}
.w-nuit:hover { border-color: var(--accent); }
.w-nuit.haute { border-color: var(--warn-line); }
.w-nuit-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.w-nuit-lbl { font: 600 13px/1 var(--font); color: var(--gray-900); text-transform: capitalize; }
.w-nuit-occ { font: 600 12px/1 var(--mono); }
.w-nuit-list { display: flex; flex-direction: column; gap: 5px; }
.w-nuit-qui { font: 400 11.5px/1.3 var(--font); color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-chalet-bas { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.w-card { background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 13px; }
.w-chalet-bas > .w-card:first-child { flex: 1; min-width: 320px; }
.w-sejour { width: 340px; flex-shrink: 0; }
.w-chambres { display: flex; flex-direction: column; gap: 9px; }
.w-ch-row, .w-chambre { display: flex; align-items: center; gap: 14px; }
.w-chambre-nom { font: 600 13.5px/1 var(--font); color: var(--gray-900); min-width: 110px; }
.w-lits { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.w-lit {
  width: 34px; height: 30px; flex: 0 0 34px; border-radius: 7px; background: var(--gray-200);
}
.w-lit.pris { background: var(--accent); color: #fff; }
.w-chambre-cap { font: 500 12px/1 var(--mono); color: var(--gray-600); }
.w-sejtitre { font: 600 15px/1.25 var(--font); color: var(--gray-900); }
.w-sejsub { font: 400 12.5px/1.4 var(--font); color: var(--gray-600); }
.w-sejtrajet { font: 400 13px/1.5 var(--font); color: var(--gray-800); }
.w-sejtrajet.attente { color: var(--warn); }
.w-sejactions { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.w-sejactions .w-btn { height: 42px; justify-content: center; }
.w-sejautres { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.w-sejautres .w-sejrow {
  width: 100%; border: 0; background: none; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--gray-300);
}

/* ---- Vue Réserver ---- */
.w-reserver { padding: 26px 30px; display: flex; justify-content: center; }
.w-reserver > div { width: 100%; }
.w-res-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.w-res-title { font: 600 22px/1.2 var(--font); color: var(--gray-900); }
.w-res-sub { font: 400 13.5px/1.4 var(--font); color: var(--gray-600); }
.w-reserver { flex-direction: column; align-items: center; }
.w-res-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; width: 100%; max-width: 1000px; }
.w-res-cols .w-card { border-radius: 16px; padding: 18px; gap: 14px; }
.w-step { display: flex; align-items: center; gap: 9px; }
.w-stepn { width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: #fff; font: 600 12px/22px var(--mono); text-align: center; }
.w-stept { font: 600 14.5px/1 var(--font); color: var(--gray-900); }
.w-res-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.w-res-day { border-radius: 9px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; border: 1.5px solid var(--gray-300); }
.w-res-day.on { background: var(--accent); border-color: var(--accent); }
.w-res-day-l { font: 500 9.5px/1 var(--font); color: var(--gray-600); text-transform: capitalize; }
.w-res-day-n { font: 600 14px/1 var(--mono); color: var(--gray-900); }
.w-res-day.on .w-res-day-l, .w-res-day.on .w-res-day-n { color: #fff; }
.w-res-cr { border-radius: 11px; padding: 11px 12px; display: flex; align-items: center; gap: 11px; cursor: pointer; border: 1.5px solid var(--gray-300); }
.w-res-cr.on { border-color: var(--accent); background: var(--accent-soft); }
.w-res-cr-h { font: 600 15px/1 var(--mono); color: var(--gray-900); flex-shrink: 0; }
/* Les trois éléments tiennent sur une ligne, comme dans le design. */
/* Libellé et places empilés : côte à côte, « 9 places libres sur 9 » débordait
   du bouton dans la colonne étroite du parcours Réserver. */
.w-res-cr-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.w-res-cr-s { font: 500 12.5px/1.2 var(--font); color: var(--gray-800); }
.w-res-cr-d { font: 500 11px/1.2 var(--mono); color: var(--gray-600); }
.w-res-roster { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.w-res-p { border-radius: 11px; padding: 10px 12px; display: flex; align-items: center; gap: 11px; cursor: pointer; border: 1.5px solid var(--gray-300); }
.w-res-p.on { border-color: var(--accent); background: var(--accent-soft); }
.w-cb { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; border: 1.5px solid var(--gray-400); background: var(--gray-75); font: 600 11px/1 var(--font); color: #fff; flex-shrink: 0; }
.w-cb.on { background: var(--accent); border-color: var(--accent); }
.w-res-libre { border: 1.5px dashed var(--gray-400); border-radius: 11px; padding: 10px; text-align: center; font: 600 12.5px/1 var(--font); color: var(--gray-700); background: transparent; width: 100%; cursor: pointer; }
/* Bandeau d'alerte de la console — mêmes valeurs que celui des demandes en
   attente (A3), mais aligné en haut : le disclaimer hors créneaux fait
   plusieurs lignes, là où le design n'en montrait qu'une. */
.w-alerte {
  background: var(--warn-bg); border-radius: 9px; padding: 9px 11px;
  display: flex; gap: 9px; align-items: flex-start;
  font: 500 12px/1.35 var(--font); color: var(--warn-fg);
}
.w-alerte .w-diamond { margin-top: 4px; }
.w-res-field { display: flex; flex-direction: column; gap: 6px; }
.w-res-field input { height: 38px; border-radius: 9px; border: 1.5px solid var(--gray-300); background: var(--gray-75); }
.w-res-field input[type="time"] { font: 600 15px/1 var(--mono); color: var(--gray-900); }
.w-res-recap { background: var(--gray-100); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.w-res-recap-top { display: flex; align-items: center; gap: 11px; font: 500 13px/1.2 var(--font); color: var(--gray-800); }
.w-res-recap-h { font: 600 22px/1 var(--mono); color: var(--accent-down); }
/* Marqueur du récapitulatif, dans le registre mono petites-capitales de la
   console (cf. « SANS CONV. » sur les cartes de rotation). */
.w-tag { margin-left: auto; flex-shrink: 0; padding: 4px 8px; border-radius: 9px; font: 600 9.5px/1 var(--mono); letter-spacing: .04em; }
.w-tag.warn { background: var(--warn-bg); color: var(--warn-fg); }
.w-hr { height: 1px; background: var(--gray-300); }
.w-res-kv { display: flex; align-items: center; justify-content: space-between; font: 400 12.5px/1 var(--font); color: var(--gray-700); }
.w-res-kv b { font: 600 12.5px/1 var(--mono); color: var(--gray-900); }
.w-res-noms { font: 400 12px/1.5 var(--font); color: var(--gray-600); }
.w-res-secu { border-radius: 11px; padding: 11px 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; border: 1.5px solid var(--gray-300); font: 500 12.5px/1.35 var(--font); color: var(--gray-800); }
.w-res-secu.on { border-color: var(--accent); background: var(--accent-soft); }

/* Écran Paramètres — garde la coquille barre/canvas/barre d'état */
.p-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* =====================================================================
   Administration mobile (A1-A4 du handoff) — préfixe `a-`.
   ===================================================================== */
.a-head {
  flex-shrink: 0; background: var(--gray-900); color: #fff;
  padding: max(28px, env(safe-area-inset-top)) 20px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.a-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Écran A2 : le bloc de titre suit le bouton retour, il n'est pas repoussé. */
.a-head-top.left { justify-content: flex-start; }
.a-head-title { display: flex; align-items: center; gap: 9px; font: 600 17px/1.2 var(--font); color: #fff; }
.a-head-title.col { flex-direction: column; align-items: flex-start; gap: 2px; }
.a-tag { font: 600 9.5px/1 var(--mono); padding: 4px 7px; border-radius: 5px; background: var(--accent); color: #fff; }
.a-tag.chalet { background: #2d9d78; }
/* Bascule de semaine discrète dans l'en-tête A1 — remplace les gros boutons
   qui vivaient dans Réglages (double emploi avec la vue Semaine). */
.a-weekpill { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.a-weekbtn {
  width: 22px; height: 22px; border: 0; border-radius: 7px; flex-shrink: 0;
  background: rgba(255, 255, 255, .09); color: #8a93a0; font: 500 12px/1 var(--font);
  display: grid; place-items: center; cursor: pointer;
}
.a-weekbtn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.a-daynav { display: flex; align-items: center; gap: 10px; }
.a-navbtn {
  width: 34px; height: 34px; border: 0; border-radius: 10px; flex-shrink: 0;
  background: rgba(255, 255, 255, .09); color: #fff; font: 500 16px/1 var(--font); display: grid; place-items: center;
}
.a-dayinfo { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.a-dayname { font: 600 15px/1.2 var(--font); color: #fff; }
.a-dayname::first-letter { text-transform: uppercase; }
.a-daysub { font: 400 11.5px/1 var(--mono); color: #8a93a0; }
.a-nuitocc { flex: 1; display: flex; align-items: center; gap: 12px; }
.a-nuitocc-v { font: 600 30px/1 var(--mono); color: #fff; }
.a-nuitocc-c { font-size: 18px; color: #8a93a0; }
.a-nuitbar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.a-nuitbar i { display: block; height: 100%; border-radius: 4px; }

.a-tiles { display: flex; gap: 10px; }
.a-tile { flex: 1; background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; }
.a-tile.neg { border-color: var(--neg-line); }
.a-tile-v { font: 600 19px/1 var(--mono); color: var(--gray-900); }

.a-rot { background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 14px; padding: 14px 15px; display: flex; flex-direction: column; gap: 11px; }
/* Rotation sans convoyeur : en rouge sur l'écran A1 du design (un départ sans
   convoyeur habilité n'est pas une alerte, c'est un blocage). L'orange reste
   la couleur de l'avertissement dans la console web. */
.a-rot.alerte { border-width: 1.5px; border-color: var(--neg-line); }
.a-rot.vide { opacity: .72; }
.a-rot-top { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.a-rot-h { font: 600 21px/1 var(--mono); color: var(--accent-down); min-width: 60px; }
.a-rot-mid { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.a-rot-sens { font: 600 14px/1.2 var(--font); color: var(--gray-900); }
.a-rot-conv { font: 400 12px/1.2 var(--font); color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-rot-conv.warn { color: var(--neg); font-weight: 600; }
.a-rot-occ { font: 600 15px/1 var(--mono); }
.a-rot-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a-affecter { height: 42px; border: 0; border-radius: 11px; background: var(--neg); color: #fff; font: 600 14px/1 var(--font); width: 100%; }

.a-badge {
  position: absolute; top: -3px; right: 12px; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--neg); color: #fff; font: 600 10px/17px var(--mono); text-align: center; padding: 0 3px;
}
.c-tabbtn { position: relative; }

.a-convbox { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 13px; display: flex; align-items: center; gap: 12px; }
.a-convav { width: 36px; height: 36px; border-radius: 18px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 600 13px/1 var(--mono); flex-shrink: 0; }
.a-convmain { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.a-convnom { font: 600 14px/1.2 var(--font); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-convchange { border: 0; background: none; font: 500 12.5px/1 var(--font); color: #7fb2f5; flex-shrink: 0; }

.a-quai-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; cursor: pointer; border: 1px solid var(--gray-200); background: var(--gray-100); }
.a-quai-row.on { background: var(--gray-75); border-color: var(--gray-300); }
.a-dot { width: 26px; height: 26px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; border: 1.5px solid var(--gray-400); background: var(--gray-75); color: #fff; font: 600 13px/1 var(--font); }
.a-dot.on { background: var(--pos); border-color: var(--pos); }
.a-quai-n { font: 600 11px/1 var(--mono); color: var(--gray-500); min-width: 14px; }

.a-dem { border-radius: 16px; padding: 15px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--gray-75); border: 1.5px dashed #b9c1cc; }
.a-dem-top { display: flex; align-items: flex-start; gap: 12px; }
.a-dem-ic { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; background: var(--accent-soft); position: relative; }
.a-dem-ic::after { content: ""; position: absolute; inset: 12px; border-radius: 4px; background: var(--accent); }
.a-dem-ic.chalet { background: var(--pos-bg); }
.a-dem-ic.chalet::after { background: #2d9d78; transform: rotate(45deg); }
.a-dem-t { font: 600 14.5px/1.25 var(--font); color: var(--gray-900); }
.a-dem-s { font: 400 12.5px/1.35 var(--font); color: var(--gray-600); }
.a-dem-alerte { background: var(--warn-bg); border-radius: 9px; padding: 9px 11px; display: flex; gap: 9px; align-items: center; font: 500 12px/1.35 var(--font); color: var(--warn-fg); }
.a-dem-actions { display: flex; gap: 9px; }
.a-dem-actions .c-btn { height: 44px; font-size: 14px; flex: 1; border-radius: 11px; }
.a-vide { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; color: var(--gray-600); font: 500 13.5px/1.4 var(--font); text-align: center; }

/* ---- Bascule Journée / Semaine (en-tête sombre de A1) ---- */
.a-seg {
  display: flex; gap: 3px; background: rgba(255, 255, 255, .1); padding: 3px;
  border-radius: 10px; margin-bottom: 12px;
}
.a-seg button {
  flex: 1; min-height: 38px; border: 0; border-radius: 8px; background: transparent;
  font: 600 13px/1 var(--font); color: #a7b0bd; cursor: pointer;
}
.a-seg button.on { background: #fff; color: var(--gray-900); }

/* ---- Vue semaine mobile : une carte par jour ---- */
.a-wday {
  background: var(--gray-75); border: 1.5px solid var(--gray-300); border-radius: 14px;
  padding: 12px 13px; display: flex; flex-direction: column; gap: 9px; cursor: pointer;
}
.a-wday.auj { border-color: var(--accent); }
.a-wday.sel { background: var(--accent-soft); border-color: var(--accent); }
.a-wday-top { display: flex; align-items: center; gap: 8px; }
.a-wday-nom { font: 600 14.5px/1 var(--font); color: var(--gray-900); text-transform: capitalize; }
.a-wday-tag { font: 500 10px/1 var(--mono); color: var(--gray-500); }
.a-wday-tag.ext { color: var(--accent); }
.a-wchips { display: flex; flex-wrap: wrap; gap: 6px; }
.a-wchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 9px; border-radius: 8px; background: var(--gray-100);
  font: 500 11.5px/1 var(--mono); color: var(--gray-700);
}
.a-wchip b { font-weight: 600; color: var(--gray-900); }
.a-wchip.on { background: var(--accent-soft); color: var(--accent-down); }
.a-wchip.on b { color: var(--accent-down); }
.a-wchip.warn { background: var(--warn-bg); color: var(--warn-fg); }
.a-wchip.warn b { color: var(--warn-fg); }
.a-wchip.neg { background: var(--neg-bg); color: var(--neg); }
.a-wchip.neg b { color: var(--neg); }
.a-wday-bot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: var(--gray-600);
}

.a-ch-row { display: flex; align-items: center; gap: 12px; }
.a-ch-nom { font: 600 13.5px/1 var(--font); color: var(--gray-900); min-width: 88px; }
.a-ch-lits { flex: 1; display: flex; gap: 5px; }
.a-ch-lit { flex: 1; height: 26px; border-radius: 6px; background: var(--gray-200); }
.a-ch-lit.on { background: var(--accent); }

/* Sur grand écran, l'appli client reste au format téléphone, centrée —
   ces écrans sont pensés pour ce gabarit, pas pour s'étirer en pleine
   largeur de bureau. Ne s'applique plus qu'entre 561px et le seuil web
   (760px), au-delà duquel client.js rend la coquille `w-`/`wc-`. */
@media (min-width: 561px) and (max-width: 760px) {
  .capp { max-width: 560px; margin: 0 auto; box-shadow: 0 0 0 1px var(--gray-300); }
  body:has(.capp) { background: var(--gray-200); }
}

/* =====================================================================
   Parcours client en version web — écrans WC0/WC1/WC2 du handoff.
   Valeurs relevées dans `Appli Bissorte.dc.html` (styles en ligne) : c'est
   la source de vérité, les captures ne font que la documenter.
   ===================================================================== */
.wc-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #f4f6f8; }
.wc-spacer { flex: 1; }
.wc-scroll { flex: 1; overflow: auto; min-height: 0; display: flex; flex-direction: column; }

/* ---- Barre de navigation (h64) ---- */
.wc-nav {
  height: 64px; flex-shrink: 0; background: var(--gray-75);
  border-bottom: 1px solid var(--gray-300);
  display: flex; align-items: center; gap: 30px; padding: 0 34px;
}
.wc-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.wc-brand-logo { width: 32px; height: 32px; border-radius: 10px; background: #2680eb; flex-shrink: 0; }
.wc-brand-txt { display: flex; flex-direction: column; gap: 2px; }
.wc-brand-n { font: 600 14.5px/1 var(--font); color: var(--gray-900); }
.wc-brand-o { font: 500 9.5px/1 var(--mono); letter-spacing: .09em; color: #8a93a0; }
.wc-tabs { display: flex; align-items: center; gap: 4px; }
.wc-tab {
  height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent;
  font: 500 13px/1 var(--font); color: var(--gray-700); cursor: pointer; white-space: nowrap;
}
.wc-tab:hover { background: var(--gray-100); }
.wc-tab.on { background: var(--accent-soft); color: var(--accent-down); font-weight: 600; }
.wc-navcta {
  height: 36px; padding: 0 15px; border: 0; border-radius: 10px; background: #2680eb;
  font: 600 13px/1 var(--font); color: #fff; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.wc-navcta:hover { background: var(--accent-hover); }
.wc-navcta.chalet { background: #2d9d78; }
.wc-userbox {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit;
}
.wc-useravatar {
  width: 32px; height: 32px; border-radius: 16px; background: var(--accent-soft);
  display: grid; place-items: center; font: 600 12px/1 var(--mono); color: var(--accent-down);
}
.wc-usertxt { display: flex; flex-direction: column; gap: 1px; }
.wc-username { font: 600 12.5px/1 var(--font); color: var(--gray-900); }
.wc-userorg { font: 400 11px/1 var(--font); color: #8a93a0; }

/* ---- Héros (WC1) ---- */
/* `flex-shrink:0` est indispensable : sans lui la bande sombre s'écrase dans
   le conteneur en colonne scrollable (noté explicitement par le handoff). */
.wc-hero { flex-shrink: 0; background: #0b2f5c; padding: 30px 34px 34px; position: relative; overflow: hidden; }
.wc-cable { position: absolute; top: 64px; left: -60px; right: -60px; height: 1px; background: rgba(255, 255, 255, .24); transform: rotate(-3deg); }
.wc-cab { position: absolute; top: 44px; left: 640px; width: 38px; height: 28px; border-radius: 7px; background: #2680eb; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.wc-hero-row { position: relative; display: flex; align-items: flex-end; gap: 40px; }
.wc-hero-txt { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.wc-hero-eyebrow { font: 500 10px/1 var(--mono); letter-spacing: .14em; color: #7fb2f5; text-transform: uppercase; }
.wc-hero-txt h1 { margin: 0; font: 700 30px/1.15 var(--font); color: #fff; letter-spacing: -.4px; }
.wc-hero-txt p { margin: 0; font: 400 14px/1.55 var(--font); color: rgba(255, 255, 255, .68); max-width: 44ch; }
.wc-hero-card {
  width: 400px; flex-shrink: 0; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px;
  padding: 17px 19px 19px; display: flex; flex-direction: column; gap: 14px;
}
.wc-hero-card.empty { cursor: pointer; gap: 10px; }
.wc-hero-cardtop { display: flex; align-items: center; justify-content: space-between; }
.wc-hero-lbl { font: 600 9.5px/1 var(--mono); letter-spacing: .11em; color: #a9cdfb; }
.wc-hero-badge { font: 600 9.5px/1 var(--mono); padding: 4px 8px; border-radius: 20px; background: rgba(255, 255, 255, .18); color: #fff; }
.wc-hero-time { display: flex; align-items: flex-end; gap: 14px; }
.wc-hero-h { font: 600 38px/1 var(--mono); color: #fff; letter-spacing: -1px; }
.wc-hero-lines { display: flex; flex-direction: column; gap: 2px; padding-bottom: 5px; min-width: 0; }
.wc-hero-l1 { font: 600 14px/1.2 var(--font); color: #fff; }
.wc-hero-l2 { font: 400 12.5px/1.2 var(--font); color: #a9cdfb; }
.wc-hero-empty { font: 600 15px/1 var(--font); color: #fff; }
.wc-hero-actions { display: flex; gap: 9px; }
.wc-hero-b1, .wc-hero-b2 {
  flex: 1; height: 42px; border: 0; border-radius: 11px; cursor: pointer;
  font: 600 14px/1 var(--font);
}
.wc-hero-b1 { background: #fff; color: var(--accent-down); }
.wc-hero-b2 { background: rgba(255, 255, 255, .14); color: #fff; }
.wc-hero-b2:hover { background: rgba(255, 255, 255, .22); }

/* ---- Corps ---- */
.wc-body { flex-shrink: 0; padding: 22px 34px 30px; display: flex; flex-direction: column; gap: 20px; }
.wc-msg {
  display: flex; gap: 12px; align-items: center; background: var(--warn-bg);
  border: 1px solid #f0d5a8; border-radius: 12px; padding: 13px 16px;
}
.wc-msg-di { width: 10px; height: 10px; background: var(--warn); transform: rotate(45deg); flex-shrink: 0; }
.wc-msg-di.sm { width: 7px; height: 7px; display: inline-block; margin-right: 7px; vertical-align: middle; }
.wc-msg-t { font: 600 13.5px/1.35 var(--font); color: var(--warn-fg); }
.wc-msg-d { font: 400 13px/1.35 var(--font); color: #96601c; }
.wc-cols { display: flex; gap: 20px; align-items: flex-start; }
.wc-colmain { flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.wc-colside { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.wc-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wc-entry {
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 16px;
  padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 40px; cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.wc-entry:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
.wc-entry-ic { width: 34px; height: 26px; border-radius: 7px; background: #2680eb; }
.wc-entry-ic.di { width: 28px; height: 28px; background: #2d9d78; transform: rotate(45deg); }
.wc-entry-txt { display: flex; flex-direction: column; gap: 5px; }
.wc-entry-t { font: 600 18px/1.25 var(--font); color: var(--gray-900); }
.wc-entry-s { font: 400 13px/1.45 var(--font); color: #7b8492; }

.wc-card {
  background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 16px;
  padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 13px;
}
.wc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wc-eyebrow { font: 600 10px/1 var(--mono); letter-spacing: .09em; color: #8a93a0; }
.wc-note { font: 400 12px/1.45 var(--font); color: #8a93a0; }
.wc-note.center { text-align: center; font-size: 11px; line-height: 1.3; }
.wc-link { border: 0; background: none; padding: 0; font: 500 12px/1 var(--font); color: var(--accent-down); cursor: pointer; }
.wc-link.muted { color: var(--gray-700); }
.wc-hr { height: 1px; background: #eef0f3; }

/* Lignes de réservation */
.wc-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--gray-300); border-radius: 12px;
}
/* Une demande en attente garde la bordure en pointillés — même convention
   qu'en mobile et sur la console. */
.wc-row.attente { border-style: dashed; border-color: #b9c1cc; }
.wc-row-bar { width: 4px; height: 38px; border-radius: 2px; flex-shrink: 0; }
.wc-row-h { font: 600 15px/1 var(--mono); color: var(--gray-900); min-width: 52px; }
.wc-row-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-row-t { font: 600 14px/1.3 var(--font); color: var(--gray-900); }
.wc-row-s { font: 400 12.5px/1.3 var(--font); color: #7b8492; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-badge { font: 600 10px/1 var(--mono); padding: 5px 9px; border-radius: 20px; white-space: nowrap; }
.wc-badge.cabine { background: var(--accent-soft); color: var(--accent-down); }
.wc-badge.chalet { background: #e8f5ef; color: #1f7a5c; }
.wc-badge.attente { background: var(--gray-100); color: var(--gray-700); }
.wc-badge.neg { background: var(--neg-bg); color: var(--neg); }

/* Créneaux du jour */
.wc-slots { display: flex; flex-direction: column; gap: 9px; }
.wc-slot { display: flex; align-items: center; gap: 11px; }
.wc-slot-h { font: 600 13px/1 var(--mono); color: var(--gray-900); min-width: 44px; }
.wc-slot-bar { flex: 1; height: 6px; border-radius: 3px; background: #e9ecf1; overflow: hidden; }
.wc-slot-bar i { display: block; height: 6px; border-radius: 3px; }
.wc-slot-n { font: 500 11px/1 var(--mono); color: #7b8492; min-width: 30px; text-align: right; }
.wc-slot-n.full { color: var(--warn); }
.wc-tip { display: flex; gap: 10px; align-items: flex-start; }
.wc-dot { width: 7px; height: 7px; border-radius: 4px; background: #2680eb; margin-top: 6px; flex-shrink: 0; }
.wc-dot.chalet { background: #2d9d78; }
.wc-tip span:last-child { font: 400 13px/1.5 var(--font); color: #3d4653; }

.wc-pagehead { display: flex; align-items: flex-end; gap: 16px; }
.wc-pagetitle { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wc-pagetitle h2 { margin: 0; font: 700 24px/1.2 var(--font); color: var(--gray-900); letter-spacing: -.2px; }
.wc-pagetitle span { font: 400 13.5px/1.45 var(--font); color: #7b8492; }

/* ---- WC2 — Réserver ---- */
.wc-resa { width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px 34px 30px; display: flex; flex-direction: column; gap: 20px; box-sizing: border-box; }
.wc-resa-head { display: flex; align-items: flex-end; gap: 16px; }
.wc-resa-cols { display: flex; gap: 20px; align-items: flex-start; }
.wc-resa-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.wc-resa-right { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.wc-resa .wc-card { border-radius: 16px; padding: 20px 22px; gap: 14px; }

.wc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wc-days.ouvres { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wc-day {
  border-radius: 12px; padding: 13px 6px 14px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer;
  border: 1.5px solid var(--gray-300); background: var(--gray-75);
}
.wc-day-l { font: 500 11.5px/1 var(--font); color: #8a93a0; }
.wc-day-n { font: 600 22px/1.1 var(--mono); color: var(--gray-900); }
.wc-day-tag { font: 500 9.5px/1 var(--mono); color: #8a93a0; }
.wc-day.on { background: var(--accent); border-color: var(--accent); }
.wc-day.on .wc-day-n { color: #fff; }
.wc-day.on .wc-day-l, .wc-day.on .wc-day-tag { color: var(--accent-line); }
.c-daycell.depart, .wc-day.depart { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.c-daycell.depart .c-daycell-num, .wc-day.depart .wc-day-n { color: var(--accent-down); }
/* Jour fermé aux extérieurs : gris et non cliquable, la règle se lit. */
.wc-day.off { background: var(--gray-100); cursor: default; }
.wc-day.off .wc-day-n { color: #9aa3af; }

.wc-sensrow { display: flex; align-items: center; gap: 16px; }
.wc-seg { display: flex; gap: 6px; background: #e9ecf1; padding: 4px; border-radius: 12px; width: 300px; }
.wc-seg button {
  flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent;
  font: 600 13.5px/1 var(--font); color: var(--gray-700); cursor: pointer;
}
.wc-seg button.on { background: var(--gray-75); color: var(--accent-down); box-shadow: 0 1px 3px rgba(16, 21, 27, .14); }

.wc-cr {
  border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 18px;
  cursor: pointer; border: 1.5px solid var(--gray-300); background: var(--gray-75);
}
.wc-cr.on { background: var(--accent-soft); border-color: #2680eb; }
.wc-cr.on .wc-cr-h { color: var(--accent-down); }
.wc-cr.full { cursor: default; opacity: .7; }
.wc-cr-h { font: 600 24px/1 var(--mono); color: var(--gray-900); min-width: 74px; }
.wc-cr-mid { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wc-cr { min-width: 0; }
.wc-cr-s { font: 600 14px/1.2 var(--font); color: var(--gray-900); }
.wc-cr-bar { height: 6px; border-radius: 3px; background: var(--gray-300); overflow: hidden; }
.wc-cr-bar i { display: block; height: 6px; border-radius: 3px; }
.wc-cr-d { font: 400 12.5px/1.25 var(--font); color: #7b8492; min-width: 0; text-align: right; }
.wc-cr-badge { font: 600 9.5px/1 var(--mono); padding: 6px 9px; border-radius: 20px; background: #e8f5ef; color: #1f7a5c; white-space: nowrap; }
.wc-cr-badge.full { background: #fdeceb; color: var(--neg); }

.wc-recap { background: var(--accent-soft); border-radius: 12px; padding: 13px 15px; display: flex; align-items: center; gap: 13px; }
.wc-recap-h { font: 600 20px/1 var(--mono); color: var(--accent-down); }
.wc-recap-l { font: 500 13px/1.3 var(--font); color: var(--accent-down); }
.wc-paxcount { font: 500 11.5px/1 var(--mono); color: var(--gray-700); }
.wc-pax {
  border-radius: 12px; padding: 11px 13px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; border: 1.5px solid var(--gray-300); background: var(--gray-75);
}
.wc-pax.on { background: var(--accent-soft); border-color: #2680eb; }
.wc-paxbox {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--gray-75); border: 1.5px solid #cfd5dd; font: 600 12px/1 var(--font); color: #fff;
}
.wc-paxbox.on { background: #2680eb; border-color: #2680eb; }
.wc-pax-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wc-pax-n { font: 600 13.5px/1.25 var(--font); color: var(--gray-900); }
.wc-pax-e { font: 400 11.5px/1.25 var(--font); color: #7b8492; }
.wc-dashed {
  border: 1.5px dashed #b9c1cc; border-radius: 12px; padding: 11px; width: 100%;
  min-height: 46px; text-align: center; font: 600 13.5px/1 var(--font);
  color: var(--gray-700); background: none; cursor: pointer;
}
.wc-alerte {
  background: var(--warn-bg); border-radius: 9px; padding: 9px 11px;
  display: flex; gap: 9px; align-items: flex-start;
  font: 500 12px/1.35 var(--font); color: var(--warn-fg);
}
.wc-alerte .wc-msg-di { margin-top: 3px; }
.wc-field { display: flex; flex-direction: column; gap: 6px; }
.wc-field input { height: 42px; border-radius: 10px; border: 1.5px solid var(--gray-300); background: var(--gray-75); font: 600 15px/1 var(--mono); color: var(--gray-900); }

/* ---- Barre d'action ancrée (hors zone scrollable) ---- */
.wc-actionbar {
  flex-shrink: 0; background: var(--gray-75); border-top: 1px solid var(--gray-300);
  padding: 14px 34px; display: flex; align-items: center; gap: 22px;
}
.wc-materiel { width: 230px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.wc-materiel-txt { display: flex; flex-direction: column; gap: 1px; }
.wc-materiel-t { font: 600 13px/1.25 var(--font); color: var(--gray-900); }
.wc-materiel-s { font: 400 11px/1.25 var(--font); color: #7b8492; }
.wc-send { width: 250px; flex-shrink: 0; display: flex; flex-direction: column; gap: 5px; }
.wc-cta {
  height: 48px; border: 0; border-radius: 13px; background: #2680eb; color: #fff;
  font: 600 15px/1 var(--font); cursor: pointer; box-shadow: 0 8px 20px rgba(38, 128, 235, .28);
}
.wc-cta:hover { background: var(--accent-hover); }
.wc-cta.off { background: var(--gray-300); color: #9aa3af; box-shadow: none; cursor: not-allowed; }
.wc-cta.ghost { background: var(--gray-75); color: #3d4653; border: 1.5px solid var(--gray-300); box-shadow: none; }

/* ---- Confirmation ---- */
.wc-confirm { width: 640px; margin: 0 auto; padding: 40px 34px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.wc-confirm-ic { width: 64px; height: 64px; border-radius: 32px; background: #e8f5ef; display: grid; place-items: center; }
.wc-confirm-ic i { width: 24px; height: 24px; border-radius: 12px; background: #2d9d78; display: block; }
.wc-confirm-txt { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.wc-confirm-t { font: 700 24px/1.2 var(--font); color: var(--gray-900); }
.wc-confirm-s { font: 400 14px/1.55 var(--font); color: #7b8492; text-align: center; max-width: 46ch; }
.wc-billet {
  width: 100%; background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 18px;
  padding: 24px 26px; display: flex; gap: 26px; align-items: center;
}
.wc-qr {
  width: 140px; height: 140px; flex-shrink: 0; border-radius: 10px; position: relative;
  background: conic-gradient(#10151b 0 25%, #fff 0 50%, #10151b 0 75%, #fff 0) 0 0/16px 16px;
}
.wc-qr span {
  position: absolute; inset: 50px; background: #fff; border-radius: 6px;
  display: grid; place-items: center; font: 600 10px/1 var(--mono); color: var(--gray-900);
}
.wc-billet-main { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wc-billet-top { display: flex; align-items: center; gap: 12px; }
.wc-billet-h { font: 600 26px/1 var(--mono); color: var(--accent-down); }
.wc-billet-l { font: 500 14px/1.3 var(--font); color: #3d4653; }
.wc-billet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wc-billet-grid > div { display: flex; flex-direction: column; gap: 3px; }
.wc-billet-v { font: 600 13.5px/1.3 var(--mono); color: var(--gray-900); }
.wc-billet-v.attente { font-family: var(--font); color: var(--warn); }
.wc-billet-noms { font: 400 12.5px/1.5 var(--font); color: #7b8492; }
.wc-confirm-actions { display: flex; gap: 12px; width: 100%; }
.wc-confirm-actions .wc-cta { flex: 1; }

/* ---- Barre de statut (h34) ---- */
.wc-status {
  height: 34px; flex-shrink: 0; background: var(--gray-75); border-top: 1px solid var(--gray-300);
  display: flex; align-items: center; gap: 18px; padding: 0 34px;
  font: 400 11.5px/1 var(--mono); color: #7b8492;
}

/* Billet, bon de séjour, dossier : le gabarit téléphone reste le bon support
   pour un document — on le centre au lieu de l'étirer. */
.wc-doc { max-width: 560px; margin: 0 auto; background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 16px; overflow: hidden; }
.wc-doc .cscreen { overflow: visible; }

/* Compléments à la vue Réserver de la console (W1). */
.w-eyebrow-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.w-res-note { font: 400 11.5px/1.5 var(--font); color: var(--gray-600); }
.w-res-day.off { opacity: .45; cursor: default; background: var(--gray-100); }
.w-res-cr.full { opacity: .55; cursor: default; }

/* =====================================================================
   WC0 — Connexion web : écran partagé en deux.
   ===================================================================== */
.wl-split { display: flex; height: 100vh; height: 100dvh; }
.wl-brand {
  width: 620px; flex-shrink: 0; background: #0b2f5c; padding: 44px 48px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.wl-cable { position: absolute; top: 300px; left: -80px; right: -80px; height: 1px; background: rgba(255, 255, 255, .26); transform: rotate(-7deg); }
.wl-cab { position: absolute; top: 268px; left: 392px; width: 44px; height: 32px; border-radius: 8px; background: #2680eb; box-shadow: 0 10px 26px rgba(0, 0, 0, .42); }
.wl-brandtop { display: flex; align-items: center; gap: 12px; position: relative; }
.wl-logo { width: 34px; height: 34px; border-radius: 10px; background: #2680eb; flex-shrink: 0; }
.wl-org { font: 500 10px/1 var(--mono); letter-spacing: .14em; color: #7fb2f5; }
.wl-brandmid { margin-top: auto; margin-bottom: auto; position: relative; display: flex; flex-direction: column; gap: 14px; }
.wl-brandmid h1 { margin: 0; font: 700 40px/1.1 var(--font); color: #fff; letter-spacing: -.8px; }
.wl-brandmid p { margin: 0; font: 400 16px/1.55 var(--font); color: rgba(255, 255, 255, .68); max-width: 34ch; }
.wl-figures { display: flex; gap: 44px; position: relative; }
.wl-figures > div { display: flex; flex-direction: column; gap: 5px; }
.wl-fig { font: 600 22px/1 var(--mono); color: #fff; }
.wl-figlbl { font: 400 12px/1 var(--font); color: rgba(255, 255, 255, .55); }

.wl-form { flex: 1; background: #f4f6f8; display: flex; align-items: center; justify-content: center; padding: 40px; min-width: 0; }
.wl-formbox { width: 100%; max-width: 420px; display: flex; flex-direction: column; }
.wl-formbox h2 { margin: 0; font: 700 24px/1.2 var(--font); color: var(--gray-900); }
.wl-lead { margin: 8px 0 26px; font: 400 13.5px/1.5 var(--font); color: #7b8492; }
.wl-lbl { font: 600 10px/1 var(--mono); letter-spacing: .09em; color: #8a93a0; margin-bottom: 9px; }
.wl-lblhint { font-family: var(--font); font-weight: 400; letter-spacing: 0; text-transform: none; }
.wl-pin { position: relative; margin-bottom: 22px; }
.wl-cells { display: flex; gap: 10px; }
.wl-cell {
  flex: 1; height: 58px; border-radius: 12px; background: var(--gray-75);
  border: 1.5px solid #cfd5dd; display: grid; place-items: center;
  font: 600 26px/1 var(--mono); color: var(--gray-900);
}
.wl-cell.on { border: 2px solid #2680eb; background: var(--accent-soft); }
/* Le vrai champ est invisible mais reçoit la frappe : les cases n'en sont
   qu'un reflet (même mécanique qu'en mobile). */
.wl-pin input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  border: 0; background: none; cursor: pointer;
}
.wl-entwrap { margin-bottom: 22px; }
.wl-ident {
  height: 52px; border-radius: 12px; border: 1.5px solid var(--gray-300);
  background: var(--gray-75); padding: 0 14px; font: 400 14px/1 var(--font);
  color: var(--gray-900); margin-bottom: 22px;
}
.wl-ident::placeholder { color: #9aa3af; }
.wl-btn {
  height: 54px; border: 0; border-radius: 14px; background: #2680eb; color: #fff;
  font: 600 15.5px/1 var(--font); cursor: pointer; box-shadow: 0 8px 20px rgba(38, 128, 235, .3);
}
.wl-btn:hover { background: var(--accent-hover); }
.wl-sep { height: 1px; background: var(--gray-300); margin: 24px 0 16px; }
.wl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 400 12.5px/1.4 var(--font); color: #7b8492; }
.wl-link { color: var(--accent-down); cursor: pointer; }

/* =====================================================================
   Boîte de confirmation au premier plan (demandes exceptionnelles).
   ===================================================================== */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200; background: rgba(11, 21, 33, .55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  width: 100%; max-width: 440px; background: var(--gray-75);
  border-radius: 18px; padding: 26px 28px 22px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  max-height: 100%; overflow: auto; box-sizing: border-box;
}
.modal-ic {
  width: 44px; height: 44px; border-radius: 22px; background: var(--warn-bg);
  display: grid; place-items: center; flex-shrink: 0;
}
.modal-ic::after { content: ""; width: 14px; height: 14px; background: var(--warn); transform: rotate(45deg); }
.modal-t { margin: 0; font: 700 19px/1.25 var(--font); color: var(--gray-900); }
.modal-b { display: flex; flex-direction: column; gap: 10px; }
.modal-b p { margin: 0; font: 400 13.5px/1.55 var(--font); color: var(--gray-800); }
.modal-actions { display: flex; gap: 10px; margin-top: 4px; }
/* `min-height` et non `height` : en colonne (petit écran), l'axe principal du
   flex devient la hauteur et un `flex-basis:0` écrasait ces boutons à la
   hauteur du texte (18px mesurés). `flex-basis:auto` + min-height tient dans
   les deux orientations. */
.modal-no, .modal-yes {
  flex: 1 1 auto; min-height: 50px; border: 0; border-radius: 12px; cursor: pointer;
  font: 600 15px/1.25 var(--font); padding: 12px 14px;
}
.modal-no { background: var(--gray-100); color: var(--gray-800); }
.modal-no:hover { background: var(--gray-200); }
.modal-yes { background: var(--warn); color: #fff; }
.modal-yes:hover { filter: brightness(1.08); }
/* Formulaire dans une modale : cibles tactiles confortables, et 16px sur les
   champs (en dessous, iOS zoome au focus). */
.modal .field > label { font-size: 11.5px; }
.modal .field input, .modal .field select, .modal .field textarea {
  height: 48px; font-size: 16px; border-radius: 10px;
}
/* Encart d'alerte dans une modale : même vocabulaire ambré que le reste. */
.modal-alerte {
  background: var(--warn-bg); border-radius: 10px; padding: 11px 13px;
  display: flex; gap: 10px; align-items: flex-start;
  font: 400 12.5px/1.45 var(--font); color: var(--warn-fg);
}
.modal-alerte .w-diamond { margin-top: 4px; }
/* Trois choix (retour / à pied / annuler) : empilés, l'action neutre en bas. */
.modal-actions.col { flex-direction: column; }
.modal-actions.col .modal-no, .modal-actions.col .modal-yes { width: 100%; flex: 0 0 auto; }
.modal-actions.col .modal-yes { background: var(--accent); }
.modal-annule {
  border: 0; background: none; cursor: pointer; padding: 8px;
  min-height: 40px; font: 500 13.5px/1.25 var(--font); color: var(--gray-600);
}
.modal-annule:hover { color: var(--gray-800); text-decoration: underline; }
@media (max-width: 560px) {
  .modal-actions { flex-direction: column-reverse; }
  .modal-no, .modal-yes { width: 100%; flex: 0 0 auto; }
  /* `col` impose déjà son ordre : ne pas l'inverser une seconde fois. */
  .modal-actions.col { flex-direction: column; }
}

/* =====================================================================
   Menu « Ajouter un billet » — FAB mobile, menu déroulant web, et la
   fiche coordonnées qu'ils ouvrent en aval (nouveauté du handoff V3).
   ===================================================================== */
.fab {
  position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 28px; border: 0;
  background: #2680eb; color: #fff;
  box-shadow: 0 10px 24px rgba(38, 128, 235, .4);
  display: grid; place-items: center; z-index: 55; cursor: pointer;
}
.fab:hover { background: var(--accent-hover); }
.fab-plus { font: 400 28px/1 var(--font); margin-top: -2px; }

/* ---- Feuille du bas (choix mobile) ---- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 210; background: rgba(16, 21, 27, .44);
  display: flex; align-items: flex-end;
}
.sheet {
  width: 100%; background: var(--gray-75); border-radius: 22px 22px 0 0;
  padding: 10px 20px max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 4px;
  max-height: 82vh; overflow-y: auto; box-sizing: border-box;
  box-shadow: 0 -12px 30px rgba(16, 21, 27, .2);
}
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--gray-400); align-self: center; margin: 6px 0 10px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sheet-t { margin: 0; font: 700 20px/1.25 var(--font); color: var(--gray-900); }
.sheet-sub { display: block; margin-top: 2px; font: 400 13px/1.4 var(--font); color: var(--gray-600); }
.sheet-x {
  width: 30px; height: 30px; border-radius: 15px; border: 0; background: var(--gray-100);
  color: var(--gray-700); font-size: 14px; flex-shrink: 0; cursor: pointer;
}
.sheet-rows { display: flex; flex-direction: column; }

/* ---- Menu déroulant ancré (choix web) ---- */
.ddmenu-scrim { position: fixed; inset: 0; z-index: 210; }
.ddmenu {
  position: fixed; width: 320px; background: var(--gray-75); border-radius: 14px;
  border: 1px solid var(--gray-300); box-shadow: 0 16px 40px rgba(16, 21, 27, .18);
  padding: 10px; display: flex; flex-direction: column; gap: 0; box-sizing: border-box;
}
.ddmenu-head { display: block; padding: 6px 8px 10px; font: 600 10px/1 var(--mono); letter-spacing: .09em; color: #8a93a0; }

/* ---- Lignes de choix, partagées feuille du bas et menu déroulant ---- */
.addrow {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none;
  text-align: left; cursor: pointer; padding: 12px 6px; border-radius: 10px;
}
.addrow:hover { background: var(--gray-100); }
.sheet .addrow + .addrow { border-top: 1px solid var(--gray-300); }
.addrow-ic { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; position: relative; }
.addrow-ic.cabine { background: #eaf2fe; }
.addrow-ic.chalet { background: #e8f5ef; }
.addrow-ic.dossier { background: var(--gray-100); }
.addrow-ic-shape { width: 16px; height: 12px; border-radius: 4px; background: #2680eb; }
.addrow-ic.chalet .addrow-ic-shape { width: 14px; height: 14px; border-radius: 0; background: #2d9d78; transform: rotate(45deg); }
.addrow-ic.dossier .addrow-ic-shape { position: absolute; width: 9px; height: 9px; border-radius: 5px; }
.addrow-ic.dossier .addrow-ic-shape.a { background: #2680eb; left: 8px; }
.addrow-ic.dossier .addrow-ic-shape.b { background: #2d9d78; left: 18px; }
.addrow-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.addrow-t { font: 600 14.5px/1.25 var(--font); color: var(--gray-900); }
.addrow-s { font: 400 12px/1.35 var(--font); color: var(--gray-600); }
.addrow-chev { color: var(--gray-500); font-size: 16px; flex-shrink: 0; }

/* ---- Fiche coordonnées : plein écran mobile ---- */
.coord-page {
  position: fixed; inset: 0; z-index: 220; background: var(--gray-50);
  display: flex; flex-direction: column;
}
.coord-head {
  flex-shrink: 0; background: var(--gray-900); color: #fff;
  padding: max(28px, env(safe-area-inset-top)) 20px 16px;
  display: flex; align-items: center; gap: 12px;
}
.coord-back {
  width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 18px; flex-shrink: 0; cursor: pointer;
}
.coord-headtxt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.coord-head .coord-t { font: 600 17px/1.2 var(--font); color: #fff; }
.coord-head .coord-s { font: 400 12.5px/1.4 var(--font); color: rgba(255, 255, 255, .6); }
.coord-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.coord-actionbar {
  flex-shrink: 0; background: var(--gray-75); border-top: 1px solid var(--gray-300);
  padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.coord-cta {
  width: 100%; height: 54px; border: 0; border-radius: 14px; background: var(--accent); color: #fff;
  font: 600 16.5px/1 var(--font); cursor: pointer; box-shadow: 0 8px 20px var(--accent-shadow);
}
.coord-cancel {
  border: 0; background: none; color: var(--gray-600); font: 500 13.5px/1 var(--font);
  padding: 8px; cursor: pointer;
}

/* ---- Fiche coordonnées : fenêtre modale web ---- */
.coord-scrim {
  position: fixed; inset: 0; z-index: 220; background: rgba(16, 21, 27, .4);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.coord-modal {
  position: relative; width: 100%; max-width: 600px; background: var(--gray-75);
  border-radius: 18px; padding: 28px 32px 26px; box-shadow: 0 24px 60px rgba(16, 21, 27, .28);
  max-height: 100%; overflow-y: auto; box-sizing: border-box;
}
.coord-modal .coord-t { margin: 0; font: 700 22px/1.25 var(--font); color: var(--gray-900); }
.coord-modal .coord-s { display: block; margin-top: 3px; font: 400 13.5px/1.4 var(--font); color: var(--gray-600); }
.coord-modal .coord-body { padding: 20px 0 0; gap: 16px; }
.coord-x {
  position: absolute; top: 22px; right: 22px; width: 30px; height: 30px; border-radius: 15px;
  border: 0; background: var(--gray-100); color: var(--gray-700); font-size: 14px; cursor: pointer;
}
.coord-modalactions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.coord-cancel-btn {
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--gray-300);
  background: var(--gray-75); color: var(--gray-800); font: 600 13.5px/1 var(--font); cursor: pointer;
}
.coord-modal .coord-cta { width: auto; height: 44px; padding: 0 22px; border-radius: 12px; font-size: 14px; box-shadow: none; }

/* ---- Champs de la fiche, partagés page mobile / modale web ---- */
.cf-field { display: flex; flex-direction: column; gap: 5px; }
.cf-lbl { font: 600 10px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--gray-600); }
.cf-lbl i { font-style: normal; font-family: var(--font); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--gray-500); }
.cf-field input, .cf-field textarea, .cf-field select {
  height: 52px; border-radius: 12px; border: 1.5px solid var(--gray-300);
  background: var(--gray-75); padding: 0 14px; font: 400 15px/1 var(--font); color: var(--gray-900);
  box-sizing: border-box;
}
.cf-field textarea { height: auto; min-height: 64px; padding: 10px 14px; font: 400 14px/1.4 var(--font); resize: vertical; }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: var(--gray-500); }
.cf-field input:focus, .cf-field textarea:focus, .cf-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cf-static {
  height: 52px; border-radius: 12px; border: 1.5px solid transparent;
  background: var(--gray-100); padding: 0 14px; font: 400 15px/1 var(--font); color: var(--gray-700);
  box-sizing: border-box; display: flex; align-items: center;
}
.cf-nom input { border-color: #2680eb; background: #eaf2fe; font-weight: 500; }
.cf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.coord-page .cf-row2 { grid-template-columns: 1fr; gap: 16px; }

/* ---- Sélecteur d'entreprise (compte externe partagé) ---- */
.ent-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; gap: 2px; margin: 10px 0; }
.ent-row.on { background: var(--accent-soft); }
.ent-row.on .addrow-t { color: var(--accent-down); }
.ent-switch {
  border: 0; background: none; padding: 0; cursor: pointer; text-align: left;
  font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px;
}

/* ---- Combobox entreprise (déclencheur stylé + panneau ancré) — remplace un
   `<select>` natif sur l'écran de connexion et la fiche admin. ---- */
.ecombo { position: relative; }
.ecombo-trigger {
  width: 100%; height: 52px; border-radius: 12px; border: 1.5px solid var(--gray-300);
  background: var(--gray-75); padding: 0 14px; font: 400 15px/1 var(--font); color: var(--gray-900);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; text-align: left; box-sizing: border-box;
}
.ecombo-trigger.placeholder .ecombo-val { color: var(--gray-500); }
.ecombo-trigger.open, .ecombo-trigger:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}
.ecombo-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecombo-chev { color: var(--gray-500); font-size: 11px; flex-shrink: 0; transition: transform .15s ease; }
.ecombo-trigger.open .ecombo-chev { transform: rotate(180deg); }
.ecombo-panel {
  position: fixed; z-index: 260; width: var(--w, 320px); background: var(--gray-75);
  border-radius: 14px; border: 1px solid var(--gray-300); box-shadow: 0 16px 40px rgba(16, 21, 27, .18);
  padding: 6px; max-height: 280px; overflow-y: auto; box-sizing: border-box;
}
.ecombo-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  border: 0; background: none; text-align: left; cursor: pointer; padding: 11px 10px;
  border-radius: 9px; font: 500 13.5px/1.3 var(--font); color: var(--gray-900);
}
.ecombo-row:hover { background: var(--gray-100); }
.ecombo-row.on { background: var(--accent-soft); color: var(--accent-down); font-weight: 600; }
.ecombo-row-check { color: var(--accent-down); font-size: 13px; }
.ecombo-row.new {
  color: var(--accent-down); font-weight: 600; margin-top: 4px;
  border-top: 1px solid var(--gray-300); border-radius: 0; padding-top: 13px;
}
.ecombo-empty { padding: 14px 10px; font: 400 13px/1.4 var(--font); color: var(--gray-600); }
.ecombo-add { display: flex; gap: 8px; padding: 4px; }
.ecombo-add input {
  flex: 1; height: 42px; border-radius: 10px; border: 1.5px solid var(--gray-300);
  background: #fff; padding: 0 12px; font: 400 13.5px/1 var(--font); color: var(--gray-900); box-sizing: border-box;
}
.ecombo-add input:focus { outline: none; border-color: var(--accent); }
.ecombo-addok {
  height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent);
  color: #fff; font: 600 13px/1 var(--font); cursor: pointer; flex-shrink: 0;
}
.ecombo-addok:hover { background: var(--accent-hover); }

/* ------------------------------------------------------------ Impression */
.printdoc { display: none; }
@media print {
  body { overflow: visible; background: #fff; color: #000; }
  .shell, .panel, .scrim, .toast { display: none !important; }
  .printdoc { display: block; padding: 12mm; font-size: 11pt; color: #000; }
  .printdoc h1 { font-size: 16pt; margin-bottom: 2mm; }
  .printdoc .ph { font-size: 10pt; color: #444; margin-bottom: 6mm; }
  .printdoc table { width: 100%; border-collapse: collapse; }
  .printdoc th, .printdoc td { border: 1px solid #999; padding: 2mm 3mm; text-align: left; }
  .printdoc th { background: #eee; font-size: 9pt; text-transform: uppercase; }
  .printdoc .sign { margin-top: 10mm; font-size: 10pt; }
}

/* ------------------------------------------------- Pointage — affiches QR */
@media print {
  .pr-qrpage { page-break-after: always; break-after: page; text-align: center; padding-top: 8mm; }
  .pr-qrpage:last-child { page-break-after: auto; break-after: auto; }
  .pr-qrorg { font: 600 10pt/1 var(--mono); letter-spacing: .08em; color: #555; }
  .pr-qrgare { font-size: 34pt; font-weight: 700; margin-top: 8mm; }
  .pr-qraction { display: inline-block; margin-top: 6mm; padding: 3mm 9mm; border-radius: 10mm;
                 font-size: 26pt; font-weight: 800; color: #fff; background: #2680eb;
                 -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr-qraction.debarquer { background: #2d9d78; }
  .pr-qrimg svg { width: 120mm; height: 120mm; margin-top: 8mm; }
  .pr-qrtxt { font-size: 15pt; margin-top: 6mm; line-height: 1.4; }
  .pr-qrsub { font-size: 11pt; color: #555; margin-top: 4mm; }
}

/* ------------------------------------------------- Présence (pointage gares) */
.pr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pr-tile { background: var(--gray-75); border: 1px solid var(--gray-300); border-radius: 12px; padding: 10px 12px;
           display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pr-tile.big { background: var(--gray-900); border-color: var(--gray-900); color: #fff; }
.pr-tile.big .pr-tile-l { color: #aab2bf; }
.pr-tile.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.pr-tile-v { font: 600 24px/1 var(--mono); }
.pr-tile-l { font-size: 11.5px; color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pr-actions .c-btn { flex: 1 1 auto; }
.pr-gh { margin: 8px 0 8px; }
.pr-note { font-size: 12.5px; color: var(--warn-fg); background: var(--warn-bg); border: 1px solid var(--warn-line);
           border-radius: 9px; padding: 8px 10px; margin-bottom: 8px; }
.pr-row, .pr-ev { display: flex; align-items: center; gap: 10px; background: var(--gray-75);
                  border: 1px solid var(--gray-300); border-radius: 12px; padding: 11px 12px; margin-bottom: 7px; }
.pr-tel { font: 500 12.5px/1 var(--mono); color: var(--gray-700); text-decoration: none; white-space: nowrap; }
.pr-act { flex-shrink: 0; border: 0; background: var(--accent); color: #fff; border-radius: 8px; padding: 8px 11px;
          font: 600 12.5px/1 var(--font); cursor: pointer; min-height: 34px; }
.pr-act.ghost { background: transparent; color: var(--gray-700); border: 1px solid var(--gray-300); }
.pr-ev.annule { opacity: .55; }
.pr-ev.annule .c-row-t { text-decoration: line-through; }
.pr-ev-h { font: 600 13px/1 var(--mono); color: var(--gray-800); width: 42px; flex-shrink: 0; }
.pr-ev-a { font: 600 11px/1 var(--mono); padding: 5px 7px; border-radius: 6px; flex-shrink: 0; }
.pr-ev-a.embarquer { background: #eaf2fe; color: #0d66d0; }
.pr-ev-a.debarquer { background: var(--pos-bg); color: var(--pos); }
.pr-jnav { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.pr-jlbl { flex: 1; text-align: center; font-weight: 600; font-size: 13.5px; }
.pr-navbtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--gray-300); background: var(--gray-75);
             font-size: 18px; cursor: pointer; color: var(--gray-800); }
.pr-navbtn:disabled { opacity: .35; cursor: default; }
.pr-web { display: grid; grid-template-columns: minmax(380px, 1.15fr) minmax(340px, 1fr); gap: 16px; height: 100%; min-height: 0; }
.pr-col { min-height: 0; overflow: hidden; }
.pr-scroll { overflow: auto; min-height: 0; flex: 1; padding-right: 2px; }
.pr-form input { width: 100%; height: 42px; border: 1px solid var(--gray-400); border-radius: 9px; padding: 0 11px;
                 font: inherit; font-size: 15px; background: #fff; }
.pr-lbl { display: block; font: 600 11px/1 var(--mono); letter-spacing: .06em; color: var(--gray-600);
          text-transform: uppercase; margin: 14px 0 6px; }
.pr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px), (pointer: coarse) {
  .pr-form input { height: 46px; font-size: 16px; }
  .pr-act { min-height: 38px; }
}
/* Icône « Présence » (triangle = la montée) — onglet mobile et rail web. */
.c-ic-tri, .w-railic.tri { background: none; border-radius: 0; width: 0; height: 0;
  border-left: 11px solid transparent; border-right: 11px solid transparent; border-bottom: 19px solid currentColor; }
/* Présence sur téléphone : le nom d'abord, en entier ; téléphone, étiquette
   et bouton passent sur une seconde ligne. Place réservée au bouton « + ». */
.pr-body { padding-bottom: 96px; }
@media (max-width: 760px) {
  .pr-tiles { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px; }
  .pr-tile { padding: 9px 9px; }
  .pr-tile-v { font-size: 21px; }
  .pr-tile-l { font-size: 10.5px; white-space: normal; line-height: 1.2; }
  .pr-row, .pr-ev { flex-wrap: wrap; row-gap: 8px; }
  .pr-row .c-row-main { flex: 1 1 100%; }
  .pr-row .c-row-t, .pr-row .c-row-s, .pr-ev .c-row-s { white-space: normal; }
  .pr-row .pr-tel { flex: 1; }
  .pr-ev .c-row-main { flex: 1 1 60%; }
}

/* =====================================================================
   Annuaire (Paramètres) — préfixe `an-`. Une carte par entreprise, le GU
   en tête ; lignes en grille qui se replient sur deux lignes en mobile.
   ===================================================================== */
.kpi.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.kpi.warn .v { color: var(--warn); }
.badge.warnb { border-color: var(--warn); color: var(--warn); }
.badge.an-gu { border-color: rgba(255,255,255,.5); color: #fff; }

.an-tools {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  margin-bottom: var(--sp-1);
}
.an-tools input[type="search"] { flex: 1 1 260px; max-width: 420px; }

.an-card {
  background: var(--gray-75); border: 1px solid var(--gray-300);
  border-radius: var(--r-3); margin-top: var(--sp-2); overflow: hidden;
}
.an-card.hors { border-left: 3px solid var(--warn); }
.an-card.sans { border-style: dashed; }
.an-head {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: 10px var(--sp-3); cursor: pointer; user-select: none;
}
.an-head:hover { background: var(--gray-100); }
.an-card.gu .an-head { background: var(--accent-dark); color: #fff; }
.an-card.gu .an-head:hover { filter: brightness(1.12); }
.an-chev {
  width: 0; height: 0; flex: 0 0 auto; transition: transform .15s;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid currentColor; opacity: .6;
}
.an-card.replie .an-chev { transform: rotate(-90deg); }
.an-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.an-nom { font-weight: 700; font-size: 14px; }
.an-meta {
  margin-left: auto; display: flex; gap: var(--sp-3); align-items: baseline; flex-wrap: wrap;
  font-size: 12px; color: var(--gray-600);
}
.an-card.gu .an-meta { color: rgba(255,255,255,.75); }
.an-last { font-size: 11.5px; }

.an-body { border-top: 1px solid var(--gray-300); padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.an-card.replie .an-body { display: none; }
.an-info {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  font-size: 12px; padding: 2px 0 var(--sp-1);
}
.an-sub {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--gray-600); margin: var(--sp-3) 0 2px;
}
.an-sub .btn { text-transform: none; letter-spacing: 0; }
.an-rows { border-top: 1px solid var(--gray-200); }
.an-row {
  display: grid; align-items: center; gap: var(--sp-3);
  grid-template-columns: minmax(180px, 1.4fr) 120px minmax(140px, 1.2fr) minmax(150px, 1fr) 96px;
  padding: 6px 4px; border-bottom: 1px solid var(--gray-200); font-size: 12.5px;
}
.an-row:hover { background: var(--gray-50); }
.an-row.off { opacity: .5; }
.an-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.an-pnom { font-weight: 700; text-transform: uppercase; letter-spacing: .2px; }
.an-cic {
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: 0 0 auto;
}
.an-tel, .an-mail { font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-tel a, .an-mail a, .an-info a { color: var(--accent); text-decoration: none; }
.an-tel a:hover, .an-mail a:hover, .an-info a:hover { text-decoration: underline; }
.an-act { display: flex; gap: 4px; flex-wrap: wrap; font-size: 11.5px; }
.an-chip {
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-down); white-space: nowrap;
}
.an-chip.chalet { background: var(--pos-bg); color: var(--pos); }
.an-date { font-size: 11.5px; color: var(--gray-600); text-align: right; white-space: nowrap; }
.an-agents {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px; margin-top: 4px;
}
.an-agent {
  border: 1px solid var(--gray-200); border-radius: var(--r-2);
  padding: 6px 9px; font-size: 12.5px; background: var(--gray-50);
}
.an-agent.off { opacity: .5; }
.an-agent-s { font-size: 11px; color: var(--gray-600); margin-top: 1px; }
.an-tools2 { margin-top: var(--sp-1); }
.an-tools2 .hint { margin: 0; flex: 1 1 320px; }
.an-headbtn { flex: 0 0 auto; }
.an-card.gu .an-headbtn { color: #fff; }
.an-card.comptes .an-head { background: var(--gray-100); }
.an-cic.ext { background: var(--warn); border-radius: 50%; }

/* Lignes cliquables : elles ouvrent leur fiche dans le panneau. */
.an-row.edit, .an-agent.edit, .an-add, .an-headbtn { cursor: pointer; }
.an-row.edit:hover { background: var(--accent-soft); }
.an-row.edit:focus-visible, .an-agent.edit:focus-visible, .an-add:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.an-agent.edit:hover { border-color: var(--accent); background: var(--accent-soft); }
.an-agent-c { font-size: 11px; color: var(--gray-700); margin-top: 1px; font-variant-numeric: tabular-nums; }

.an-add {
  display: flex; align-items: center; gap: 8px; margin-top: var(--sp-2);
  padding: 7px 10px; border: 1px dashed var(--gray-400); border-radius: var(--r-2);
  color: var(--accent); font-size: 12.5px; font-weight: 600;
}
.an-add:hover { border-color: var(--accent); background: var(--accent-soft); }
.an-add.tile { margin-top: 0; justify-content: center; min-height: 44px; }
.an-plus { font-size: 15px; line-height: 1; }

.an-actions { display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-4); flex-wrap: wrap; }
.an-actions .spacer { flex: 1; }
.btn.an-del { color: var(--neg); }
.btn.an-del:hover { background: var(--neg-bg); color: var(--neg); }
.an-check { margin: 6px 0 var(--sp-3); flex-wrap: wrap; }
.panel .body p { font-size: 12.5px; line-height: 1.5; margin: 0 0 var(--sp-2); }

.an-vide { font-size: 12px; color: var(--gray-600); padding: var(--sp-2) 0; }

@media (max-width: 760px) {
  .an-tools input[type="search"] { max-width: none; flex-basis: 100%; }
  .an-agents { grid-template-columns: 1fr 1fr; }
  .an-kpis { display: grid; grid-template-columns: 1fr 1fr; }
  .an-kpis .kpi { min-width: 0; }
  .an-meta { margin-left: 0; width: 100%; }
  .an-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "who date" "tel act" "mail act";
    gap: 2px var(--sp-2); padding: 8px 2px;
  }
  .an-who { grid-area: who; }
  .an-date { grid-area: date; }
  .an-tel { grid-area: tel; }
  .an-mail { grid-area: mail; }
  .an-act { grid-area: act; justify-content: flex-end; align-self: start; }
  .an-tel.vide, .an-mail.vide { display: none; }
}

/* =====================================================================
   Bandeau hors ligne / pointages en attente (js/hors-ligne.js). Fixé en
   haut, au-dessus de tout : on doit TOUJOURS savoir qu'on lit une copie.
   ===================================================================== */
.horsligne {
  display: none; position: fixed; left: 0; right: 0; top: 0; z-index: 95;
  padding: calc(5px + env(safe-area-inset-top)) 14px 5px; text-align: center;
  font-size: 12px; line-height: 1.35; color: #fff; background: var(--gray-800);
  box-shadow: var(--shadow-1);
}
.horsligne.on { display: block; }
.horsligne.attente { background: var(--warn); }
.horsligne.neg { background: var(--neg); cursor: pointer; }
.horsligne b { font-weight: 700; }
body.avec-horsligne #app { padding-top: calc(26px + env(safe-area-inset-top)); }
body.avec-horsligne .p-shell, body.avec-horsligne .w-shell { height: calc(100dvh - 26px); }

/* Étiquettes d'habilitation (annuaire) : pastille entourée de sa couleur. */
.tag {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  border: 1.5px solid currentColor; background: transparent; white-space: nowrap; line-height: 1.5;
}
.tag.conv { color: #0d66d0; background: #eaf2fe; }
.tag.cond { color: #9a3fc0; background: #f6ecfb; }
.an-agent-t { display: flex; gap: 4px; flex-wrap: wrap; margin: 3px 0 1px; }
.an-tags-choix { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-choix {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid currentColor; font-size: 12.5px; font-weight: 700; cursor: pointer;
  text-transform: none !important; letter-spacing: 0 !important;
}
.tag-choix.conv { color: #0d66d0; }
.tag-choix.cond { color: #9a3fc0; }
.tag-choix:has(input:checked).conv { background: #eaf2fe; }
.tag-choix:has(input:checked).cond { background: #f6ecfb; }
.tag-choix input { accent-color: currentColor; width: 15px; height: 15px; }

/* Historique dans la fiche d'une personne (annuaire). */
.an-histo { margin-top: var(--sp-4); }
.an-h { border-top: 1px solid var(--gray-200); }
.an-h-row {
  display: grid; grid-template-columns: 18px 118px 1fr; gap: 6px; align-items: baseline;
  padding: 6px 2px; border-bottom: 1px solid var(--gray-200); font-size: 12.5px;
}
.an-h-ic { color: var(--accent); font-size: 11px; text-align: center; }
.an-h-row.chalet .an-h-ic { color: var(--pos); }
.an-h-row.pt .an-h-ic { color: var(--gray-600); }
.an-h-row.conv .an-h-ic { color: #0d66d0; }
.an-h-row.barre .an-h-txt { color: var(--gray-500); }
.an-h-date { font-family: var(--mono); font-size: 11.5px; color: var(--gray-600); white-space: nowrap; }
.an-h-txt { min-width: 0; }
