/* ==========================================================================
   Day-Counter — feuille de style
   --------------------------------------------------------------------------
   Direction : un registre imprimé plutôt qu'une pile de cartes. Papier,
   filets fins, hiérarchie typographique forte, chiffres tabulaires. L'accent
   est le bleu « acier bleui » des aiguilles de chronomètre ; le laiton est
   réservé aux jalons. Typographies système uniquement : aucune requête
   réseau, donc rendu identique hors ligne.
   ========================================================================== */

:root {
  /* — Encres et papier — */
  --paper:      #f7f6f3;
  --paper-2:    #efede8;
  --surface:    #fffefc;
  --ink:        #1a1a18;
  --ink-soft:   #55534d;
  --ink-faint:  #8a877f;
  --rule:       #e0ddd5;
  --rule-soft:  #ebe8e1;

  /* — Accents — */
  --steel:      #2f4d8f;   /* acier bleui : accent principal */
  --steel-tint: #eaeef8;
  --brass:      #8a6d2f;   /* laiton : jalons uniquement */
  --brass-tint: #f6efdf;
  --rust:       #8c3030;   /* suppression */
  --rust-tint:  #f7eaea;
  --verdigris:  #2f6b5c;   /* synchro OK */

  /* — Couleurs assignables aux événements — */
  --tag-ink:    #3d3b36;
  --tag-slate:  #4a5568;
  --tag-blue:   #2f4d8f;
  --tag-indigo: #4c3f8f;
  --tag-teal:   #1f6b73;
  --tag-moss:   #40663a;
  --tag-olive:  #6a6b25;
  --tag-brass:  #8a6d2f;
  --tag-clay:   #9a5330;
  --tag-rust:   #93342b;
  --tag-rose:   #a8386b;
  --tag-plum:   #6b3560;

  /* — Typographie — */
  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* — Mesures — */
  --tap: 44px;
  --measure: 640px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #141519;
    --paper-2:    #1b1d22;
    --surface:    #191b20;
    --ink:        #ecebe6;
    --ink-soft:   #a8a59d;
    --ink-faint:  #78766f;
    --rule:       #2e3138;
    --rule-soft:  #24272c;

    --steel:      #8aa6e8;
    --steel-tint: #1e2634;
    --brass:      #cba867;
    --brass-tint: #2a2418;
    --rust:       #e08585;
    --rust-tint:  #2e1e1e;
    --verdigris:  #6cbfa6;

    --tag-ink:    #c9c6bd;
    --tag-slate:  #93a3bd;
    --tag-blue:   #8aa6e8;
    --tag-indigo: #a598ee;
    --tag-teal:   #6fc0c8;
    --tag-moss:   #7fb173;
    --tag-olive:  #bcbd63;
    --tag-brass:  #cba867;
    --tag-clay:   #d8916a;
    --tag-rust:   #e28a80;
    --tag-rose:   #ef8fb4;
    --tag-plum:   #c08ab5;
  }
}

