/* Police Hanken Grotesk hébergée ici (licence SIL OFL : fonts/OFL.txt) : plus d'appel à Google, qui recevait
   l'adresse IP de chaque visiteur (audit n° 2). Latin et latin étendu, graisses 400 à 800. */
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-800.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-ext-500.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-ext-600.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-ext-700.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('fonts/hanken-grotesk-latin-ext-800.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* =============================================================================
   Chèque de Ville — Les Vitrines de Cugnaux
   Thème SOMBRE (noir légèrement grisé) — charte rose/vert/violet en accents
   Re-skin : tous les sélecteurs .cdv-* sont conservés à l'identique.
   ============================================================================= */

:root {
  /* --- Charte (inchangée, utilisée en accents) ------------------------- */
  --pink:   #E91E7B;
  --green:  #A8C60E;
  --purple: #8B5EA0;
  --white:  #ffffff;   /* pastille du logo, etc. */

  /* Variantes éclaircies pour lisibilité du texte/lien sur fond sombre */
  --pink-2:   #ff5aa3;
  --green-2:  #c6e436;
  --purple-2: #c79fda;

  /* --- Échelle sombre (rôles) ------------------------------------------ */
  --bg:        #14151a;   /* base de page, noir un peu grisé */
  --surface:   #1d1f26;   /* cartes, sections, tuiles */
  --surface-2: #262932;   /* en-têtes de table, encarts, code, ghost */
  --surface-3: #30343f;   /* survols */
  --border:    rgba(255,255,255,.09);
  --border-soft: rgba(255,255,255,.055);

  /* Compat : anciens noms de tokens repointés vers les rôles sombres */
  --card:    var(--surface);
  --card-bd: var(--border);

  /* --- Texte ----------------------------------------------------------- */
  --text:     #e9eaee;   /* corps */
  --text-dim: #b4b8c2;   /* secondaire */
  --grey:     #8b909c;   /* hints / légendes */
  --dgrey:    #c3c7d0;   /* labels (plus clair que le corps sur sombre) */

  /* --- États (calibrés pour le sombre) --------------------------------- */
  --ok:   #45cf83;
  --warn: #e3a531;
  --err:  #ef5d5d;
  --info: #6f9bf0;

  /* Fonds translucides des messages / champs (lisibles sur sombre) */
  --ok-bg:   rgba(69,207,131,.14);
  --ok-bd:   rgba(69,207,131,.30);
  --err-bg:  rgba(239,93,93,.14);
  --err-bd:  rgba(239,93,93,.32);
  --warn-bg: rgba(227,165,49,.15);
  --info-bg: rgba(111,155,240,.14);
  --info-bd: rgba(111,155,240,.30);
  --purple-bg: rgba(139,94,160,.22);
  --blue:    #6f9bf0;
  --blue-bg: rgba(111,155,240,.14);

  /* --- Forme ----------------------------------------------------------- */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -16px rgba(0,0,0,.6);
  --ring:   0 0 0 3px rgba(233,30,123,.30);
  --font:   'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:   ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body.cdv {
  --container: 1280px;   /* largeur max du contenu + bande d'alignement de l'entête (1 seul endroit à changer) */
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 78% -8%, rgba(139,94,160,.16), transparent 62%),
    radial-gradient(900px 520px at 8% 4%, rgba(233,30,123,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- HEADER -------------------------------------------------------------- */
.cdv-header {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 16px;
  background: linear-gradient(180deg, #1b1d24, #16171d);
  color: var(--text);
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.cdv-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--green) 52%, var(--purple));
  opacity: .9;
}
.cdv-logo { display: flex; align-items: center; gap: 12px; }
.cdv-logo-mark { display: grid; grid-template-columns: 14px 14px; grid-gap: 3px; }
.cdv-logo-mark i { width: 14px; height: 14px; border-radius: 3px; display: block; }
.cdv-logo-mark i:nth-child(1){ background: var(--pink); }
.cdv-logo-mark i:nth-child(2){ background: var(--green); }
.cdv-logo-mark i:nth-child(3){ background: var(--purple); }
.cdv-logo-mark i:nth-child(4){ background: var(--white); }
.cdv-logo-txt { display: flex; flex-direction: column; line-height: 1.15; }
.cdv-logo-txt strong { font-size: 15px; font-weight: 700; letter-spacing: .01em; color: #fff; }
.cdv-logo-txt em { font-style: normal; font-size: 12px; color: var(--grey); }

.cdv-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cdv-nav a {
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 12px; border-radius: 9px;
  transition: background .15s ease, color .15s ease;
}
.cdv-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.cdv-nav a.is-active { background: var(--pink); color: #fff; box-shadow: 0 4px 14px -6px rgba(233,30,123,.7); }
.cdv-nav a.cdv-logout { color: var(--pink-2); }
.cdv-nav a.cdv-logout:hover { background: rgba(233,30,123,.16); color: #fff; }

/* Bouton menu mobile */
.cdv-nav-toggle {
  display: none; background: transparent; border: 0; color: var(--text);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 8px;
}
.cdv-nav-toggle:hover { background: rgba(255,255,255,.08); }
.cdv-nav-toggle::before { content: "\2630"; }                      /* ☰ */
.cdv-nav-toggle[aria-expanded="true"]::before { content: "\2715"; } /* ✕ */

/* --- MAIN ---------------------------------------------------------------- */
/* Contenu centré, plafonné à --container ; l'entête s'aligne via le même calcul. */
.cdv-main { max-width: var(--container); margin: 0 auto; padding: 30px 22px 64px; }
.cdv-h1 { font-size: 25px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; color: #fff; }
.cdv-lead { color: var(--grey); margin: 0 0 22px; }

/* --- SECTIONS COLLAPSIBLES ----------------------------------------------- */
.cdv-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--grey);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  animation: cdvRise .45s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cdvRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cdv-section[data-color="pink"]   { border-left-color: var(--pink); }
.cdv-section[data-color="green"]  { border-left-color: var(--green); }
.cdv-section[data-color="purple"] { border-left-color: var(--purple); }
.cdv-section[data-color="black"]  { border-left-color: #5a5f6b; }

.cdv-section-head {
  width: 100%; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; font-size: 16px; font-family: var(--font);
  color: var(--text); text-align: left;
  transition: background .15s ease;
}
.cdv-section-head:hover { background: rgba(255,255,255,.03); }
.cdv-section-title { display: flex; align-items: center; gap: 12px; font-weight: 600; }

.cdv-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-3); color: #fff; font-size: 13px; font-weight: 700;
}
.cdv-section[data-color="pink"]   .cdv-badge { background: var(--pink); }
.cdv-section[data-color="green"]  .cdv-badge { background: var(--green); color: #1a1a1a; }
.cdv-section[data-color="purple"] .cdv-badge { background: var(--purple); }

.cdv-chevron { transition: transform .2s ease; color: var(--grey); font-size: 13px; }
.cdv-section.is-open .cdv-chevron { transform: rotate(180deg); }

.cdv-section-body { display: none; padding: 0 18px 18px; }
.cdv-section.is-open .cdv-section-body { display: block; }

/* --- CARDS --------------------------------------------------------------- */
.cdv-card {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 14px 16px;
}
.cdv-soon { color: var(--grey); font-style: italic; }
.cdv-soon b { color: var(--text-dim); font-style: normal; }

/* --- LOGIN --------------------------------------------------------------- */
.cdv-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(700px 380px at 50% 0%, rgba(139,94,160,.22), transparent 65%),
    var(--bg);
  padding: 20px;
}
.cdv-login {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px;
  width: 100%; max-width: 384px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
  animation: cdvRise .5s cubic-bezier(.2,.7,.2,1) both;
}
.cdv-login::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--pink), var(--green) 52%, var(--purple));
}
.cdv-login .cdv-logo-mark { margin: 0 auto 18px; }
.cdv-login h1 { font-size: 19px; font-weight: 700; text-align: center; margin: 0 0 4px; color: #fff; }
.cdv-login p.sub { text-align: center; color: var(--grey); margin: 0 0 22px; font-size: 13px; }
.cdv-field { margin-bottom: 14px; }
.cdv-field label { display: block; font-size: 13px; color: var(--dgrey); margin-bottom: 5px; }
.cdv-field input {
  width: 100%; padding: 11px 12px; font-size: 16px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font-family: var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cdv-field input::placeholder { color: #6a6f7a; }
.cdv-field input:focus { outline: none; border-color: var(--pink); box-shadow: var(--ring); }
.cdv-btn {
  width: 100%; padding: 12px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--pink); color: #fff; font-size: 15px; font-weight: 600; font-family: var(--font);
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
  box-shadow: 0 8px 20px -10px rgba(233,30,123,.8);
}
.cdv-btn:hover { background: #f5318b; }
.cdv-btn:active { transform: translateY(1px); }
.cdv-alert {
  background: var(--err-bg); color: #ffb4b4; border: 1px solid var(--err-bd);
  padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}

/* --- FOOTER -------------------------------------------------------------- */
.cdv-footer {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--grey); font-size: 13px; padding: 24px; border-top: 1px solid var(--border-soft);
}
.cdv-dots { display: flex; gap: 5px; }
.cdv-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.cdv-dots i:nth-child(1){ background: var(--pink); }
.cdv-dots i:nth-child(2){ background: var(--green); }
.cdv-dots i:nth-child(3){ background: var(--purple); }
.cdv-dots i:nth-child(4){ background: #5a5f6b; }

/* =============================================================================
   Lot 2 — formulaires, tableaux, tags, messages flash
   ============================================================================= */

/* --- Formulaires --------------------------------------------------------- */
.cdv-form { margin: 4px 0; }
.cdv-form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.cdv-form-row .cdv-field { flex: 1 1 220px; }
.cdv-form .cdv-field { margin-bottom: 14px; }
.cdv-form label { display: block; font-size: 13px; color: var(--dgrey); margin-bottom: 5px; }
.cdv-form input[type=text],
.cdv-form input[type=email],
.cdv-form input[type=password] {
  width: 100%; padding: 10px 12px; font-size: 16px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font-family: var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cdv-form input:focus { outline: none; border-color: var(--pink); box-shadow: var(--ring); }
.cdv-form input:disabled { background: #191b21; color: #6a6f7a; }
.cdv-hint { font-size: 12px; color: var(--grey); margin: 8px 0 0; }

.cdv-btn-inline { width: auto; display: inline-block; text-decoration: none; text-align: center; }

/* Focus clavier visible (au clavier seulement, invisible à la souris) */
.cdv-btn:focus-visible,
.cdv-nav a:focus-visible,
.cdv-link:focus-visible,
.cdv-section-head:focus-visible,
.cdv-add-line:focus-visible,
.cdv-remove-line:focus-visible,
.cdv-modal-close:focus-visible {
  outline: 2px solid var(--pink-2);
  outline-offset: 2px;
}

/* --- Tableau ------------------------------------------------------------- */
.cdv-table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 11px; }
.cdv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cdv-table th, .cdv-table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.cdv-table th {
  background: var(--surface-2); color: var(--text-dim); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  position: sticky; top: 0;
}
.cdv-table tbody tr { transition: background .12s ease; }
.cdv-table tbody tr:hover { background: rgba(255,255,255,.03); }
.cdv-table tr:last-child td { border-bottom: 0; }

/* En-têtes triables (tri client instantané : voir app.js) */
.cdv-sortable th:not([data-nosort]) { cursor: pointer; user-select: none; white-space: nowrap; }
.cdv-sortable th:not([data-nosort])::after { content: " ↕"; opacity: .35; font-weight: 400; }
.cdv-sortable th[data-dir="asc"]::after  { content: " ↑"; opacity: 1; color: var(--pink-2); }
.cdv-sortable th[data-dir="desc"]::after { content: " ↓"; opacity: 1; color: var(--pink-2); }

.cdv-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.cdv-actions form { display: inline; margin: 0; }
.cdv-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--purple-2); font-size: 13px; font-family: var(--font); text-decoration: underline;
  text-underline-offset: 2px; transition: color .12s ease;
}
.cdv-link:hover { color: var(--pink-2); }
.cdv-link-danger { color: var(--err); }

/* --- Tags ---------------------------------------------------------------- */
.cdv-tag { display: inline-block; vertical-align: middle; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; border: 1px solid transparent; }
.cdv-tag-ok   { background: var(--ok-bg);  color: #7fe3aa; border-color: var(--ok-bd); }
.cdv-tag-off  { background: rgba(255,255,255,.06); color: #9aa0ac; border-color: var(--border); }
.cdv-tag-warn { background: var(--warn-bg); color: #f2c879; border-color: rgba(227,165,49,.3); }

/* --- Messages flash ------------------------------------------------------ */
.cdv-flash { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; border: 1px solid transparent; }
.cdv-flash-ok   { background: var(--ok-bg);   color: #9bedc0; border-color: var(--ok-bd); }
.cdv-flash-err  { background: var(--err-bg);  color: #ffb0b0; border-color: var(--err-bd); }
.cdv-flash-info { background: var(--info-bg); color: #bcd2fb; border-color: var(--info-bd); }
.cdv-flash a { color: inherit; font-weight: 700; }

/* =============================================================================
   Lot 3 — select, textarea, aperçu d'import, code
   ============================================================================= */
.cdv-select {
  width: 100%; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 10px; font-family: var(--font);
  background: var(--surface-2); color: var(--text);
}
.cdv-select:focus { outline: none; border-color: var(--pink); box-shadow: var(--ring); }

.cdv-textarea {
  width: 100%; padding: 10px 12px; font-size: 16px; font-family: var(--mono);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; resize: vertical; line-height: 1.5;
}
.cdv-textarea:focus { outline: none; border-color: var(--pink); box-shadow: var(--ring); }

.cdv-preview-cq { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.cdv-preview-cq:last-child { border-bottom: 0; }
.cdv-preview-num { font-family: var(--mono); font-size: 13px; color: var(--grey); margin-top: 3px; }

.cdv-table code { font-family: var(--mono); font-size: 13px; background: var(--surface-3); color: var(--text); padding: 2px 7px; border-radius: 6px; }

/* =============================================================================
   Lot 4 — saisie multi-lignes + cumuls + bouton danger
   ============================================================================= */
.cdv-cheque-lines { display: flex; flex-direction: column; gap: 8px; }
.cdv-cheque-line { display: flex; align-items: center; gap: 8px; }
.cdv-cheque-line input {
  padding: 10px 12px; font-size: 16px; border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--mono); flex: 1 1 200px;
  background: var(--surface-2); color: var(--text); letter-spacing: .04em;
}
.cdv-cheque-line input.cdv-input-short { flex: 0 0 110px; }
.cdv-cheque-line input:focus { outline: none; border-color: var(--pink); box-shadow: var(--ring); }
.cdv-cheque-sep { color: var(--grey); font-size: 18px; font-weight: 600; }
.cdv-remove-line { width: 32px; height: 32px; padding: 0; line-height: 30px; text-align: center; border-radius: 50%; text-decoration: none; color: var(--grey); transition: background .12s, color .12s; }
.cdv-remove-line:hover { background: rgba(239,93,93,.16); color: var(--err); }
.cdv-add-line { display: inline-block; margin-top: 6px; text-decoration: none; padding: 7px 11px; border-radius: 8px; color: var(--purple-2); }
.cdv-add-line:hover { background: rgba(255,255,255,.05); }
/* Audit n° 2 (front-2) : sous 400 px, le 12e chiffre se cachait (360 px) et le ✕ tombait à 19-21 px. Le padding
   n'agit qu'avec « .cdv-form » devant (sinon « .cdv-form input[type=text] » l'emporte) ; le N° garde la place de
   6 chiffres. Ne jamais retirer le width: 100 % hérité de .cdv-form : sans lui, le champ ne rétrécit plus. */
@media (max-width: 400px) {
  .cdv-cheque-line { gap: 6px; }
  .cdv-form .cdv-cheque-line input { padding: 10px 8px; letter-spacing: 0; }
  .cdv-form .cdv-cheque-line input.cdv-input-short { flex: 0 0 76px; }
  .cdv-remove-line { flex: 0 0 40px; width: 40px; height: 40px; line-height: 38px; }
}

.cdv-stats { display: flex; flex-wrap: wrap; gap: 14px; }
.cdv-stat {
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 15px 18px; flex: 1 1 200px;
}
.cdv-stat-label { font-size: 12px; color: var(--grey); text-transform: uppercase; letter-spacing: .05em; }
.cdv-stat-value { font-size: 28px; font-weight: 800; margin-top: 4px; color: #fff; font-variant-numeric: tabular-nums; }
.cdv-stat-value.cdv-stat-ok   { color: var(--ok); }
.cdv-stat-value.cdv-stat-warn { color: var(--warn); }
.cdv-stat-hint { font-size: 12px; color: var(--grey); margin-top: 4px; }

/* =============================================================================
   Lot 4.2 — modale de confirmation
   ============================================================================= */
.cdv-modal-overlay {
  position: fixed; inset: 0; background: rgba(6,7,10,.66); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
}
.cdv-modal-overlay.is-open { display: flex; }
.cdv-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 30px 90px -30px rgba(0,0,0,.85); animation: cdvModalIn .16s ease-out;
}
@keyframes cdvModalIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.cdv-modal-title { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: #fff; }
.cdv-modal-body p { margin: 0 0 10px; }
.cdv-modal-list {
  list-style: none; padding: 0; margin: 8px 0 12px;
  max-height: 240px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.cdv-modal-list li {
  padding: 8px 12px; border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono); font-size: 13px;
}
.cdv-modal-list li:last-child { border-bottom: 0; }
.cdv-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.cdv-btn-ghost { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); box-shadow: none; }
.cdv-btn-ghost:hover { background: var(--surface-3); color: #fff; }
/* Recette en ligne du 20/11/2026 — la confirmation dessinée (assets/app.js, data-confirmer) */
.cdv-confirmer-texte { white-space: pre-line; }
.cdv-btn.cdv-btn-danger { background: var(--err-bg); color: #ffb3b3; border: 1px solid var(--err); box-shadow: none; }
.cdv-btn.cdv-btn-danger:hover { background: var(--err); color: #fff; }

/* =============================================================================
   Lot 4.3 — Zones statiques (front commerçant)
   ============================================================================= */
.cdv-zone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--grey);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.cdv-zone[data-color="pink"]   { border-left-color: var(--pink); }
.cdv-zone[data-color="green"]  { border-left-color: var(--green); }
.cdv-zone[data-color="purple"] { border-left-color: var(--purple); }
.cdv-zone[data-color="black"]  { border-left-color: #5a5f6b; }

.cdv-zone-head { padding: 16px 18px 6px; font-size: 16px; font-weight: 600; }
.cdv-zone-body { padding: 6px 18px 18px; }

.cdv-zone[data-color="pink"]   .cdv-badge { background: var(--pink); }
.cdv-zone[data-color="green"]  .cdv-badge { background: var(--green); color: #1a1a1a; }
.cdv-zone[data-color="purple"] .cdv-badge { background: var(--purple); }
.cdv-zone[data-color="black"]  .cdv-badge { background: #5a5f6b; }

/* =============================================================================
   Lot 4.5 — Modale de détail (large) + bouton de fermeture
   ============================================================================= */
.cdv-modal { position: relative; }
.cdv-modal-lg { max-width: 760px; }
.cdv-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: 0; font-size: 20px; line-height: 1;
  cursor: pointer; color: var(--grey);
}
.cdv-modal-close:hover { color: var(--err); }
.cdv-detail-body .cdv-modal-title { margin: 0 0 16px; padding-right: 28px; font-size: 18px; }
.cdv-detail-body .cdv-zone { box-shadow: none; }

/* =============================================================================
   Lot 5a (Réception) — tag "info" + case à cocher
   ============================================================================= */
.cdv-tag-info { background: var(--purple-bg); color: var(--purple-2); border-color: rgba(139,94,160,.4); }
/* « Bloquer des chèques perdus ou volés » (fiche d'un chéquier) : une case par chèque, en ligne au téléphone. */
.cdv-bloquer { display: grid; gap: 10px; margin-top: 8px; }
.cdv-bloquer .cdv-field { margin: 0; }
.cdv-bloquer-liste { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cdv-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cdv-check input { width: 16px; height: 16px; accent-color: var(--pink); }
.cdv-stat-value.cdv-stat-info { color: var(--purple-2); }

/* Statut "Récupéré" — bleu */
.cdv-tag-blue { background: var(--blue-bg); color: #a9c4fb; border-color: var(--info-bd); }
.cdv-stat-value.cdv-stat-blue { color: var(--blue); }

/* =============================================================================
   Connexion des adhérents — bandeau de l'espace commerçant, écrans de la connexion
   (cibles tactiles de 44 px : ces liens se touchent au pouce, au comptoir)
   ============================================================================= */
.cdv-sso-bandeau {
  display: flex; align-items: center; min-height: 44px;
  padding: 0 22px;
  background: var(--surface-2); color: var(--purple-2);
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.cdv-sso-bandeau:hover { background: var(--surface-3); color: #fff; }
.cdv-sso-bandeau:focus-visible { outline: 2px solid var(--pink-2); outline-offset: -2px; }

.cdv-login-texte { color: var(--text-dim); font-size: 14px; margin: 0 0 14px; }
.cdv-login-texte strong { color: var(--text); overflow-wrap: anywhere; }
.cdv-login-liens { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px 0 0; }
.cdv-login-liens .cdv-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-align: center; }
.cdv-field input[readonly] { background: #191b21; color: var(--text-dim); }

/* --- RESPONSIVE (mobile) -------------------------------------------------- */
@media (max-width: 640px) {
  .cdv-nav-toggle { display: inline-flex; }
  .cdv-header { flex-wrap: wrap; }
  .cdv-logo   { flex: 1 1 auto; }
  .cdv-nav    { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; margin-top: 8px; }
  .cdv-nav.is-open { display: flex; }
  .cdv-nav a  { font-size: 14px; padding: 11px 12px; }
  .cdv-main   { padding: 22px 14px 48px; }

  /* Tableaux → cartes empilées sur mobile (TOUS les .cdv-table).
     L'en-tête se masque, chaque ligne devient une carte ; le libellé de chaque
     cellule vient du data-label, rempli automatiquement par app.js d'après les <th>. */
  .cdv-table-wrap { border: 0; overflow: visible; }
  .cdv-table thead { display: none; }
  .cdv-table, .cdv-table tbody, .cdv-table tr, .cdv-table td { display: block; width: 100%; }
  .cdv-table tr {
    background: var(--surface-2); border: 1px solid var(--border-soft);
    border-radius: 10px; margin-bottom: 10px;
  }
  .cdv-table td {
    border: 0; border-bottom: 1px solid var(--border-soft);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 6px 14px; padding: 9px 13px; text-align: right; white-space: normal !important;
  }
  .cdv-table tr td:last-child { border-bottom: 0; }
  .cdv-table td:empty { display: none; }
  .cdv-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-dim);
    text-align: left; flex: 0 0 auto;
  }
}

/* =============================================================================
   Frise « Parcours du chèque » — structure & typo seulement
   (les couleurs des pastilles/traits restent posées en inline par le PHP)
   ============================================================================= */
.cdv-tl { margin-top: 2px; }
.cdv-tl-step { display: flex; gap: 14px; }
.cdv-tl-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 32px; }
.cdv-tl-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: none;
  font-size: 15px; font-weight: 700; line-height: 1;
}
.cdv-tl-dot.done { color: #fff; }
.cdv-tl-dot.todo { background: var(--surface-2); border: 2px dashed #4a4f5a; color: #6f7480; font-size: 13px; font-weight: 600; }
.cdv-tl-line { width: 2px; flex: 1; min-height: 24px; margin: 3px 0; background: #3a3f49; }
.cdv-tl-line.todo { background: repeating-linear-gradient(#3a3f49 0 4px, transparent 4px 8px); }
.cdv-tl-body { padding-bottom: 14px; flex: 1; min-width: 0; }
.cdv-tl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cdv-tl-ttl { font-size: 14px; font-weight: 600; color: var(--text); }
.cdv-tl-ttl.todo { color: #7c818c; font-weight: 400; }
.cdv-tl-date { font-size: 12px; color: var(--grey); white-space: nowrap; }
.cdv-tl-date.todo { color: #6a6f7a; font-style: italic; }
.cdv-tl-det { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.cdv-tl-det.todo { color: #6f7480; }
.cdv-tl-sub { font-size: 12px; color: var(--grey); margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* =============================================================================
   Nouveau chemin du chèque (03/10) — la case « Je détruis ces chèques papier » de
   la fenêtre de confirmation : encadrée, facile à toucher ; « Confirmer » estompé
   tant qu'elle n'est pas cochée (un bouton grisé doit en avoir l'air).
   ============================================================================= */
.cdv-btn:disabled { opacity: .4; box-shadow: none; transform: none; pointer-events: none; }
.cdv-check-detruire {
  display: flex; gap: 12px; margin-top: 4px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  color: #fff; font-weight: 600;
}
.cdv-check-detruire input { width: 22px; height: 22px; flex: none; }
.cdv-check-detruire:has(input:checked) { border-color: var(--pink); }

/* =============================================================================
   Accessibilité — respect de la préférence "réduire les animations"
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* =============================================================================
   Opérations bonifiées (lot B, 23/10/2026) — la liste des opérations, les lignes
   de chiffres de la clôture, et la vente au stand (admin/vente.php), pensée pour
   le téléphone du vendeur : gros boutons, un geste par étape (maquette validée).
   ============================================================================= */
.cdv-op-liste { display: grid; gap: 8px; }
.cdv-op-ligne {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-soft);
  color: var(--text); text-decoration: none; min-height: 52px;
}
.cdv-op-ligne:hover { background: var(--surface-3); }
.cdv-op-ligne strong { font-size: 15px; flex: 1 1 200px; }
.cdv-op-ligne .cdv-hint { margin: 0; }
.cdv-op-ligne-chiffre {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; font-variant-numeric: tabular-nums;
}
.cdv-op-ligne-chiffre > :last-child { flex: none; white-space: nowrap; text-align: right; }
.cdv-op-ligne-chiffre:last-child { border-bottom: 0; }
.cdv-op-ligne-chiffre .cdv-hint { margin: 2px 0 0; }
/* Les chiffres d'une opération : deux tuiles par ligne sur un téléphone (maquette). */
.cdv-op-stats .cdv-stat { flex: 1 1 150px; padding: 12px 14px; }
.cdv-op-stats .cdv-stat-value { font-size: 22px; }
/* La caisse jour par jour : un tableau compact, qui tient en 375 px (pas les cartes empilées des .cdv-table). */
.cdv-op-caisse-wrap { overflow-x: auto; }
.cdv-op-caisse { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.cdv-op-caisse th, .cdv-op-caisse td { padding: 8px 5px; border-bottom: 1px solid var(--border-soft); text-align: right; white-space: nowrap; }
.cdv-op-caisse th:first-child, .cdv-op-caisse td:first-child { text-align: left; padding-left: 0; }
.cdv-op-caisse th:last-child, .cdv-op-caisse td:last-child { padding-right: 0; }
.cdv-op-caisse th { color: var(--text-dim); font-weight: 600; font-size: 12px; white-space: normal; vertical-align: bottom; }
.cdv-op-caisse tr.total td { font-weight: 800; border-bottom: 0; }
@media (max-width: 400px) {
  .cdv-op-caisse { font-size: 12px; }
  .cdv-op-caisse th, .cdv-op-caisse td { padding: 8px 3px; }
}
.cdv-op-theo {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px;
  margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--green);
}
.cdv-op-theo span { font-size: 13px; color: var(--text-dim); }
.cdv-op-theo strong { font-size: 22px; color: var(--green-2); font-variant-numeric: tabular-nums; }

body.cdv-stand { background: var(--bg); }
.cdv-stand-bar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 14px 16px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.cdv-stand-bar strong { display: block; font-size: 17px; line-height: 1.3; }
.cdv-stand-bar .cdv-hint { display: block; margin: 2px 0 0; }
.cdv-stand-liens { display: flex; gap: 14px; font-size: 13px; white-space: nowrap; padding-top: 2px; }
.cdv-stand-deconnexion { margin: 0; }   /* vendeur venu de l'Espace bureau : la déconnexion est un formulaire (POST) */
.cdv-stand-onglets {
  display: grid; grid-template-columns: repeat(3, 1fr); position: sticky; top: 0; z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.cdv-stand-onglets a {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 4px;
  font-weight: 700; font-size: 14px; color: var(--text-dim); text-decoration: none; border-bottom: 3px solid transparent;
}
.cdv-stand-onglets a[aria-current="page"] { color: var(--text); border-bottom-color: var(--pink); }
.cdv-stand-corps { max-width: 560px; margin: 0 auto; padding: 16px 16px 56px; display: grid; gap: 14px; align-content: start; }
.cdv-stand-corps > .cdv-flash { margin: 0; }
.cdv-stand-corps .cdv-form { display: grid; gap: 14px; }
.cdv-stand-corps .cdv-field { margin-bottom: 0; }
.cdv-stand-corps .cdv-field input { min-height: 50px; font-size: 17px; }
.cdv-stand-corps .cdv-scan-cta { width: 100%; min-height: 76px; margin: 0; font-size: 18px; }
.cdv-stand-titre { font-size: 20px; font-weight: 800; margin: 0; }
.cdv-stand-jour { font-size: 13px; font-weight: 700; color: var(--text-dim); margin: 6px 0 -4px; }
.cdv-stand-etapes { display: flex; gap: 6px; font-size: 12px; color: var(--text-dim); }
.cdv-stand-etapes span { flex: 1; text-align: center; padding: 6px 2px; border-radius: 999px; background: var(--surface-2); }
.cdv-stand-etapes .on { background: var(--pink); color: #fff; font-weight: 700; }
.cdv-stand-etapes .fait { background: var(--surface-3); color: var(--text); }
.cdv-stand-liste { display: grid; gap: 8px; }
.cdv-stand-chq {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
}
.cdv-stand-chq b { font-variant-numeric: tabular-nums; }
.cdv-stand-chq button {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface-3); color: var(--text); font-size: 20px; line-height: 1;
}
/* Vente à l'unité (11/2026) : un chèque seul, son chéquier dessous, et « Tout le chéquier » d'un appui. */
.cdv-stand-chq-nom { flex: 1 1 auto; min-width: 0; }
.cdv-stand-chq-nom .cdv-hint { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdv-stand-chq button.cdv-stand-entier {
  width: auto; height: 40px; border-radius: 20px; padding: 0 12px; font-size: 13px; font-weight: 700;
  background: var(--surface-3); color: var(--pink-2); border: 1px solid var(--border);
}
.cdv-requis { color: var(--err); font-weight: 700; }
.cdv-stand-du { display: grid; gap: 2px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.cdv-stand-du span { font-size: 13px; color: var(--text-dim); }
.cdv-stand-du strong { font-size: 30px; font-weight: 800; color: var(--green-2); font-variant-numeric: tabular-nums; line-height: 1.2; }
.cdv-stand-du em { font-style: normal; font-size: 13px; color: var(--text-dim); }
.cdv-btn.cdv-stand-principal { display: block; width: 100%; min-height: 52px; font-size: 16px; font-weight: 700; text-align: center; text-decoration: none; line-height: 28px; }
.cdv-stand-retour { justify-self: start; padding: 8px 0; background: none; border: 0; font-size: 15px; cursor: pointer; }
.cdv-stand-modes { display: grid; gap: 10px; }
/* « .cdv-stand » devant : passe avant « .cdv-form label » (bloc, 13 px) du reste de l'outil. */
.cdv-stand .cdv-stand-mode {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 16px; margin: 0; cursor: pointer;
  border: 2px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 18px; font-weight: 800;
}
.cdv-stand-mode input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--pink); }
.cdv-stand-mode:has(input:checked) { border-color: var(--pink); background: var(--surface-3); }
.cdv-stand-connu { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); color: #7fe3aa; font-size: 14px; font-weight: 600; }
.cdv-stand-erreurs { padding: 10px 12px; border-radius: 12px; background: var(--err-bg); border: 1px solid var(--err-bd); color: #ffd0d0; font-size: 14px; }
.cdv-stand-erreurs p { margin: 0; }
.cdv-stand-erreurs p + p { margin-top: 6px; }
.cdv-stand-ok { display: grid; gap: 6px; padding: 18px; border-radius: 16px; background: var(--ok-bg); border: 1px solid var(--ok-bd); }
.cdv-stand-ok strong { font-size: 22px; color: var(--ok); }
.cdv-stand-vente { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.cdv-stand-vente.est-annulee { opacity: .7; }
.cdv-stand-vente-l1 { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.cdv-stand-vente-l1 span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cdv-stand-vente-l2 { font-size: 13px; color: var(--text-dim); }
.cdv-stand-annuler > summary { cursor: pointer; width: fit-content; padding: 6px 0; color: var(--pink-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cdv-stand-annuler form { display: grid; gap: 10px; margin-top: 6px; }
.cdv-stand .cdv-stand-rendu { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; cursor: pointer; }
.cdv-stand-rendu input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--pink); }
.cdv-btn.cdv-stand-danger { background: var(--err-bg); color: #ffb3b3; border: 1px solid var(--err); box-shadow: none; min-height: 50px; font-weight: 700; }
.cdv-stand-defaut { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =============================================================================
   Calendrier de l'outil (audit n° 2, maquette « A ») — app.js : tout input[type=date],
   [data-cdv-validite]. Le panneau flotte (position fixe, placé par app.js) : il passe
   au-dessus des tuiles et des tableaux qui rognent, popups comprises.
   ============================================================================= */
/* width 0 + min-width 100 % : le champ garde la largeur prévue par la page (la date se raccourcit), au lieu de
   s'élargir à la date en toutes lettres. */
.cdv-cal-champ {
  width: 0; min-width: 100%; min-height: 46px; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 16px; text-align: left; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cdv-cal-champ:hover { border-color: rgba(255,255,255,.18); }
.cdv-cal-champ:focus-visible, .cdv-cal.is-ouvert .cdv-cal-champ { outline: none; border-color: var(--pink); box-shadow: var(--ring); }
.cdv-cal.is-erreur .cdv-cal-champ { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-bg); }
.cdv-cal-champ svg { flex: none; color: var(--pink-2); }
.cdv-cal-date { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cdv-cal-date::first-letter { text-transform: uppercase; }
.cdv-cal-date.is-vide { color: #6a6f7a; }
.cdv-cal-rel { flex: none; font-size: 12px; color: var(--text-dim); }
.cdv-cal-panneau {
  position: fixed; z-index: 10001; width: 300px; max-width: calc(100vw - 16px);
  padding: 10px 10px 8px; background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px -12px rgba(0,0,0,.75);
}
.cdv-cal-panneau:not([hidden]) { animation: cdv-cal-ouvre .14s ease-out; }
.cdv-cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cdv-cal-titre {
  min-height: 36px; padding: 4px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer;
}
.cdv-cal-titre::first-letter { text-transform: uppercase; }
.cdv-cal-titre:hover { background: var(--surface-3); color: #fff; }
.cdv-cal-nav {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--text-dim); cursor: pointer;
}
.cdv-cal-nav:hover:not(:disabled) { background: var(--surface-3); color: #fff; }
.cdv-cal-nav:disabled { opacity: .25; cursor: default; }
.cdv-cal-sem {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 2px;
  text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--text-dim);
}
.cdv-cal-grille { display: grid; gap: 2px; touch-action: pan-y; }
.cdv-cal-grille.glisse-d { animation: cdv-cal-d .18s ease-out; }
.cdv-cal-grille.glisse-g { animation: cdv-cal-g .18s ease-out; }
.cdv-cal-ligne { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cdv-cal-j {
  position: relative; width: 100%; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font-family: var(--font); font-size: 14px;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.cdv-cal-j:hover:not(:disabled) { background: var(--surface-3); }
.cdv-cal-j.is-autre { color: var(--grey); }
.cdv-cal-j:disabled { color: var(--grey); opacity: .3; cursor: default; }
.cdv-cal-j.is-auj { box-shadow: inset 0 0 0 1.5px var(--pink-2); }
.cdv-cal-j.is-futur::after {
  content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--info);
}
.cdv-cal-j.is-choisi { background: var(--pink); color: #fff; font-weight: 700; box-shadow: 0 6px 14px -8px rgba(233,30,123,.9); }
.cdv-cal-j.is-choisi.is-futur::after { background: #fff; }
.cdv-cal-annee { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; }
.cdv-cal-m {
  border: 0; border-radius: 10px; background: transparent; color: var(--text);
  font-family: var(--font); font-size: 15px; cursor: pointer;
}
.cdv-cal-m:hover:not(:disabled) { background: var(--surface-3); }
.cdv-cal-m:disabled { color: var(--grey); opacity: .3; cursor: default; }
.cdv-cal-m.is-auj { box-shadow: inset 0 0 0 1.5px var(--pink-2); }
.cdv-cal-m.is-choisi { background: var(--pink); color: #fff; font-weight: 700; }
.cdv-cal-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); }
.cdv-cal-raccourci {
  min-height: 36px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: transparent; color: var(--text-dim); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer;
}
.cdv-cal-raccourci:hover:not(:disabled) { background: var(--surface-3); color: #fff; }
.cdv-cal-raccourci:disabled { opacity: .35; cursor: default; }
.cdv-cal-legende { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.cdv-cal-legende i { width: 5px; height: 5px; border-radius: 50%; background: var(--info); }
.cdv-cal-note {
  margin: 8px 0 0; padding: 8px 10px; font-size: 13px; color: var(--info);
  background: var(--info-bg); border: 1px solid var(--info-bd); border-radius: 10px;
}
.cdv-cal-nav:focus-visible, .cdv-cal-titre:focus-visible, .cdv-cal-j:focus-visible, .cdv-cal-m:focus-visible,
.cdv-cal-raccourci:focus-visible, .cdv-val-btn:focus-visible, .cdv-val-raz:focus-visible { outline: 2px solid var(--pink-2); outline-offset: 1px; }
@keyframes cdv-cal-ouvre { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes cdv-cal-d { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes cdv-cal-g { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.cdv-val-pas {
  display: flex; align-items: stretch; min-height: 46px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.cdv-val-btn {
  flex: 0 0 46px; border: 0; background: transparent; color: var(--text);
  font-family: var(--font); font-size: 22px; line-height: 1; cursor: pointer;
}
.cdv-val-btn:first-child { border-radius: 10px 0 0 10px; border-right: 1px solid var(--border-soft); }
.cdv-val-btn:last-child { border-radius: 0 10px 10px 0; border-left: 1px solid var(--border-soft); }
.cdv-val-btn:hover:not(:disabled) { background: var(--surface-3); }
.cdv-val-btn:disabled { color: var(--grey); opacity: .35; cursor: default; }
.cdv-val-date { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 6px 8px; font-size: 15px; text-align: center; }
.cdv-val-date strong { font-weight: 700; margin-left: .3em; }
.cdv-val-note { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--text-dim); }
.cdv-val-prol { color: var(--pink-2); font-weight: 600; }
.cdv-val-raz {
  padding: 2px 0; border: 0; background: transparent; color: var(--text-dim);
  font-family: var(--font); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.cdv-val-raz:hover { color: #fff; }

@media (max-width: 560px) {
  .cdv-cal-j { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .cdv-cal-panneau:not([hidden]), .cdv-cal-grille.glisse-d, .cdv-cal-grille.glisse-g { animation: none; }
}
