/* Inter, hébergée localement (SIL Open Font License, voir fonts/LICENSE-Inter.txt). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/inter-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/inter-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/inter-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/inter-latin-700.woff2') format('woff2'); }

/* ═══════════════════════════════════════════════════════════════
   Planning — Design system
   Mobile-first, refined for desktop. Flat, high-contrast, restrained.
   ═══════════════════════════════════════════════════════════════ */

/* `hidden` doit toujours gagner : sans cette règle, n'importe quel composant
   qui fixe son propre `display` (boutons, bannières) reste visible malgré
   l'attribut. */
[hidden] { display: none !important; }

:root {
  /* Neutrals */
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #f6f7f9;
  --border: #e5e8ee;
  --border-strong: #d3d8e0;

  --ink: #0b0e14;
  --text: #0b0e14;
  --text-secondary: #4a5468;
  --text-muted: #8891a3;

  /* Identité — bleu pétrole, neutre et distinct de toutes les couleurs de
     statut (le bleu vif « Banquet », le vert « Disponible »…). Assez foncé
     pour porter du texte blanc. --brand-soft sert sur les fonds sombres. */
  --brand: #0e6e8c;
  --brand-soft: #9fd3e2;

  --accent: #0e6e8c;
  --accent-hover: #0b5870;
  --accent-light: #e7f2f6;
  --accent-text: #0b5870;

  /* Le bleu ne disparaît pas : c'est la couleur du statut « Banquet » dans
     leur Excel, et elle doit rester distincte de l'accent de l'interface. */
  --banquet: #1456f0;
  --banquet-light: #eaf0fe;

  /* legacy alias used across templates */
  --primary: var(--accent);
  --primary-hover: var(--accent-hover);
  --primary-light: var(--accent-light);
  --primary-text: var(--accent-text);

  /* Status */
  --green: #0e9f6e;
  --green-light: #ecfdf5;
  --green-text: #04785a;

  --orange: #d97706;
  --orange-light: #fffbeb;
  --orange-text: #a35709;

  --red: #dc2626;
  --red-light: #fef2f2;
  --red-text: #b42318;

  --purple: #6d5ce8;
  --purple-light: #f2f0fd;

  /* Annulé : un gris neutre rayé, pour ne jamais se confondre avec les
     couleurs de statut de leur Excel. */
  --cancelled: #6b7385;
  --cancelled-light: #eef0f3;
  --cancelled-stripes: repeating-linear-gradient(135deg, #eef0f3 0 6px, #e2e5ea 6px 12px);

  --yellow: #ca8a04;
  --yellow-light: #fef9c3;
  --yellow-text: #854d0e;

  /* Radius */
  --radius-xl: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --radius-pill: 999px;

  /* Shadow — used sparingly, borders do most of the work */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .14);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --container: 880px;
  --site-container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; }

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

svg.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: -3px;
}
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Layout ─────────────────────────────────────────────────── */
.app-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px 100px;
}

/* Data-dense manager views (the planning grid) benefit from the full
   desktop width instead of the narrower reading-width container. */
@media (min-width: 860px) {
  .app-shell.app-shell-wide { max-width: 1360px; }
}