/* Le sélecteur de thème doit l'emporter dans les deux sens. */
:root[data-theme="light"] {
  --paper: #f7f6f3; --paper-2: #efede8; --surface: #fffefc;
  --ink: #1a1a18; --ink-soft: #55534d; --ink-faint: #8a877f;
  --rule: #e0ddd5; --rule-soft: #ebe8e1;
  --steel: #2f4d8f; --steel-tint: #eaeef8; --brass: #8a6d2f; --brass-tint: #f6efdf;
  --rust: #8c3030; --rust-tint: #f7eaea; --verdigris: #2f6b5c;
  --tag-ink: #3d3b36; --tag-slate: #4a5568; --tag-blue: #2f4d8f; --tag-indigo: #4c3f8f;
  --tag-teal: #1f6b73; --tag-moss: #40663a; --tag-olive: #6a6b25; --tag-brass: #8a6d2f;
  --tag-clay: #9a5330; --tag-rust: #93342b; --tag-rose: #a8386b; --tag-plum: #6b3560;
}
:root[data-theme="dark"] {
  --paper: #141519; --paper-2: #1b1d22; --surface: #191b20;
  --ink: #ecebe6; --ink-soft: #a8a59d; --ink-faint: #78766f;
  --rule: #2e3138; --rule-soft: #24272c;
  --steel: #8aa6e8; --steel-tint: #1e2634; --brass: #cba867; --brass-tint: #2a2418;
  --rust: #e08585; --rust-tint: #2e1e1e; --verdigris: #6cbfa6;
  --tag-ink: #c9c6bd; --tag-slate: #93a3bd; --tag-blue: #8aa6e8; --tag-indigo: #a598ee;
  --tag-teal: #6fc0c8; --tag-moss: #7fb173; --tag-olive: #bcbd63; --tag-brass: #cba867;
  --tag-clay: #d8916a; --tag-rust: #e28a80; --tag-rose: #ef8fb4; --tag-plum: #c08ab5;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* ==========================================================================
   En-tête
   ========================================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
  padding-top: var(--safe-t);
}

.masthead-bar {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px max(18px, var(--safe-r)) 13px max(18px, var(--safe-l));
}

