/* =========================================================================
   Veteam — Feuille de style (back-office)
   Reprend la structure du back-office « Legacy » (coquille latérale, cartes,
   chips, modale, toasts) recolorée en palette santé : bleus & pastels, fond
   gris-crème très clair.
   ========================================================================= */

:root {
  /* ── Fonds ── */
  --bg:          #EDF2F8;   /* gris-bleu très clair (crème froide) */
  --bg-2:        #E5EDF5;
  --surface:     #FFFFFF;
  --surface-2:   #F6F9FC;
  --surface-3:   #EEF3F9;
  --line:        #E1E9F1;
  --line-strong: #D2DEEA;

  /* ── Bleu santé (primaire) ── */
  --blue:        #2F80C2;
  --blue-600:    #2569A3;
  --blue-700:    #1E527F;
  --blue-tint:   #E2EEF9;
  --blue-tint-2: #EFF6FC;

  /* ── Marine (barre latérale) ── */
  --navy:        #15334C;
  --navy-2:      #1B4061;

  /* ── Accents pastel ── */
  --teal:        #2A9D8F;  --teal-tint:   #DCF1ED;
  --mint:        #5BB7A6;
  --lavender:    #7C6CF0;  --lavender-tint:#ECE9FB;
  --amber:       #E0913A;  --amber-tint:  #FBEEDB;
  --rose:        #D98AA8;  --rose-tint:   #F8E6EE;
  --sage:        #6A9A4E;  --sage-tint:   #E5EFDB;
  --red:         #DC4C5E;  --red-tint:    #FCE3E6;

  /* ── Encre / texte ── */
  --ink:         #1E3950;
  --ink-soft:    rgba(30, 57, 80, 0.66);
  --ink-faint:   rgba(30, 57, 80, 0.44);
  --on-navy:     rgba(238, 245, 251, 0.82);
  --on-navy-faint:rgba(238, 245, 251, 0.55);

  /* ── Rayons ── */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 100px;

  /* ── Bordures & ombres (teintées bleu) ── */
  --border-soft: 1px solid var(--line);
  --shadow-xs: 0 2px 6px -3px rgba(30, 57, 80, 0.30);
  --shadow-sm: 0 10px 26px -18px rgba(30, 57, 80, 0.45);
  --shadow-md: 0 20px 44px -26px rgba(30, 57, 80, 0.35);
  --shadow-lg: 0 36px 72px -36px rgba(30, 57, 80, 0.45);

  /* ── Typo (système embed : Jakarta titres · DM Sans corps · Montserrat labels) ── */
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;   /* titres & chiffres */
  --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; /* corps */
  --font-ui:      'Montserrat', system-ui, sans-serif;          /* micro-labels en capitales */
  --font: var(--font-body);  /* alias rétro-compat (boutons, champs…) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(rgba(47, 128, 194, 0.05) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.16; margin: 0; }

/* Chiffres & emphases lourdes → police d'affichage (DM Sans s'arrête à 700) */
.stat .n, .side__brand .nm, .av, .cal__dot, .cal__cov, .cal__need, .needbar .ct,
.cal-nav .month, .badge, .progress__row b, .prog + *, .gate__form input {
  font-family: var(--font-display);
}
/* Micro-labels en capitales → Montserrat (registre « UI » embed) */
.side__group, .who__lbl, .tbl th, .cal__dow {
  font-family: var(--font-ui); letter-spacing: 0.08em;
}
.tbl th { font-weight: 700; }
a { color: var(--blue-600); }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(47, 128, 194, 0.45); outline-offset: 2px; border-radius: 6px; }

/* Taille par défaut des icônes (sprite) — évite les SVG géants sans parent dimensionné */
svg.ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.av svg.ico { width: 52%; height: 52%; }
.cal__date svg.ico { width: 13px; height: 13px; }
.needbar .sp svg.ico { width: 18px; height: 18px; }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 0.95rem;
  padding: 11px 18px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.15s, border-color 0.15s;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -10px rgba(47, 128, 194, 0.7); }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--blue); color: var(--blue-700); }