/* ── Logo mark ──────────────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}
.logo-mark-lg { width: 44px; height: 44px; }

/* ── App top bar (authenticated) ───────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--surface-alt); }
.top-bar .org-name {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}
.top-bar-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.top-bar-actions a, .top-bar-actions button {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--font);
}
.top-bar-actions a:hover, .top-bar-actions button:hover {
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
}
.top-bar-user {
  font-size: .85rem;
  color: var(--text-secondary);
  padding: 8px 4px 8px 12px;
}
.top-bar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── Marketing nav (public / landing) ──────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: var(--site-container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.navbar-links a {
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
}
.navbar-links a:hover { color: var(--text); text-decoration: none; }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .navbar-links { display: none; }

  .top-bar { position: relative; }
  .nav-toggle { display: flex; }
  .top-bar-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: var(--shadow-md);
    padding: 8px;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .top-bar-actions.open { display: flex; }
  .top-bar-actions a, .top-bar-actions button {
    width: 100%;
    padding: 12px 10px;
    font-size: .92rem;
    border-radius: var(--radius-xs);
  }
  .top-bar-user { padding: 12px 10px; }
  .top-bar-divider { display: none; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: .89rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s, transform .06s;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #0a8158; color: #fff; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: var(--surface-alt); border-color: var(--text-muted); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 9px 12px;
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-lg {
  padding: 15px 26px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}
.btn-sm {
  padding: 7px 12px;
  font-size: .8rem;
  border-radius: var(--radius-xs);
}

.btn-block { display: flex; width: 100%; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 5px; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  transition: border-color .12s, box-shadow .12s;
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-light);
}
.form-input::placeholder { color: var(--text-muted); }

select.form-input { cursor: pointer; }
textarea.form-input { min-height: 90px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-section {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: .9rem;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ── Flashes ────────────────────────────────────────────────── */
.flash {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .88rem;
  font-weight: 500;
  animation: flash-in .3s ease;
  border: 1px solid transparent;
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.flash-success { background: var(--green-light); color: var(--green-text); border-color: rgba(14,159,110,.18); }
.flash-error   { background: var(--red-light); color: var(--red-text); border-color: rgba(220,38,38,.18); }
.flash-info    { background: var(--accent-light); color: var(--accent-text); border-color: rgba(20,86,240,.15); }
.flash-warning { background: var(--orange-light); color: var(--orange-text); border-color: rgba(217,119,6,.18); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-clickable { cursor: pointer; display: block; text-decoration: none; color: inherit; }
.card-clickable:hover { text-decoration: none; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.card-title { font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.card-meta { font-size: .84rem; color: var(--text-secondary); line-height: 1.7; }
.card-meta .meta-row { display: flex; align-items: center; gap: 6px; }
.card-meta svg { color: var(--text-muted); }

/* ── Badges / Status ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: .01em;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-green  { background: var(--green-light); color: var(--green-text); }
.badge-orange { background: var(--orange-light); color: var(--orange-text); }
.badge-red    { background: var(--red-light); color: var(--red-text); }
.badge-blue   { background: var(--accent-light); color: var(--accent-text); }
.badge-muted  { background: var(--surface-alt); color: var(--text-secondary); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow-text); }

.badge-role {
  font-size: .72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  color: #fff;
}

/* ── Progress bar ───────────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--surface-alt); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.progress-fill.green  { background: var(--green); }
.progress-fill.orange { background: var(--orange); }
.progress-fill.red    { background: var(--red); }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-container { max-width: 420px; margin: 40px auto; padding: 0 20px; }

/* ── Page de connexion : accueil à gauche, formulaire à droite ─────
   C'est l'écran que l'équipe voit tous les jours ; il doit ressembler à la
   maison, pas à un portail administratif. */
.auth-split {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 860px;
  margin: 32px auto 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #0f7896 0%, #0a4a5e 100%);
  color: #fff;
  padding: 34px 30px;
}
/* Un halo plutôt qu'un motif : ça donne de la matière sans dessiner de forme
   — l'emblème en filigrane, lui, restait un carré visible. */
.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 15% 0%, rgba(159, 211, 226, .26), transparent 62%);
  pointer-events: none;
}
.auth-brand-inner { position: relative; z-index: 1; }

.auth-brand-mark { width: 46px; height: 46px; color: #fff; --mark-check: #0a4a5e; }
.auth-brand-name {
  margin-top: 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-soft);
}
.auth-brand-title {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.auth-brand-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 11px; }
.auth-brand-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .88rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .92);
}
.auth-brand-points .icon-sm { flex: none; margin-top: 2px; color: var(--brand-soft); }

.auth-form-side { padding: 34px 30px 30px; }
.auth-form-side .auth-title { text-align: left; font-size: 1.5rem; margin-bottom: 4px; }
.auth-form-side .auth-subtitle { text-align: left; margin-bottom: 22px; }
.auth-footer-quiet { font-size: .8rem; color: var(--text-muted); margin-top: 10px; }

@media (min-width: 760px) {
  .auth-split { grid-template-columns: 1fr 1fr; }
  .auth-brand { padding: 42px 36px; display: flex; align-items: center; }
  .auth-form-side { padding: 42px 40px; align-self: center; width: 100%; }
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  box-shadow: var(--shadow-md);
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo .logo-mark { width: 56px; height: 56px; color: var(--brand); }

.logo .logo-mark { color: var(--accent); }
.logo-text { color: var(--text-secondary); font-weight: 600; }

/* Un filet à la couleur de l'app, juste sous la barre du haut. */
.top-bar { border-bottom: 2px solid var(--brand); }
.auth-title { font-size: 1.35rem; font-weight: 700; text-align: center; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-subtitle { text-align: center; color: var(--text-secondary); font-size: .89rem; margin-bottom: 26px; }
.auth-footer { text-align: center; margin-top: 22px; font-size: .85rem; color: var(--text-secondary); }

/* ── Section titles ─────────────────────────────────────────── */
.section-title {
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.section-title svg { color: var(--text-muted); }
.section-count {
  font-size: .75rem;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-secondary);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.roster-label {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.roster-label svg { width: 13px; height: 13px; }

.roster-details summary.roster-label {
  cursor: pointer;
  user-select: none;
  list-style: none;
  margin-bottom: 0;
  padding: 6px 0;
}
.roster-details summary.roster-label::-webkit-details-marker { display: none; }
.roster-chevron { transition: transform .15s; flex-shrink: 0; }
.roster-details[open] summary .roster-chevron { transform: rotate(90deg); }
.roster-label-detail {
  font-size: .76rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-muted);
  margin-left: 2px;
}
.roster-details[open] summary { margin-bottom: 4px; }

.search-with-suggestions { position: relative; }
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: .87rem;
  cursor: pointer;
}
.search-suggestion-item:hover { background: var(--surface-alt); }
.search-suggestion-icon { display: flex; color: var(--text-muted); flex-shrink: 0; }

/* ── People list ────────────────────────────────────────────── */
.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.person-row:last-child { border-bottom: none; }
.person-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  color: #fff;
  flex-shrink: 0;
}
.person-name { font-weight: 600; font-size: .9rem; }
.person-role { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.person-actions { display: flex; gap: 6px; flex-shrink: 0; }
.person-actions .btn { padding: 7px 12px; font-size: .78rem; }

/* ── Invite link box ────────────────────────────────────────── */
.invite-box {
  background: var(--accent-light);
  border: 1px solid rgba(20, 86, 240, .14);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}
.invite-box p {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  color: var(--accent-text);
  margin-bottom: 12px;
}
.invite-link-row { display: flex; gap: 8px; }
.invite-link-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: .82rem;
  border: 1px solid rgba(20, 86, 240, .22);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.btn-copy {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  flex-shrink: 0;
}
.btn-copy:hover { background: var(--accent-hover); }

/* ── Time slot editor ───────────────────────────────────────── */
.slot-card {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.slot-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.slot-name-input { flex: 1; font-weight: 600; padding: 8px 10px; font-size: .92rem; }
.slot-time-inputs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.slot-time-inputs input, .slot-time-inputs select { width: 110px; padding: 8px; font-size: .9rem; }
.slot-time-inputs input[type="date"] { width: 138px; color: var(--text-secondary); }
.slot-time-inputs span { color: var(--text-muted); font-size: .85rem; }
.slot-date-label { font-size: .78rem; color: var(--text-muted); }
.slot-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.slot-role-item { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.slot-role-item input {
  width: 56px;
  padding: 6px 8px;
  text-align: center;
  font-size: .9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font);
}

/* ── Event form: two columns on desktop so it fits on one screen ──── */
.event-form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.event-form-col { display: flex; flex-direction: column; gap: 16px; }
.event-form-col .form-section { margin-bottom: 0; }

@media (min-width: 900px) {
  .event-form-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 20px; }
}

/* Sticky action bar — the submit button stays reachable on a long form */
.form-actions-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 -6px 22px rgba(16, 24, 40, .07);
}
@media (max-width: 599px) {
  .form-actions-bar { padding: 10px 12px; }
  .form-actions-bar .btn-primary { flex: 1; }
}

/* Event types as compact toggle tiles — selection only; the number of couverts
   is a single figure on the event, in the Informations column. */
.type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
.type-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.type-tile:hover { border-color: var(--border-strong); }
.type-tile.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}
.type-tile input[type="checkbox"] { flex: none; margin: 0; }
.type-tile-name { flex: 1; min-width: 0; }
.type-summary { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--accent); }

