/* ============================================================
   RIAD ILYAN — Charte couleur
   Vert profond #1E3B21 (primaire / FAB, icônes blanches)
   Fond crème ivoire · texte & titres #1E1E1E · pas de doré
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #1e1e1e;   /* texte & titres */
  --ink-2:      #1e1e1e;   /* texte secondaire — même encre, hiérarchie via opacité (à venir) */
  --line:       rgba(30, 30, 30, .12);   /* séparateurs / grip — #1E1E1E transparent (plus de beige) */
  --bg:         #ffffff;   /* fond écran blanc */
  --surface:    #ffffff;   /* surfaces blanches (puces, sheet) */
  --card:       #fcf8f2;   /* cartes = crème ivoire 100% */
  --fill:       #efe8db;   /* pastilles / accents (crème soutenu) */
  --fill-2:     rgba(30, 30, 30, .18);   /* formes placeholders — neutre (plus de beige) */
  --primary:    #1e3b21;   /* vert riad — bouton primaire / FAB */
  --secondary:  #305633;   /* vert secondaire — accents (icônes, liens) */
  --on-primary: #ffffff;   /* icône/texte sur le vert */
  --error:      #ff0022;   /* rouge unique = celui des SVG (check_box_red #f02) — infos critiques */
  --frame:      #2b2b2b;   /* châssis du téléphone */
  --radius-lg:  28px;
  --radius-md:  16px;
  --radius-sm:  12px;
}

html, body {
  background: #d8d8da;
  font-family: "Google Sans Flex", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 12px;
}

/* ---------- Châssis téléphone ---------- */
.phone {
  position: relative;
  width: 412px;
  max-width: 100%;
  background: var(--bg);
  border: 10px solid var(--frame);
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 880px;                 /* hauteur viewport : top + cartes fixes */
  max-height: calc(100vh - 48px);
}

/* ---------- Bandeau d'en-tête vert (header → Show all) ---------- */
.header-zone { flex: 0 0 auto; }  /* le bandeau ne défile pas */
.header-zone {
  background: var(--secondary);            /* #305633 */
  color: #fff;
  padding-bottom: 20px;                    /* respiration sous « Show all » */
}
/* Pages secondaires (list, booking-detail, upload) : bandeau vert commun, plus haut.
   Home garde son traitement spécifique (carrousel + « Show all »). */
.header-zone--page { padding-top: 16px; padding-bottom: 33px; }   /* espace vert */
.header-zone--page .headline { padding-bottom: 8px; }