.wordmark {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
/* Petit filet à la place du point médian : détail d'imprimeur. */
.wordmark-rule {
  width: 16px;
  height: 1.5px;
  background: var(--steel);
  flex: none;
}

.masthead-tools { display: flex; align-items: center; gap: 4px; }

.tool {
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.tool:hover { background: var(--paper-2); color: var(--ink); }
.tool[aria-expanded="true"], .tool.on { background: var(--steel-tint); color: var(--steel); }
.tool:focus-visible, .btn:focus-visible, .menu-item:focus-visible,
input:focus-visible, .swatch:focus-visible, .emoji:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary { background: var(--steel); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--steel) 86%, #000); }
.btn-quiet { background: transparent; color: var(--ink-soft); border-color: var(--rule); }
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }
.btn-danger { color: var(--rust); border-color: color-mix(in srgb, var(--rust) 40%, transparent); }
.btn-danger:hover { background: var(--rust); color: #fff; border-color: var(--rust); }
.btn:active { opacity: .82; }

@media (max-width: 430px) {
  .btn-label { display: none; }
  #add-btn { padding: 0; width: var(--tap); font-size: 19px; }
}

/* ==========================================================================
   Recherche
   ========================================================================== */
.search-bar {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 max(18px, var(--safe-r)) 12px max(18px, var(--safe-l));
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-bar input {
  flex: 1;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  min-height: 42px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.search-bar input::placeholder { color: var(--ink-faint); }
.search-clear {
  width: 38px; height: 38px; flex: none;
  border: none; background: transparent; color: var(--ink-faint);
  border-radius: 8px; cursor: pointer; font-size: 14px;
  -webkit-tap-highlight-color: transparent;
}
.search-clear:hover { background: var(--paper-2); color: var(--ink); }

/* ==========================================================================
   Menu
   ========================================================================== */
.menu-panel {
  position: absolute;
  right: max(18px, var(--safe-r));
  top: calc(100% - 6px);
  min-width: 264px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .14);
  padding: 6px;
  z-index: 40;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 11px 12px;
  min-height: var(--tap);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-item:hover { background: var(--paper-2); }
.menu-ico { width: 18px; text-align: center; color: var(--ink-faint); flex: none; }
.menu-text strong { font-weight: 600; color: var(--steel); }
.menu-sep { height: 1px; background: var(--rule-soft); margin: 6px 4px; }

/* ==========================================================================
   Le registre
   ========================================================================== */
.sheet {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 6px max(18px, var(--safe-l)) 40px max(18px, var(--safe-r));
}

.ledger { list-style: none; margin: 0; padding: 0; }

/* Une rangée = un conteneur qui masque les actions révélées au glissement. */
.row {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule-soft);
}
.row.dragging { opacity: .4; }
.row.drag-over { box-shadow: inset 0 2px 0 var(--steel); }

.row-actions {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
}
.act {
  width: 104px;
  border: none;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.act svg { width: 19px; height: 19px; }
.act-edit { background: var(--steel); }
.act-delete { background: var(--rust); }

/* La carte au premier plan (celle qui glisse) */
.entry {
  position: relative;
  z-index: 1;
  background: var(--paper);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 20px 2px 20px 0;
  transform: translateX(0);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
  touch-action: pan-y;
  will-change: transform;
}
.entry.swiping { transition: none; }

/* Filet de couleur + icône, colonne de gauche */
.mark {
  width: 34px;
  align-self: stretch;      /* le filet court sur toute la hauteur de la ligne */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 2px 0 4px;
  color: var(--tag, var(--ink-faint));
}
.mark-emoji { font-size: 20px; line-height: 1; }
/* Le filet porte la couleur — et le dégradé quand une seconde teinte existe. */
.mark-rule {
  width: 3px;
  flex: 1;
  min-height: 22px;
  border-radius: 3px;
  opacity: .8;
  background-image: linear-gradient(180deg, var(--tag), var(--tag2, var(--tag)));
}

.entry-body { min-width: 0; }

.entry-name {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  word-break: break-word;
}

/* Le compteur : le héros de la page. */
.count {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 5.5vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  word-break: break-word;
}
.count .lead { color: var(--ink-faint); font-size: .68em; letter-spacing: .01em; }
.count .unit { color: var(--ink-soft); font-size: .72em; }
.count.is-future .num { color: var(--steel); }

.entry-meta {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .01em;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
}
.entry-meta .sep { opacity: .4; }

/* Jalons — laiton, et uniquement pour ça. */
.milestone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--brass);
}
.milestone.is-today {
  background: var(--brass-tint);
  border: 1px solid color-mix(in srgb, var(--brass) 30%, transparent);
  border-radius: 4px;
  padding: 3px 8px;
}

/* Barre de progression (récurrents + événements futurs) */
.progress {
  margin-top: 11px;
  height: 2px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background-image: linear-gradient(90deg, var(--tag, var(--steel)), var(--tag2, var(--tag, var(--steel))));
  transition: width .6s ease;
}

/* Colonne des flèches */
.moves { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.move {
  width: 32px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-faint);
  border-radius: 6px;
  cursor: pointer;
  font-size: 9px;
  transition: background .12s, color .12s, opacity .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.move:hover { background: var(--paper-2); color: var(--ink); }
.move:disabled { opacity: .25; cursor: not-allowed; }

.grip {
  cursor: grab;
  color: var(--ink-faint);
  opacity: .5;
  font-size: 15px;
  line-height: 1;
  padding: 4px 2px;
  user-select: none;
  touch-action: none;
  letter-spacing: -2px;
}
.grip:active { cursor: grabbing; }

/* Sur mobile : le glisser-déposer natif n'existe pas au toucher, on garde
   la poignée hors du chemin et on s'appuie sur les flèches. */
@media (max-width: 480px) {
  .grip { display: none; }
  .entry { grid-template-columns: auto 1fr auto; gap: 12px; }
}

/* ==========================================================================
   États vides
   ========================================================================== */
.empty { text-align: center; padding: 64px 16px 40px; }
.empty-mark { color: var(--rule); margin-bottom: 18px; }
.empty-mark svg { width: 62px; height: 62px; stroke-width: 1.3; }
.empty h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}
.empty p {
  margin: 0 auto 24px;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: balance;
}
.no-results {
  text-align: center;
  color: var(--ink-faint);
  font-size: 14px;
  padding: 40px 16px;
}

/* ==========================================================================
   Pied de page / état de synchro
   ========================================================================== */
.colophon {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4px max(18px, var(--safe-l)) max(24px, var(--safe-b)) max(18px, var(--safe-r));
  display: flex;
  justify-content: center;
}
.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
}
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.sync[data-state="synced"]  { color: var(--verdigris); }
.sync[data-state="offline"] { color: var(--brass); }
.sync[data-state="syncing"] .sync-dot { animation: blink 1.1s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ==========================================================================
   Fiches (modales)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, var(--safe-t)) max(16px, var(--safe-r)) max(16px, var(--safe-b)) max(16px, var(--safe-l));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* Rend [hidden] effectif malgré display:flex. */
.modal[hidden] { display: none; }

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(18, 18, 16, .46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade .16s ease;
}
.modal-sheet {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 470px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  animation: rise .2s cubic-bezier(.22, .61, .36, 1);
}
.modal-sheet-narrow { max-width: 380px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-sheet h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.005em;
}
.confirm-text { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 12px 0 0; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Écrans courts (clavier virtuel ouvert) : la fiche s'ancre en haut. */
@media (max-height: 640px) { .modal { align-items: flex-start; } }

/* ==========================================================================
   Formulaire
   ========================================================================== */
form label {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 18px 0 7px;
}
form label:first-of-type { margin-top: 0; }
.hint { font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .75; }

form input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 16px; /* ≥16px : empêche le zoom automatique de Safari iOS */
  padding: 11px 13px;
  min-height: var(--tap);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .14s, background .14s;
}
form input[type="text"]:focus { outline: none; border-color: var(--steel); background: var(--surface); }
form input.mono { font-family: var(--mono); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row label { margin-top: 18px; }

/* Sélecteur d'icône */
.picker-wrap {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}
.picker-search {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  min-height: 42px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-soft);
  -webkit-appearance: none;
  appearance: none;
}
.picker-search:focus { outline: none; background: var(--surface); }
.picker-search::placeholder { color: var(--ink-faint); }

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  max-height: 208px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.picker-group {
  flex: 0 0 100%;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 6px 0 1px;
}
.picker-group:first-child { margin-top: 0; }
.picker-empty { margin: 0; padding: 16px; text-align: center; font-size: 13px; color: var(--ink-faint); }
.emoji {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.emoji:hover { background: var(--paper-2); }
.emoji[aria-pressed="true"] { border-color: var(--steel); background: var(--steel-tint); }
.emoji-none {
  width: auto;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: .03em;
}
.emoji-none[aria-pressed="true"] { color: var(--steel); }

/* Nuancier */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.swatch i {
  display: block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--sw);
}
.swatch[aria-pressed="true"] { border-color: var(--sw); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sw) 28%, transparent); }

/* Dégradé */
.check-inline { margin-top: 12px !important; padding: 11px 13px; }
.check-inline em { font-size: 12px; }
#gradient-zone label { margin-top: 16px; }
.gradient-preview {
  height: 12px;
  border-radius: 6px;
  margin-top: 12px;
  border: 1px solid var(--rule);
  background-image: linear-gradient(90deg, var(--g1, var(--tag-ink)), var(--g2, var(--tag-ink)));
}

/* Case à cocher « chaque année » */
.check {
  display: flex !important;
  align-items: flex-start;
  gap: 11px;
  margin: 20px 0 0 !important;
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 14px !important;
  color: var(--ink) !important;
  font-weight: 400 !important;
}
.check input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--steel); flex: none; }
.check strong { display: block; font-weight: 600; font-size: 14.5px; }
.check em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-faint);
}

.form-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--rust-tint);
  border-left: 2px solid var(--rust);
  color: var(--rust);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0 6px 6px 0;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}
.modal-actions #delete-btn { margin-right: auto; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .26);
  max-width: calc(100vw - 32px);
  text-align: center;
  animation: rise .2s ease;
}

/* ==========================================================================
   Accessibilité
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