/* ── Event detail: the event's full report, readable at a glance ──── */
.event-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.event-hero-main { min-width: 0; }
.event-rep-chip {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
}
.event-hero-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.event-hero-when { margin-top: 6px; font-size: .98rem; font-weight: 600; color: var(--text-secondary); }
.event-hero-where { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .88rem; color: var(--text-muted); }
.event-hero-truck { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 6px 10px; width: fit-content; max-width: 100%; font-size: .86rem; color: var(--accent-text); background: var(--accent-light); border-radius: var(--radius-xs); }
.event-hero-truck strong { color: var(--text); }
.event-hero-sep { color: var(--text-muted); }
.event-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.event-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.event-stat {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.event-stat-value { display: block; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.event-stat-text { font-size: 1.15rem; letter-spacing: -0.01em; }
.event-stat-of { font-size: 1.05rem; font-weight: 600; color: var(--text-muted); }
.event-stat-label { display: block; margin-top: 4px; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.event-stat.is-short .event-stat-value { color: var(--orange-text); }
.event-stat.is-full .event-stat-value { color: var(--green-text); }

.event-detail-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.event-detail-col { display: flex; flex-direction: column; gap: 14px; }
.event-detail-col .card { margin-bottom: 0; }

@media (min-width: 900px) {
  .event-detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.detail-block { padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-block:first-of-type { padding-top: 4px; }
.detail-block:last-of-type { border-bottom: none; padding-bottom: 0; }
.detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.detail-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: .7rem;
  letter-spacing: 0;
}
.detail-text { font-size: .92rem; color: var(--text); }
.detail-longtext { white-space: pre-wrap; line-height: 1.55; }
.detail-empty { font-size: .88rem; color: var(--text-muted); font-style: italic; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
}
.chip-accent { background: var(--accent-light); border-color: transparent; color: var(--accent-text); }

.staffing-bar { height: 6px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; margin-bottom: 8px; }
.staffing-bar-fill { height: 100%; background: var(--orange); border-radius: 999px; transition: width .2s ease; }
.staffing-bar-fill.is-full { background: var(--green); }

.person-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 4px;
  font-size: .8rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.person-note .icon-sm { flex: none; margin-top: 2px; color: var(--accent); }

/* Échoppe pickers on the event form */
/* Fiche événement : chaque formule avec ses couverts et ses choix. */
.formule-list { display: grid; }
.formule-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.formule-row:first-child { padding-top: 4px; }
.formule-row:last-child { border-bottom: none; padding-bottom: 0; }
.formule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.formule-name { font-weight: 700; font-size: .95rem; }
.formule-covers { font-size: .85rem; color: var(--text-secondary); white-space: nowrap; }
.formule-covers strong { font-size: 1.05rem; color: var(--text); }
.formule-row .chip-row { margin-top: 8px; }
.formule-row .detail-empty { margin-top: 6px; }

/* Composition : une ligne par formule, case à gauche, couverts à droite. */
.type-list { display: grid; gap: 6px; }
.type-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 8px 6px 12px; min-height: 48px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.type-line.selected { border-color: var(--accent); background: var(--accent-light); }
.type-line-check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; font-size: .9rem; font-weight: 600; }
.type-line-check input { margin: 0; flex: none; }
.type-line-covers { display: flex; align-items: center; gap: 8px; flex: none; font-size: .8rem; color: var(--text-muted); }
.type-line-covers .form-input { width: 84px; padding: 7px 10px; text-align: right; }
.type-line:not(.selected) .type-line-covers { opacity: .55; }
.type-line-hint { font-size: .76rem; color: var(--text-muted); flex: none; }
.type-line:not(.selected) .type-line-hint { visibility: hidden; }

.echoppe-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.echoppe-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  font-size: .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.echoppe-choice:hover { border-color: var(--border-strong); }
.echoppe-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.echoppe-choice input { flex: none; }

.btn-remove-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
}
.btn-remove-slot:hover { background: var(--red-light); }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.empty-state-icon svg { width: 24px; height: 24px; }
.empty-state p { font-size: .92rem; margin-bottom: 18px; line-height: 1.6; }

/* ── Respond page (employee) ────────────────────────────────── */
.respond-hero { text-align: center; padding: 36px 20px 26px; }
.respond-hero h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.respond-hero .date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Oui/Non stay side by side even on the narrowest phone — the labels are two
   words, and stacking them pushed the calendar a full screen further down. */
.respond-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.respond-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 14px;
  min-height: 46px;
  font-size: .96rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
.respond-btn-yes { background: var(--green-light); color: var(--green-text); border-color: rgba(14,159,110,.3); }
.respond-btn-yes:hover { background: var(--green); color: #fff; border-color: var(--green); }
.respond-btn-no { background: var(--red-light); color: var(--red-text); border-color: rgba(220,38,38,.25); }
.respond-btn-no:hover { background: var(--red); color: #fff; border-color: var(--red); }

.respond-status { text-align: center; padding: 26px; border-radius: var(--radius); margin: 16px auto; max-width: 400px; }
.respond-status.confirmed { background: var(--green-light); color: var(--green-text); }
.respond-status.waitlist { background: var(--orange-light); color: var(--orange-text); }
.respond-status.unavailable { background: var(--surface-alt); color: var(--text-secondary); }
.respond-status h3 { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.08rem; margin-bottom: 5px; }
.respond-status p { font-size: .86rem; }

/* ── Danger zone (super admin destructive actions) ─────────────── */
.danger-zone {
  margin-top: 36px;
  padding: 20px 22px;
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: var(--radius);
  background: var(--red-light);
}
.danger-zone h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  color: var(--red-text);
  margin-bottom: 6px;
}
.danger-zone p { font-size: .85rem; color: var(--text-secondary); margin-bottom: 16px; }
.danger-zone .btn-danger:disabled { opacity: .45; cursor: not-allowed; }

/* ── Stat tiles (super admin overview) ─────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-tile-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-tile-label { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* ── Data table (dense admin views) ────────────────────────────── */
.table-scroll { overflow-x: auto; margin-bottom: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; white-space: nowrap; }
.data-table th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-alt); }
.data-table a.row-link { color: inherit; text-decoration: none; display: block; }
.data-table a.row-link:hover { text-decoration: none; }

/* ── Filter pills (CRM status filter) ──────────────────────────── */

/* ── Notes / log ────────────────────────────────────────────────── */
.note-entry { padding: 14px 0; border-bottom: 1px solid var(--border); }
.note-entry:last-child { border-bottom: none; }
.note-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.note-author { font-size: .8rem; font-weight: 600; color: var(--text-secondary); }
.note-date { font-size: .76rem; color: var(--text-muted); }
.note-body { font-size: .9rem; line-height: 1.6; white-space: pre-wrap; }


/* ── Utility ────────────────────────────────────────────────── */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: .85rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.flex-row { display: flex; align-items: center; gap: 8px; }
.page-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { font-size: .88rem; color: var(--text-secondary); margin-top: 3px; }

/* Liens légaux du pied de page. */
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; }
.footer-links a { font-size: .82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text-secondary); }