.header-zone .ic { background: #fff; }     /* icônes barre d'état en blanc */
.header-zone .iconbtn { color: #fff; }     /* flèche / recherche / filtre en blanc */
.header-zone .headline { color: #fff; }
.header-zone .link-action { color: #fff; } /* « Show all » blanc 100% */
.header-zone .login-title { color: #fff; }
.header-zone .login-sub { color: rgba(255, 255, 255, .85); }
.header-zone .login-brand { padding: 8px 24px 28px; }

/* Login : bandeau vert à la même hauteur que le dashboard, marque centrée */
.header-zone--login {
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.header-zone--login .login-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;   /* espaces égaux : haut, photo, titre, sous-titre, bas */
}

/* ---------- Barre d'état ---------- */
.statusbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 6px;
  font-size: 14px;
  font-weight: 500;
}
.statusbar .camera {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: #111;
  border-radius: 50%;
}
.sysicons { display: flex; gap: 6px; align-items: center; }
.ic { display: inline-block; background: var(--ink); }
.ic-signal { width: 16px; height: 11px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.ic-wifi   { width: 15px; height: 11px; clip-path: polygon(50% 0, 100% 45%, 50% 100%, 0 45%); }
.ic-battery{ width: 22px; height: 11px; border-radius: 3px; }

/* ---------- Top app bar ---------- */
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
}
.appbar-actions { display: flex; }
.appbar-title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 500;
  margin-left: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iconbtn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  transition: background-color .2s ease;   /* le cercle d'état apparaît en fondu */
}
.iconbtn svg { width: 24px; height: 24px; fill: currentColor; }
/* cercle d'état = couleur du FAB (#1E3B21) — UNIQUEMENT dans le bandeau d'en-tête */
.header-zone .iconbtn:hover  { background: rgba(30, 59, 33, .30); }
.header-zone .iconbtn:active { background: rgba(30, 59, 33, .45); }
.iconbtn--sm { width: 40px; height: 40px; }
.iconbtn--sm svg { width: 22px; height: 22px; }

/* ---------- Écran scrollable ---------- */
.screen {
  flex: 1;
  min-height: 0;            /* indispensable pour que la liste défile sous l'en-tête fixe */
  overflow-y: auto;
  padding-bottom: 8px;
}

/* ---------- Titre ---------- */
.headline {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .2px;
  padding: 8px 24px 20px;
}

/* ---------- Carrousel héro M3 (hero carousel) ----------
   Comportement M3 : la carte focalisée est large, les voisines
   sont compressées en "peek". Le contenu garde une taille fixe ;
   c'est la LARGEUR de la carte qui le masque (clip), pas un scale.
*/
.hero { padding: 0; }
.carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* padding vertical = marge pour l'ombre (sinon overflow-x la rogne) */
  padding: 14px 24px 32px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.c-item {
  flex: 0 0 auto;
  width: 64px;                       /* aperçu (peek) ; la carte active passe à 272px via .is-focus */
  height: 216px;
  background: rgba(30, 30, 30, .10);   /* peek (non sélectionnée) — #1E1E1E transparent */
  border-radius: var(--radius-md);
  overflow: hidden;                  /* masque le contenu fixe → effet accordéon */
  cursor: pointer;
  /* Accordéon piloté par la classe .is-focus : une seule transition de largeur,
     déclenchée au tap (plus de réécriture par frame = plus de saccades).
     Courbe M3 "standard" + durée allongée = mouvement plus doux. */
  transition: width .42s cubic-bezier(.4, 0, .2, 1),
              background-color .42s cubic-bezier(.4, 0, .2, 1),
              box-shadow .42s cubic-bezier(.4, 0, .2, 1);
  box-shadow: none;                  /* M3 : une carte au repos est au niveau 0 */
}
.c-item.is-focus {
  width: 272px;                                /* carte ouverte = largeur du contenu fixe */
  background: var(--primary);                  /* carte active = couleur système (comme le FAB) */
  /* Élévation élargie (choix produit) : attire l'œil sur la carte active */
  box-shadow: 0 2px 6px rgba(0, 0, 0, .10), 0 12px 28px rgba(0, 0, 0, .16);
}

.c-content {
  width: 272px;                      /* taille FIXE : c'est le clip qui révèle */
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;                       /* non sélectionnée : texte blanc */
}
/* Carte active (vert système) : texte blanc 100% */
.c-item.is-focus .c-content { color: #fff; }
.sh { fill: var(--fill-2); }

/* En-tête de carte : icône (visible même en peek) + tendance */
.c-top { display: flex; align-items: center; justify-content: space-between; }
.c-icon {
  flex: 0 0 auto;
  width: 39px;                      /* 26px + 50% = taille du conteneur = taille de l'icône */
  height: 39px;
  background: transparent;          /* plus de fond blanc */
  display: grid;
  place-items: center start;        /* svg calé à gauche = aligné au texte */
}
.c-icon svg,
.c-icon img { width: 100%; height: 100%; display: block; }  /* icône = 100% du conteneur */
.c-trend { font-size: 12px; color: rgba(255, 255, 255, .8); white-space: nowrap; }
.c-item.is-focus .c-trend { color: #fff; }

/* Corps : compteur + libellé + description */
.c-count { display: block; font-size: 44px; font-weight: 500; line-height: 1; }
.c-name { display: block; font-size: 15px; font-weight: 500; margin-top: 8px; }
.c-desc { display: block; font-size: 13px; color: rgba(255, 255, 255, .8); margin-top: 2px; white-space: nowrap; }
.c-item.is-focus .c-desc { color: #fff; }

/* Pied : action */
.c-foot {
  align-self: flex-end;            /* en bas à droite de la carte */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-primary);
  background: var(--secondary);    /* = même couleur que le bandeau d'en-tête (#305633) */
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.c-foot svg { width: 18px; height: 18px; fill: var(--on-primary); }

/* Aperçu (peek) : on ne montre que l'icône ; le reste s'efface.
   À l'ouverture (.is-focus) le contenu réapparaît en fondu. */
.c-body, .c-trend, .c-foot { transition: opacity .22s ease; }
.c-item:not(.is-focus) .c-body,
.c-item:not(.is-focus) .c-trend,
.c-item:not(.is-focus) .c-foot { opacity: 0; }
.c-item.is-focus .c-body,
.c-item.is-focus .c-trend,
.c-item.is-focus .c-foot { opacity: 1; transition: opacity .34s ease .14s; }

/* permet à la dernière carte de pouvoir devenir focus en début de piste */
.c-spacer { flex: 0 0 auto; width: 200px; }

/* ===== « Show all » → morph du carrousel en liste verticale (cartes M3 pleines) =====
   On réutilise les MÊMES cartes : la largeur passe à 100 %, le contenu se
   réorganise en rangée, et chaque carte entre en cascade (motion M3). */
.hero.is-all .carousel {
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  padding: 14px 24px 4px;
}
.hero.is-all .c-spacer { display: none; }

.hero.is-all .c-item {
  width: 100%;
  height: 72px;
  background: var(--primary);                 /* toutes en carte pleine verte */
  box-shadow: 0 1px 3px rgba(0, 0, 0, .10), 0 4px 12px rgba(0, 0, 0, .10);
  animation: cardIn .42s cubic-bezier(.4, 0, .2, 1) both;
}
.hero.is-all .c-item:nth-child(1) { animation-delay: .02s; }
.hero.is-all .c-item:nth-child(2) { animation-delay: .07s; }
.hero.is-all .c-item:nth-child(3) { animation-delay: .12s; }
.hero.is-all .c-item:nth-child(4) { animation-delay: .17s; }
.hero.is-all .c-item:nth-child(5) { animation-delay: .22s; }
.hero.is-all .c-item:nth-child(6) { animation-delay: .27s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Contenu en rangée : icône · (titre/desc) · compteur */
.hero.is-all .c-content {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 0 18px;
  opacity: 1;                                  /* visible même si carte non focus */
}
.hero.is-all .c-top   { flex: 0 0 auto; }      /* ne garde que l'icône */
.hero.is-all .c-trend { display: none; }
.hero.is-all .c-foot  { display: none; }

.hero.is-all .c-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: center;
  grid-template-areas: "name count" "desc count";
  opacity: 1;
}
.hero.is-all .c-count { grid-area: count; font-size: 26px; }
.hero.is-all .c-name  { grid-area: name; margin-top: 0; }
.hero.is-all .c-desc  { grid-area: desc; white-space: normal; }

/* Mode « Show all » plein écran : la liste de statuts occupe tout le
   châssis, défile, et masque la liste Today. Le lien « Show less »
   reste épinglé en bas du bandeau. */
.phone.show-all .header-zone {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.phone.show-all .hero {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;                /* tout le bloc défile : cartes + « Show less » */
  padding-bottom: 88px;            /* le lien dégage toujours le FAB */
}
/* « Show less » collé juste sous la dernière carte (Archivées), dans le flux,
   aligné à droite comme « Show all ». */
.phone.show-all .link-action {
  text-align: right;
  padding-top: 16px;
}
.phone.show-all .screen { display: none; }     /* plein écran : on masque Today */

.link-action {
  display: block;
  text-align: right;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(30, 30, 30, .5);   /* #1E1E1E à 50% */
  text-decoration: none;
}

/* Sous-titre d'en-tête — même taille que « Action urgente requise » (.c-desc, 13px), en blanc */
.header-sub {
  padding: 0 24px;
  margin-top: 10px;         /* décroché du titre */
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #fff;
}

/* ===== Page CLIENT : confirmation de réservation (booking detail soft) ===== */
.rc { padding: 18px 24px 28px; }
.rc-hello { font-size: 16px; color: var(--ink); margin: 0 0 18px; }
.rc-hello strong { font-weight: 500; }

/* Récap léger */
.rc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4px 18px;
}
.rc-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.rc-row:first-child { border-top: none; }
.rc-k { font-size: 14px; color: var(--ink-2); }
.rc-v { font-size: 15px; font-weight: 500; color: var(--ink); text-align: right; }

/* Mention rassurante (sans acompte) */
.rc-reassure {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 12px 14px;
  background: rgba(52, 178, 51, .10);
  border-radius: var(--radius-sm);
}
.rc-reassure svg { flex: 0 0 auto; width: 20px; height: 20px; fill: #34B233; margin-top: 1px; }
.rc-reassure p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.rc-reassure b { font-weight: 500; }
/* Variante « à noter » (règle acompte) : ton ambre, pas un succès vert */
.rc-reassure--warn { background: rgba(204, 130, 0, .12); }
.rc-reassure--warn svg { fill: #B26B00; }

/* Héros CTA : préparer l'arrivée */
.rc-cta {
  margin-top: 26px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}
.rc-cta h2 { font-size: 19px; font-weight: 500; margin: 0 0 8px; color: #fff; }
.rc-cta p { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .85); margin: 0 0 18px; }
.rc-go {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px; box-sizing: border-box;
  background: #fff; color: var(--primary);
  border: none; border-radius: 999px;
  font: 500 15px/1 inherit; cursor: pointer; text-decoration: none;
}
.rc-go svg { width: 20px; height: 20px; fill: var(--primary); }
.rc-later {
  display: block; text-align: center; margin-top: 14px;
  font-size: 13px; color: rgba(255, 255, 255, .8); text-decoration: none;
}

/* ===== Maquette E-MAIL : confirmation reçue par le client ===== */
.em-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.em-bar .iconbtn { color: var(--ink); }
.em-bar-title { font-size: 15px; font-weight: 500; color: var(--ink); }
.em-bar-spacer { margin-left: auto; }

.em-scroll { background: var(--surface); }
.em-from { display: flex; align-items: center; gap: 12px; padding: 16px 20px 10px; }
.em-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: var(--secondary); color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 500;
}
.em-sender { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.em-meta { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.em-time { margin-left: auto; align-self: flex-start; font-size: 12px; color: var(--ink-2); }
.em-subject { font-size: 20px; font-weight: 500; color: var(--ink); padding: 0 20px 14px; margin: 0; }

/* bannière marquée (en-tête de l'e-mail) */
.em-banner { background: var(--secondary); color: #fff; text-align: center; padding: 24px 20px; }
.em-banner b { font-size: 22px; font-weight: 500; letter-spacing: .5px; }
.em-banner span { display: block; font-size: 12px; color: rgba(255, 255, 255, .85); margin-top: 5px; }

.em-content { padding: 20px; }
.em-help { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 20px 0 0; }
.em-go {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; box-sizing: border-box; padding: 16px; margin-top: 12px;
  background: var(--primary); color: #fff; border: none; border-radius: 999px;
  font: 500 15px/1 inherit; text-decoration: none;
}
.em-go svg { width: 20px; height: 20px; fill: #fff; }

/* pied de l'e-mail */
.em-foot {
  padding: 18px 20px 28px; border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.7; color: var(--ink-2);
}
.em-foot strong { color: var(--ink); font-weight: 500; }
.em-foot a { color: var(--secondary); }

/* ---------- Section liste ---------- */
.list-section { padding-top: 12px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 500;
  padding: 12px 24px 16px;
}
.section-title .arrow { width: 22px; height: 22px; fill: var(--ink); }

/* Indicateur de complétion : checkmark après le titre, masqué tant que la section n'est pas remplie */
.section-check { display: none; width: 22px; height: 22px; }
.section-check svg { width: 100%; height: 100%; fill: var(--primary); display: block; }
.u-section.is-complete .section-check { display: inline-flex; align-items: center; }

/* En-tête résumé de la vue liste */
.list-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 24px 16px;
}
.list-head-num { font-size: 40px; font-weight: 500; line-height: 1; }
.list-head-desc { font-size: 14px; color: var(--ink-2); }

.list { list-style: none; }
.list-subhead {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 16px 24px 8px;
  letter-spacing: .3px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 24px;
  border-top: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 1px solid var(--line); }

.thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  background: var(--thumb);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.thumb svg { width: 60%; height: 60%; }

.li-text { flex: 1; min-width: 0; }
.li-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 2px;
}
/* ===== Sélecteur de voyageurs (booking-detail multi) ===== */
.bd-count-tag { font-size: 13px; font-weight: 400; color: var(--ink-2); }
.bd-travelers {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 2px;
  scrollbar-width: none;
}
.bd-travelers::-webkit-scrollbar { display: none; }
.bd-traveler {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.bd-traveler-name { font-size: 15px; font-weight: 500; }
.bd-traveler-role { font-size: 12px; color: var(--ink-2); }
.bd-traveler.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.bd-traveler.is-active .bd-traveler-role { color: rgba(255, 255, 255, .8); }
.bd-traveler.is-minor { border-style: dashed; }
.bd-traveler.is-minor.is-active { border-style: solid; }

/* Délai légal 24 h (booking-detail) */
.bd-deadline {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--surface);
}
.bd-deadline-ic svg { display: block; width: 24px; height: 24px; fill: var(--ink-2); }
.bd-deadline-txt { display: flex; flex-direction: column; }
.bd-deadline-lbl { font-size: 13px; color: var(--ink-2); }
.bd-deadline-val { font-size: 16px; font-weight: 500; color: var(--ink); margin-top: 1px; }
.bd-deadline.is-ok   { background: rgba(52, 178, 51, .10); border-color: rgba(52, 178, 51, .30); }
.bd-deadline.is-ok   .bd-deadline-ic svg { fill: #34B233; }
.bd-deadline.is-warn { background: rgba(204, 130, 0, .12); border-color: rgba(204, 130, 0, .35); }
.bd-deadline.is-warn .bd-deadline-ic svg { fill: #B26B00; }
.bd-deadline.is-warn .bd-deadline-val { color: #B26B00; }
.bd-deadline.is-over { background: rgba(255, 0, 34, .08); border-color: rgba(255, 0, 34, .35); }
.bd-deadline.is-over .bd-deadline-ic svg { fill: var(--error); }
.bd-deadline.is-over .bd-deadline-val { color: var(--error); }

/* Accès contrôlé aux pièces d'identité (overlay sur l'aperçu) */
.doc-viewer-stage { position: relative; }
.doc-access {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 28px;
  background: rgba(20, 20, 20, .94); color: #fff;
}
.doc-access[hidden] { display: none; }
.doc-access svg { width: 42px; height: 42px; fill: rgba(255, 255, 255, .85); }
.doc-access-title { font-size: 16px; font-weight: 500; margin: 4px 0 0; }
.doc-access-sub { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .75); margin: 0 0 8px; max-width: 280px; }
.doc-access-sub b { color: #fff; font-weight: 500; }
.doc-access-btn {
  padding: 12px 22px; border: 1px solid rgba(255, 255, 255, .45);
  background: transparent; color: #fff; border-radius: 999px;
  font: 500 14px/1 inherit; cursor: pointer;
}
.doc-access-btn:active { background: rgba(255, 255, 255, .12); }
.doc-access-log {
  position: absolute; left: 0; right: 0; bottom: 10px; z-index: 1;
  text-align: center; font-size: 11px; color: rgba(255, 255, 255, .6);
}
.doc-access-log[hidden] { display: none; }

/* Badge canal d'origine (PMS cross-canal) */
.li-channel {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(30, 30, 30, .08);
  color: var(--ink-2);
  vertical-align: 1px;
  white-space: nowrap;
}
.li-channel[data-ch="direct"]  { background: rgba(52, 178, 51, .14); color: #2c7a2c; }
.li-channel[data-ch="booking"] { background: rgba(0, 113, 194, .12); color: #0071c2; }
.li-channel[data-ch="airbnb"]  { background: rgba(255, 90, 95, .14); color: #d93b40; }

/* Drapeau pays — pastille SVG ronde (façon avatar, jamais de PNG/emoji) */
.flag {
  display: inline-block;
  width: 11px;
  height: 11px;
  vertical-align: 0;
  margin-right: 6px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 .5px var(--line);
}
.li-support {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}
.li-status {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 4px;
  display: inline-block;
  background: rgba(30, 30, 30, .08);   /* #1E1E1E transparent */
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- FAB ---------- */
.fab {
  position: absolute;
  right: 22px;
  bottom: 40px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--on-primary);
}
.fab svg { width: 26px; height: 26px; fill: currentColor; }
.fab { transition: box-shadow .2s cubic-bezier(.2, 0, 0, 1), opacity .2s ease, transform .2s cubic-bezier(.2, 0, 0, 1); }
/* FAB masqué pendant la snackbar d'alerte ET pendant l'ouverture d'un sheet (scrim visible) */
.phone:has(.snackbar.is-open) .fab,
.phone:has(.scrim:not([hidden])) .fab {
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
}
.fab:hover {
  box-shadow: 0 2px 3px rgba(0, 0, 0, .30), 0 6px 10px 4px rgba(0, 0, 0, .15),
              inset 0 0 0 100px rgba(255, 255, 255, .08);   /* niveau 4 + voile 8% */
}
.fab:active { box-shadow: inset 0 0 0 100px rgba(255, 255, 255, .10); }   /* pressé : voile 10% */

/* ---------- Snackbar M3 (avertissement prioritaire) ---------- */
.snackbar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 28px;                 /* descendu : le FAB se masque pendant la snackbar */
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e1e1e;           /* surface foncée */
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 20px 12px 20px 16px;          /* même hauteur que « Saisir le N° d'entrée » (.entry-cta) */
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .30);
  transform: translateY(160%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.2, 0, 0, 1), opacity .25s ease;
}
.snackbar.is-open { transform: none; opacity: 1; pointer-events: auto; }
/* booking-detail : même position que la barre de l'aperçu (.dv-snack) → pas de saut/clignotement */
.snackbar--bd { left: 28px; right: 28px; bottom: 28px; }

.sb-icon { flex: 0 0 auto; width: 22px; height: 22px; }
.sb-icon img { width: 100%; height: 100%; display: block; }
.sb-msg { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.sb-action {
  flex: 0 0 auto;
  border: none;
  background: none;           /* pas de bouton, simple texte */
  color: var(--secondary);    /* « VOIR » en vert */
  font: inherit;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
}
.sb-action:hover,
.sb-action:active { color: #3d723e; }   /* au survol / clic : vert plus clair */

/* ---------- Barre gestuelle ---------- */
.navbar {
  display: grid;
  place-items: center;
  padding: 10px 0 12px;
}
.handle {
  width: 130px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
}

/* ============================================================
   PAGE 1 — Connexion
   ============================================================ */
.login {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 28px;
  gap: 24px;
}
.login-brand { text-align: center; }
.login-logo {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;            /* le cercle masque l'image */
}
.login-logo svg { width: 34px; height: 34px; }
.login-logo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }   /* centré, identique à l'avatar */
.login-title { font-size: 30px; font-weight: 500; letter-spacing: .2px; }   /* = .headline du dashboard */
.login-sub { font-size: 15px; font-weight: 500; color: var(--ink-2); margin-top: 0; }   /* identique à « Show all » (15px / 500) */

/* Sélecteur de rôle — segmented button M3 (single-select) */
.login-toprow { display: flex; justify-content: flex-end; }

/* Type de pièce (upload) — même composant segmented, en pleine largeur sous le label */
#docType { display: flex; width: 100%; margin-top: 6px; }
.doc-field[hidden] { display: none; }   /* override .field{display:block} */

.segmented {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 30, 30, .05);
}
.segment {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;   /* le groupe icône+texte est centré comme un seul bloc */
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;             /* identique à « E-mail » (.field-label), réduit */
  font-weight: 400;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.segment:hover { background: rgba(30, 30, 30, .08); }       /* base 5% + 3% au survol */
.segment:active { background: rgba(30, 30, 30, .10); }      /* état pressé : voile 10% */
.segment-check {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: currentColor;
  opacity: 0;                  /* espace réservé en permanence (le texte ne bouge jamais) + transition douce */
  transition: opacity .2s ease;
}
.segment.is-selected { background: var(--secondary); color: #fff; }   /* rempli plein, même vert que le header */
.segment.is-selected:hover { background: #3d723e; }
.segment.is-selected:active { background: #285029; }
.segment.is-selected .segment-check { opacity: 1; }

.login-form { display: flex; flex-direction: column; gap: 18px; }

.field { display: block; }
.field-label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}
.field input:focus { border-color: var(--primary); border-width: 2px; }
.field select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field select:focus { border-color: var(--primary); border-width: 2px; }

/* ===== Bottom-sheet : nouvelle réservation (FAB) ===== */
.sheet--form { max-height: 88%; overflow-y: auto; scrollbar-width: none; padding-bottom: 24px; }
.sheet--form::-webkit-scrollbar { display: none; }
.nr-title { font-size: 18px; font-weight: 500; color: var(--ink); padding: 0 16px 2px; margin: 0; }
.nr-form { padding: 10px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.nr-row { display: flex; gap: 12px; }
.nr-row > .field { flex: 1; min-width: 0; }
.nr-submit { margin-top: 6px; }
.field[hidden] { display: none; }

.field-pw { position: relative; display: block; }
.field-pw input { padding-right: 52px; }
.field-ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
}
.pw-toggle svg, .pw-toggle img { width: 22px; height: 22px; fill: currentColor; display: block; }

.login-forgot {
  align-self: flex-end;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  margin-top: -4px;
  opacity: .5;
  transition: opacity .2s ease;
}
.login-forgot:hover { opacity: 1; }

/* Ripple M3 (animation de couleur au clic sur les boutons colorés) */
.btn-primary, .c-foot { position: relative; overflow: hidden; }
.fab { overflow: hidden; }
.ripple-ink {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: scale(0);
  opacity: .6;
  pointer-events: none;
  animation: ripple .55s cubic-bezier(.2, 0, 0, 1);
}
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

.btn-primary {
  height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--primary);     /* bouton vert comme le FAB */
  color: var(--on-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 6px;
  /* M3 filled button : transitions état + élévation */
  transition: box-shadow .2s cubic-bezier(.2, 0, 0, 1);
}
/* state layer = voile blanc (on-primary) via box-shadow inset */
.btn-primary:hover {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .30), 0 1px 3px 1px rgba(0, 0, 0, .15),
              inset 0 0 0 100px rgba(255, 255, 255, .08);   /* niveau 1 + voile 8% */
}
.btn-primary:active {
  box-shadow: inset 0 0 0 100px rgba(255, 255, 255, .10);   /* pressé : voile 10%, niveau 0 */
}
/* M3 disabled : 38% on-surface, pas d'élévation ni de curseur */
.btn-primary:disabled {
  background: rgba(30, 30, 30, .12);
  color: rgba(30, 30, 30, .38);
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================
   PAGE — Détail réservation (ouverte depuis list.html)
   ============================================================ */
.bd { padding: 24px; display: flex; flex-direction: column; gap: 48px; }   /* sections aérées */
.bd-section { display: flex; flex-direction: column; gap: 22px; }           /* même rythme qu'upload.html */
.bd-section .section-title { padding: 16px 0 20px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }   /* même traitement que les titres d'upload.html */
.bd-ref { font-size: 20px; font-weight: 500; }
/* Séjour — icône calendrier + dates, mis en avant */
.bd-stay { flex-direction: row; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: -34px; }   /* dates → historique resserré (~14px) malgré le gap section 48px */
.bd-stay-ic { width: 24px; height: 24px; flex: 0 0 auto; }
.bd-stay-dates { font-size: 16px; font-weight: 500; color: var(--ink); }

/* Suivi des étapes — timeline verticale */
.bd-steps { list-style: none; display: flex; flex-direction: column; gap: 0; }
.bd-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 0 48px;
}
.bd-step:last-child { padding-bottom: 0; }
.bd-step-ic { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; display: block; z-index: 1; }
.bd-step:not(.is-done):not(.bd-step--action) .bd-step-ic { opacity: .45; }   /* case en attente = même opacité que son texte */
.bd-step-text { flex: 1; min-width: 0; font-size: 16px; font-weight: 400; color: var(--ink-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }   /* = label « Prénom / Nom » */
/* étape avec sous-lignes (ex. Notification + pièces à refaire) */
.bd-step-text--col { flex-direction: column; align-items: stretch; gap: 6px; }
.bd-step-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bd-redo { display: flex; flex-direction: column; gap: 2px; }
.bd-redo:empty { display: none; }
.bd-redo-line { font-size: 16px; font-weight: 400; color: var(--ink-2); }   /* même typo/couleur que « Notification » */
.bd-step:not(.is-done) .bd-step-text { color: rgba(30, 30, 30, .45); }
.bd-step-time { flex: 0 0 auto; font-size: 16px; font-weight: 400; color: var(--ink-2); white-space: nowrap; }   /* = label « Prénom / Nom » */

/* Badge style snackbar dans la timeline → scrolle vers la saisie du tampon */
.entry-cta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #1e1e1e;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 20px 14px 20px 18px;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .30);
}
.entry-cta[hidden] { display: none; }
.bd-step[hidden] { display: none; }
.bd-step--action { align-items: center; }   /* icône centrée verticalement par rapport au badge */
.entry-cta-ic { width: 20px; height: 20px; fill: #fff; flex: 0 0 auto; }
.entry-cta-msg { flex: 1; min-width: 0; }
.entry-cta-go { flex: 0 0 auto; color: var(--error); font-size: 14px; font-weight: 500; padding: 8px 12px; margin: -8px -4px -8px 0; }   /* text button M3 (label-large + zone tactile) */

/* Badge « Action requise » sur le champ N° d'entrée */
.req-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--error);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}
.req-badge[hidden] { display: none; }

/* Checklist documents reçus */
.bd-hint { font-size: 16px; font-weight: 400; color: var(--ink); }   /* même logique que .u-hint (upload.html) */
.bd .field-label { font-size: 16px; }   /* labels de champ = 16px, comme upload.html */
/* Champ N° d'entrée — petit input « xx » + date d'arrivée pré-remplie (grisée) */
.field-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-entry input {
  width: 96px;
  height: 52px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}
.field-entry input:focus { border-color: var(--primary); border-width: 2px; }
.entry-date { font-size: 16px; font-weight: 400; color: var(--ink); white-space: nowrap; }   /* = « Vérification pour conformité » (.bd-hint) */
.bd-checklist { list-style: none; display: flex; flex-direction: column; gap: 48px; margin-top: 26px; }   /* 48px entre items ET sous le hint (22px gap + 26px) */
.bd-check[hidden] { display: none; }   /* cellule conditionnelle (Page d'entrée) */
.bd-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);            /* blanc — se distingue du vrai snackbar d'état (sombre) */
  color: var(--ink);                     /* texte #1E1E1E */
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 14px 20px 18px;          /* même hauteur que « Saisir le N° d'entrée » (.entry-cta) */
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
}
.bd-check-label { flex: 1; min-width: 0; }
.bd-view { flex: 0 0 auto; color: var(--secondary); font-size: 14px; font-weight: 500; padding: 8px 12px; margin: -8px -4px -8px 0; }   /* text button M3 (label-large + zone tactile) */

/* Fiche de police — reste en sombre (snackbar) comme avant */
.bd-fiche-row { background: #1e1e1e; color: #fff; border: none; box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .30); }
.bd-fiche-row .bd-view { color: #34b233; }

/* Bulletin pré-rempli — données en lecture seule (revue agent) */
.bd-data { list-style: none; }
.bd-data li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.bd-data li:last-child { border-bottom: none; }
.bd-data-k { font-size: 16px; color: var(--ink-2); flex: 0 0 auto; }       /* = .info-label (upload/profil) */
.bd-data-v { font-size: 16px; font-weight: 500; text-align: right; }        /* = .info-value (upload/profil) */

/* Carte fiche de police */
.bd-fiche {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.bd-fiche-ic { width: 28px; height: 28px; flex: 0 0 auto; }
.bd-fiche-text { flex: 1; min-width: 0; }
.bd-fiche-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-fiche-meta { font-size: 13px; color: rgba(30, 30, 30, .5); margin-top: 2px; }

.bd-actions { gap: 12px; }
.bd-conform { align-items: center; }   /* libellé sur une ligne → switch centré */

/* Bouton M3 « outlined » — action secondaire */
.btn-outline {
  position: relative;
  overflow: hidden;
  height: 52px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s ease;
}
.btn-outline:hover { background: rgba(30, 59, 33, .08); }
.btn-outline:active { background: rgba(30, 59, 33, .14); }
/* bouton « Créer une alerte » — rouge */
.btn-outline--alert { border-color: var(--error); color: var(--error); }
.btn-outline--alert:hover { background: rgba(179, 38, 30, .08); }
.btn-outline--alert:active { background: rgba(179, 38, 30, .14); }

/* « Générer » verrouillé tant que les documents ne sont pas marqués conformes */
.bd-fiche-row.is-locked { opacity: .5; pointer-events: none; }
.bd-fiche-row.is-generated { opacity: 1; }   /* générée : pleinement visible (confirmation en place) */
.bd-fiche-row.is-generated .bd-view { display: none; }
.bd-fiche-row.is-generated .bd-check-label { display: inline-flex; align-items: center; gap: 8px; }
.bd-fiche-row.is-generated .bd-check-label::before {
  content: '';
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Aperçu du PDF généré (bulletin de police, plein écran) */
.fiche-viewer {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: #e9e9ea;
  display: flex;
  flex-direction: column;
}
.fiche-viewer[hidden] { display: none; }
.fiche-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.fiche-paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.fp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.fp-brand { font-size: 18px; font-weight: 500; letter-spacing: 2px; }
.fp-ar-small { font-size: 11px; color: rgba(30, 30, 30, .6); margin-top: 2px; }
.fp-contact { text-align: right; font-size: 11px; color: rgba(30, 30, 30, .7); line-height: 1.5; }
.fp-title { border: 1px solid var(--ink); border-radius: 4px; padding: 8px; text-align: center; font-size: 14px; font-weight: 500; letter-spacing: .5px; margin-bottom: 14px; }
.fp-fields { display: flex; flex-direction: column; }
.fp-row { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.fp-k { font-size: 13px; font-weight: 500; flex: 0 0 auto; }
.fp-v { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink); }
.fp-v--empty { color: rgba(30, 30, 30, .35); }
.fp-ar { font-size: 13px; color: rgba(30, 30, 30, .65); white-space: nowrap; flex: 0 0 auto; }
.fp-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; }
.fp-foot-l { font-size: 13px; }
.fp-sign { text-align: center; }
.fp-sign-lbl { display: block; font-size: 11px; color: rgba(30, 30, 30, .6); margin-bottom: 4px; }
.fp-sign-box { display: inline-flex; align-items: center; justify-content: center; width: 130px; height: 50px; border: 1px solid var(--line); border-radius: 4px; }
.fiche-snack { flex: 0 0 auto; }
.fiche-pdf { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.dv-act--neutral { color: #fff; }

/* Aperçu document (modal plein cadre) */
.doc-viewer {
  position: absolute;
  inset: 0;                 /* plein écran — pas de fenêtrage */
  z-index: 40;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.doc-viewer[hidden] { display: none; }
.doc-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px 10px 16px;
  border-bottom: 1px solid var(--line);
}
.doc-viewer-title { font-size: 15px; font-weight: 500; }
.doc-viewer-stage { flex: 1; display: grid; place-items: center; padding: 24px; }
.doc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(30, 30, 30, .45);
  font-size: 14px;
  text-align: center;
}
.doc-placeholder img { width: 56px; height: 56px; opacity: .5; }

/* Barre de validation (snackbar) dans l'aperçu document */
.dv-snack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 20px 8px 20px 16px;           /* même hauteur que « Saisir le N° d'entrée » (.entry-cta) */
  background: #1e1e1e;
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .30);
}
.dv-snack-msg { flex: 1; min-width: 0; font-size: 14px; }
.dv-snack-actions { display: flex; flex: 0 0 auto; }
.dv-act { border: none; background: none; font: inherit; font-size: 14px; font-weight: 500; padding: 8px 12px; cursor: pointer; }
.dv-act--ko { color: var(--error); }
.dv-act--ok { color: #34b233; }

/* États des pièces après vérification */
.bd-check.is-valid .bd-view { color: var(--secondary); }   /* = vert du bandeau header */
.bd-check.is-rejected .bd-view { color: var(--error); }
/* validé → checkmark vert devant le nom (le mot « Conforme » n'est pas affiché) */
.bd-check.is-valid .bd-check-label { display: inline-flex; align-items: center; gap: 8px; }
.bd-check.is-valid .bd-check-label::before {
  content: '';
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23305633'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ============================================================
   PAGE — Upload client (lien e-mail : ID, signature, infos)
   ============================================================ */
.header-zone--upload { padding-bottom: 24px; }
.upload-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 24px 0;
}
.upload-logo { width: 56px; height: 56px; margin: 0; flex: 0 0 auto; }
.upload-title { font-size: 20px; font-weight: 500; color: #fff; }
.upload-ref { font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .75); margin-top: 2px; }

.upload { padding: 24px; display: flex; flex-direction: column; gap: 40px; }
#uploadForm { display: flex; flex-direction: column; gap: 40px; }   /* plus d'air entre les sections */
.u-section { display: flex; flex-direction: column; gap: 22px; }     /* plus d'air titre / sous-titre / contenu */
.u-section .section-title { padding: 16px 0 20px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }   /* même respiration + ligne que « Today » */
.u-hint { font-size: 16px; font-weight: 400; color: var(--ink); margin-top: 0; }   /* identique à « Nom du client » (.li-title) */
.u-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Tuiles ID recto / verso — comportement carrousel héro : la tuile active
   (grande) bascule INSTANTANÉMENT sur l'autre dès qu'une est complétée. */
.id-tiles { display: flex; gap: 14px; }
.id-tile {
  flex: 0 0 84px;         /* peek : large barre étroite, le contenu fixe est masqué (overflow) */
  height: 216px;          /* même hauteur que les cartes du carrousel héro (.c-item) */
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;       /* masque le contenu fixe → effet peek du carrousel */
  cursor: pointer;
  opacity: .6;
  transition: border-color .2s ease, background-color .2s ease;
  /* pas de transition sur la largeur : bascule instantanée, pas d'animation */
}
.id-tile:hover { border-style: solid; border-color: var(--primary); border-width: 2px; }   /* même principe que .field input:focus, pas de fond gris */
.id-tile.is-active { flex: 1 1 auto; opacity: 1; }   /* carte focus : entièrement révélée */
.id-tile.is-locked { pointer-events: none; }   /* 2e pièce bloquée tant que la 1re n'est pas validée (Suivant) */
.id-tile-inner {
  width: 240px;           /* largeur FIXE du contenu (comme .c-content) : c'est le clip qui révèle */
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* haut (icône+label) / état en bas, comme .c-content */
}
.id-tile-top { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.id-tile-ic { width: 39px; height: 39px; display: block; margin-left: -12px; }   /* taille .c-icon ; marge négative = compense le retrait à gauche de l'artwork pour aligner le bord visible avec le texte */
.id-tile-count { display: block; font-size: 44px; font-weight: 500; line-height: 1; margin-top: 8px; }   /* identique à .c-count sur les cartes */
.id-tile-label { font-size: 15px; font-weight: 500; margin-top: 8px; }   /* identique à .c-name sur les cartes */
.id-tile-state {
  align-self: flex-end;             /* en bas à droite, comme .c-foot sur les cartes */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-primary);
  background: var(--secondary);        /* identique à .c-foot : fond vert, texte/flèche blancs */
  border-radius: 999px;
  padding: 8px 14px;
}
.id-tile-state svg { width: 18px; height: 18px; fill: currentColor; }
.id-tile.is-filled { border-style: solid; border-color: var(--primary); opacity: 1; }

/* Libellés des champs (Prénom, Nom, etc.) = même taille que « Membre depuis » (.info-label, 16px) */
.upload .field-label { font-size: 16px; }

/* Note de pied de formulaire — couleur du texte de consentement, taille réduite */
.upload-footnote {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  padding: 0 8px;
}

/* Pad de signature — grand cadre pour signer au doigt */
.sig-pad {
  position: relative;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
/* active / survol : bordure verte 2px, comme les tuiles et les champs */
.sig-pad:hover,
.sig-pad.is-active { border-color: var(--primary); border-width: 2px; }
.sig-pad canvas { width: 100%; height: 100%; touch-action: none; }
.sig-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(30, 30, 30, .4);
  pointer-events: none;
}
/* Stylo en haut à gauche : même taille/calage que l'icône des tuiles (.id-tile-ic) */
.sig-pen {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 39px;
  height: 39px;
  margin-left: -12px;
  display: block;
}
.sig-clear {
  align-self: flex-end;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;          /* = « Show all » (.link-action) */
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  padding: 6px 4px;
}

/* Consentement RGPD / loi 09-08 */
.consent { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }

/* Switch M3 — piste + pastille qui glisse, animée */
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 32px;
  border-radius: 16px;
  background: rgba(30, 30, 30, .12);   /* piste éteinte */
  transition: background-color .2s cubic-bezier(.2, 0, 0, 1);
}
.switch-thumb {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(30, 30, 30, .5);    /* pastille éteinte */
  transform: translateY(-50%);
  transition: left .2s cubic-bezier(.2, 0, 0, 1), width .2s ease, height .2s ease, background-color .2s ease;
}
.consent input:checked ~ .switch { background: var(--secondary); }   /* piste verte (= header) */
.consent input:checked ~ .switch .switch-thumb {
  left: 24px;            /* glisse à droite */
  width: 24px;
  height: 24px;
  background: #fff;
}
.consent-text { font-size: 16px; font-weight: 400; line-height: 1.45; color: var(--ink); }   /* même police que .u-hint */

/* ============================================================
   États d'erreur — champs requis manquants
   ============================================================ */
.field input.has-error { border-color: var(--error); border-width: 2px; }
.field-error {
  display: none;
  font-size: 13px;
  color: var(--error);
  margin-top: 6px;
}
.field.has-error .field-error { display: block; }
.id-tile.has-error { border-style: solid; border-color: var(--error); border-width: 2px; opacity: 1; }
.sig-pad.has-error { border-color: var(--error); border-width: 2px; }
.consent.has-error .switch { box-shadow: 0 0 0 2px var(--error); }
.consent.has-error .consent-text { color: var(--error); }

/* ============================================================
   Sélecteur de date M3 (modal)
   ============================================================ */
.datepicker {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
  padding: 8px 0 8px;
  display: flex;
  flex-direction: column;
}
.datepicker[hidden] { display: none; }

.dp-header { padding: 16px 24px 12px; border-bottom: 1px solid var(--line); }
.dp-supporting { font-size: 13px; color: rgba(30, 30, 30, .6); }
.dp-headline { font-size: 26px; font-weight: 500; margin-top: 6px; }

.dp-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; }
.dp-monthbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.dp-caret { width: 20px; height: 20px; fill: var(--ink); transition: transform .2s ease; }
.dp-monthbtn.is-open .dp-caret { transform: rotate(180deg); }
.dp-arrows { display: flex; }

.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 12px;
}
.dp-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(30, 30, 30, .55);
  height: 32px;
  line-height: 32px;
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 4px 12px 12px;
}
.dp-day {
  height: 40px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .15s ease;
}
.dp-day:hover { background: rgba(30, 30, 30, .06); }
.dp-day.is-today { box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); }
.dp-day.is-selected { background: var(--primary); color: #fff; }

.dp-years {
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 16px 12px;
}
.dp-year {
  height: 40px;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.dp-year:hover { background: rgba(30, 30, 30, .06); }
.dp-year.is-selected { background: var(--primary); color: #fff; }

.dp-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 16px 12px; }
.dp-text-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 999px;
}
.dp-text-btn:hover { background: rgba(30, 59, 33, .08); }

.login-roles {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.login-roles strong { color: var(--ink); font-weight: 500; }

/* ---------- Avatar compte (app bar) ---------- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  border: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .5px;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-left: 4px;
  overflow: hidden;
  padding: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; margin: 0; }
.avatar--xl { width: 84px; height: 84px; margin: 0; }

/* ---------- Profil (bottom sheet agrandi) ---------- */
.sheet--profile { max-height: 92%; overflow-y: auto; scrollbar-width: none; }
.sheet--profile::-webkit-scrollbar { display: none; }

.profile-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 44px;
  padding: 16px;
  background: var(--bg);                  /* fond blanc */
}
.profile-id { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.profile-name span { display: inline; }   /* le nom passe à la ligne si trop long */
.profile-name { font-size: 22px; font-weight: 500; color: var(--ink); }   /* Sébastien V. en #1E1E1E */

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 4px;
}
.stat-tile {
  background: var(--secondary);        /* vert secondaire #305633 */
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  min-height: 160px;                   /* rectangle (plus haut qu'un carré) */
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;       /* espaces égaux : haut, icône, nombre, libellé, bas */
}
.stat-tile-ic { width: 36px; height: 36px; display: block; }
.stat-tile-num { display: block; font-size: 26px; font-weight: 500; line-height: 1; color: #fff; }
.stat-tile-label { display: block; font-size: 12px; color: rgba(255, 255, 255, .85); }
/* Tuiles tonales : le texte de chacune = la couleur de fond de l'autre */
.profile-stats .stat-tile:nth-child(2) { background: #34b233; }
.profile-stats .stat-tile:nth-child(2) .stat-tile-num,
.profile-stats .stat-tile:nth-child(2) .stat-tile-label { color: #fff; }   /* texte blanc */

.profile-info { list-style: none; padding: 12px 8px 4px; }
.profile-info li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
}
.profile-info svg,
.profile-info img { width: 22px; height: 22px; fill: var(--ink-2); flex: 0 0 auto; display: block; }
.profile-info .info-label { font-size: 16px; color: var(--ink-2); }
.profile-info .info-value { margin-left: auto; font-size: 16px; font-weight: 500; text-align: right; }

/* ---------- Bottom sheet : compte ---------- */
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 20;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 24px 8px 20px;       /* plus d'espace blanc au-dessus du grip */
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
  transition: transform .3s cubic-bezier(.2, 0, 0, 1);
}
.sheet[hidden], .scrim[hidden] { display: none; }
.sheet.is-closing { transform: translateY(100%); }

.sheet-grip {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 3px;
  background: var(--line);
  margin: 4px auto 12px;
}

/* Menu contextuel d'une réservation (⋮) */
.rowmenu-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  padding: 2px 24px 4px;
  margin: 0;
}
/* Lignes marquées annulée / non-présentation (marquage visuel) */
.list-item.row-cancelled .li-title,
.list-item.row-noshow .li-title { text-decoration: line-through; }
.list-item.row-cancelled,
.list-item.row-noshow { opacity: .55; }
.list-item.row-cancelled .li-status,
.list-item.row-noshow .li-status { color: var(--error); font-weight: 500; }

.sheet-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 16px;
  border-bottom: 1px solid var(--line);
}
.sheet-id { flex: 1; min-width: 0; }
.sheet-name { font-size: 16px; font-weight: 500; }
.sheet-mail { font-size: 13px; color: var(--ink-2); }
.role-chip {
  font-size: 12px;
  font-weight: 500;
  color: #fff;                 /* police blanche */
  background: var(--primary);  /* couleur système (#1E3B21) */
  border-radius: 999px;
  padding: 4px 12px;
}

.sheet-menu { list-style: none; padding-top: 8px; }
.sheet-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: none;
  border: none;
  font-size: 16px;          /* = même taille que les infos / « Nom du client » */
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-md);
}
.sheet-row:active { background: rgba(30, 30, 30, .08); }   /* #1E1E1E transparent */
.sheet-row svg,
.sheet-row img { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; display: block; }
.sheet-row--danger { color: var(--ink); }
.row-tag {
  margin-left: auto;
  font-size: 12px;          /* = même taille que le badge « Admin » */
  font-weight: 500;
  color: #fff;
  background: #34b233;                 /* Super-admin = vert clair (2e tuile) */
  border-radius: 999px;
  padding: 4px 12px;          /* = même padding que le badge « Admin » */
}