.btn-soft { background: var(--blue-tint); color: var(--blue-700); }
.btn-soft:hover { background: #d4e6f7; }
.btn-success { background: var(--teal); color: #fff; }
.btn-success:hover { background: #238577; }
.btn-danger-ghost { background: var(--surface); color: var(--red); border-color: var(--red-tint); }
.btn-danger-ghost:hover { background: var(--red-tint); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ═══════════════ PORTE D'ACCÈS (démo) ═══════════════ */
.gate {
  position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(rgba(47, 128, 194, 0.06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(160deg, #f3f8fd, var(--bg));
}
body.unlocked .gate { display: none; }
.gate__card {
  width: min(420px, 100%); background: var(--surface); border: var(--border-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 38px 34px; text-align: center;
}
.gate__soft { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.gate__soft svg { width: 17px; height: 17px; color: var(--blue); }
.gate__slogan { display: block; font-family: var(--font-ui); font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); margin: 3px 0 14px; }
.gate__card h1 { letter-spacing: -0.035em; font-size: 1.9rem; }
.gate__card h1 { font-size: 1.7rem; }
.gate__card p { color: var(--ink-soft); font-size: 0.96rem; margin: 8px 0 24px; }
.gate__form { display: flex; flex-direction: column; gap: 12px; }
.gate__form input {
  font-family: var(--font); font-size: 1.3rem; text-align: center; letter-spacing: 0.3em; font-weight: 700;
  padding: 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink);
}
.gate__form input:focus { outline: none; border-color: var(--blue); background: #fff; }
.gate__form[hidden] { display: none; }                 /* sinon display:flex écrase [hidden] */
/* Champs du formulaire de lead : texte normal (pas le style « code ») */
#lead-form input { font-size: 1rem; text-align: left; letter-spacing: normal; font-weight: 500; }
#lead-form select {
  font-family: var(--font); font-size: 1rem; font-weight: 500; padding: 13px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); cursor: pointer; appearance: none;
}
#lead-form select:focus { outline: none; border-color: var(--blue); background: #fff; }
.gate__err { color: var(--red); font-size: 0.86rem; min-height: 1.1em; margin: 0; font-weight: 600; }
.gate__note { font-size: 0.78rem; color: var(--ink-faint); margin: 20px 0 0; line-height: 1.55; }

/* ═══════════════ COQUILLE ═══════════════ */
.app { display: none; }
body.unlocked .app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

.side {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: var(--on-navy); padding: 20px 14px; overflow-y: auto;
}
.side__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; text-decoration: none; }
.side__brand { align-items: flex-start; }
.side__brand .brand-soft { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--on-navy); letter-spacing: -0.02em; line-height: 1; }
.side__brand .brand-soft svg { width: 16px; height: 16px; color: #7fc0ef; }
.side__brand .brand-slogan { font-family: var(--font-ui); font-size: 0.55rem; font-weight: 600; color: var(--on-navy-faint); letter-spacing: 0.04em; margin: 2px 0 9px; }
.side__brand-txt { display: flex; flex-direction: column; line-height: 1.04; min-width: 0; }
.side__brand .brand-name { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.035em; color: #fff; line-height: 1.02; margin-top: 18px; }
.side__brand .brand-base { font-family: var(--font-ui); font-size: 0.74rem; font-weight: 600; color: var(--on-navy-faint); margin-top: 5px; letter-spacing: 0.01em; }
/* Logo « veteam » (SVG vectoriel) — recoloré via currentColor, éclair bleu conservé */
.veteam-logo { display: block; }
.side__brand .veteam-logo { width: 98px; height: 20px; color: #93a6bd; align-self: flex-start; }
.gate__logo { width: 195px; height: 40px; color: var(--ink); margin: 2px auto 16px; }
.veteam-logo--m { width: 98px; height: 20px; color: var(--navy); }

.side__group { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--on-navy-faint); padding: 14px 12px 6px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; color: var(--on-navy);
  font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  padding: 10px 12px; border-radius: 11px; transition: background 0.16s, color 0.16s;
}
.side__nav button svg { width: 19px; height: 19px; opacity: 0.82; flex-shrink: 0; }
.side__nav button:hover { background: rgba(255,255,255,0.07); color: #fff; }
.side__nav button.active { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -10px rgba(0,0,0,0.5); }
.side__nav button.active svg { opacity: 1; }
.side__nav .badge { margin-left: auto; background: var(--amber); color: #4a2f08; font-size: 0.72rem; font-weight: 800; padding: 1px 8px; border-radius: 100px; }
.side__nav button.soon { opacity: 0.5; cursor: default; }
.side__nav button.soon:hover { background: rgba(255,255,255,0.04); color: var(--on-navy); }
.side__nav .soon-badge { margin-left: auto; background: rgba(255,255,255,0.13); color: var(--on-navy); font-family: var(--font-ui); font-size: 0.56rem; font-weight: 700; padding: 2px 7px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.06em; }

.side__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); }

/* Sélecteur d'identité (démo des rôles) */
.who { background: rgba(255,255,255,0.06); border-radius: 12px; padding: 10px 12px; }
.who__lbl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-navy-faint); font-weight: 700; }
.who select {
  width: 100%; margin-top: 6px; background: rgba(0,0,0,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.16);
  border-radius: 9px; padding: 8px 10px; font-family: var(--font); font-weight: 600; font-size: 0.9rem;
}
.who select option { color: #15334C; }

/* ── Zone principale ── */
.main { min-width: 0; padding: clamp(18px, 3vw, 38px); }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.topbar .sub { color: var(--ink-soft); font-size: 0.96rem; margin-top: 5px; }
.topbar__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.burger { display: inline-flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; }
.burger svg { width: 22px; height: 22px; color: var(--navy); display: block; }
.mobile-top { display: none; align-items: center; gap: 12px; margin-bottom: 18px; }

/* ── Cartes & grilles ── */
.card { background: var(--surface); border: var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 22px 24px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

/* Stat cards */
.stat { background: var(--surface); border: var(--border-soft); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-xs); }
.stat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue-600); margin-bottom: 13px; }
.stat .ic svg { width: 20px; height: 20px; }
.stat .n { font-weight: 800; font-size: 2rem; color: var(--navy); line-height: 1; letter-spacing: -0.03em; }
.stat .l { font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; }
.stat.warn .ic { background: var(--amber-tint); color: var(--amber); }
.stat.good .ic { background: var(--teal-tint); color: var(--teal); }
/* Variante compacte (KPIs du tableau de bord) — icône à gauche, chiffre + label à droite */
.dash-stats .stat { padding: 13px 16px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.dash-stats .stat .ic { grid-row: 1 / span 2; margin: 0; width: 40px; height: 40px; }
.dash-stats .stat .n { font-size: 1.5rem; align-self: end; }
.dash-stats .stat .l { font-size: 0.78rem; margin-top: 1px; align-self: start; }
.stat.alert .ic { background: var(--red-tint); color: var(--red); }

/* Section headers */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: 1.3rem; }
.sec-head p { margin: 3px 0 0; color: var(--ink-soft); font-size: 0.92rem; }

/* Chips / badges */
.chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 0.72rem; padding: 3px 10px; border-radius: 100px; line-height: 1.5; }
.chip svg { width: 12px; height: 12px; }
.chip-blue { background: var(--blue-tint); color: var(--blue-700); }
.chip-teal { background: var(--teal-tint); color: #1d7468; }
.chip-amber { background: var(--amber-tint); color: #9a5f15; }
.chip-rose { background: var(--rose-tint); color: #a64a72; }
.chip-lav  { background: var(--lavender-tint); color: #5847b8; }
.chip-sage { background: var(--sage-tint); color: #4d6f37; }
.chip-gray { background: var(--surface-3); color: var(--ink-soft); }
.chip-red  { background: var(--red-tint); color: #b32d3d; }

/* Progress */
.prog { height: 9px; border-radius: 100px; background: var(--surface-3); overflow: hidden; }
.prog > span { display: block; height: 100%; border-radius: 100px; background: var(--blue); transition: width 0.5s var(--ease); }
.prog.over > span { background: var(--teal); }
.prog.under > span { background: var(--amber); }

/* Avatars */
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.86rem; flex-shrink: 0; }
.av.sm { width: 30px; height: 30px; font-size: 0.74rem; }
.av.lg { width: 48px; height: 48px; font-size: 1rem; }

/* État vide */
.empty { text-align: center; padding: 40px 22px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-soft); background: var(--surface-2); }
.empty svg { width: 36px; height: 36px; color: var(--ink-faint); margin-bottom: 10px; }

/* Tableaux */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 800; padding: 0 14px 10px; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 0.93rem; vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .vetcell { display: flex; align-items: center; gap: 10px; }
.tbl .vetcell b { font-weight: 700; }

/* ═══════════════ ÉQUIPE — glisser-déposer ═══════════════ */
.roster { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.dz { background: var(--surface); border: var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px; }
.dz__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dz__head h3 { font-size: 1.05rem; }
.dz__count { font-size: 0.8rem; color: var(--ink-faint); font-weight: 700; }
.dz__list { display: flex; flex-direction: column; gap: 10px; min-height: 90px; border-radius: var(--r-md); transition: background 0.18s, box-shadow 0.18s; padding: 4px; }
.dz__list.drop-ok { background: var(--blue-tint-2); box-shadow: inset 0 0 0 2px var(--blue); }
.dz__hint { font-size: 0.82rem; color: var(--ink-faint); text-align: center; padding: 20px 8px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); }

.pcard {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 11px 13px;
  cursor: grab; transition: box-shadow 0.16s, border-color 0.16s, transform 0.12s;
}
.pcard:hover { border-color: var(--blue); box-shadow: var(--shadow-xs); }
.pcard.dragging { opacity: 0.5; cursor: grabbing; }
.pcard.member { cursor: default; }
.pcard.invited { border-style: dashed; background: var(--surface-2); }
.pcard__body { flex: 1; min-width: 0; }
.pcard__body .nm { font-weight: 700; font-size: 0.96rem; }
.pcard__body .rl { font-size: 0.8rem; color: var(--ink-soft); }
.pcard__specs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pcard__grip { color: var(--ink-faint); }
.pcard__grip svg { width: 18px; height: 18px; }
.pcard__actions { display: flex; gap: 2px; flex-shrink: 0; }
.icbtn { background: none; border: none; color: var(--ink-faint); padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.icbtn:hover { background: var(--surface-3); color: var(--blue-700); }
.icbtn.danger:hover { background: var(--red-tint); color: var(--red); }
.icbtn svg { width: 17px; height: 17px; }

.spectag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 100px; }

/* ═══════════════ PLANNING (calendrier) ═══════════════ */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 8px; }
.cal-nav .btn { flex-shrink: 0; }
.cal-nav .month { font-weight: 800; font-size: 1.15rem; min-width: 200px; text-align: center; white-space: nowrap; text-transform: none; }
.cal-nav .month::first-letter { text-transform: uppercase; }
.cal-nav button { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; }
.cal-nav button:hover { border-color: var(--blue); color: var(--blue-700); }
.cal-nav button svg { width: 18px; height: 18px; }

.cal-views { display: inline-flex; gap: 3px; background: var(--surface-3); padding: 3px; border-radius: var(--r-pill); margin-left: 8px; }
.cal-views button { border: none; background: none; font-family: var(--font); font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); padding: 7px 16px; border-radius: var(--r-pill); }
.cal-views button.on { background: var(--surface); color: var(--blue-700); box-shadow: var(--shadow-xs); }

/* Vue semaine (grille vétérinaires × jours) */
.wk { display: grid; grid-template-columns: 156px repeat(7, minmax(66px, 1fr)); min-width: 640px; }
.wk__corner { border-bottom: 1px solid var(--line); }
.wk__dayhead { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; }
.wk__dayhead:hover { background: var(--surface-2); }
.wk__dayhead.weekend { background: var(--surface-2); }
.wk__dayhead.today { box-shadow: inset 0 3px 0 var(--blue); }
.wk__dow { font-family: var(--font-ui); font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.wk__dnum { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--ink); }
.wk__vlabel { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 0.86rem; min-width: 0; }
.wk__vlabel .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk__vlabel svg.ico { width: 17px; height: 17px; color: var(--ink-faint); }
.wk__slot { display: flex; align-items: center; justify-content: center; min-height: 42px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; font-weight: 800; font-size: 0.78rem; }
.wk__slot:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
.wk__cov { background: var(--surface-2); cursor: default; font-weight: 700; }
.wk__slot.wk__cov:hover { outline: none; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.8rem; color: var(--ink-soft); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 14px; border-radius: 5px; border: 1.5px solid; }

.cal { background: var(--surface); border: var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__dow { text-align: center; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); padding: 12px 0; border-bottom: 1px solid var(--line); }
.cal__cell { min-height: 116px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 8px; cursor: pointer; transition: background 0.14s; position: relative; }
.cal--strip .cal__cell { min-height: 150px; }

/* Modale « statut du jour » (vétérinaire) */
.day-opts { display: flex; flex-direction: column; gap: 8px; }
.day-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.day-opt:hover { border-color: var(--blue); background: var(--surface-2); }
.day-opt.on { border-color: var(--blue); background: var(--blue-tint-2); }
.day-opt__sw { width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; }
.day-opt__txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.day-opt__txt b { font-size: 0.96rem; }
.day-opt__txt span { font-size: 0.8rem; color: var(--ink-soft); }
.day-opt svg.ico { color: var(--blue); flex-shrink: 0; }
.cal__cell:nth-child(7n) { border-right: none; }
.cal__cell:hover { background: var(--surface-2); }
.cal__cell.out { background: var(--surface-3); color: var(--ink-faint); cursor: default; }
.cal__cell.weekend { background: var(--surface-2); }
.cal__cell.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal__date { font-weight: 700; font-size: 0.86rem; display: flex; align-items: center; justify-content: space-between; }
.cal__date .dn.today { background: var(--blue); color: #fff; border-radius: 50%; min-width: 23px; height: 23px; padding: 0 2px; display: inline-grid; place-items: center; font-size: 0.82rem; line-height: 1; }
.wk__dayhead.today .wk__dnum { background: var(--blue); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: inline-grid; place-items: center; }
.cal__cov { font-size: 0.68rem; font-weight: 800; padding: 1px 7px; border-radius: 100px; }
.cov-ok { background: var(--teal-tint); color: #1d7468; }
.cov-low { background: var(--amber-tint); color: #9a5f15; }
.cov-bad { background: var(--red-tint); color: #b32d3d; }
.cal__avs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 7px; }
.cal__dot { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 0.64rem; font-weight: 800; color: #fff; position: relative; }
.cal__needs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.cal__need { font-size: 0.6rem; font-weight: 700; padding: 1px 5px; border-radius: 5px; }

/* ── Panneau jour (drag-drop affectation) ── */
.day-panel { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
@media (max-width: 920px) { .day-panel { grid-template-columns: 1fr; } }

.slot-col { display: flex; flex-direction: column; gap: 12px; }
.needbar { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 13px; }
.needbar .sp { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; flex: 1; }
.needbar .ct { font-weight: 800; font-size: 0.92rem; }
.needbar .ct.ok { color: var(--teal); }
.needbar .ct.under { color: var(--amber); }

.assign-zone { border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); padding: 12px; min-height: 70px; transition: background 0.16s, box-shadow 0.16s; }
.assign-zone.drop-ok { background: var(--blue-tint-2); box-shadow: inset 0 0 0 2px var(--blue); border-style: solid; }
.assign-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.assign-tag { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 100px; padding: 4px 6px 4px 4px; font-weight: 700; font-size: 0.84rem; }
.assign-tag button { background: none; border: none; color: var(--ink-faint); padding: 2px; border-radius: 50%; display: grid; place-items: center; }
.assign-tag button:hover { background: var(--red-tint); color: var(--red); }
.assign-tag button svg { width: 14px; height: 14px; }

.avail-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.avail-col h4 { font-size: 0.92rem; margin-bottom: 10px; }
.avail-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }

/* ═══════════════ DEMANDES ═══════════════ */
.req { display: flex; gap: 14px; align-items: center; background: var(--surface); border: var(--border-soft); border-radius: var(--r-md); box-shadow: var(--shadow-xs); padding: 14px 16px; }
.req__body { flex: 1; min-width: 0; }
.req__body .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req__body .nm { font-weight: 700; }
.req__body .meta { font-size: 0.85rem; color: var(--ink-soft); margin-top: 3px; }
.req__body .meta.decided { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 0.8rem; color: var(--ink-faint); }
.req__body .meta.decided svg.ico { width: 14px; height: 14px; }
.req__actions { display: flex; gap: 8px; flex-shrink: 0; }
.restatus { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hist-filter { font-family: var(--font); font-size: 0.85rem; font-weight: 600; padding: 7px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); }

/* Spécialités */
.spec-card__head { display: flex; align-items: center; gap: 12px; }
.spec-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.spec-ic svg.ico { width: 21px; height: 21px; }
.spec-card__members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 26px; }
.iconpicks { display: flex; flex-wrap: wrap; gap: 8px; }
.iconpick { width: 44px; height: 44px; border: 1.5px solid var(--line-strong); border-radius: 11px; display: grid; place-items: center; cursor: pointer; color: var(--ink-soft); }
.iconpick input { display: none; }
.iconpick.on { border-color: var(--blue); background: var(--blue-tint); color: var(--blue-700); }
.iconpick svg.ico { width: 20px; height: 20px; }
.check-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; font-size: 0.92rem; user-select: none; }
.check-row input { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }
.check-row.on { background: var(--blue-tint-2); border-color: var(--blue); }

/* Aperçu du planning (mini-semaine sur le tableau de bord) */
.mini-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.mini-day { border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 10px; min-height: 156px; cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; gap: 8px; }
.mini-day:hover { box-shadow: var(--shadow-xs); }
/* Remplissage couleur de toute la case selon le taux de couverture (vert / orange / rouge) */
.mini-day.fill-cov-ok { background: var(--teal-tint); border-color: #bcd49a; }
.mini-day.fill-cov-low { background: var(--amber-tint); border-color: #f0c987; }
.mini-day.fill-cov-bad { background: var(--red-tint); border-color: #f3b1b8; }
.mini-day.fill-cov-ok .mini-day__cov, .mini-day.fill-cov-low .mini-day__cov, .mini-day.fill-cov-bad .mini-day__cov { background: rgba(255,255,255,0.6); }
.mini-day:hover { border-color: var(--blue); background: var(--surface-2); }
.mini-day.weekend { background: var(--surface-2); }
.mini-day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.mini-day__d { display: flex; align-items: baseline; justify-content: space-between; }
.mini-day__dow { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.mini-day__n { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--ink); }
.mini-day__cov { font-size: 0.72rem; font-weight: 800; padding: 1px 8px; border-radius: 100px; align-self: flex-start; }
.mini-day__dots { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; margin-top: auto; }
.mini-dot { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 0.6rem; font-weight: 800; background-size: cover; background-position: center; }
.mini-more { font-size: 0.66rem; font-weight: 800; color: var(--ink-faint); align-self: center; padding: 0 2px; }
.mini-day__tag { font-size: 0.66rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; align-self: flex-start; }
.mini-day__tag--ok { background: var(--blue-tint); color: var(--blue-700); }
@media (max-width: 820px) { .mini-week { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(92px, 1fr); overflow-x: auto; } }

/* Mémos / annonces */
.sec-head h2 svg.ico { vertical-align: -3px; margin-right: 5px; color: var(--blue); }
.memo-list { display: flex; flex-direction: column; gap: 14px; }
.memo { border: var(--border-soft); border-left: 3px solid var(--blue); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface-2); }
.memo__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.memo__author { font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; gap: 7px; }
.memo__date { font-size: 0.78rem; color: var(--ink-faint); }
.memo__title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.memo__body { margin: 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; }
.idea__actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.idea__actions .restatus { flex: 1; }

/* ═══════════════ FORMULAIRES ═══════════════ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-weight: 700; font-size: 0.86rem; color: var(--navy); }
.field .hint { font-size: 0.77rem; color: var(--ink-faint); font-weight: 500; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 0.98rem; padding: 11px 13px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); font-size: 0.88rem; font-weight: 600; cursor: pointer; user-select: none; }
.check input { display: none; }
.check.on { background: var(--blue-tint); border-color: var(--blue); color: var(--blue-700); }

/* ── Pills de sélection de type ── */
.typepills { display: flex; flex-wrap: wrap; gap: 8px; }
.typepill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 0.88rem; }
.typepill.on { border-color: var(--blue); background: var(--blue-tint); color: var(--blue-700); }

/* ═══════════════ MODALE ═══════════════ */
.backdrop { position: fixed; inset: 0; z-index: 6000; background: rgba(21, 51, 76, 0.46); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(620px, 100%); max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 26px 28px; animation: pop 0.2s var(--ease); }
.modal.wide { width: min(960px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal__head h3 { font-size: 1.28rem; }
.modal__head .sub { color: var(--ink-soft); font-size: 0.9rem; margin-top: 4px; }
.modal__close { background: none; border: none; color: var(--ink-faint); padding: 6px; border-radius: 8px; }
.modal__close:hover { background: var(--surface-3); color: var(--ink); }
.modal__close svg { width: 22px; height: 22px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.modal__note { font-size: 0.82rem; color: var(--blue-700); background: var(--blue-tint-2); border: 1px solid var(--blue-tint); border-radius: var(--r-sm); padding: 11px 14px; margin: 0 0 16px; line-height: 1.55; }

/* ── Toast ── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 13px 22px; border-radius: var(--r-pill); box-shadow: var(--shadow-md); font-weight: 600; font-size: 0.92rem; z-index: 7000; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Bannière info ── */
.note-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--blue-tint-2); border: 1px solid var(--blue-tint); border-radius: var(--r-md); padding: 14px 16px; font-size: 0.9rem; color: var(--blue-700); margin-bottom: 18px; }
.note-banner svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--blue); margin-top: 1px; }

/* ── Toggle ── */
.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle .tr { position: absolute; inset: 0; background: var(--line-strong); border-radius: 100px; transition: background 0.2s; }
.toggle .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: var(--shadow-xs); }
.toggle input:checked + .tr { background: var(--teal); }
.toggle input:checked + .tr::after { transform: translateX(20px); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 980px) {
  body.unlocked .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 4000; transform: translateX(-100%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; background: rgba(21,51,76,0.45); z-index: 3999; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .mobile-top { display: flex; }
  .roster { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .grid.c4 { grid-template-columns: 1fr 1fr; }
  .grid.c3 { grid-template-columns: 1fr; }
  .grid.c2 { grid-template-columns: 1fr; }
  .cal__cell { min-height: 92px; }
  .cal__needs { display: none; }
}
/* ── Mobile fluide ── */
@media (max-width: 640px) {
  .main { padding: 16px 14px 32px; }
  .topbar { margin-bottom: 18px; }
  .topbar__actions { width: 100%; }
  .topbar__actions .btn { flex: 1 1 auto; justify-content: center; }
  .card { padding: 18px 16px; }
  /* Demandes : empile le bloc d'actions sous le contenu */
  .req { flex-wrap: wrap; row-gap: 12px; }
  .req__actions { flex-basis: 100%; flex-wrap: wrap; }
  .req__actions .btn { flex: 1 1 auto; justify-content: center; }
  .req__actions[style] { align-items: stretch !important; }
  .restatus { flex-basis: 100%; }
  .restatus .btn { flex: 1 1 auto; justify-content: center; }
  .sec-head { gap: 10px; }
  .sec-head .btn { flex: 0 0 auto; }
  /* Calendrier : compact + scroll horizontal si besoin */
  .cal__grid { min-width: 0; }
  .cal__cell { min-height: 78px; padding: 5px 5px; }
  .cal__dow { font-size: 0.6rem; padding: 8px 0; }
  .cal__cov { font-size: 0.6rem; padding: 1px 5px; }
  .cal-toolbar { gap: 10px; }
  .cal-nav { width: 100%; }
  .cal-nav .month { min-width: 0; text-align: left; font-size: 1rem; }
  .cal-views { margin-left: 0; flex-basis: 100%; }
  .legend { font-size: 0.74rem; gap: 5px 10px; }
  .modal { padding: 20px 18px; }
  .stat .n { font-size: 1.7rem; }
  .pcard__actions, .spec-card .pcard__actions { flex-shrink: 0; }
}
@media (max-width: 400px) {
  .cal__avs { gap: 2px; }
  .cal__dot { width: 16px; height: 16px; font-size: 0.5rem; }
}
@media (max-width: 560px) {
  .cal__dot { width: 18px; height: 18px; font-size: 0.56rem; }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ═══════════════ Photos d'avatar (upload, repli initiales) ═══════════════ */
.av--photo { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* Confirmation du statut quotidien — vue « Mon planning » */
.cal__status { font-size: 0.66rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; line-height: 1.25; }
.cal__status svg { width: 11px; height: 11px; }
.cal__status--planned { background: transparent; color: var(--ink-soft); border: 1px dashed var(--line-strong); }
.cal__status--confirmed { background: var(--sage-tint); color: #4d6f37; border: 1px solid #bcd49a; }

/* Prévu vs Confirmé — vue semaine (case véto×jour) */
.wk__slot--confirmed { box-shadow: inset 0 0 0 2px var(--sage) !important; }
.wk__chk { position: absolute; top: 1px; right: 1px; display: grid; place-items: center; color: var(--sage); }
.wk__chk svg { width: 11px; height: 11px; }

/* Panneau jour — bouton confirmer par véto */
.assign-tag--confirmed { border-color: var(--sage); background: var(--sage-tint); }
.tag-confirm { background: none; border: none; color: var(--ink-faint); padding: 2px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.tag-confirm svg { width: 14px; height: 14px; }
.tag-confirm.on { color: #fff; background: var(--sage); }

/* Légende — pastilles prévu / confirmé */
.sw--planned { background: transparent; border: 1.5px dashed var(--line-strong) !important; }
.sw--confirmed { background: var(--sage-tint); border-color: #bcd49a !important; color: #4d6f37; display: inline-grid; place-items: center; }
.sw--confirmed svg { width: 10px; height: 10px; }

/* Outil plage — sélection des jours de semaine */
.dow-checks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dow-check { width: 38px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); font-weight: 800; font-size: 0.82rem; cursor: pointer; user-select: none; color: var(--ink-soft); }
.dow-check input { display: none; }
.dow-check.on { background: var(--blue-tint); border-color: var(--blue); color: var(--blue-700); }

/* Bandeau « L'équipe du planning » — petites cartes photo + nom */
.vroster { display: flex; flex-wrap: wrap; gap: 10px; }
.vcard { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 100px; padding: 5px 16px 5px 5px; }
.vcard__nm { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.vcard__specs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.vcard__none { font-size: 0.72rem; color: var(--ink-faint); }

/* Annonces de la direction — accusé de lecture (« Vu ») */
.memo__foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; }
.memo__seen { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.84rem; color: var(--sage); }
.memo__seen svg { width: 16px; height: 16px; }

/* Champ photo (modale membre) */
.photo-field { display: flex; align-items: center; gap: 14px; }
.photo-prev { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.photo-prev .av { width: 56px; height: 56px; font-size: 1.1rem; }
.photo-prev--lg { width: 84px; height: 84px; }
.photo-prev--lg .av { width: 84px; height: 84px; font-size: 1.5rem; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crop-vp--round { border-radius: 50%; }
.rl--contact { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.rl--contact svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--ink-faint); }

/* Aperçu planning — 2 semaines empilées */
.mini-weeks { display: flex; flex-direction: column; gap: 8px; }
.mini-wlabel { font-family: var(--font-ui); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; }
.mini-wlabel:first-child { margin-top: 0; }

/* Badge astreinte dans une case de planning (soir / week-end) */
.cal__oncall { display: inline-flex; align-items: center; gap: 3px; font-size: 0.6rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; margin-top: 6px; white-space: nowrap; }
.cal__oncall svg { width: 11px; height: 11px; }
.cal__oncall.oc-ok { background: #fef3c7; color: #92400e; }
.cal__oncall.oc-low { background: #fde4e4; color: #9f1239; outline: 1.5px solid #fca5a566; }

/* Console veteam — ligne client cliquable + fiche détaillée (modale) */
.row-click { cursor: pointer; }
.row-click:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.cs-head { display: flex; align-items: center; gap: 14px; }
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.cs-sect h4 { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.cs-sect h4 svg { width: 14px; height: 14px; color: var(--blue); }
.cs-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.cs-row:first-of-type { border-top: none; }
.cs-row__l { color: var(--ink-soft); flex-shrink: 0; }
.cs-row__v { text-align: right; font-weight: 600; color: var(--ink); }
.cs-admin { font-weight: 600; }
.cs-admin + .cs-admin { margin-top: 3px; }
@media (max-width: 620px) { .cs-grid { grid-template-columns: 1fr; } .cs-row__v { text-align: left; } }

/* Logo client white-label — sidebar (sur fond marine → cartouche blanc) */
.brand-logo { display: block; max-width: 172px; max-height: 60px; object-fit: contain; background: #fff; border-radius: 10px; padding: 8px 10px; margin: 12px 0 8px; box-shadow: var(--shadow-xs); }
.gate__clientlogo { display: block; max-width: 170px; max-height: 66px; object-fit: contain; margin: 8px auto 12px; }
.brand-logo[hidden], .gate__clientlogo[hidden] { display: none; }

/* Aperçu + champ logo (Réglages) */
.logo-prev { width: 92px; height: 56px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); border: 1.5px solid var(--line); overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-prev__ph { font-size: 0.7rem; color: var(--ink-faint); text-align: center; padding: 0 4px; }

/* Recadreur de logo */
.cropper { display: flex; justify-content: center; margin: 6px 0 16px; }
.crop-vp { position: relative; overflow: hidden; border-radius: 14px; border: 1.5px solid var(--line-strong); cursor: grab; touch-action: none;
  background-image: linear-gradient(45deg, #eef2f6 25%, transparent 25%), linear-gradient(-45deg, #eef2f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eef2f6 75%), linear-gradient(-45deg, transparent 75%, #eef2f6 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; background-color: #fff; }
.crop-vp:active { cursor: grabbing; }
.crop-vp img { position: absolute; left: 0; top: 0; transform-origin: 0 0; -webkit-user-drag: none; user-select: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.crop-zoom svg { width: 18px; height: 18px; color: var(--ink-faint); }
.crop-zoom input[type=range] { flex: 1; accent-color: var(--blue); }

/* Réglages — astreinte (case d'activation + effectif) */
.oncall-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.oncall-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; }
.oncall-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }
.oncall-row__lbl { flex: 1; font-weight: 700; font-size: 0.9rem; }
.oncall-row input[type=number] { width: 64px; text-align: center; padding: 7px 4px; }
.oncall-row.is-off { opacity: 0.5; }
.oncall-row.is-off input[type=number] { pointer-events: none; }

/* Réglages — horaires d'ouverture */
.hours-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hours-row { display: flex; align-items: center; gap: 12px; }
.hours-day { display: flex; align-items: center; gap: 9px; width: 116px; flex-shrink: 0; cursor: pointer; font-weight: 700; font-size: 0.9rem; }
.hours-day input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.hours-times { display: flex; align-items: center; gap: 8px; }
.hours-times input[type=time] { padding: 7px 8px; }
.hours-sep { color: var(--ink-faint); font-weight: 700; }
.hours-row.is-closed .hours-times { opacity: 0.4; pointer-events: none; }

/* Réglages — tuiles numériques (effectif min. par jour / astreinte) */
.numtiles { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.numtile { flex: 0 0 auto; width: 60px; text-align: center; }
.numtile--wide { width: 96px; }
.numtile span { display: block; font-family: var(--font-ui); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; white-space: nowrap; }
.numtile input { width: 100%; text-align: center; padding: 9px 4px; }

/* ═══════════════ Animations de navigation + bandeau démo + légende mini ═══════════════ */
html { scroll-behavior: smooth; }                 /* ancres (console admin) en défilement fluide */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-anim { animation: viewIn 0.28s var(--ease); }
/* transition douce des éléments de menu */
.side__nav button, .cal-views button, .typepill, .subnav__links a { transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease); }

/* Bandeau « version de démonstration » en haut du dashboard */
.demo-bn { display: flex; align-items: center; gap: 14px; background: linear-gradient(100deg, var(--blue-tint), var(--blue-tint-2)); border: 1px solid var(--blue); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 18px; box-shadow: var(--shadow-xs); }
.demo-bn__ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--blue); color: #fff; flex-shrink: 0; }
.demo-bn__ic svg { width: 17px; height: 17px; }
.demo-bn__txt { flex: 1; min-width: 0; font-size: 0.88rem; color: var(--blue-700); line-height: 1.45; }
.demo-bn .btn { flex-shrink: 0; }
.demo-bn__x { background: none; border: none; color: var(--blue-700); opacity: 0.6; padding: 6px; border-radius: 8px; flex-shrink: 0; }
.demo-bn__x:hover { opacity: 1; background: rgba(255,255,255,0.5); }
.demo-bn__x svg { width: 16px; height: 16px; }
@media (max-width: 720px) { .demo-bn { flex-wrap: wrap; } .demo-bn__txt { flex-basis: 100%; order: 3; } }

/* Légende compacte sous l'aperçu planning du dashboard */
.legend--mini { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); gap: 6px 12px; font-size: 0.74rem; }

/* Sidebar — encart « Convention 2027 » + switch de vue Admin/Vétérinaire */
.conv-note { display: flex; gap: 9px; align-items: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 11px; padding: 10px 11px; margin-bottom: 12px; }
.conv-note svg { width: 16px; height: 16px; color: #8FD14A; flex-shrink: 0; margin-top: 1px; }
.conv-note b { display: block; font-size: 0.76rem; color: #fff; font-weight: 800; }
.conv-note span { display: block; font-size: 0.7rem; color: var(--on-navy-faint); line-height: 1.42; margin-top: 2px; }
.viewswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.viewswitch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; font-weight: 700; font-size: 0.82rem; color: var(--on-navy); background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); border-radius: 9px; padding: 9px 6px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.viewswitch button svg { width: 14px; height: 14px; }
.viewswitch button:hover { background: rgba(255,255,255,0.13); color: #fff; }
.viewswitch button.on { background: #fff; color: var(--navy); border-color: #fff; }

/* Planning — sélecteur de date + vue « Jour » (agenda) */
.cal-datepick { font-family: inherit; font-size: 0.86rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 7px 10px; color: var(--ink); background: var(--surface); margin-left: 8px; }
.dayview { background: var(--surface); border: var(--border-soft); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-xs); }
.dayview__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dayview__head.today { box-shadow: inset 4px 0 0 var(--blue); }
.dayview__date { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; color: var(--navy); text-transform: capitalize; }
.dayview__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dayview__list { display: flex; flex-direction: column; }
.dayrow { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.dayrow:first-child { border-top: none; }
.dayrow:hover { background: var(--surface-2); }
.dayrow__nm { flex: 1; font-weight: 600; font-size: 0.95rem; }
.dayrow__st { font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dayrow__st svg { width: 12px; height: 12px; }