/* App-shell footer (authenticated / auth pages) */
.app-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 20px 0 4px;
  text-align: center;
}
.app-footer .footer-links { margin-bottom: 4px; }
.app-footer p { font-size: .76rem; color: var(--text-muted); }

/* ── Legal pages ────────────────────────────────────────────── */
.legal-page { max-width: 720px; margin: 0 auto; padding: 8px 0 60px; }
.legal-header { margin-bottom: 8px; }
.legal-header h1 { font-size: 1.7rem; margin-bottom: 8px; }
.legal-updated { font-size: .82rem; color: var(--text-muted); }

.legal-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--orange-light);
  color: var(--orange-text);
  border: 1px solid rgba(217, 119, 6, .18);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .85rem;
  line-height: 1.55;
  margin: 22px 0 8px;
}
.legal-notice svg { flex-shrink: 0; margin-top: 1px; }

.legal-toc {
  margin: 28px 0;
  padding: 16px 18px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}
.legal-toc-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 10px; }
.legal-toc ol { list-style: none; display: grid; gap: 6px; counter-reset: toc; }
.legal-toc li { counter-increment: toc; font-size: .87rem; }
.legal-toc li::before { content: counter(toc) ". "; color: var(--text-muted); font-weight: 600; }
.legal-toc a { color: var(--text-secondary); }
.legal-toc a:hover { color: var(--accent); }

.legal-section { padding: 26px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.legal-placeholder-badge {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
}
.legal-section p { font-size: .92rem; color: var(--text-secondary); line-height: 1.7; }
.legal-section p.placeholder { color: var(--text-muted); font-style: italic; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 20, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.modal-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-subtitle { font-size: .86rem; color: var(--text-secondary); margin-bottom: 18px; }

#shareModalBody textarea { resize: none; font-family: inherit; }

/* ── Planning grid (weekly availability) ───────────────────────── */
.planning-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.planning-grid { display: grid; min-width: 760px; }
.planning-grid-header, .planning-grid-row {
  display: grid;
  grid-template-columns: 160px repeat(7, minmax(0, 1fr));
}
.planning-grid-header { position: sticky; top: 0; background: var(--surface); z-index: 3; border-bottom: 1px solid var(--border); }
.planning-corner {
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
}
.planning-date-cell {
  padding: 10px 6px;
  text-align: center;
  border-right: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  touch-action: none;
}
.planning-date-cell:last-child { border-right: none; }
.planning-date-cell .dow { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: .03em; }
.planning-date-cell .dnum { font-size: .95rem; font-weight: 700; margin-top: 2px; }
.planning-date-cell.is-today .dnum { color: var(--accent); }
.planning-date-cell.selecting, .planning-date-cell.selected-range { background: var(--accent-light); }
.planning-employee-cell {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--border);
  border-top: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  min-width: 0;
}
.planning-employee-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.planning-employee-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-employee-info .badge { align-self: flex-start; }
.planning-day-cell {
  border-right: 1px solid var(--border);
  border-top: 1px solid var(--border);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 56px;
}
.planning-day-cell:last-child { border-right: none; }
.planning-slot {
  border-radius: 6px;
  padding: 4px 6px;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  border: none;
  text-align: left;
  width: 100%;
}
.planning-slot.status-pending { background: var(--yellow-light); color: var(--yellow-text); }
.planning-slot.status-unavailable { background: var(--red-light); color: var(--red-text); }
.planning-slot.status-available { background: var(--green-light); color: var(--green-text); }
.planning-slot.status-banquet { background: var(--banquet); color: #fff; }
.planning-slot.status-degustation { background: var(--orange-light); color: var(--orange-text); }
.planning-slot.status-vacances { background: var(--purple-light); color: var(--purple); }
.planning-slot.status-cancelled { background: var(--cancelled-stripes); color: var(--cancelled); }
.planning-slot.status-cancelled .pvalue { text-decoration: line-through; text-decoration-color: var(--red); }
.planning-slot .plabel {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  opacity: .75;
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
}
.planning-slot .pvalue { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* L'horaire sur mesure partage la ligne de la période : une troisième ligne
   allongeait la case, puis toute la rangée de l'employé. */
.planning-slot .ptime { font-weight: 600; text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }

/* Remplie ou vide, une case a toujours la même hauteur — sinon la rangée d'un
   employé grandit dès qu'un jour est complet et la grille devient irrégulière. */
.planning-slot, .planning-slot-empty { height: 38px; overflow: hidden; display: block; min-width: 0; }
.planning-day-cell, .planning-slot-wrap { min-width: 0; }
.planning-slot-empty .plabel, .planning-slot .plabel { line-height: 1.3; }
.planning-slot .pvalue, .planning-slot-empty .pvalue { line-height: 1.35; }

/* Note pinned on a slot — discreet when empty, solid once written */
.planning-slot-wrap { position: relative; }
.slot-note-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: .3;
  cursor: pointer;
}
.slot-note-btn:hover, .slot-note-btn:focus-visible { opacity: .9; }
.slot-note-btn .icon-sm { width: 13px; height: 13px; }
.slot-note-btn.has-note {
  opacity: 1;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--border);
}
.planning-slot-wrap .plabel { padding-right: 16px; }

.slot-note-box {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.slot-note-box p { white-space: pre-wrap; }

.planning-slot-empty {
  border-radius: 6px;
  padding: 4px 6px;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  border: none;
  background: var(--surface-alt);
  text-align: left;
  width: 100%;
  color: var(--text-muted);
}
.planning-slot-empty .plabel { display: block; opacity: .65; font-size: .6rem; text-transform: uppercase; letter-spacing: .02em; }
.planning-slot-empty .pvalue { display: block; opacity: .55; font-size: .78rem; }
.planning-slot-empty:hover, .planning-slot-empty:focus-visible {
  background: var(--accent-light);
  color: var(--accent-text);
}
.planning-slot-empty:hover .plabel, .planning-slot-empty:hover .pvalue,
.planning-slot-empty:focus-visible .plabel, .planning-slot-empty:focus-visible .pvalue {
  opacity: .9;
}

/* ── Ask / Fill-in modals ─────────────────────────────────────────
   Same three steps in both: who, when, and the verb. Anything rare —
   custom hours, repetition — lives folded inside <details>. */
.employee-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px;
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
}
.employee-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  font-size: .88rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.employee-pick:hover { background: var(--surface-alt); }
.employee-pick:has(input:checked) { background: var(--accent-light); font-weight: 600; }
.employee-pick input { flex: none; }

.period-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.period-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.period-toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.period-toggle input { flex: none; }
.period-toggle-hint { display: block; font-size: .72rem; font-weight: 500; color: var(--text-muted); }

.form-options {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
}
.form-options > summary {
  padding: 12px 0;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.form-options[open] { padding-bottom: 14px; }
.form-options[open] > summary { border-bottom: 1px solid var(--border); }

.hours-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-label { width: 62px; flex: none; font-size: .84rem; font-weight: 600; color: var(--text-secondary); }
.hours-sep { color: var(--text-muted); }

.status-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.status-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 12px;
  font-size: .94rem;
  font-weight: 700;
  font-family: var(--font);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}
.status-choice.is-available { background: var(--green-light); color: var(--green-text); border-color: rgba(14,159,110,.3); }
.status-choice.is-available:hover { background: var(--green); color: #fff; }
.status-choice.is-unavailable { background: var(--red-light); color: var(--red-text); border-color: rgba(220,38,38,.25); }
.status-choice.is-unavailable:hover { background: var(--red); color: #fff; }
.status-choice.is-vacances { background: var(--purple-light); color: var(--purple); border-color: rgba(109,92,232,.28); }
.status-choice.is-vacances:hover { background: var(--purple); color: #fff; }
.status-choice.is-degustation { background: var(--orange-light); color: var(--orange-text); border-color: rgba(163,87,9,.22); }
.status-choice.is-degustation:hover { background: var(--orange); color: #fff; }

@media (max-width: 520px) {
  .period-toggles, .status-choices { grid-template-columns: 1fr; }
  .employee-picker { grid-template-columns: 1fr; }
}

/* The "also send it by e-mail" choice in the request modal */
.notify-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.notify-toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.notify-toggle input { flex: none; margin-top: 2px; }
.notify-toggle-title { display: block; font-size: .9rem; font-weight: 600; }
.notify-toggle-hint { display: block; margin-top: 2px; font-size: .78rem; color: var(--text-secondary); }

.planning-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: var(--text-secondary); margin-top: 12px; }
.planning-legend-item { display: flex; align-items: center; gap: 6px; }
.planning-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-dot-cancelled { background: repeating-linear-gradient(135deg, #b8bec9 0 2px, #e2e5ea 2px 4px); }

.btn-cancel-outline { color: var(--red-text); }
.btn-cancel-outline:hover { border-color: rgba(220, 38, 38, .35); background: var(--red-light); color: var(--red-text); }

.cancel-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--cancelled-stripes);
  border: 1px solid var(--border);
}
.cancel-box-title { font-weight: 700; font-size: .92rem; margin-bottom: 4px; color: var(--text); }
.person-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.plain-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.planning-month-label { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
#monthPicker { min-width: 150px; }

/* Desktop: the grid has real room now (.app-shell-wide) — use it. */
@media (min-width: 860px) {
  .planning-grid { min-width: 100%; }
  .planning-grid-header, .planning-grid-row { grid-template-columns: 200px repeat(7, minmax(0, 1fr)); }
  .planning-day-cell { min-height: 70px; padding: 6px; }
  .planning-slot { font-size: .78rem; padding: 6px 9px; }
  .planning-slot-empty { padding: 6px 9px; }
  .planning-slot, .planning-slot-empty { height: 44px; }
  .planning-employee-cell { font-size: .92rem; padding: 12px 16px; }
  .planning-date-cell { padding: 14px 8px; }
  .planning-date-cell .dnum { font-size: 1.1rem; }
}

/* ── Events month calendar (coloured per commercial) ─────────── */
.evcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.evcal-day {
  background: var(--surface);
  min-height: 108px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.evcal-day.outside { background: var(--bg-subtle); }
.evcal-day.outside .mycal-daynum { color: var(--text-muted); }
.evcal-day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.evcal-day.today .mycal-daynum {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 21px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.evcal-add {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
  opacity: .35;
  padding: 0 3px;
  border-radius: 4px;
}
.evcal-add:hover { opacity: 1; color: var(--accent); text-decoration: none; background: var(--accent-light); }
.evcal-event { display: block; border-radius: 6px; overflow: hidden; }
.evcal-event:hover { text-decoration: none; opacity: .85; }
.evcal-event-name {
  display: block;
  font-size: .64rem;
  font-weight: 700;
  color: #fff;
  padding: 3px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evcal-event-place {
  display: block;
  font-size: .62rem;
  font-weight: 600;
  color: var(--text);
  padding: 2px 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evcal-event-meta {
  display: block;
  font-size: .58rem;
  color: var(--text-muted);
  padding: 0 6px 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Employee month calendar (mon planning) ─────────────────── */
/* A pending request: date, hours, two buttons — nothing more, so nine of them
   don't bury the calendar underneath. */
.pending-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.pending-card { padding: 14px 16px; margin-bottom: 0; }

/* Wide screens: a full-width row per question wastes the whole first screen,
   so they sit side by side instead. */
@media (min-width: 760px) {
  .pending-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
.pending-card .pending-date { font-size: .96rem; font-weight: 700; line-height: 1.3; }
.pending-card .pending-when {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 10px;
  font-size: .82rem;
  color: var(--text-secondary);
}

/* ── Employee calendar — written mobile first, then given room on desktop.
   On a phone a 7-column month can't carry text, so each slot is a coloured
   bar and the wording moves to the day-by-day list beside/below it. ── */
.mycal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mycal-month { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; text-transform: capitalize; }

.empcal-layout { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
.empcal-main { min-width: 0; }
.empcal-side { min-width: 0; }

.mycal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mycal-weekday {
  background: var(--surface-alt);
  padding: 7px 2px;
  text-align: center;
  font-size: .64rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mycal-day {
  background: var(--surface);
  /* Hauteur fixe : une journée remplie ne doit jamais allonger sa semaine. */
  height: 58px;
  overflow: hidden;
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.mycal-day.outside { background: var(--bg-subtle); }
.mycal-day.outside .mycal-daynum { color: var(--text-muted); }
.mycal-daynum { font-size: .8rem; font-weight: 600; }
.mycal-day.today .mycal-daynum {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mycal-chip {
  width: 100%;
  height: 8px;
  border-radius: 3px;
  overflow: hidden;
}
/* The empty half of a day keeps its row, so a bar's position says whether
   it's the journée or the soir. */
.mycal-chip-empty {
  width: 100%;
  height: 8px;
  border-radius: 3px;
  background: var(--border);
  opacity: .35;
}
.mycal-chip-text { display: none; }
.mycal-chip-period { font-weight: 800; opacity: .7; margin-right: 3px; }

.mycal-hint { margin-top: 8px; font-size: .78rem; color: var(--text-muted); }
.mycal-hint strong { color: var(--text-secondary); }
.mycal-chip.status-pending { background: var(--yellow); }
.mycal-chip.status-unavailable { background: var(--red); }
.mycal-chip.status-available { background: var(--green); }
.mycal-chip.status-banquet { background: var(--banquet); }
.mycal-chip.status-degustation { background: var(--orange); }
.mycal-chip.status-vacances { background: var(--purple); }
.mycal-chip.status-cancelled { background: repeating-linear-gradient(135deg, #b8bec9 0 3px, #dfe2e8 3px 6px); }
.mycal-chip.has-note { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85); }

/* Day by day — the readable half of the view on a phone */
.agenda { display: flex; flex-direction: column; gap: 8px; }
.agenda-day {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.agenda-day.today { border-color: var(--accent); }
.agenda-day.past { opacity: .55; }
.agenda-date {
  flex: none;
  width: 42px;
  text-align: center;
  line-height: 1.1;
}
.agenda-dow { display: block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.agenda-num { display: block; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.agenda-day.today .agenda-num { color: var(--accent); }
.agenda-slots { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.agenda-slot { border-left: 3px solid var(--border-strong); padding-left: 10px; }
.agenda-slot-label { font-size: .92rem; font-weight: 600; line-height: 1.3; }
.agenda-slot-time { margin-top: 1px; font-size: .8rem; color: var(--text-secondary); }
.agenda-slot-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 5px;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.agenda-slot-note .icon-sm { flex: none; margin-top: 2px; color: var(--accent); }
.agenda-slot.status-pending { border-left-color: var(--yellow); }
.agenda-slot.status-unavailable { border-left-color: var(--red); }
.agenda-slot.status-available { border-left-color: var(--green); }
.agenda-slot.status-banquet { border-left-color: var(--banquet); }
.agenda-slot.status-degustation { border-left-color: var(--orange); }
.agenda-slot.status-vacances { border-left-color: var(--purple); }
.agenda-slot.status-cancelled { border-left: 3px dashed var(--cancelled); }
.agenda-slot.status-cancelled .agenda-slot-label { color: var(--cancelled); }
.agenda-slot-cancel {
  margin-top: 5px;
  padding: 7px 9px;
  border-radius: var(--radius-xs);
  background: var(--cancelled-light);
  font-size: .8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Tablet and up: the cells can hold real words, so show them. */
@media (min-width: 680px) {
  .mycal-day { height: 96px; padding: 6px; align-items: stretch; gap: 4px; }
  .mycal-weekday { padding: 9px 4px; font-size: .7rem; }
  .mycal-daynum { font-size: .88rem; }
  .mycal-chip {
    height: auto;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.3;
  }
  .mycal-chip-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mycal-chip-empty { height: 22px; background: transparent; border: 1px dashed var(--border); opacity: 1; }
  .mycal-chip.status-pending { background: var(--yellow-light); color: var(--yellow-text); }
  .mycal-chip.status-unavailable { background: var(--red-light); color: var(--red-text); }
  .mycal-chip.status-available { background: var(--green-light); color: var(--green-text); }
  .mycal-chip.status-banquet { background: var(--banquet); color: #fff; }
  .mycal-chip.status-degustation { background: var(--orange-light); color: var(--orange-text); }
  .mycal-chip.status-vacances { background: var(--purple-light); color: var(--purple); }
  .mycal-chip.status-cancelled { background: var(--cancelled-stripes); color: var(--cancelled); }
  .mycal-chip.status-cancelled .mycal-chip-text { text-decoration: line-through; text-decoration-color: var(--red); }
  .mycal-chip.has-note { box-shadow: inset 0 0 0 1.5px currentColor; }
}

/* Desktop: the month gets the width, the list becomes a side column. */
@media (min-width: 1000px) {
  .empcal-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; }
  .mycal-day { height: 118px; }
  .mycal-month { font-size: 1.6rem; }
  .empcal-side .agenda { max-height: 620px; overflow-y: auto; padding-right: 4px; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 860px) {
  .top-bar { padding: 20px 0; }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .slot-roles { grid-template-columns: 1fr; }
  .top-bar h1, .logo { font-size: 1.02rem; }
  .planning-grid-header, .planning-grid-row { grid-template-columns: 120px repeat(7, minmax(0, 1fr)); }
  .planning-grid { min-width: 780px; }
  /* « Mise en place » doit tenir dans une colonne de téléphone. */
  .planning-slot .pvalue { font-size: .62rem; }
  .planning-employee-cell { padding: 8px; font-size: .78rem; }
  .evcal-day { min-height: 74px; padding: 3px; }
  .evcal-event-name { font-size: .56rem; padding: 2px 4px; }
  .evcal-event-place { font-size: .54rem; padding: 1px 4px 0; }
  .evcal-event-meta { display: none; }
}


/* ── App installable ─────────────────────────────────────────────── */
.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.install-banner-icon { width: 42px; height: 42px; border-radius: 10px; flex: none; }
.install-banner-text { flex: 1; min-width: 0; font-size: .82rem; line-height: 1.35; color: var(--text-secondary); }
.install-banner-text strong { display: block; font-size: .9rem; color: var(--text); }
.install-banner-close {
  flex: none;
  display: inline-flex;
  padding: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.offline-page {
  max-width: 380px;
  margin: 18vh auto 0;
  padding: 0 24px;
  text-align: center;
}
.offline-icon { display: block; margin: 0 auto 18px; border-radius: 16px; }
.offline-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.offline-text { color: var(--text-secondary); font-size: .92rem; line-height: 1.5; margin-bottom: 22px; }


/* ── Téléphone à l'horizontale : la barre du haut s'efface au défilement ──
   Avec 390 px de hauteur, la barre en mange près d'un tiers. Elle glisse hors
   de l'écran quand on descend et revient dès qu'on remonte. */
.top-bar { transition: transform .22s ease, box-shadow .22s ease; will-change: transform; }
@media (orientation: landscape) and (max-height: 500px) {
  .top-bar { padding: 10px 0; }
  .top-bar.top-bar-hidden { transform: translateY(calc(-100% - 2px)); }
  .top-bar.top-bar-floating { box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
}
@media (prefers-reduced-motion: reduce) {
  .top-bar { transition: none; }
}


/* ── Pages légales ─────────────────────────────────────────────────── */
.legal-intro { margin-top: 12px; font-size: .95rem; color: var(--text-secondary); line-height: 1.65; }
.legal-todo { background: #fff3c4; color: #7a5a00; padding: 1px 5px; border-radius: 4px; font-style: normal; font-weight: 600; }
.legal-section h3 { font-size: .95rem; font-weight: 700; margin: 18px 0 6px; color: var(--text); }
.legal-section ul, .legal-section ol { margin: 8px 0 8px 20px; display: grid; gap: 6px; }
.legal-section li { font-size: .92rem; color: var(--text-secondary); line-height: 1.6; }
.legal-section p + p { margin-top: 10px; }
.legal-section strong { color: var(--text); }
.legal-table-wrap { overflow-x: auto; margin: 12px 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.legal-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); background: var(--surface-alt); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: top; line-height: 1.5; }
.legal-table td strong { color: var(--text); }
.legal-callout { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--accent-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem; color: var(--text-secondary); line-height: 1.6; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .85rem; }
.legal-nav a { color: var(--text-secondary); }

/* ── Mot de passe d'un employé, masqué par défaut ───────────────────── */
.pw-reveal { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .78rem; }
.pw-reveal-label { color: var(--text-muted); white-space: nowrap; }
.pw-reveal-value { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; color: var(--text); background: var(--surface-alt); padding: 1px 6px; border-radius: 6px; }
.pw-reveal-value.is-missing { font-family: inherit; color: var(--text-muted); background: none; padding: 0; }
.pw-reveal-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; background: none; color: var(--text-secondary); border-radius: 6px; cursor: pointer; }
.pw-reveal-btn:hover { background: var(--surface-alt); color: var(--accent); }

.catalogue-section { scroll-margin-top: 100px; }

/* Compte RH : les créneaux s'affichent, mais ne réagissent à rien. */
.planning-slot.is-static, .planning-slot-empty.is-static, .slot-note-btn.is-static { cursor: default; }
.planning-slot.is-static:hover, .planning-slot-empty.is-static:hover { transform: none; box-shadow: none; filter: none; }
.planning-slot-empty.is-static { opacity: .55; }

/* Choix du type de compte à la création. */
.role-choices { display: grid; gap: 8px; }
.role-choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.role-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.role-choice input { margin-top: 3px; }
.role-choice strong { display: block; font-size: .92rem; }
.role-choice small { display: block; font-size: .8rem; color: var(--text-secondary); margin-top: 2px; }
