/* Direction artistique WEBLABLA — habillage global « bento coloré ».
   Chargé sur toutes les pages APRÈS app.css : il s'appuie sur les jetons de
   tokens.css (couleurs, rayons, police) et ne touche qu'à l'apparence, jamais
   au balisage ni à la logique des pages. Mobile d'abord.
   Référence : planche « Direction artistique » (logo, couleurs, typographie,
   composants, formes). */

html, body {
  background: var(--color-bg);
  background-attachment: scroll;
  font-family: var(--font-sans);
}

/* ---------- Typographie ---------- */

h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
h3 { font-weight: 800; letter-spacing: -0.02em; }
.page__subtitle { font-size: 14px; font-weight: 500; color: var(--color-text-muted); margin-top: 6px; }
.stat { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.u-note { color: var(--color-text-muted); }

@media (max-width: 720px) {
  h1 { font-size: 34px; }
}

/* ---------- Cartes ---------- */

.card {
  border: none;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: none;
}

/* ---------- Boutons : pilules, 44 px minimum ---------- */

.btn {
  height: 44px;
  padding: 0 22px;
  border: none;
  background: var(--color-surface);
  font-weight: 700;
}
.btn:hover { background: var(--color-surface-hollow); }

.btn--primary {
  background: var(--color-ink);
  color: var(--color-ink-contrast);
  border: none;
}
.btn--primary:hover { background: var(--color-ink); opacity: 0.88; border: none; }

.btn--ghost { height: 40px; background: transparent; color: var(--color-text-muted); }
.btn--ghost:hover { background: var(--color-surface); color: var(--color-text); }
.btn--danger { color: var(--color-status-danger); }

/* ---------- Champs ---------- */

.form-field label { font-size: 13px; font-weight: 700; color: var(--color-text); }
.form-field input,
.form-field select,
.form-field textarea {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--color-surface-hollow);
  font-weight: 500;
}
.form-field textarea { min-height: 96px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--color-accent);
}

/* ---------- Onglets : contrôle segmenté en pilule ---------- */

.tabs { background: var(--color-surface); padding: 5px; }
.tabs button { padding: 10px 18px; font-weight: 700; }
.tabs button.active {
  background: var(--color-ink);
  color: var(--color-ink-contrast);
  box-shadow: none;
}

/* ---------- Pastilles de statut ---------- */

.badge { padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--txt-encre); }
.badge--neutral { background: var(--pastel-sable-fonce); color: var(--txt-encre); --txt-encre: #1B1A17; }
.badge--info { background: var(--pastel-lilas-clair); color: var(--txt-encre); --txt-encre: #1B1A17; }
.badge--success { background: var(--pastel-lime); color: var(--txt-encre); --txt-encre: #1B1A17; }
.badge--warning { background: var(--pastel-orange-clair); color: #8A2A0C; --txt-encre: #1B1A17; }
.badge--danger { background: var(--pastel-orange); color: var(--txt-encre); --txt-encre: #1B1A17; }

/* ---------- Tableaux et listes ---------- */

th { font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.list-row__title { font-weight: 700; letter-spacing: -0.01em; }
.list-row__value { font-weight: 800; color: var(--color-text); }
.empty-state { color: var(--color-text-muted); }

/* ---------- En-tête : logo « w. » + logotype ---------- */

.app-header__logo {
  flex: 0 0 44px;
  position: relative;
  border-radius: 14px;
  background: #1B1A17;
  color: var(--pastel-lime);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.app-header__logo::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6B4EFF;
}
.app-header__brand { font-size: 20px; font-weight: 800; letter-spacing: -0.04em; color: var(--color-text); }
.app-header__brand .app-header__dot { color: var(--color-accent); }

/* ---------- Barre de navigation du bas (mobile) ---------- */

.da-nav { display: none; }

@media (max-width: 720px) {
  /* Le bouton « Plus » de la barre du bas remplace le bouton menu du header
     (il le déclenche en JS, donc il doit rester dans le DOM). */
  .app-header__menu-btn { display: none; }

  /* Voile sable sous la barre : les tuiles s'effacent derrière au lieu de la toucher. */
  body:has(.da-nav)::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(112px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent, var(--color-bg) 62%);
    pointer-events: none;
    z-index: 34;
  }

  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  .da-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 35;
    display: flex;
    gap: 2px;
    padding: 8px 6px;
    border-radius: var(--radius-lg);
    background: #1B1A17;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), var(--shadow-float);
  }
  .da-nav a,
  .da-nav button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    padding: 0;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: #C9C6BC;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .da-nav .is-active { background: var(--pastel-lime); color: var(--txt-encre); font-weight: 800; --txt-encre: #1B1A17; }
}

@media (max-width: 720px) {
  .mail-compose-btn { bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* Accroche Copilote : seconde ligne lisible */
.app-aibanner__line2 { color: var(--color-text-muted); }

/* ---------- Connexion / première configuration ---------- */

body:has(.auth-shell) { background: var(--color-bg); }
.auth-blob { display: none; }
.auth-card {
  border-radius: var(--radius-xl);
  box-shadow: none;
  padding: var(--space-7) var(--space-5) var(--space-6);
}
.auth-logo {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 26px;
  background: #1B1A17;
  color: var(--pastel-lime);
  font-size: 48px;
  letter-spacing: -0.05em;
  line-height: 1;
  padding-bottom: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.auth-logo::after {
  content: '';
  position: absolute;
  right: 15px;
  bottom: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6B4EFF;
}
.auth-card h1 { font-size: 38px; line-height: 1; letter-spacing: -0.05em; margin-bottom: 12px; }
.auth-card .btn--primary { height: 56px; font-size: 16px; font-weight: 800; }

/* ---------- Menu « Plus » ---------- */

.app-header__menu-title { display: none; }
.app-header__menu-mobile-only { display: none !important; }

@media (max-width: 720px) {
  /* Feuille sable plein écran, sous la barre du bas (qui reste visible). */
  .app-header__menu {
    background: var(--color-bg);
    backdrop-filter: none;
    z-index: 34;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
    padding: 20px 16px calc(112px + env(safe-area-inset-bottom));
  }
  .app-header__menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 4px;
  }
  .app-header__menu { overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
    .app-header__menu-title { display: block; font-size: 36px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--color-text); }
  .app-header__menu .app-header__menu-close {
    position: static;
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    color: var(--color-text);
  }
  .app-header__menu .app-header__menu-close:hover { background: var(--color-surface-hollow); }

  .app-header__menu-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .app-header__menu-group { display: contents; }
  .app-header__menu-section { display: none; }

  /* Pages déjà dans la barre du bas (Accueil, Agenda, Messagerie, Comptabilité) : pas de doublon ici. */
  .app-header__menu a[data-page='dashboard'],
  .app-header__menu a[data-page='calendrier'],
  .app-header__menu a[data-page='messagerie'],
  .app-header__menu a[data-page='comptabilite'] { display: none; }
  .app-header__menu .app-header__menu-mobile-only { display: flex !important; }

  /* Toutes les pages : même tuile de couleur (icône en haut, nom en bas). */
  .app-header__menu a {
    grid-column: auto;
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    height: 104px;
    min-height: 104px;
    padding: 14px 18px;
    overflow: hidden;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--pastel-sable-fonce);
    color: var(--txt-encre);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: left; --txt-encre: #1B1A17; }
  .app-header__menu a svg { width: 26px; height: 26px; flex: none; }
  .app-header__menu a:hover { border: none; color: var(--txt-encre); }
  .app-header__menu a[data-page='communication'], .app-header__menu a[data-page='communication']:hover { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='suivi'], .app-header__menu a[data-page='suivi']:hover { background: var(--pastel-lime); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='transferts'], .app-header__menu a[data-page='transferts']:hover { background: var(--pastel-lilas-clair); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='clients'], .app-header__menu a[data-page='clients']:hover { background: var(--pastel-orange-clair); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='devis'], .app-header__menu a[data-page='devis']:hover { background: var(--pastel-lilas); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='facturation'], .app-header__menu a[data-page='facturation']:hover { background: var(--pastel-lime); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='projets'], .app-header__menu a[data-page='projets']:hover { background: var(--pastel-orange); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='administratif'], .app-header__menu a[data-page='administratif']:hover { background: var(--pastel-sable-fonce); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='conformite'], .app-header__menu a[data-page='conformite']:hover { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
  .app-header__menu a[data-page='rappels'], .app-header__menu a[data-page='rappels']:hover { background: var(--pastel-lilas-clair); --txt-encre: #1B1A17; }

  /* Réglages : bande pleine largeur en encre, en bas. */
  .app-header__menu a[data-page='parametres'],
  .app-header__menu a[data-page='parametres']:hover {
    grid-column: 1 / -1;
    order: 30;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 64px;
    min-height: 64px;
    background: var(--color-ink);
    color: #FFFFFF;
  }
  .app-header__menu a[data-page='parametres'] svg { width: 22px; height: 22px; }
  .app-header__menu a.active { box-shadow: inset 0 0 0 3px #1B1A17; }
  .app-header__menu a[data-page='parametres'].active { box-shadow: inset 0 0 0 3px var(--pastel-lime); }
}

/* ---------- Agenda (calendrier, mobile) ---------- */

@media (max-width: 720px) {
  /* Le graphe d'activité du mois reste sur bureau ; sur mobile l'agenda prime. */
  .cal-activite { display: none; }

  /* Bandeau de jours : 7 pastilles, le jour choisi en lime. */
  .cal-datestrip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 0 0 var(--space-3);
  }
  .cal-datestrip__day { align-items: center; gap: 6px; padding: 0; }
  .cal-datestrip__dow { font-size: 11px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; }
  .cal-datestrip__mois { display: none; }
  .cal-datestrip__nb {
    width: 100%;
    aspect-ratio: 1;
    max-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--color-surface);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-text);
  }
  .cal-datestrip__day.is-today .cal-datestrip__nb { box-shadow: inset 0 0 0 2px var(--color-accent); color: var(--color-text); }
  .cal-datestrip__day.is-selected .cal-datestrip__nb { background: var(--pastel-lime); color: var(--txt-encre); font-weight: 800; box-shadow: none; --txt-encre: #1B1A17; }
  .cal-datestrip__day.is-selected .cal-datestrip__dow { color: var(--color-text); }
}

.cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.cal-agenda__jour { padding: 4px 4px 2px; font-size: 13px; font-weight: 700; color: var(--color-text-muted); }
.cal-agenda__ligne { display: flex; gap: 10px; align-items: stretch; cursor: pointer; }
.cal-agenda__heure { flex: 0 0 48px; padding-top: 16px; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.cal-agenda__carte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border: none;
  border-radius: 24px;
  background: color-mix(in srgb, var(--cat, #C9BDFF) var(--cat-mix, 68%), var(--color-surface));
  color: var(--color-text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.cal-agenda__titre { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.cal-agenda__meta { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .cal-agenda__carte { --cat-mix: 42%; }
}
:root[data-theme='dark'] .cal-agenda__carte { --cat-mix: 42%; }

/* ---------- Listes métier : devis, factures, projets, clients (mobile) ---------- */

@media (max-width: 720px) {
  .cards,
  .cards--lg { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .tile--clickable:hover { transform: none; box-shadow: none; }

  /* Devis / factures : ligne-carte, identité à gauche, montant et statut à droite. */
  .cards--sm .tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 16px 18px;
    border: none;
    border-radius: 24px;
  }
  .cards--sm .tile__kicker { grid-column: 1; font-size: 12px; font-weight: 700; }
  .cards--sm .tile__title {
    grid-column: 1;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    -webkit-line-clamp: 1;
  }
  .cards--sm .tile__meta { grid-column: 1; font-size: 13px; }
  .cards--sm .tile__footer {
    grid-column: 2;
    grid-row: 1 / span 3;
    flex-direction: column-reverse;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
  }
  .cards--sm .tile__value { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }

  /* Projets / abonnements : grandes cartes blanches. */
  .tile--lg { padding: 18px 20px; border: none; border-radius: var(--radius-lg); gap: 8px; }
  .tile--lg .tile__title { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
  .tile__kicker { font-size: 12px; font-weight: 700; }
  .tile__meta { font-size: 13px; }
  .tile .badge { font-size: 11px; padding: 5px 10px; }
  .tile__value { font-size: 15px; font-weight: 800; }
  .tile__avatar { width: 40px; height: 40px; border-radius: 14px; font-size: 13px; }
  .tile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Clients : cartes blanches, avatars carrés teintés par les pastels. */
.client-row {
  margin-bottom: 10px;
  padding: 14px 16px;
  background: var(--color-surface);
  border-radius: 24px;
}
.client-row:hover { background: var(--color-surface-hollow); }
.client-row__avatar { border-radius: 16px; width: 48px; height: 48px; font-size: 15px; font-weight: 800; color: var(--txt-encre); }
.client-row:nth-child(4n + 1) .client-row__avatar { background: var(--pastel-lilas); --txt-encre: #1B1A17; }
.client-row:nth-child(4n + 2) .client-row__avatar { background: var(--pastel-lime); --txt-encre: #1B1A17; }
.client-row:nth-child(4n + 3) .client-row__avatar { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
.client-row:nth-child(4n) .client-row__avatar { background: var(--pastel-orange-clair); --txt-encre: #1B1A17; }
.client-row__titre p { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }

/* Carte « jours pris par des clients » : bloc lime. */
.streak-card {
  background: var(--pastel-lime);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--txt-encre); --txt-encre: #1B1A17; }
.streak-card__jours { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; color: var(--txt-encre); }
.streak-card__sub { color: #4A5016; }
.streak-card__icon { background: rgba(255, 255, 255, 0.55); color: var(--txt-encre); }
.streak-card__dot { background: rgba(27, 26, 23, 0.18); }
.streak-card__dot.on { background: #1B1A17; }

/* Widget renouvellements : bloc orange. */
.renouv-widget {
  --color-text: #1B1A17;
  --color-text-muted: #5A2A14;
  --color-border: rgba(27, 26, 23, 0.18);
  --color-surface-hollow: rgba(255, 255, 255, 0.45);
  color: var(--txt-encre);
}
.renouv-widget__track {
  background: var(--pastel-orange);
  border: none;
  border-radius: var(--radius-lg); --txt-encre: #1B1A17; }
.renouv-widget__total { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.renouv-widget__bar { background: rgba(27, 26, 23, 0.16); }
.renouv-widget__bar.on { background: #1B1A17; }
.renouv-widget__dot.is-active { background: #1B1A17; }

@media (max-width: 720px) {
  /* Clients : le nom passe avant tout, la pastille reste, la flèche disparaît. */
  .client-row__groupe--droite .circle-btn,
  .client-row__groupe--droite > svg { display: none; }
  .client-row__groupe--droite .client-row__contact { display: none; }
  .client-row__groupe--droite .badge { font-size: 11px; padding: 5px 10px; }
  .client-row__titre p { white-space: normal; }
}

/* Graphiques annuels (prévisionnel, chiffre d'affaires) : bloc encre. */
.yearchart {
  background: #1B1A17;
  border: none;
  border-radius: var(--radius-lg);
  color: #FFFFFF;
  --color-text: #FFFFFF;
  --color-text-muted: #C9C6BC;
  --color-text-faint: #8E8B82;
  --color-border: rgba(255, 255, 255, 0.14);
  --color-border-soft: rgba(255, 255, 255, 0.08);
  --color-surface: #2A2927;
  --color-surface-hollow: rgba(255, 255, 255, 0.1);
  --color-accent: #D7F25C;
  --color-accent-light: rgba(215, 242, 92, 0.2);
}
.yearchart__total { font-size: 40px; font-weight: 800; letter-spacing: -0.05em; }
.yearchart-controls__btn.is-active { background: #D7F25C; color: var(--txt-encre); --txt-encre: #1B1A17; }

/* ---------- Fiches (client, projet) : bloc héros de couleur ---------- */

.fiche-retour {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-weight: 700;
  color: var(--color-text);
}
.fiche-retour:hover { background: var(--color-surface-hollow); }

.page__header:has(.fiche-entete) {
  background: var(--fiche-couleur, var(--pastel-lilas));
  border-radius: var(--radius-xl);
  padding: 22px;
  align-items: stretch;
  --color-text: #1B1A17;
  --color-text-muted: #3F3770;
  color: var(--txt-encre);
}
body[data-page='clients'] .page__header:has(.fiche-entete) { --fiche-couleur: var(--pastel-lime); --color-text-muted: #4A5016; }
body[data-page='projets'] .page__header:has(.fiche-entete) { --fiche-couleur: var(--pastel-lilas); }

.fiche-entete { flex-direction: row; align-items: center; text-align: left; gap: 16px; }
.fiche-entete__avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: #1B1A17;
  color: var(--pastel-lime);
  font-size: 22px;
  font-weight: 800;
}
.fiche-entete__ligne { justify-content: flex-start; gap: 8px; }
.fiche-entete__ligne h1 { font-size: 30px; line-height: 1; letter-spacing: -0.04em; }
.fiche-entete .badge { background: #1B1A17; color: #FFFFFF; }
.fiche-entete .circle-btn--sm { background: rgba(255, 255, 255, 0.6); border: none; color: var(--txt-encre); width: 36px; height: 36px; }
.fiche-entete .page__subtitle { color: var(--color-text-muted); font-weight: 600; margin-top: 4px; }

.fiche-nav { background: var(--color-surface); padding: 5px; box-shadow: none; }
.fiche-nav a { padding: 10px 16px; font-weight: 700; border-radius: var(--radius-pill); }
.fiche-nav a.active { background: var(--color-ink); color: var(--color-ink-contrast); box-shadow: none; }

/* ---------- Paramètres : tuiles de couleur ---------- */

.icon-card {
  min-height: 112px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
  border: none;
  border-radius: var(--radius-lg);
  color: var(--txt-encre);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: left;
}
.icon-card svg { width: 26px; height: 26px; color: var(--txt-encre); }
.icon-card:hover { border: none; opacity: 0.9; }
.icon-card-grid .icon-card:nth-child(4n + 1) { background: var(--pastel-lilas); --txt-encre: #1B1A17; }
.icon-card-grid .icon-card:nth-child(4n + 2) { background: var(--pastel-lime); --txt-encre: #1B1A17; }
.icon-card-grid .icon-card:nth-child(4n + 3) { background: var(--pastel-orange); --txt-encre: #1B1A17; }
.icon-card-grid .icon-card:nth-child(4n) { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
.icon-card-grid .icon-card:hover { background: inherit; }

/* ---------- Interrupteurs : encre + pastille lime ---------- */

.pref-row__label { font-weight: 700; }
.pref-toggle { width: 50px; height: 30px; }
.pref-toggle input:checked + .pref-toggle__track { background: #1B1A17; }
.pref-toggle input:checked + .pref-toggle__track::before { background: var(--pastel-lime); transform: translateX(20px); --txt-encre: #1B1A17; }
.pref-toggle__track::before { width: 24px; height: 24px; }

/* ---------- Conformité : bloc d'intégrité ---------- */


/* ---------- Haut d'accueil (mobile) : pilule Copilote encre + tuiles date / tâches ---------- */

@media (max-width: 720px) {
  .app-aibanner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 6px 22px;
    border-radius: 999px;
    background: var(--color-ink);
    box-shadow: none;
  }
  .app-aibanner__line1 { display: none; }
  .app-aibanner__text { flex: 1; min-width: 0; align-items: flex-start; }
  .app-aibanner__line2 {
    width: 100%;
    padding: 0;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    text-overflow: ellipsis;
  }
  .app-aibanner__line2::placeholder { color: #9C998E; }
  .app-aibanner__mic {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pastel-lime);
    color: var(--color-ink);
    box-shadow: none; --txt-encre: #1B1A17; }
  .app-aibanner__mic:hover { background: var(--pastel-lime); color: var(--color-ink); --txt-encre: #1B1A17; }
  .app-aibanner__mic svg { width: 22px; height: 22px; }

  /* Tuiles date / tâches : uniquement sur l'accueil. */
  body:not([data-page='dashboard']) .app-datebar__groupe { display: none; }
  body[data-page='dashboard'] .app-datebar__groupe {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    width: 100%;
    max-height: 130px;
  }
  /* Accueil : « Salut Prénom ! » au-dessus de la pilule Copilote (le bloc titre de la page disparaît). */
  .app-datebar__salut { display: none; }
  body[data-page='dashboard'] .app-datebar__salut {
    display: block;
    order: -2;
    flex-basis: 100%;
    margin: 4px 4px 2px;
    max-height: 56px;
    overflow: hidden;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.045em;
    color: var(--color-text);
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
  }
  body.is-scrolled[data-page='dashboard'] .app-datebar__salut { max-height: 0; opacity: 0; margin: 0; }
  body[data-page='dashboard'] .bento-hero { display: none; }

  /* Au scroll : les tuiles se replient vraiment (hauteur, écart et marge à zéro), sans laisser de vide. */
  body.is-scrolled[data-page='dashboard'] .app-datebar__groupe {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
  }
  body.is-scrolled .app-datebar__inner { gap: 0; }
  body.is-scrolled .app-aibanner { margin-bottom: 0; }
  .datebar-tuile {
    position: relative;
    min-height: 104px;
    padding: 12px 16px 14px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--color-ink);
    min-width: 0;
  }
  .datebar-tuile > svg { width: 22px; height: 22px; flex: none; }
  .datebar-tuile__corps { display: flex; min-width: 0; }
  .datebar-tuile--date { background: var(--pastel-lime); --txt-encre: #1B1A17; }
  .datebar-tuile--date .datebar-tuile__corps { flex-direction: column; }
  .datebar-tuile__jour { font-size: 46px; font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; }
  .datebar-tuile__mois { font-size: 13px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
  .datebar-tuile--date .app-datebar__dot { top: 14px; right: 16px; background: var(--color-ink); }
  .datebar-tuile--taches { background: var(--color-accent); color: var(--color-accent-contrast); }
  .datebar-tuile--taches .datebar-tuile__corps { align-items: flex-end; justify-content: space-between; gap: 8px; }
  .datebar-tuile__titre { font-size: 18px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
  .datebar-tuile__go { width: 34px; height: 34px; border-radius: 50%; background: var(--surf-blanc); color: var(--color-accent); display: grid; place-items: center; flex: none; --txt-encre: var(--txt-neutre); }
  .datebar-tuile__go svg { width: 16px; height: 16px; }
}

/* ---------- Suivi : blocs de couleur ---------- */

.devis-trend { background: var(--pastel-lime); color: var(--txt-encre); --color-text: #1B1A17; --color-text-muted: #4A5016; --txt-encre: #1B1A17; }
.devis-trend .stat { font-size: 44px; letter-spacing: -0.05em; }
.devis-trend__spark path { stroke: #1B1A17 !important; }
.stage-bubbles { background: var(--color-surface); }
.stat-label, .list-row__meta { font-weight: 600; }

/* ---------- Administratif, rappels, transferts, communication : entêtes de liste ---------- */

.tache-section-header .stat { font-size: 36px; letter-spacing: -0.04em; }

/* =====================================================================
   BUREAU (≥ 721px) — en-tête commun de la planche DK : logo, pilule de
   navigation, champ Copilote, cloche, avatar. Chaque page est ensuite
   découpée en deux panneaux (voir les sections « Bureau » plus bas).
   ===================================================================== */

.app-header__nav { display: none; }

@media (min-width: 721px) {
  :root { --dk-pad: 40px; }
  .app-header { background: var(--color-bg); }
  .app-header__inner {
    max-width: none;
    height: 88px;
    padding: 0 var(--dk-pad);
    gap: 16px;
  }
  .app-header__logo { width: 44px; height: 44px; border-radius: 14px; font-size: 26px; }
  .app-header__brand { display: block; font-size: 22px; }
  .app-header__menu-btn { display: none; }

  .app-header__nav {
    display: flex;
    gap: 2px;
    margin-left: 12px;
    padding: 5px;
    background: var(--dk-ink-surface, #1B1A17);
    border-radius: 999px;
    flex: none;
  }
  .app-header__nav a,
  .app-header__nav button {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #C9C6BC;
    font: 600 13px var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
  }
  .app-header__nav a:hover,
  .app-header__nav button:hover { color: #fff; }
  .app-header__nav .on { background: var(--pastel-lime); color: var(--txt-encre); font-weight: 800; --txt-encre: #1B1A17; }
  .app-header__nav button span { margin-left: 4px; font-size: 11px; }

  /* Menu « Plus » : sous la pilule, aligné à droite */
  .app-header__menu {
    left: auto;
    right: var(--dk-pad);
    top: calc(100% - 10px);
    width: min(720px, calc(100vw - 2 * var(--dk-pad)));
    border: 0;
    border-radius: 28px;
    padding: 20px;
  }
  .app-header__menu a { border-radius: 14px; }
  .app-header__menu a.active { background: var(--pastel-lime); color: var(--txt-encre); font-weight: 800; --txt-encre: #1B1A17; }
  /* Déjà dans la barre du haut : pas de doublon dans « Plus ». */
  .app-header__menu a[data-page='dashboard'],
  .app-header__menu a[data-page='calendrier'],
  .app-header__menu a[data-page='messagerie'],
  .app-header__menu a[data-page='comptabilite'] { display: none; }
  .app-header__menu-mobile-only { display: none !important; }

  /* Copilote : pilule blanche avec micro violet */
  .app-aibanner {
    flex: none;
    width: 210px;
    gap: 6px;
    padding: 5px 5px 5px 18px;
    background: var(--color-surface);
    border-radius: 999px;
    box-shadow: none;
    border: 0;
  }
  .app-aibanner__line1 { display: none; }
  .app-aibanner__text { flex: 1; min-width: 0; }
  .app-aibanner__line2 { font-size: 13px; font-weight: 500; padding: 0; text-align: left; }
  .app-aibanner__mic {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    box-shadow: none;
  }
  .app-aibanner__mic svg { width: 17px; height: 17px; }

  .app-header__user { gap: 16px; }
  .app-header__user .app-header__theme:not(.app-header__notif-btn) { display: none; }
  .app-header__user .app-header__notif-btn {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--color-surface);
  }
  .app-header__avatar {
    width: 44px;
    height: 44px;
    background: var(--pastel-lilas);
    color: var(--txt-encre);
    font-size: 14px;
    font-weight: 800; --txt-encre: #1B1A17; }

  .app-datebar { display: none; }
}

/* iOS Safari zoome la page dès qu'un champ pris au focus a une police < 16px :
   on force 16px sur tous les champs en tactile / mobile (sans bloquer le zoom utilisateur). */
@media (max-width: 720px), (pointer: coarse) {
  input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']),
  select,
  textarea,
  .app-aibanner__line2 {
    font-size: 16px !important;
  }
}

/* ---------- Messagerie (mobile) : une tuile par message, non lus en menthe ---------- */

@media (max-width: 720px) {
  .page--mail .mail-folder { background: var(--color-surface); color: var(--color-text); font-weight: 700; padding: 10px 16px; }
  .page--mail .mail-folder.is-active { background: var(--color-ink); color: var(--color-ink-contrast); }

  .page--mail .mail-list-pane { background: none; border: 0; box-shadow: none; overflow: visible; }
  .page--mail .mail-list-pane__head { border: 0; padding: 4px 4px 12px; }
  .page--mail .mail-list-pane__head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
  .page--mail .mail-list-pane__head .circle-btn { background: var(--color-surface); border: 0; }
  .page--mail .mail-list { gap: 10px; }

  .page--mail .mail-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas: 'av nom date' 'av suj etoile';
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 14px 16px;
    border: 0;
    border-radius: 24px;
    background: var(--color-surface);
  }
  .page--mail .mail-row:hover { background: var(--color-surface); }
  .page--mail .mail-row__avatar { grid-area: av; width: 46px; height: 46px; font-size: 15px; font-weight: 800; }
  .page--mail .mail-row__expediteur { grid-area: nom; width: auto; order: 0; font-size: 15px; font-weight: 700; color: var(--color-text); }
  .page--mail .mail-row__date { grid-area: date; order: 0; width: auto; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
  .page--mail .mail-row__sujet { grid-area: suj; order: 0; flex-basis: auto; width: auto; font-size: 14px; color: var(--color-text-muted); }
  .page--mail .mail-row__etoile { grid-area: etoile; order: 0; justify-self: end; }
  .page--mail .mail-row.is-non-lue { background: var(--pastel-menthe); box-shadow: none; --txt-encre: #1B1A17; }
  .page--mail .mail-row.is-non-lue .mail-row__sujet { color: var(--color-text); font-weight: 700; }
  .page--mail .mail-row.is-non-lue .mail-row__date { color: var(--color-text); }

  .page--mail .mail-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
  .page--mail .mail-pagination .btn { background: var(--color-surface); border: 0; border-radius: 999px; font-weight: 700; }

  /* Lecture : fond sable, en-tête et corps en tuiles blanches. */
  .mail-layout--lecture .mail-reading-pane { background: var(--color-bg); padding: max(20px, env(safe-area-inset-top)) 16px 28px; }
  .mail-reading__toolbar { position: sticky; top: -20px; z-index: 2; margin: -20px -16px 14px; padding: max(20px, env(safe-area-inset-top)) 16px 10px; background: var(--color-bg); }
  .mail-reading__toolbar .circle-btn { background: var(--color-surface); border: 0; }
  .mail-reading__sujet { font-size: 28px; font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; margin: 0 4px 14px; }
  .mail-reading__meta { background: var(--pastel-menthe); border: 0; border-radius: 24px; padding: 14px 16px; margin-bottom: 10px; --txt-encre: #1B1A17; }
  .mail-reading__de { font-weight: 800; }
  .mail-reading__a, .mail-reading__date { color: #3A5A53; font-weight: 600; }
  .mail-reading__corps { background: var(--color-surface); border-radius: 28px; padding: 18px; }
  .mail-reading__pieces { margin-top: 10px; }
  .mail-piece { background: var(--color-surface); border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; }
}

/* ---------- Agenda (mobile) : carte verte du jour, frise, semaine en lignes, mois à pastilles ---------- */

.cal-hero, .cal-resume { display: none; }

@media (max-width: 720px) {
  #cal-period-label { display: none; }
  #cal-legend { display: none; }

  /* Sous-menus éditoriaux : de gros mots, l'actif en encre et souligné violet. */
  :is(#cal-view-tabs, #messagerie-tabs, #contacts-filter-tabs, #compta-tabs, #suivi-tabs, #type-tabs, #admin-tabs, #rappels-tabs, #com-tabs, #facturation-tabs) { background: none; padding: 0 0 10px; gap: 18px; border-radius: 0; box-shadow: none; width: auto; align-items: baseline; overflow: visible; }
  :is(#cal-view-tabs, #messagerie-tabs, #contacts-filter-tabs, #compta-tabs, #suivi-tabs, #type-tabs, #admin-tabs, #rappels-tabs, #com-tabs, #facturation-tabs) button,
  :is(#cal-view-tabs, #messagerie-tabs, #contacts-filter-tabs, #compta-tabs, #suivi-tabs, #type-tabs, #admin-tabs, #rappels-tabs, #com-tabs, #facturation-tabs) button.active {
    flex: none;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--color-text-faint);
    position: relative;
    white-space: nowrap;
  }
  :is(#cal-view-tabs, #messagerie-tabs, #contacts-filter-tabs, #compta-tabs, #suivi-tabs, #type-tabs, #admin-tabs, #rappels-tabs, #com-tabs, #facturation-tabs) button.active { color: var(--color-text); }
  :is(#cal-view-tabs, #messagerie-tabs, #contacts-filter-tabs, #compta-tabs, #suivi-tabs, #type-tabs, #admin-tabs, #rappels-tabs, #com-tabs, #facturation-tabs) button.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 6px;
    border-radius: 6px;
    background: var(--color-accent);
  }
  #cal-view-tabs button, #cal-view-tabs button.active { font-size: 30px; }
  #compta-tabs button, #compta-tabs button.active { font-size: 24px; }
  #compta-tabs { gap: 14px; }
  /* Libellés longs : une seule ligne qui défile sur le côté. */
  #suivi-tabs { gap: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; }
  #suivi-tabs::-webkit-scrollbar { display: none; }
  #suivi-tabs button, #suivi-tabs button.active { font-size: 21px; }
  #facturation-tabs { gap: 14px; }
  #facturation-tabs button, #facturation-tabs button.active { font-size: 21px; }
  .cal-controls { align-items: center; gap: 12px; margin-bottom: 4px; }
  .cal-resume { margin: 14px 4px 12px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }

  .cal-resume { display: none; }
  .cal-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 14px 0 12px;
    padding: 16px 18px;
    border: 0;
    border-radius: 28px;
    background: var(--pastel-lime);
    color: var(--txt-encre);
    font-family: inherit;
    text-align: left;
    cursor: pointer; --txt-encre: #1B1A17; }
  .cal-hero__date { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .cal-hero__jour { font-size: 62px; font-weight: 800; line-height: 0.85; letter-spacing: -0.05em; }
  .cal-hero__mois { font-size: 17px; font-weight: 800; line-height: 1.15; }
  .cal-hero__mois small { display: block; font-size: 13px; font-weight: 600; color: #4A5016; }
  .cal-hero__compteur { flex: none; background: #1B1A17; color: #FFFFFF; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; }

  /* ----- Jour : frise horaire ----- */
  .cal-tl__titre { padding: 4px 4px 2px; font-size: 13px; font-weight: 700; color: var(--color-text-muted); }
  .cal-tl__frise { position: relative; margin-top: 12px; }
  .cal-tl__heure { position: absolute; left: 0; width: 46px; text-align: right; font-size: 12px; font-weight: 700; color: var(--color-text-faint); transform: translateY(-50%); }
  .cal-tl__ligne { position: absolute; left: 56px; right: 0; border-top: 1px dashed var(--color-border); }
  .cal-tl__ev,
  .cal-tl__chip,
  .cal-sem__ev {
    background: color-mix(in srgb, var(--cat, #C9BDFF) var(--cat-mix, 68%), var(--color-surface));
    color: var(--color-text);
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
  }
  .cal-tl__ev { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 20px; overflow: hidden; }
  .cal-tl__ev b { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
  .cal-tl__ev span { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
  .cal-tl__now { position: absolute; left: 50px; right: 0; border-top: 2px solid var(--color-accent); z-index: 3; pointer-events: none; }
  .cal-tl__now::before { content: ''; position: absolute; left: -1px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); }
  .cal-tl__now i { position: absolute; left: -50px; top: -11px; padding: 2px 7px; border-radius: 999px; background: var(--color-accent); color: var(--color-accent-contrast); font-size: 11px; font-weight: 800; font-style: normal; }
  .cal-tl__entiere { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .cal-tl__chip { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 18px; font-size: 14px; font-weight: 800; }
  .cal-tl__chip span { font-size: 11px; font-weight: 600; color: var(--color-text-muted); }

  /* ----- Semaine : un jour par ligne ----- */
  .cal-sem { display: flex; flex-direction: column; gap: 10px; }
  .cal-sem__tete { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
  .cal-sem__total { background: var(--color-surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; letter-spacing: 0; }
  .cal-sem__jour { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border-radius: 24px; background: var(--color-surface); }
  .cal-sem__jour.is-today { box-shadow: inset 0 0 0 3px var(--pastel-lime); }
  .cal-sem__date { text-align: center; }
  .cal-sem__date small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-faint); }
  .cal-sem__date b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 16px; background: var(--color-surface-hollow); font-size: 20px; font-weight: 800; }
  .cal-sem__jour.is-today .cal-sem__date b { background: var(--pastel-lime); color: var(--txt-encre); --txt-encre: #1B1A17; }
  .cal-sem__events { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
  .cal-sem__ev { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 16px; }
  .cal-sem__ev b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; }
  .cal-sem__ev span { flex: none; font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
  .cal-sem__vide { padding: 14px 0; font-size: 13px; font-weight: 600; color: var(--color-text-faint); }
  .cal-sem__ajouter { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--color-surface-hollow); color: var(--color-text); font-family: inherit; font-size: 20px; font-weight: 700; cursor: pointer; }

  /* ----- Mois : grille à pastilles + liste du jour ----- */
  .cal-mm__tete { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
  .cal-mm__tete h3 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
  .cal-mm__tete h3 small { margin-left: 6px; font-size: 16px; font-weight: 700; letter-spacing: 0; color: var(--color-text-faint); }
  .cal-mm__nav { display: flex; gap: 8px; }
  .cal-mm__nav button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--color-surface); color: var(--color-text); font-family: inherit; display: grid; place-items: center; cursor: pointer; }
  .cal-mm__grille { padding: 14px 10px 10px; border-radius: 28px; background: var(--color-surface); }
  .cal-mm__semaine, .cal-mm__jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
  .cal-mm__semaine span { padding-bottom: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--color-text-faint); }
  .cal-mm__jour { display: flex; flex-direction: column; align-items: center; height: 46px; padding: 5px 0 0; border: 0; background: none; color: var(--color-text); font-family: inherit; cursor: pointer; }
  .cal-mm__nb { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; font-weight: 700; }
  .cal-mm__jour.is-hors { color: var(--color-text-muted); opacity: 0.8; }
  .cal-mm__jour.is-auj .cal-mm__nb { background: var(--pastel-lime); color: var(--txt-encre); font-weight: 800; --txt-encre: #1B1A17; }
  .cal-mm__jour.is-sel .cal-mm__nb { background: var(--color-ink); color: var(--color-ink-contrast); font-weight: 800; }
  .cal-mm__pts { display: flex; gap: 3px; margin-top: 3px; }
  .cal-mm__pts i { display: block; width: 5px; height: 5px; border-radius: 50%; }
  .cal-mm__titre-jour { display: flex; align-items: center; justify-content: space-between; margin: 14px 4px 8px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
  .cal-mm__titre-jour small { font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
  .cal-mm__carte { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 8px; padding: 12px 14px; border: 0; border-radius: 22px; background: var(--color-surface); color: var(--color-text); font-family: inherit; text-align: left; cursor: pointer; }
  .cal-mm__barre { align-self: stretch; width: 6px; border-radius: 6px; background: var(--cat, #C9BDFF); flex: none; }
  .cal-mm__texte { min-width: 0; }
  .cal-mm__texte b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
  .cal-mm__texte small { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
  .cal-mm__heure { flex: none; margin-left: auto; padding: 6px 11px; border-radius: 999px; background: var(--color-surface-hollow); font-size: 13px; font-weight: 800; }
  .cal-mm__ajouter { width: 100%; padding: 12px; border: 0; border-radius: 999px; background: var(--color-surface); color: var(--color-text); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) :is(.cal-tl__ev, .cal-tl__chip, .cal-sem__ev) { --cat-mix: 42%; }
}
:root[data-theme='dark'] :is(.cal-tl__ev, .cal-tl__chip, .cal-sem__ev) { --cat-mix: 42%; }

/* ======================================================================
   Copilote — chat (plein encre, cartes de données, glisser pour confirmer)
   et vocal (dégradé violet, sous-titres géants)
   ====================================================================== */

.copilote-panel {
  background: #1B1A17;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 18px 16px;
  gap: 0;
  color: #FFFFFF;
}
.copilote-panel__tabs-fixe { display: flex; align-items: center; gap: 10px; padding-bottom: 0; }
.copilote-panel__titre { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: #FFFFFF; }
.copilote-spark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-contrast); flex: none; }
.copilote-spark svg { width: 16px; height: 16px; }
.copilote-panel .tabs { width: auto; align-items: center; padding: 5px; gap: 2px; border-radius: 999px; background: #2B2A26; box-shadow: none; }
.copilote-panel .tabs button { flex: none; display: block; padding: 8px 14px; border-radius: 999px; background: none; font-size: 13px; font-weight: 700; line-height: 1.2; color: #9C998E; }
.copilote-panel .tabs button.active { background: var(--pastel-lime); color: var(--txt-encre); box-shadow: none; --txt-encre: #1B1A17; }
.copilote-panel__fermer { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #2B2A26; color: #FFFFFF; cursor: pointer; flex: none; }
.copilote-panel__fermer svg { width: 18px; height: 18px; }

.copilote-panel .copilote-chat { gap: 12px; padding: 18px 0 0; margin-bottom: 0; scrollbar-width: none; }
.copilote-panel .copilote-chat > :first-child { margin-top: auto; }
.copilote-panel .copilote-chat::-webkit-scrollbar { display: none; }
.copilote-panel .copilote-bubble { font-size: 15px; line-height: 1.4; }
.copilote-panel .copilote-bubble--user { max-width: 80%; background: var(--pastel-lime); color: var(--txt-encre); font-weight: 700; padding: 12px 16px; border-radius: 22px 22px 6px 22px; --txt-encre: #1B1A17; }
.copilote-panel .copilote-bubble--assistant { background: none; padding: 0; border-radius: 0; color: #E8E5DB; font-weight: 500; max-width: 90%; }
.copilote-panel .copilote-bubble--assistant.is-loading { color: #9C998E; }

.copilote-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.copilote-carte { min-width: 0; padding: 12px 14px; border-radius: 22px; background: var(--pastel-sable-fonce); color: var(--txt-encre); --txt-encre: #1B1A17; }
.copilote-carte small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copilote-carte b { display: block; margin-top: 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.copilote-carte span { display: block; font-size: 12px; font-weight: 600; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copilote-carte--orange { background: var(--pastel-orange); --txt-encre: #1B1A17; }
.copilote-carte--lime { background: var(--pastel-lime); --txt-encre: #1B1A17; }
.copilote-carte--lilas { background: var(--pastel-lilas); --txt-encre: #1B1A17; }
.copilote-carte--menthe { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
.copilote-cartes__plus { grid-column: 1 / -1; padding: 0 4px; font-size: 12px; font-weight: 600; color: #9C998E; }

.copilote-action-card { align-self: stretch; max-width: none; padding: 14px 16px; border: 0; border-radius: 24px; background: var(--color-accent); color: var(--color-accent-contrast); gap: 0; }
.copilote-action-card__corps b { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 800; color: #FFFFFF; }
.copilote-action-card__resume { margin: 0 0 10px; font-size: 13px; font-weight: 400; line-height: 1.35; opacity: 0.85; color: #FFFFFF; }
.copilote-action-card__actions { flex-direction: column; gap: 8px; }
.copilote-glisse { position: relative; display: flex; align-items: center; height: 44px; padding: 4px; border-radius: 999px; background: #1B1A17; overflow: hidden; --progres: 0; }
.copilote-glisse__poignee { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pastel-lime); color: var(--txt-encre); cursor: grab; touch-action: none; flex: none; position: relative; z-index: 2; --txt-encre: #1B1A17; }
.copilote-glisse__poignee svg { width: 16px; height: 16px; }
.copilote-glisse__label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 36px; font-size: 13px; font-weight: 700; color: #FFFFFF; opacity: calc(1 - var(--progres) * 1.4); pointer-events: none; }
.copilote-glisse.is-busy { opacity: 0.6; pointer-events: none; }
.copilote-action-card__annuler { width: 100%; padding: 10px 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: #FFFFFF; font-family: inherit; font-size: 14px; font-weight: 800; text-align: center; cursor: pointer; }
.copilote-action-card.is-confirmee .copilote-action-card__statut { color: var(--pastel-lime); }
.copilote-action-card.is-annulee .copilote-action-card__statut { color: #E4DEFF; }
.copilote-action-card.is-erreur .copilote-action-card__statut { color: #FFD6D3; }
.copilote-action-card__statut { font-size: 13px; }

.copilote-panel__bas { padding-top: 12px; }
.copilote-panel .copilote-chat-form { align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 22px; background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.copilote-panel .copilote-chat-form input { flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--txt-encre); font-size: 16px; }
.copilote-panel .copilote-chat-form input::placeholder { color: #A8A59A; }
.copilote-panel .copilote-chat-form input:focus { border: 0; box-shadow: none; }
.copilote-send { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 16px; background: var(--color-accent); color: var(--color-accent-contrast); cursor: pointer; flex: none; }
.copilote-send svg { width: 20px; height: 20px; }
.copilote-send:disabled { opacity: 0.5; }

/* ----- Vocal : dégradé violet, orbe blanche, sous-titres géants ----- */

.copilote-voix-overlay {
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
  padding: 24px 22px 26px;
  background: linear-gradient(170deg, #7C63FF 0%, #5B3FE6 55%, #3B26B0 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #FFFFFF;
}
.copilote-voix-overlay__top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; opacity: 0.85; }
.copilote-voix-overlay__duree { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-variant-numeric: tabular-nums; }
.copilote-voix-overlay__zone { flex: 1; max-width: none; align-items: stretch; justify-content: flex-start; gap: 0; min-height: 0; padding-top: 0; }
.copilote-voix-orb {
  align-self: center;
  width: 96px;
  height: 96px;
  margin-top: 26px;
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #D9D1FF 60%, #B6A8FF);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.14), 0 0 0 34px rgba(255, 255, 255, 0.08), 0 0 60px rgba(255, 255, 255, 0.35);
}
.copilote-voix-orb.is-ia-parle { background: radial-gradient(circle at 35% 30%, #FFFFFF, #F1FFB8 60%, var(--pastel-lime)); }
.copilote-voix-overlay__statut { margin: 16px 0 0; font-size: 13px; font-weight: 600; opacity: 0.8; text-align: center; }
.copilote-voix-overlay__zone:has(.copilote-voix-overlay__transcript > *) .copilote-voix-overlay__statut { display: none; }
.copilote-voix-overlay__transcript { flex: 1; min-height: 0; max-height: none; justify-content: center; gap: 14px; overflow-y: auto; scrollbar-width: none; text-align: left; font-size: 15px; color: #FFFFFF; }
.copilote-voix-overlay__transcript::-webkit-scrollbar { display: none; }
.copilote-voix-overlay__transcript > :not(:nth-last-child(-n + 2)) { display: none; }
.copilote-voix-overlay__transcript .copilote-bubble { max-width: none; font-size: 15px; font-weight: 600; opacity: 0.7; }
.copilote-voix-overlay__transcript .copilote-bubble--user::before { content: 'Vous : « '; }
.copilote-voix-overlay__transcript .copilote-bubble--user::after { content: ' »'; }
.copilote-voix-overlay__transcript .copilote-bubble--assistant em { font-style: normal; color: var(--pastel-lime); }
.copilote-voix-overlay__transcript .copilote-bubble--assistant { font-size: 30px; font-weight: 800; line-height: 1.08; letter-spacing: -0.04em; opacity: 1; color: #FFFFFF; }
.copilote-voix-overlay .copilote-action-card { background: rgba(255, 255, 255, 0.16); }
.copilote-voix-overlay__bas { display: flex; align-items: center; justify-content: space-between; }
.copilote-voix-rond { display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #FFFFFF; cursor: pointer; }
.copilote-voix-rond svg { width: 22px; height: 22px; }
.copilote-voix-rond__barre { opacity: 0; }
.copilote-voix-rond[aria-pressed='true'] { background: var(--surf-blanc); color: #3B26B0; --txt-encre: var(--txt-neutre); }
.copilote-voix-rond[aria-pressed='true'] .copilote-voix-rond__barre { opacity: 1; }
.copilote-voix-overlay .copilote-overlay__stop { height: 54px; padding: 0 30px; background: var(--surf-blanc); color: #3B26B0; font-size: 15px; font-weight: 800; --txt-encre: var(--txt-neutre); }
.copilote-voix-overlay .copilote-overlay__stop:hover { background: #F1EEFF; --txt-encre: #1B1A17; }
.copilote-voix-overlay__transcript .copilote-bubble--user { align-self: flex-start; }

/* Lecture d'un mail (volet plein écran sur téléphone) : l'en-tête et la barre du bas s'effacent. */
@media (max-width: 859px) {
  body.is-lecture-mail .app-header,
  body.is-lecture-mail .da-nav { visibility: hidden; }
}

/* ---------- Mail ouvert : Répondre / Transférer / corbeille en gros boutons collés en bas ---------- */

.mail-reading__bas {
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
}
.mail-reading__action {
  flex: 1;
  height: 54px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
#mail-btn-repondre { background: var(--color-accent); color: var(--color-accent-contrast); }
#mail-btn-transferer { background: var(--pastel-lime); color: var(--txt-encre); --txt-encre: #1B1A17; }
.mail-reading__corbeille {
  flex: none;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: var(--pastel-orange-clair);
  color: #B8420F;
  display: grid;
  place-items: center;
  cursor: pointer; --txt-encre: #1B1A17; }

@media (max-width: 859px) {
  .mail-reading__bas {
    position: sticky;
    bottom: -28px;
    z-index: 2;
    margin: 14px -16px -28px;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--color-bg) 72%, transparent);
  }
}
.mail-reading__meta-texte { min-width: 0; }
.mail-reading__de { overflow-wrap: anywhere; }
.mail-reading__date { white-space: nowrap; }

/* ---------- Aperçu devis / facture : violet + dock blanc (téléphone) ---------- */

.doc-overlay__sous { display: none; }

@media (max-width: 859px) {
  .doc-overlay {
    align-items: stretch;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(170deg, #7C63FF 0%, #5B3FE6 55%, #3B26B0 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
  }
  .doc-overlay__stack { flex: 1; min-height: 0; max-width: none; margin: 0; padding-top: 0; gap: 0; align-items: center; }
  .doc-overlay__close {
    position: fixed;
    top: 20px;
    left: 16px;
    right: auto;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0;
  }
  .doc-overlay__close::before { content: ''; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
  .doc-overlay__titre { margin-top: 2px; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: #FFFFFF; }
  .doc-overlay__sous { display: block; margin: 2px 0 0; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.8); text-align: center; }

  .doc-viewer { flex: 1; min-height: 0; width: 100%; }
  .doc-viewer__panel--apercu.is-active { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
  .doc-viewer__panel--infos.is-active { flex: 1; min-height: 0; overflow-y: auto; padding-top: 14px; }
  .doc-preview--pdf { flex: 1; min-height: 0; height: 100%; display: flex; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
  .doc-preview--pdf .pdf-pager { flex: 1; min-height: 0; width: 100%; }
  .doc-preview--pdf .pdf-pager__track { flex: 1; height: auto; min-height: 0; background: transparent; }
  .doc-preview--pdf .pdf-pager__page { padding: 14px 26px; }
  .doc-preview--pdf .pdf-pager__page canvas { transform: rotate(-2deg); box-shadow: 0 18px 40px rgba(20, 10, 80, 0.45); border-radius: 4px; }
  .pdf-pager__dots { padding: 6px 0 0; }
  .pdf-pager__dot { background: rgba(255, 255, 255, 0.4); transition: width 0.25s ease, background 0.25s ease; }
  .pdf-pager__dot.is-active { width: 20px; border-radius: 7px; background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
  .pdf-preview__loading, .pdf-pager__loading { color: rgba(255, 255, 255, 0.8); height: auto; min-height: 0; }

  /* Dock blanc : télécharger, partager, Statut (lime), supprimer ; « infos » devient le « i » du haut. */
  .doc-viewer__actions { width: 100%; align-items: center; gap: 6px; margin-top: 14px; padding: 7px; border-radius: 999px; background: var(--surf-blanc); flex: none; --txt-encre: var(--txt-neutre); }
  .doc-action-btn {
    flex: none;
    flex-direction: row;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--txt-encre);
    font-size: 0;
    box-shadow: none;
  }
  .doc-action-btn svg { width: 20px; height: 20px; }
  .doc-action-btn:hover { background: var(--color-surface-hollow); color: var(--txt-encre); }
  .doc-action-btn[id$='doc-btn-statut'] { flex: 1; width: auto; border-radius: 999px; background: var(--pastel-lime); font-size: 14px; font-weight: 800; gap: 8px; --txt-encre: #1B1A17; }
  .doc-action-btn[id$='doc-btn-statut']:hover { background: var(--pastel-lime); color: var(--txt-encre); --txt-encre: #1B1A17; }
  .doc-action-btn--danger { color: #B3261E; margin-left: auto; }
  .doc-action-btn--danger:hover { background: #FFE3D6; color: #B3261E; --txt-encre: #1B1A17; }
  .doc-action-btn[id$='doc-btn-statut']:not([hidden]) ~ .doc-action-btn--danger { margin-left: 0; }
  .doc-btn-toggle {
    position: fixed;
    top: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    z-index: 10;
  }
  .doc-btn-toggle:hover { background: rgba(255, 255, 255, 0.28); color: #FFFFFF; }
  .doc-btn-toggle svg { width: 20px; height: 20px; }
}

/* ---------- Facturation : barre de filtre de statut (téléphone) ---------- */

.filtre-barre { display: none; }

@media (max-width: 720px) {
  #facture-statut-tabs, #devis-tabs { display: none; }
  .filtre-barre { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--color-surface); }
  .filtre-barre__icone { display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--color-text-muted); cursor: pointer; flex: none; }
  .filtre-barre__icone svg { width: 18px; height: 18px; }
  .filtre-barre__chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--color-surface-hollow); color: var(--color-text); font-size: 13px; font-weight: 800; cursor: pointer; }
  .filtre-barre__chip.is-actif { color: var(--txt-encre); }
  .filtre-barre__chip svg { width: 14px; height: 14px; }
  .filtre-barre__effacer { margin-left: auto; padding: 0 10px 0 0; border: 0; background: none; color: var(--color-text-muted); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
}

.statut-liste { display: flex; flex-direction: column; }
.statut-liste__ligne { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); background: none; color: #FFFFFF; font-family: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.statut-liste__ligne:last-child { border-bottom: 0; }
.statut-liste__ligne i { width: 12px; height: 12px; border-radius: 50%; display: block; flex: none; }
.statut-liste__ligne.is-actif { font-weight: 800; }
.statut-liste__ligne.is-actif::after { content: '✓'; margin-left: auto; color: var(--pastel-lime); font-weight: 800; }

/* ======================================================================
   Header : icônes nues + profil nommé (« L · Luut ▾ »)
   ====================================================================== */

.app-header__user .app-header__theme,
.app-header__user .app-header__notif-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--color-text);
}
.app-header__user .app-header__theme:hover { background: var(--color-surface-hollow); }
.app-header__notif-badge { top: 7px; right: 8px; width: 9px; height: 9px; background: var(--color-accent); border: 2px solid var(--color-bg); }

.app-header__profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
.app-header__profile-btn .app-header__avatar { width: 34px; height: 34px; font-size: 13px; background: var(--color-accent-light); color: var(--color-accent); }
.app-header__profile-btn > svg { width: 14px; height: 14px; flex: none; }
.app-header__profile-nom { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 340px) { .app-header__profile-nom { display: none; } .app-header__profile-btn { padding-right: 8px; } }

/* ======================================================================
   Panneau de notifications : plein encre, filtres, glisser pour les actions
   ====================================================================== */

.modal-backdrop--haut { background: rgba(27, 26, 23, 0.55); backdrop-filter: blur(6px); }
.modal-backdrop--haut .notif-modal {
  background: #1B1A17;
  color: #FFFFFF;
  border: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.notif-modal h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: #FFFFFF; }
.notif-tete { display: flex; align-items: center; justify-content: space-between; }
.notif-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #2B2A26; color: #FFFFFF; cursor: pointer; }
.notif-x svg { width: 18px; height: 18px; }
.notif-filtres { display: flex; gap: 8px; margin: 14px 0 4px; overflow-x: auto; scrollbar-width: none; }
.notif-filtres::-webkit-scrollbar { display: none; }
.notif-filtres button { flex: none; padding: 8px 14px; border: 0; border-radius: 999px; background: #2B2A26; color: #C9C6BC; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.notif-filtres button.on { background: var(--pastel-lime); color: var(--txt-encre); --txt-encre: #1B1A17; }

.notif-modal .notif-list { gap: 0; }
.notif-modal .notif-day-label { margin: 18px 4px 8px; color: #8F8C82; }
.notif-modal .notif-day-group { gap: 8px; }

.notif-swipe { position: relative; overflow: hidden; border-radius: 22px; }
.notif-actions { position: absolute; top: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; }
.notif-act { display: grid; place-items: center; height: 44px; padding: 0 14px; border: 0; border-radius: 999px; font-family: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.notif-act--ouvrir { background: var(--pastel-lime); color: var(--txt-encre); --txt-encre: #1B1A17; }
.notif-act--lu { background: #3B3935; color: #FFFFFF; }
.notif-act--suppr { width: 44px; padding: 0; background: #FF8A7D; color: var(--txt-encre); --txt-encre: #1B1A17; }
.notif-act--suppr svg { width: 18px; height: 18px; }

.notif-modal .notif-item {
  position: relative;
  z-index: 1;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 22px;
  background: #2B2A26;
  box-shadow: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.notif-modal .notif-item:hover { transform: none; box-shadow: none; }
.notif-modal .notif-item:not(.is-non-lue) { opacity: 1; }
.notif-modal .notif-item:not(.is-non-lue) .notif-item__titre { font-weight: 600; color: #C9C6BC; }
.notif-modal .notif-item.is-non-lue { background: #34322E; box-shadow: inset 3px 0 0 var(--pastel-lime); }
.notif-modal .notif-item__titre { font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: #FFFFFF; }
.notif-modal .notif-item__meta { color: #8F8C82; }
.notif-modal .notif-item__temps { color: #8F8C82; padding-top: 0; align-self: flex-start; }
.notif-modal .notif-item__icone { color: var(--txt-encre); background: var(--pastel-lilas); --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-tonalite='alerte'] .notif-item__icone { background: var(--pastel-orange); --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-tonalite='succes'] .notif-item__icone { background: var(--pastel-lime); --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-tonalite='argent'] .notif-item__icone { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-tonalite='neutre'] .notif-item__icone { background: var(--pastel-sable-fonce); --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-categorie='transferts'] .notif-item__icone { background: var(--pastel-menthe); --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-categorie='rendez_vous'] .notif-item__icone { background: var(--pastel-lilas); --txt-encre: #1B1A17; }
.notif-modal .empty-state { color: #8F8C82; }
.notif-modal .notif-panel__actions--centre { margin-top: 14px; }
.notif-tout-lu { padding: 10px 18px; border: 0; border-radius: 999px; background: #2B2A26; color: #FFFFFF; font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }

@media (max-width: 720px) {
  .modal-backdrop--haut { padding: 0; backdrop-filter: none; background: #1B1A17; }
  .modal-backdrop--haut .notif-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: max(18px, env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
}

/* Agenda mobile : indicateur de période + bouton Aujourd'hui, glissement de la bande */
.cal-indic, .cal-hint { display: none; }
@media (max-width: 720px) {
  .cal-hint { display: block; text-align: center; margin: 4px 0 6px; }
  .cal-hint__titre { display: block; font-size: 22px; text-align: center; letter-spacing: -0.02em; }
  .cal-indic { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 10px; }
  .cal-indic__dots { display: flex; gap: 5px; }
  .cal-indic__dots i { width: 6px; height: 6px; border-radius: 9px; background: var(--color-border-strong, #c8c4ba); transition: width 0.2s, background 0.2s; }
  .cal-indic__dots i.a { width: 20px; background: #6B4EFF; }
  .cal-indic__auj { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 12px; background: var(--color-ink, #1B1A17); color: #DCF06E; font: 700 12px/1 inherit; font-family: inherit; cursor: pointer; }
  #cal-datestrip { overflow: hidden; touch-action: pan-y; margin-bottom: 6px; }
  #cal-datestrip[data-slide="next"] { animation: cal-glisse-next 0.28s ease-out; }
  #cal-datestrip[data-slide="prev"] { animation: cal-glisse-prev 0.28s ease-out; }
}
@keyframes cal-glisse-next { from { translate: 40px 0; opacity: 0.2; } to { translate: 0 0; opacity: 1; } }
@keyframes cal-glisse-prev { from { translate: -40px 0; opacity: 0.2; } to { translate: 0 0; opacity: 1; } }
@media (max-width: 720px) { .cal-mm__tete { display: none; } }
@media (max-width: 720px) { #cal-container { touch-action: pan-y; } .cal-hint:empty, .cal-hint:not(:has(.cal-hint__titre)) { display: none; } }

/* Messagerie : dossiers en menu déroulant (planche 6) */
.mail-dossier-btn { display: none; }
.mail-folder__nb { font-style: normal; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #6B4EFF; color: #fff; margin-left: auto; }
.mail-folder.is-active .mail-folder__nb { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
@media (max-width: 720px) {
  .page--mail .mail-sidebar { flex-direction: column; align-items: stretch; overflow: visible; gap: 0; }
  .page--mail .mail-dossier-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 0 4px; font-family: inherit; color: var(--color-text); cursor: pointer; text-align: left; }
  .page--mail .mail-dossier-btn b { flex: 1; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
  .page--mail .mail-dossier-btn__rond { width: 34px; height: 34px; border-radius: 50%; background: var(--color-surface); display: flex; align-items: center; justify-content: center; transition: rotate 0.2s; }
  .page--mail .mail-dossier-btn.is-ouvert .mail-dossier-btn__rond { rotate: 180deg; }
  .page--mail .mail-folders { display: none; flex-direction: column; overflow: visible; gap: 0; margin-top: 12px; background: var(--color-surface); border-radius: 22px; padding: 6px; }
  .page--mail .mail-folders.is-ouvert { display: flex; animation: anim-fade 0.15s ease-out backwards; }
  .page--mail .mail-folder { width: 100%; gap: 12px; padding: 12px; border-radius: 16px; font-size: 14px; background: none; }
  .page--mail .mail-folder.is-active { background: var(--color-ink); color: var(--color-ink-contrast); }
  .page--mail .mail-folder span { flex: 1; text-align: left; }
  .page--mail .mail-list-pane__head { display: none; }
}
@media (min-width: 721px) { .mail-dossier-btn { display: none !important; } }

/* Cartes projet : A4 (en cours) / A3 (livré) — mobile uniquement */
.pj-m { display: none; }
@media (max-width: 720px) {
  #projets-cards .tile--prepa .tile__kicker,
  #projets-cards .tile--prepa .tile__meta,
  #projets-cards .tile--prepa .tile__stats,
  #projets-cards .tile--prepa .tile__footer,
  #projets-cards .tile--livre .tile__meta { display: none; }
  #projets-cards .tile--prepa .pj-m { display: flex; }
  #projets-cards .tile--prepa { background: var(--surf-blanc); color: var(--color-text); --txt-encre: var(--txt-neutre); }
  .pj-m--qui { align-items: center; gap: 8px; }
  .pj-m--qui small { font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
  .pj-m--qui .badge { margin-left: auto; }
  .pj-av { width: 30px; height: 30px; border-radius: 50%; background: #DCD3FF; color: var(--txt-encre); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex: none; --txt-encre: #1B1A17; }
  .pj-m--etapes { flex-direction: column; gap: 6px; }
  .pj-m--etapes small { font-size: 12px; color: var(--color-text-muted); }
  .pj-steps { display: flex; gap: 6px; }
  .pj-steps i { flex: 1; height: 8px; border-radius: 9px; background: var(--surf-creux); --txt-encre: var(--txt-neutre); }
  .pj-steps i.d { background: #1B1A17; }
  .pj-steps i.a { background: #6B4EFF; }

  #projets-cards .tile--livre { background: #1B1A17; color: #fff; }
  #projets-cards .tile--livre .tile__kicker,
  #projets-cards .tile--livre .tile__stat-label { color: #aaa49a; }
  #projets-cards .tile--livre .tile__title { color: #fff; }
  #projets-cards .tile--livre .tile__stats > div:first-child .tile__stat-value { color: #DCF06E; }
  #projets-cards .tile--livre .tile__stat-value { color: #fff; }
  #projets-cards .tile--livre .badge { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
  #projets-cards .tile--livre .tile__value { color: #fff; }
}

/* Fiche projet (mobile) — design B1 : héros lilas + une carte blanche par section */
@media (max-width: 720px) {
  body[data-page='projets'] .page__header:has(.fiche-entete) { padding: 16px; margin-bottom: 4px; }
  body[data-page='projets'] .fiche-entete,
  body[data-page='projets'] .fiche-entete > div,
  body[data-page='projets'] .fiche-entete__ligne { display: contents; }
  body[data-page='projets'] .page__header:has(.fiche-entete) > .fiche-entete { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 10px; row-gap: 12px; }
  body[data-page='projets'] .fiche-entete__avatar { grid-area: 1 / 1; width: 44px; height: 44px; border-radius: 14px; background: var(--surf-blanc); color: var(--txt-encre); font-size: 14px; --txt-encre: var(--txt-neutre); }
  body[data-page='projets'] #fiche-statut-badge { grid-area: 1 / 3; background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
  body[data-page='projets'] #btn-modifier { grid-area: 1 / 4; background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
  body[data-page='projets'] .fiche-entete__ligne h1 { grid-area: 2 / 1 / 3 / -1; font-size: 26px; line-height: 1.05; margin-top: 4px; }
  body[data-page='projets'] #fiche-client { grid-area: 3 / 1 / 4 / -1; margin: -6px 0 0; }

  body[data-page='projets'] .u-section { background: var(--surf-blanc); border-radius: 22px; padding: 14px 16px; margin: 12px 0 0; --txt-encre: var(--txt-neutre); }
  body[data-page='projets'] .u-section > h2 { font-size: 15px; margin: 0 0 10px; }
  body[data-page='projets'] #section-infos .grid--2 { display: block; }
  body[data-page='projets'] #section-infos .card { background: none; box-shadow: none; padding: 0; border-radius: 0; }
  body[data-page='projets'] #section-infos .card__title { display: none; }
  body[data-page='projets'] #fiche-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body[data-page='projets'] #fiche-infos > div:not(.renouv-widget) { background: var(--surf-sable-clair); border-radius: 14px; padding: 10px; font-weight: 700; font-size: 14px; --txt-encre: var(--txt-neutre); }
  body[data-page='projets'] #fiche-infos .list-row__meta { font-weight: 500; margin-bottom: 2px; }
  body[data-page='projets'] #section-infos .grid--2 > .card:last-child { margin-top: 10px; }
  body[data-page='projets'] #section-infos .grid--2 > .card:last-child::before { content: 'Description'; display: block; font-size: 12px; color: var(--color-text-muted); }
  body[data-page='projets'] #fiche-description { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }

  body[data-page='projets'] .avancement-layout { flex-direction: column; align-items: stretch; margin: 0; gap: 12px; }
  body[data-page='projets'] .avancement-layout .progress-stepper { flex-direction: row; gap: 4px; max-width: none; margin: 0; }
  body[data-page='projets'] .progress-stepper__step { flex: 1; flex-direction: column; gap: 6px; text-align: center; }
  body[data-page='projets'] .progress-stepper__rail { display: block; width: 100%; }
  body[data-page='projets'] .progress-stepper__dot { display: block; width: 100%; height: 8px; border-radius: 9px; background: #D9D4C9; box-shadow: none !important; }
  body[data-page='projets'] .progress-stepper__step.is-done .progress-stepper__dot { background: #1B1A17; }
  body[data-page='projets'] .progress-stepper__step.is-actuel .progress-stepper__dot { background: #6B4EFF; }
  body[data-page='projets'] .progress-stepper__connector { display: none; }
  body[data-page='projets'] .progress-stepper__label { padding: 0; font-size: 10px; font-weight: 700; }
  body[data-page='projets'] #btn-changer-etape { width: auto; height: auto; align-self: flex-start; border-radius: 999px; padding: 8px 14px; gap: 6px; background: #6B4EFF; color: #fff; }
  body[data-page='projets'] #btn-changer-etape::after { content: "Changer l'étape"; font: 700 12px/1 inherit; font-family: inherit; }

  body[data-page='projets'] #section-maintenance .card { background: var(--surf-sable-clair); box-shadow: none; border-radius: 16px; --txt-encre: var(--txt-neutre); }
  body[data-page='projets'] #form-nouveau-plan { display: flex; flex-direction: column; gap: 8px; }
  body[data-page='projets'] #form-nouveau-plan .form-field { margin: 0; }
  body[data-page='projets'] #form-nouveau-plan .btn { align-self: flex-start; margin: 0; }
}

/* Fiche projet — module Tâches (design 1 : checklist) */
body[data-page='projets'] #section-taches > h2 { display: flex; align-items: baseline; }
body[data-page='projets'] #section-taches > h2 em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; color: var(--color-text-muted); }
.taches-barre { height: 6px; border-radius: 9px; background: var(--surf-sable); margin-bottom: 6px; overflow: hidden; --txt-encre: var(--txt-neutre); }
.taches-barre[hidden] { display: none; }
.taches-barre i { display: block; height: 100%; background: #6B4EFF; border-radius: 9px; transition: width 0.3s ease; }
.tache-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #F0ECE4; }
.tache-case { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #CFCABF; background: none; padding: 0; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.tache-case.is-en-cours { border-color: #6B4EFF; }
.tache-case.is-fait { background: #6B4EFF; border-color: #6B4EFF; }
.tache-texte { flex: 1; min-width: 0; }
.tache-texte b { display: block; font-size: 14px; }
.tache-texte b.is-fait { color: #AAA; text-decoration: line-through; }
.tache-texte small { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.tache-point { width: 9px; height: 9px; border-radius: 50%; background: #6B4EFF; flex: none; }
.tache-suppr { border: 0; background: none; color: #B7B2A7; font-size: 14px; padding: 6px; cursor: pointer; flex: none; }
@media (max-width: 720px) { body[data-page='projets'] #section-taches .u-note { margin-top: 10px; } }

/* Écran « changer de statut » — design 6 : plein écran lime, typographique */
.statut-changer__icone, .statut-changer__timeline { display: none; }
.statut-changer__haut { align-self: stretch; }
.statut-changer__titre { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.75); text-align: left; letter-spacing: 0; }
.statut-changer__verbe { margin: 0; align-self: stretch; text-align: left; color: #fff; font-size: var(--taille, 64px); line-height: 0.95; letter-spacing: -0.04em; font-weight: 800; }
.statut-changer__verbe u { text-decoration: none; background: #DCF06E; color: var(--txt-encre); padding: 0 12px; border-radius: 18px; display: inline-block; margin-top: 6px; --txt-encre: #1B1A17; }
.statut-changer__infos { align-self: stretch; justify-content: flex-start; gap: 4px 14px; }
.statut-changer__info { flex-direction: row; gap: 5px; align-items: baseline; }
.statut-changer__info-label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.statut-changer__info-valeur { font-size: 13px; font-weight: 600; }
@media (max-width: 720px) {
  .statut-overlay.doc-overlay { background: #DCF06E; --txt-encre: #1B1A17; }
  .statut-overlay .doc-overlay__close { background: rgba(0, 0, 0, 0.1); color: var(--txt-encre); }
  .statut-overlay .statut-changer { max-width: none; margin: 0; flex: 1; justify-content: center; gap: 18px; padding: 60px 8px 0; color: var(--txt-encre); }
  .statut-changer__titre { color: rgba(27, 26, 23, 0.7); }
  .statut-changer__verbe { color: var(--txt-encre); }
  .statut-changer__verbe u { background: #1B1A17; color: #DCF06E; }
  .statut-changer__info-label, .statut-changer__info-valeur { color: rgba(27, 26, 23, 0.7); }
  .statut-changer__haut { margin-top: auto; }
  .statut-changer__infos { margin-bottom: auto; }
  .statut-changer__slider { background: #1B1A17; height: 60px; padding: 5px; margin-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .statut-changer__slider-fill { background: rgba(220, 240, 110, 0.25); top: 5px; bottom: 5px; left: 5px; }
  .statut-changer__slider-label { color: #fff; font-size: 14px; font-weight: 700; padding-left: 40px; }
  .statut-changer__slider-handle { top: 5px; left: 5px; width: 50px; height: 50px; background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
  .statut-changer__secondaires { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .statut-changer__secondaire { background: rgba(0, 0, 0, 0.08); color: var(--txt-encre); padding: 0 16px; font-weight: 700; }
}
@media (min-width: 721px) { #devis-trend { display: none; } }

/* Séparation en fondu sous la barre Copilote (mobile) : plus de bord net ni d'ombre portée */
@media (max-width: 720px) {
  body.is-scrolled .app-datebar { box-shadow: none; }
  .app-datebar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 34px;
    background: linear-gradient(to bottom, var(--color-bg-top) 0%, color-mix(in srgb, var(--color-bg-top) 70%, transparent) 40%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  body.is-scrolled .app-datebar::after { opacity: 1; }
}

/* Suivi : carte « En cours » + widget « Cette semaine » */
.suivi-encours { background: #1B1A17; color: #fff; border-radius: 26px; padding: 18px; margin-bottom: 12px; }
.suivi-encours[hidden] { display: none; }
.suivi-encours__badge { display: block; color: #DCF06E; font-weight: 700; letter-spacing: 0.08em; font-size: 11px; }
.suivi-encours h3 { margin: 6px 0 4px; font-size: 26px; line-height: 1.05; letter-spacing: -0.03em; }
.suivi-encours__projet { display: block; color: #DCF06E; font-weight: 700; font-size: 12px; letter-spacing: 0.03em; }
.suivi-encours__bas { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.suivi-encours__chrono { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; color: #fff; }
.suivi-encours__fin { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #DCF06E; color: var(--txt-encre); display: flex; align-items: center; justify-content: center; cursor: pointer; --txt-encre: #1B1A17; }
.suivi-semaine { background: var(--surf-blanc); border-radius: 26px; padding: 16px 18px; margin-bottom: 12px; --txt-encre: var(--txt-neutre); }
.suivi-semaine__tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.suivi-semaine__tete .stat { margin: 2px 0 0; font-size: 28px; letter-spacing: -0.04em; }
.suivi-semaine__delta { font-size: 11px; font-weight: 700; background: var(--surf-sable); border-radius: 99px; padding: 5px 10px; white-space: nowrap; --txt-encre: var(--txt-neutre); }
.suivi-semaine__hist { display: flex; gap: 8px; align-items: flex-end; height: 112px; margin-top: 12px; border-bottom: 1px dashed #CFCABF; }
.suivi-semaine__hist > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; }
.suivi-semaine__hist i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: #DCD3FF; transition: height 0.4s ease; --txt-encre: #1B1A17; }
.suivi-semaine__hist i.is-auj { background: #6B4EFF; }
.suivi-semaine__hist small { font-size: 11px; color: var(--color-text-muted); }
.suivi-semaine__nb { font-size: 11px; font-weight: 800; }

/* Suivi : filtres des tâches (téléphone) — même barre + feuille que Facturation */
.statut-liste__titre { margin: 14px 6px 2px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 720px) {
  #btn-toggle-filtres, #tache-filters-wrap { display: none !important; }
}

/* Tâche en cours : toute la carte clignote doucement */
.tache-item.is-en-cours { animation: tache-carte-pulse 1.8s ease-in-out infinite; }
@keyframes tache-carte-pulse {
  0%, 100% { background: var(--color-surface); box-shadow: 0 0 0 0 rgba(107, 78, 255, 0); }
  50% { background: #EFEBFF; box-shadow: 0 0 0 5px rgba(107, 78, 255, 0.22); --txt-encre: #1B1A17; }
}
@media (prefers-reduced-motion: reduce) { .tache-item.is-en-cours { animation: none; background: #EFEBFF; --txt-encre: #1B1A17; } }
.suivi-encours.is-fermeture { opacity: 0.4; transform: scale(0.98); transition: opacity 0.15s, transform 0.15s; pointer-events: none; }

/* Formulaires en assistant « un champ à la fois » : feuille du bas (téléphone) — voir js/components/wizard.js */
.wz-haut, .wz-intro, .wz-bas { display: none; }
@media (max-width: 720px) {
  .modal-backdrop.is-wizard { padding: 0; align-items: flex-end; background: rgba(27, 26, 23, 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overflow: hidden; }
  .modal-backdrop.is-wizard .modal {
    display: flex; flex-direction: column;
    width: 100%; max-height: 92dvh; height: auto;
    border: 0; border-radius: 30px 30px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.14); backdrop-filter: none; -webkit-backdrop-filter: none;
    background: var(--color-surface); color: var(--color-text);
    padding: 0; overflow: hidden;
  }
  .modal-backdrop.is-wizard .modal__header, .modal-backdrop.is-wizard .modal__actions { display: none; }
  .modal-backdrop.is-wizard .wz-haut { display: flex; align-items: center; gap: 14px; padding: 16px 18px 4px; }
  .wz-fermer { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
  .wz-vide { width: 44px; flex: none; }
  .wz-progres { flex: 1; display: flex; gap: 5px; }
  .wz-progres i { flex: 1; height: 5px; border-radius: 9px; background: var(--color-border, #E3DED4); transition: background 0.2s; }
  .wz-progres i.d { background: #1B1A17; }
  .wz-progres i.a { background: #6B4EFF; }
  .modal-backdrop.is-wizard .wz-intro { display: block; padding: 10px 22px 0; }
  .wz-cap { display: block; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
  .modal-backdrop.is-wizard .modal h2.wz-titre { margin: 6px 0 0; font-size: 28px; line-height: 1.05; letter-spacing: -0.04em; color: var(--color-text); }

  .modal-backdrop.is-wizard .modal form { flex: 0 1 auto; min-height: 130px; overflow-y: auto; padding: 14px 22px 4px; display: block; }
  .modal-backdrop.is-wizard .modal form > .wz-off { display: none !important; }
  .modal-backdrop.is-wizard .modal form > h2, .modal-backdrop.is-wizard .modal form > h3, .modal-backdrop.is-wizard .modal form > .u-note { display: none; }
  .modal-backdrop.is-wizard .modal .form-field { margin: 0 0 18px; }
  .modal-backdrop.is-wizard .modal .form-row { display: block; }
  .modal-backdrop.is-wizard .modal .form-field--narrow { width: auto; }
  /* un seul champ : l'étiquette devient le titre → on la masque */
  .modal-backdrop.is-wizard .modal form > .form-field:not(.wz-multi) > label { display: none; }
  .modal-backdrop.is-wizard .modal .wz-multi .form-field > label { display: block; color: var(--color-text-muted); font-size: 12px; font-weight: 700; margin-bottom: 2px; }
  .modal-backdrop.is-wizard .modal .form-field input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']),
  .modal-backdrop.is-wizard .modal .form-field select,
  .modal-backdrop.is-wizard .modal .form-field textarea {
    width: 100%; box-sizing: border-box; background: transparent; color: var(--color-text); color-scheme: light dark;
    border: 0; border-bottom: 3px solid #6B4EFF; border-radius: 0; box-shadow: none;
    padding: 10px 0; font-size: 24px; font-weight: 700; line-height: 1.2; font-family: inherit;
  }
  .modal-backdrop.is-wizard .modal .wz-multi .form-field input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']),
  .modal-backdrop.is-wizard .modal .wz-multi .form-field select { font-size: 20px; border-bottom-width: 2px; border-bottom-color: var(--color-border-strong, #CFCABF); }
  .modal-backdrop.is-wizard .modal .form-field textarea { min-height: 140px; font-weight: 600; resize: none; }
  .modal-backdrop.is-wizard .modal .form-field input::placeholder, .modal-backdrop.is-wizard .modal .form-field textarea::placeholder { color: var(--color-text-faint, #B7B2A7); font-weight: 500; }

  .modal-backdrop.is-wizard .wz-bas { display: flex; gap: 10px; padding: 10px 18px calc(16px + env(safe-area-inset-bottom)); }
  .wz-retour { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
  .wz-suivant { flex: 1; height: 54px; border-radius: 999px; border: 0; background: #6B4EFF; color: #fff; font-size: 16px; font-weight: 800; font-family: inherit; cursor: pointer; }
}

/* Administratif = coffre-fort de documents */
.coffre-resume { display: flex; align-items: center; gap: 14px; background: var(--pastel-lime); color: var(--txt-encre); border-radius: 26px; padding: 16px 18px; margin-bottom: 14px; --txt-encre: #1B1A17; }
.coffre-resume[hidden] { display: none; }
.coffre-resume__ic { width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, 0.6); display: flex; align-items: center; justify-content: center; flex: none; }
.coffre-resume b { display: block; font-size: 24px; letter-spacing: -0.03em; }
.coffre-resume small { color: #4A5016; font-weight: 600; }
.coffre-liste { display: flex; flex-direction: column; gap: 8px; }
.coffre-doc { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; border-radius: 22px; background: var(--color-surface); color: var(--color-text); font-family: inherit; text-align: left; cursor: pointer; }
.coffre-doc__type { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--txt-encre); flex: none; }
.coffre-doc__texte { flex: 1; min-width: 0; }
.coffre-doc__texte b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coffre-doc__texte small { display: block; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.coffre-doc__chevron { color: var(--color-text-muted); flex: none; }
.coffre-detail { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.coffre-detail__ligne { display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 10px 14px; }
.coffre-detail__ligne small { color: rgba(255, 255, 255, 0.6); }
.coffre-detail__actions .btn { text-decoration: none; text-align: center; }

/* Filtres (Devis, Facturation, Suivi) : feuille blanche courte, pastilles multi-lignes */
.modal-backdrop--filtres { background: rgba(27, 26, 23, 0.35); }
.modal-backdrop--filtres .modal {
  background: var(--color-surface); color: var(--color-text); backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12); border-radius: 30px 30px 0 0; padding-top: 22px;
}
.modal-backdrop--filtres .modal::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--color-border, #D4CFC4); margin: -12px auto 12px; }
.modal-backdrop--filtres .modal__header h2 { color: var(--color-text); }
.modal-backdrop--filtres .modal__header [data-close] { background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); }
.modal-backdrop--filtres .statut-liste { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.modal-backdrop--filtres .statut-liste__ligne { border: 0; border-radius: 999px; padding: 10px 14px; gap: 8px; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-size: 13px; font-weight: 700; }
.modal-backdrop--filtres .statut-liste__ligne.is-actif { background: #1B1A17; color: #fff; }
.modal-backdrop--filtres .statut-liste__ligne.is-actif::after { content: none; }
.modal-backdrop--filtres .statut-liste__ligne i { width: 9px; height: 9px; }
.modal-backdrop--filtres .statut-liste__titre { margin: 14px 2px 8px; color: var(--color-text-muted); }
.filtres-actions { display: none; }
.modal-backdrop--filtres .filtres-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-backdrop--filtres .filtres-actions .btn { flex: 1; height: 50px; border-radius: 999px; font-weight: 700; }
.modal-backdrop--filtres .filtres-actions .btn--primary { background: #6B4EFF; color: #fff; }
.modal-backdrop--filtres .statut-liste__ligne i[style*="#FFFFFF"] { display: none; }

/* Devis : mode d'encaissement (cartes-radio) et démarrage d'abonnement (plein écran lime) — téléphone */
.slide-zone, .ab-titre, .roue-jours { display: none; }
.slide { position: relative; display: flex; align-items: center; height: 60px; border-radius: 999px; padding: 5px; background: #1B1A17; overflow: hidden; touch-action: none; }
.slide__fill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: 0; border-radius: 999px; background: rgba(220, 240, 110, 0.25); }
.slide__label { position: relative; flex: 1; text-align: center; padding-left: 44px; color: #fff; font-size: 14px; font-weight: 700; pointer-events: none; }
.slide__handle { position: absolute; top: 5px; left: 5px; width: 50px; height: 50px; border-radius: 50%; background: #DCF06E; color: var(--txt-encre); display: flex; align-items: center; justify-content: center; cursor: grab; --txt-encre: #1B1A17; }
@media (max-width: 720px) {
  .modal-backdrop--enc .modal, .modal-backdrop--abo .modal { background: var(--color-surface); color: var(--color-text); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
  .modal-backdrop--enc .modal { border-radius: 30px 30px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12); }
  .modal-backdrop--enc .modal__header h2 { color: var(--color-text); }
  .modal-backdrop--enc .modal__header [data-close] { background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); }
  .modal-backdrop--enc .modal__actions, .modal-backdrop--abo .modal__actions { display: none; }
  .modal-backdrop--enc .slide-zone, .modal-backdrop--abo .slide-zone { display: block; margin-top: 16px; }

  #encaissement-mode-tabs { width: 100%; display: flex; flex-direction: column; gap: 8px; background: none; padding: 0; box-shadow: none; overflow: visible; }
  #encaissement-mode-tabs button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 2px solid var(--color-border, #EDEAE3); border-radius: 20px; background: none; color: var(--color-text); font-family: inherit; font-size: 15px; }
  #encaissement-mode-tabs button > span:first-child { flex: 1; }
  #encaissement-mode-tabs button b { display: block; font-size: 15px; }
  #encaissement-mode-tabs button small { display: block; font-size: 12px; font-weight: 500; color: var(--color-text-muted); }
  #encaissement-mode-tabs button.active { border-color: #6B4EFF; background: rgba(107, 78, 255, 0.08); }
  #encaissement-mode-tabs button.active::after { content: none; }
  #encaissement-mode-tabs .fr { display: flex; gap: 4px; }
  #encaissement-mode-tabs .fr i { width: 16px; height: 16px; border-radius: 50%; background: #CFCABF; }
  #encaissement-mode-tabs button.active .fr i { background: #6B4EFF; }
  .modal-backdrop--enc #echeances-table { width: 100%; }
  .modal-backdrop--enc .modal .form-field input { background: var(--color-surface-hollow, #F5F2EC); color: var(--color-text); border: 0; border-radius: 12px; }
  .modal-backdrop--enc .u-note { color: var(--color-text-muted); }

  .modal-backdrop--abo { padding: 0; align-items: stretch; background: #DCF06E; backdrop-filter: none; overflow: hidden; --txt-encre: #1B1A17; }
  .modal-backdrop--abo .modal { display: flex; flex-direction: column; width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; background: #DCF06E; color: var(--txt-encre); padding: calc(16px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; --txt-encre: #1B1A17; }
  .modal-backdrop--abo .modal__header { order: 0; margin: 0; }
  .modal-backdrop--abo .modal__header h2 { display: none; }
  .modal-backdrop--abo .modal__header [data-close] { background: rgba(0, 0, 0, 0.1); color: var(--txt-encre); }
  .modal-backdrop--abo .ab-titre { display: block; order: 1; margin: auto 0 20px; font-size: 52px; line-height: 0.95; letter-spacing: -0.04em; color: var(--txt-encre); }
  .modal-backdrop--abo .ab-titre u { text-decoration: none; background: #1B1A17; color: #DCF06E; padding: 0 10px; border-radius: 16px; display: inline-block; margin-top: 4px; }
  .modal-backdrop--abo .form-row { order: 2; display: block; }
  .modal-backdrop--abo .form-field label { color: #4A5016; font-size: 13px; font-weight: 700; }
  .modal-backdrop--abo .form-field input { background: rgba(255, 255, 255, 0.55); color: var(--txt-encre); border: 0; border-radius: 14px; font-weight: 700; color-scheme: light; }
  .modal-backdrop--abo #ab-devis-jour { display: none; }
  .modal-backdrop--abo .roue-jours { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
  .modal-backdrop--abo .roue-jours i { font-style: normal; flex: none; min-width: 44px; text-align: center; padding: 12px 0; border-radius: 14px; background: rgba(255, 255, 255, 0.55); font-weight: 700; cursor: pointer; }
  .modal-backdrop--abo .roue-jours i.a { background: #1B1A17; color: #DCF06E; }
  .modal-backdrop--abo .slide-zone { order: 3; margin-top: 24px; }
}

/* Composer de mail : plein écran façon app Mail (téléphone) */
.mail-envoi, .c-cc-toggle, .pj-ajout, .pj-liste { display: none; }
@media (max-width: 720px) {
  .modal-backdrop--mail { padding: 0; align-items: stretch; background: var(--color-surface); backdrop-filter: none; overflow: hidden; }
  .modal-backdrop--mail .modal { display: flex; flex-direction: column; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; background: var(--color-surface); color: var(--color-text); padding: 0; overflow: hidden; }
  .modal-backdrop--mail .modal__header { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: calc(14px + env(safe-area-inset-top)) 16px 10px; }
  .modal-backdrop--mail .modal__header h2 { order: 1; flex: 1; text-align: center; font-size: 16px; color: var(--color-text); }
  .modal-backdrop--mail .modal__header [data-close] { order: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-size: 0; position: relative; }
  .modal-backdrop--mail .modal__header [data-close]::before { content: '✕'; font-size: 16px; position: absolute; inset: 0; display: grid; place-items: center; }
  .modal-backdrop--mail .mail-envoi { order: 2; display: flex; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #6B4EFF; color: #fff; align-items: center; justify-content: center; cursor: pointer; }
  .modal-backdrop--mail form { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
  .modal-backdrop--mail .modal__actions { display: none; }
  .modal-backdrop--mail .modal form .form-field { display: flex; flex-direction: row; flex-wrap: nowrap; text-align: left; align-items: center; gap: 10px; margin: 0; padding: 0 18px; border-top: 1px solid var(--color-border-soft, #F0ECE4); }
  .modal-backdrop--mail .modal form .form-field > label:first-child { width: 48px; text-align: left; flex: none; margin: 0; color: var(--color-text-muted); font-size: 13px; }
  .modal-backdrop--mail .modal .form-field input[type='text'] { text-align: left; flex: 1; min-width: 0; border: 0; background: transparent; color: var(--color-text); padding: 14px 0; font-size: 16px; font-weight: 600; box-shadow: none; border-radius: 0; }
  .modal-backdrop--mail .modal form #c-cc-champ { display: none; }
  .modal-backdrop--mail .modal form #c-cc-champ.is-visible { display: flex; }
  .modal-backdrop--mail .c-cc-toggle { display: block; flex: none; border: 0; background: none; color: #6B4EFF; font-weight: 700; font-size: 13px; cursor: pointer; }
  .modal-backdrop--mail .modal form .form-field:has(textarea) { flex: 1; align-items: stretch; min-height: 160px; }
  .modal-backdrop--mail .form-field:has(textarea) > label { display: none; }
  .modal-backdrop--mail .modal .form-field textarea { flex: 1; font-family: inherit; width: 100%; border: 0; background: transparent; color: var(--color-text); padding: 14px 0; font-size: 16px; line-height: 1.45; resize: none; box-shadow: none; }
  .modal-backdrop--mail .modal form .form-field:has(#c-pieces) { flex-wrap: wrap; padding-top: 10px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-backdrop--mail #c-pieces, .modal-backdrop--mail .form-field:has(#c-pieces) > label:first-child { display: none; }
  .modal-backdrop--mail .pj-ajout { display: inline-flex; background: var(--color-ink, #1B1A17); color: #DCF06E; border-radius: 999px; padding: 9px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }
  .modal-backdrop--mail .pj-liste { display: flex; flex-wrap: wrap; gap: 6px; }
  .pj-chip { background: var(--color-surface-hollow, #EDEAE3); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; }
  .modal-backdrop--mail .form-field#c-transfert { padding-top: 8px; padding-bottom: 8px; }
}

/* Assistant — barre de total et blocs spécifiques du devis */
.wz-total { display: none; }
@media (max-width: 720px) {
  .modal-backdrop.is-wizard .wz-total { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 22px 0; border-top: 1px solid var(--color-border-soft, #F0ECE4); }
  .wz-total small { font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
  .wz-total b { font-size: 18px; letter-spacing: -0.02em; }
  .modal-backdrop.is-wizard .wz-total + .wz-bas { padding-top: 8px; }
  /* Type de devis : deux grosses pastilles */
  .modal-backdrop.is-wizard #d-type-tabs { display: flex; flex-direction: column; gap: 10px; background: none; padding: 0; box-shadow: none; overflow: visible; }
  .modal-backdrop.is-wizard #d-type-tabs button { width: 100%; padding: 20px; border-radius: 22px; border: 2px solid var(--color-border, #EDEAE3); background: none; color: var(--color-text); font-size: 20px; font-weight: 800; text-align: left; font-family: inherit; }
  .modal-backdrop.is-wizard #d-type-tabs button.active { border-color: #6B4EFF; background: rgba(107, 78, 255, 0.08); }
  .modal-backdrop.is-wizard #d-type-tabs button.active::after { content: none; }
  /* Lignes : cartes compactes, champs à taille normale */
  .modal-backdrop.is-wizard #lignes-list .ligne-item { background: var(--color-surface-hollow, #F5F2EC); border-radius: 18px; padding: 12px; margin-bottom: 10px; }
  .modal-backdrop.is-wizard #lignes-list input, .modal-backdrop.is-wizard #lignes-list select, .modal-backdrop.is-wizard #lignes-list textarea {
    font-size: 16px !important; font-weight: 600 !important; border: 0 !important; border-radius: 12px !important; padding: 10px 12px !important; background: var(--color-surface) !important; color: var(--color-text) !important;
  }
  .modal-backdrop.is-wizard #lignes-list label { display: block !important; font-size: 11px; margin-top: 6px; }
  .modal-backdrop.is-wizard #btn-add-ligne { width: 100%; height: 50px; border-radius: 999px; background: none; border: 2px dashed #6B4EFF; color: #6B4EFF; font-weight: 700; }
}
@media (max-width: 720px) {
  .modal-backdrop.is-wizard #lignes-list .ligne-item__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; }
  .modal-backdrop.is-wizard #lignes-list .ligne-item__row > .form-field { margin: 0; min-width: 0; }
  .modal-backdrop.is-wizard #lignes-list .ligne-item__row > .form-field:nth-child(1), .modal-backdrop.is-wizard #lignes-list .ligne-item__row > .form-field:nth-child(2) { grid-column: 1 / -1; }
  .modal-backdrop.is-wizard #lignes-list .ligne-item__remove { position: absolute; top: -4px; right: -4px; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: rgba(232, 85, 78, 0.12); color: #E8554E; }
  .modal-backdrop.is-wizard #lignes-list .form-field { margin: 0 0 8px; }
  .modal-backdrop.is-wizard #lignes-list label { color: var(--color-text-muted) !important; font-weight: 700; }
  .modal-backdrop.is-wizard #lignes-list .ligne-item__desc textarea { min-height: 70px !important; }
}

/* Coffre-fort : aperçu d'un document (feuille stylisée) dans le visualiseur commun */
.coffre-apercu { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; padding: 20px 34px; }
.coffre-apercu__feuille { width: 100%; max-width: 280px; aspect-ratio: 3 / 4; background: var(--surf-blanc); color: var(--txt-encre); border-radius: 14px; transform: rotate(-2deg); box-shadow: 0 18px 40px rgba(20, 10, 80, 0.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; --txt-encre: var(--txt-neutre); }
.coffre-apercu__type { width: 84px; height: 84px; border-radius: 28px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.coffre-apercu__feuille b { font-size: 15px; word-break: break-word; }
.coffre-apercu__feuille small { color: var(--color-text-muted); }
.doc-infos-card .coffre-detail__ligne { background: transparent; padding: 10px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.doc-infos-card .coffre-detail__ligne small { color: var(--color-text-muted); }
a.doc-action-btn { text-decoration: none; }

/* Catégories du calendrier (design C : cartes colorées) */
.cat-form[hidden] { display: none; }
.cat-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cat-carte { border: 0; border-radius: 24px; padding: 16px; min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; text-align: left; font-family: inherit; }
.cat-carte b { font-size: 18px; letter-spacing: -0.02em; line-height: 1.1; word-break: break-word; }
.cat-carte small { color: rgba(255, 255, 255, 0.8); font-size: 12px; font-weight: 700; }
.cat-carte--add { background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.cat-carte--add span { font-size: 34px; line-height: 1; font-weight: 300; }
.cat-carte--add small { color: var(--color-text); }
.cat-palette { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.cat-palette__c { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; }
.cat-palette__c.is-actif { border-color: var(--color-text); }
.modal-backdrop--cat .modal { background: var(--color-surface); color: var(--color-text); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12); }
.modal-backdrop--cat .modal__header h2, .modal-backdrop--cat .modal .form-field label { color: var(--color-text); }
.modal-backdrop--cat .modal__header [data-close] { background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); }
.modal-backdrop--cat .modal .form-field input[type='text'] { background: var(--color-surface-hollow, #F5F2EC); color: var(--color-text); border: 0; }
.modal-backdrop--cat #cat-couleur { display: none; }
.modal-backdrop--cat .form-field--narrow { display: none; }

/* Widgets du dashboard (design C) : carrousel plein écran — téléphone */
.wg-enregistrer, .wg-dots, .wg-dock { display: none; }
@media (max-width: 720px) {
  .modal-backdrop--widgets { padding: 0; align-items: stretch; background: #DCF06E; backdrop-filter: none; overflow: hidden; --txt-encre: #1B1A17; }
  .modal-backdrop--widgets .modal { display: flex; flex-direction: column; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; background: #DCF06E; color: var(--txt-encre); padding: 0; overflow: hidden; --txt-encre: #1B1A17; }
  .modal-backdrop--widgets .modal__header { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: calc(14px + env(safe-area-inset-top)) 16px 8px; }
  .modal-backdrop--widgets .modal__header h2 { flex: 1; text-align: center; font-size: 16px; color: var(--txt-encre); }
  .modal-backdrop--widgets .modal__header [data-close] { order: -1; background: rgba(0, 0, 0, 0.1); color: var(--txt-encre); }
  .modal-backdrop--widgets .wg-enregistrer { display: block; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-weight: 800; font-size: 13px; padding: 11px 16px; font-family: inherit; cursor: pointer; }
  .modal-backdrop--widgets .modal__actions { display: none; }
  .modal-backdrop--widgets .widget-preview-grid { flex: 1; min-height: 0; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px 0; }
  .modal-backdrop--widgets .widget-preview-grid::-webkit-scrollbar { display: none; }
  .modal-backdrop--widgets .widget-preview-card { flex: 0 0 100%; scroll-snap-align: center; box-sizing: border-box; margin: 0 24px; flex-basis: calc(100% - 48px); background: var(--surf-blanc); color: var(--txt-encre); border: 3px solid transparent; border-radius: 30px; display: flex; flex-direction: column; padding: 22px; --txt-encre: var(--txt-neutre); }
  .modal-backdrop--widgets .widget-preview-card.is-selected { border-color: #6B4EFF; background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
  .modal-backdrop--widgets .widget-preview-card__mini { flex: 1; zoom: 2.1; display: flex; flex-direction: column; justify-content: center; }
  .modal-backdrop--widgets .widget-preview-card__titre { font-size: 18px; color: var(--txt-encre); }
  .modal-backdrop--widgets .widget-preview-card__page { color: var(--color-text-muted); }
  .modal-backdrop--widgets .wg-dots { display: flex; justify-content: center; gap: 5px; margin: 6px 0; }
  .wg-dots i { width: 6px; height: 6px; border-radius: 9px; background: rgba(0, 0, 0, 0.22); }
  .wg-dots i.on { background: #6B4EFF; }
  .wg-dots i.a { width: 20px; background: #1B1A17; }
  .wg-dots i.a.on { background: #6B4EFF; }
  .modal-backdrop--widgets .wg-dock { display: block; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); }
  .wg-toggle { width: 100%; height: 58px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-size: 15px; font-weight: 800; font-family: inherit; cursor: pointer; }
  .wg-toggle.is-retirer { background: rgba(27, 26, 23, 0.12); color: var(--txt-encre); }
}

/* Notifications (Paramètres) — design A : carte d'état + interrupteurs à icônes colorées (téléphone) */
.push-aide summary { cursor: pointer; font-weight: 700; font-size: 13px; padding: 12px 0; }
.push-aide:has(> p[hidden]) { display: none; }
@media (max-width: 720px) {
  .modal-backdrop--notifs { padding: 0; align-items: flex-end; background: rgba(27, 26, 23, 0.35); backdrop-filter: none; overflow: hidden; }
  .modal-backdrop--notifs .modal { display: flex; flex-direction: column; width: 100%; max-width: none; height: auto; max-height: 90dvh; border: 0; border-radius: 30px 30px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12); backdrop-filter: none; background: var(--color-surface); color: var(--color-text); padding: 22px 0 calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
  .modal-backdrop--notifs .modal::before { content: ''; display: block; flex: none; width: 40px; height: 5px; border-radius: 9px; background: var(--color-border, #D4CFC4); margin: -12px auto 12px; }
  .modal-backdrop--notifs .modal__header { display: flex; align-items: center; margin: 0; padding: 0 18px 8px; }
  .modal-backdrop--notifs .modal__header h2 { flex: 1; text-align: left; font-size: 18px; color: var(--color-text); }
  .modal-backdrop--notifs .modal__header [data-close] { width: 42px; height: 42px; border-radius: 50%; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); }
  .modal-backdrop--notifs .push-status { margin: 4px 16px 10px; padding: 16px; border-radius: 24px; background: var(--pastel-lime); color: var(--txt-encre); display: flex; align-items: center; gap: 12px; --txt-encre: #1B1A17; }
  .modal-backdrop--notifs .push-status__text { flex: 1; color: var(--txt-encre); font-weight: 800; font-size: 15px; }
  .modal-backdrop--notifs .push-status .btn { background: #1B1A17; color: #DCF06E; border: 0; border-radius: 999px; font-weight: 700; }
  .modal-backdrop--notifs .push-aide { margin: 0 16px; }
  .modal-backdrop--notifs .push-aide .u-note { color: var(--color-text-muted); }
  .modal-backdrop--notifs .u-mt-4 { margin: 4px 0 0; }
  .modal-backdrop--notifs .pref-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border: 0; }
  .modal-backdrop--notifs .pref-row::before { content: ''; width: 38px; height: 38px; border-radius: 13px; flex: none; background-repeat: no-repeat; background-position: center; background-size: 20px; }
  .modal-backdrop--notifs .pref-row > div { flex: 1; }
  .modal-backdrop--notifs .pref-row__label { color: var(--color-text); font-weight: 700; font-size: 14px; }
  .modal-backdrop--notifs .pref-row__desc { color: var(--color-text-muted); font-size: 12px; }
  .modal-backdrop--notifs .pref-toggle input:checked + .pref-toggle__track { background: #6B4EFF; }
  .modal-backdrop--notifs .pref-toggle input:checked + .pref-toggle__track::before { background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
  .modal-backdrop--notifs .pref-row:nth-of-type(1)::before { background-color: #DCD3FF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1A17' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); --txt-encre: #1B1A17; }
  .modal-backdrop--notifs .pref-row:nth-of-type(2)::before { background-color: #DCF06E; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1A17' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l3 2M9 3h6'/%3E%3C/svg%3E"); --txt-encre: #1B1A17; }
  .modal-backdrop--notifs .pref-row:nth-of-type(3)::before { background-color: #F4A56B; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1A17' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7zM14 3v5h5'/%3E%3C/svg%3E"); --txt-encre: #1B1A17; }
  .modal-backdrop--notifs .pref-row:nth-of-type(4)::before { background-color: #CFE9DD; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1A17' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8l8-4 8 4v8l-8 4-8-4zM4 8l8 4 8-4M12 12v8'/%3E%3C/svg%3E"); --txt-encre: #1B1A17; }
  .modal-backdrop--notifs .pref-row:nth-of-type(5)::before { background-color: #FBD9C4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1A17' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); --txt-encre: #1B1A17; }
}

/* Rappels (téléphone) : deux onglets, une section à la fois */
#rappels-tabs { display: none; }
@media (max-width: 720px) {
  #rappels-tabs { display: flex; }
  #rappels-page[data-vue='perso'] .dk-card--rules { display: none; }
  #rappels-page[data-vue='auto'] .dk-col:first-child .rappel-list, #rappels-page[data-vue='auto'] #rappels-empty { display: none; }
  #rappels-page .notif-panel__soustitre--espace { display: none; }
}

/* Échéances comptables : fiche « assistant » (explication, étapes, organisme) */
.fiche-assist { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.fiche-assist__bloc { background: var(--color-surface-hollow, #F5F2EC); border-radius: 18px; padding: 12px 14px; }
.fiche-assist small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--color-text-muted); }
.fiche-assist__bloc p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; }
.fiche-assist__etape { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; font-size: 13.5px; line-height: 1.35; }
.fiche-assist__etape i { width: 22px; height: 22px; border-radius: 50%; background: #1B1A17; color: #DCF06E; font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.fiche-assist ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.fiche-assist__org { display: flex; align-items: center; gap: 10px; background: #1B1A17; color: #fff; border-radius: 18px; padding: 12px 14px; }
.fiche-assist__org > div { flex: 1; min-width: 0; }
.fiche-assist__org b { display: block; font-size: 13.5px; }
.fiche-assist__org small { color: #AAA49A; letter-spacing: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche-assist__go { width: 36px; height: 36px; border-radius: 50%; background: #DCF06E; color: var(--txt-encre); display: flex; align-items: center; justify-content: center; font-weight: 800; text-decoration: none; flex: none; --txt-encre: #1B1A17; }

/* Fiche plein écran d'une échéance comptable (téléphone) */
.fiche-ech { padding: 0; align-items: stretch; background: var(--color-surface); backdrop-filter: none; overflow: hidden; }
.fiche-ech__page { width: 100%; height: 100%; overflow-y: auto; box-sizing: border-box; padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; color: var(--color-text); transform: translateY(24px); transition: transform 0.3s ease; }
.fiche-ech.is-open .fiche-ech__page { transform: none; }
.fiche-ech__haut { display: flex; align-items: center; gap: 12px; }
.fiche-ech__haut small { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--color-text-muted); }
.fiche-ech__fermer { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-size: 15px; cursor: pointer; flex: none; }
.fiche-ech__titre { margin: 4px 0 0; font-size: 32px; line-height: 1; letter-spacing: -0.04em; }
.fiche-ech__pastille { align-self: flex-start; font-size: 12px; font-weight: 800; background: #DCF06E; color: var(--txt-encre); border-radius: 999px; padding: 6px 12px; --txt-encre: #1B1A17; }
.fiche-ech__pastille.is-fait { background: #CFE9DD; --txt-encre: #1B1A17; }
.fiche-ech__bloc, .fiche-ech__chiffres { background: var(--color-surface-hollow, #F5F2EC); border-radius: 20px; padding: 14px; }
.fiche-ech small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--color-text-muted); }
.fiche-ech__bloc p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; }
.fiche-ech__etape { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 14px; line-height: 1.4; }
.fiche-ech__etape i { width: 22px; height: 22px; border-radius: 50%; background: #1B1A17; color: #DCF06E; font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.fiche-ech__bloc ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.fiche-ech__chiffres[hidden] { display: none; }
.fiche-ech__chiffre { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.fiche-ech__chiffre span { flex: 1; color: var(--color-text-muted); }
.fiche-ech__chiffre b { font-size: 15px; letter-spacing: -0.02em; }
.fiche-ech__chiffre button { border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 11px; font-weight: 800; padding: 6px 10px; cursor: pointer; min-width: 62px; }
.fiche-ech__chiffres p { margin: 10px 0 0; font-size: 11.5px; color: var(--color-text-muted); }
.fiche-ech__org { display: flex; align-items: center; gap: 12px; background: #1B1A17; color: #fff; border-radius: 20px; padding: 14px; }
.fiche-ech__org > div { flex: 1; min-width: 0; }
.fiche-ech__org b { display: block; font-size: 14px; }
.fiche-ech__org small { color: #AAA49A; letter-spacing: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche-ech__go { width: 38px; height: 38px; border-radius: 50%; background: #DCF06E; color: var(--txt-encre); display: flex; align-items: center; justify-content: center; flex: none; --txt-encre: #1B1A17; }
.fiche-ech__modifier { align-self: center; border: 0; background: none; color: var(--color-text-muted); font-family: inherit; font-weight: 700; font-size: 13px; padding: 6px; cursor: pointer; }
.fiche-ech__bas { margin-top: auto; position: sticky; bottom: 0; padding-top: 8px; background: linear-gradient(to bottom, transparent, var(--color-surface) 30%); }
.fiche-ech__bas .slide { background: #6B4EFF; }
.fiche-ech__bas .slide__handle { background: var(--surf-blanc); color: #6B4EFF; --txt-encre: var(--txt-neutre); }
.fiche-ech__bas .slide__fill { background: rgba(255, 255, 255, 0.22); }
.fiche-ech__rouvrir { width: 100%; height: 56px; border: 0; border-radius: 999px; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }

/* Choix des widgets : aperçu réel (copie du widget de l'accueil) */
.widget-reel { pointer-events: none; user-select: none; }
.widget-reel > * { margin: 0 !important; width: 100%; box-sizing: border-box; }
.widget-preview-card__mini .widget-reel { zoom: 0.5; }
@media (max-width: 720px) {
  .modal-backdrop--widgets .widget-preview-card { padding: 10px; }
  .modal-backdrop--widgets .widget-preview-card__mini { zoom: 1; overflow-y: auto; align-items: stretch; justify-content: flex-start; padding: 4px 0; }
  .modal-backdrop--widgets .widget-preview-card__mini .widget-reel { zoom: 1; }
  .modal-backdrop--widgets .widget-preview-card__footer { padding: 6px 8px 2px; }
}
.widget-reel { color: var(--color-text); }
.widget-reel :is(h2, h3, h4) { color: var(--color-text); }
.widget-reel :is(.list-row__meta, .u-note) { color: var(--color-text-muted); }
@media (max-width: 720px) { .modal-backdrop--widgets .widget-preview-card__mini { justify-content: center; } }
@media (max-width: 720px) {
  /* Carrousel des widgets : pas de carte blanche, le widget réel est simplement centré à l'écran. */
  .modal-backdrop--widgets .widget-preview-card, .modal-backdrop--widgets .widget-preview-card.is-selected { background: transparent; border: 0; box-shadow: none; padding: 0 16px; justify-content: center; }
  .modal-backdrop--widgets .widget-preview-card__footer { display: none; }
  .modal-backdrop--widgets .widget-preview-card__mini { flex: 0 1 auto; overflow: visible; background: transparent; padding: 0; height: auto; max-height: 100%; }
  .modal-backdrop--widgets .widget-preview-card__coche { top: 6px; right: 22px; }
  .modal-backdrop--widgets .widget-preview-card.is-selected::before { content: "Sur l'accueil"; align-self: center; margin-bottom: 14px; font-size: 12px; font-weight: 800; background: #1B1A17; color: #DCF06E; border-radius: 999px; padding: 6px 12px; }
  .modal-backdrop--widgets .widget-preview-card:not(.is-selected)::before { content: 'Pas affiché'; align-self: center; margin-bottom: 14px; font-size: 12px; font-weight: 800; background: rgba(27, 26, 23, 0.12); color: var(--txt-encre); border-radius: 999px; padding: 6px 12px; }
  .modal-backdrop--widgets .widget-preview-card:not(.is-selected) .widget-reel { opacity: 0.55; }
  .modal-backdrop--widgets .widget-preview-card__coche { display: none; }
}

@media (max-width: 720px) {
  .modal-backdrop--widgets .widget-preview-card.is-selected::before { content: "✓ Sur l'accueil · touchez pour retirer"; }
  .modal-backdrop--widgets .widget-preview-card:not(.is-selected)::before { content: 'Touchez pour ajouter à l\'accueil'; }
  .modal-backdrop--widgets .widget-preview-card { cursor: pointer; }
  .modal-backdrop--widgets .widget-preview-grid { padding-bottom: 0; }
}
@media (max-width: 720px) {
  /* Contour noir autour du widget : plein = affiché sur l'accueil, pointillé = pas affiché */
  .modal-backdrop--widgets .widget-reel > * { outline: 3px solid #1B1A17; outline-offset: 3px; }
  .modal-backdrop--widgets .widget-preview-card:not(.is-selected) .widget-reel > * { outline-style: dashed; }
  .modal-backdrop--widgets .widget-preview-card:not(.is-selected) .widget-reel { opacity: 0.7; }
}

/* Connexion réussie : animation plein écran */
.login-anim { position: fixed; inset: 0; z-index: 1000; overflow: hidden; pointer-events: all; }
.login-anim__fond { position: absolute; inset: 0; background: #DCF06E; clip-path: circle(0 at var(--ox, 50%) var(--oy, 70%)); transition: clip-path 0.75s cubic-bezier(0.7, 0, 0.2, 1); --txt-encre: #1B1A17; }
.login-anim.is-on .login-anim__fond { clip-path: circle(150% at var(--ox, 50%) var(--oy, 70%)); }
.login-anim__centre { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 0 24px; text-align: center; }
.login-anim__logo { position: relative; width: 108px; height: 108px; border-radius: 34px; background: #1B1A17; color: #DCF06E; display: flex; align-items: center; justify-content: center; font-size: 74px; font-weight: 800; letter-spacing: -0.06em; line-height: 1; opacity: 0; scale: 0.3; rotate: -14deg; }
.login-anim__logo span { margin-top: -6px; }
.login-anim__logo i { position: absolute; right: 22px; bottom: 24px; width: 14px; height: 14px; border-radius: 50%; background: #6B4EFF; }
.login-anim.is-on .login-anim__logo { animation: login-logo 0.7s 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes login-logo { 0% { opacity: 0; scale: 0.3; rotate: -14deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; } }
.login-anim__texte { display: flex; flex-wrap: wrap; justify-content: center; font-size: 46px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: var(--txt-encre); }
.login-anim__texte span, .login-anim__texte b { display: inline-block; opacity: 0; translate: 0 26px; }
.login-anim__texte b { color: #6B4EFF; }
.login-anim.is-on .login-anim__texte span { animation: login-lettre 0.4s calc(0.85s + var(--i) * 0.04s) cubic-bezier(0.2, 1, 0.3, 1) forwards; }
.login-anim.is-on .login-anim__texte b { animation: login-lettre 0.4s 1.35s cubic-bezier(0.2, 1.5, 0.3, 1) forwards; }
@keyframes login-lettre { to { opacity: 1; translate: 0 0; } }
.login-anim.is-reduit .login-anim__fond { transition: none; }
.login-anim.is-reduit .login-anim__logo, .login-anim.is-reduit .login-anim__texte span, .login-anim.is-reduit .login-anim__texte b { animation: none !important; opacity: 1; scale: 1; rotate: 0deg; translate: 0 0; }

/* Comptabilité : sélecteur de période (année + mois) */
.periode-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 16px; background: var(--color-surface); color: var(--color-text); font-family: inherit; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; cursor: pointer; flex: none; }
.periode-btn svg { color: var(--color-text-muted); }
.per-annee { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.per-annee b { font-size: 30px; letter-spacing: -0.04em; }
.per-annee button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-size: 22px; line-height: 1; cursor: pointer; }
.per-annee button:disabled { opacity: 0.3; cursor: default; }
.per-toute { width: 100%; border: 0; border-radius: 999px; padding: 13px; margin-bottom: 12px; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.per-toute.is-actif, .per-mois__m.is-actif { background: #1B1A17; color: #fff; }
.per-mois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.per-mois__m { border: 0; border-radius: 18px; padding: 16px 0; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; position: relative; }
.per-mois__m.is-courant::after { content: ''; position: absolute; top: 8px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: #6B4EFF; }
.per-mois__m.is-actif.is-courant::after { background: #DCF06E; --txt-encre: #1B1A17; }

/* Période : simple icône ronde à droite du titre (remplace la barre pleine largeur) */
.circle-btn.periode-btn { width: 46px; height: 46px; padding: 0; justify-content: center; background: var(--color-surface); color: var(--color-text); position: relative; flex: none; }
.circle-btn.periode-btn svg { color: inherit; }
.circle-btn.periode-btn.is-modifie::after { content: ''; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #6B4EFF; border: 2px solid var(--color-surface); }

/* Charges : liste par mois + fiche (téléphone) */
.charges-liste-m { display: none; }
.modal-backdrop--filtres .cf-libelle { margin: 4px 0 0; font-size: 17px; font-weight: 700; }
.cf-montant { font-size: 46px; font-weight: 800; letter-spacing: -0.05em; margin: 6px 0 14px; }
.cf-kv { display: flex; gap: 8px; }
.cf-kv > div { flex: 1; background: var(--color-surface-hollow, #F5F2EC); border-radius: 14px; padding: 10px 12px; }
.cf-kv small { display: block; font-size: 11px; color: var(--color-text-muted); }
.cf-kv b { font-size: 14px; }
.cf-kv b.is-oui { color: #2C8A5B; }
.modal-backdrop--filtres .filtres-actions .btn--danger { background: #FBD9D6; color: #E8554E; border: 0; --txt-encre: #1B1A17; }
@media (max-width: 720px) {
  .charges-table-bureau { display: none; }
  .charges-liste-m { display: flex; flex-direction: column; gap: 8px; }
  .chm-titre { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 4px 0; }
  .chm-titre b { font-size: 11px; letter-spacing: 0.08em; color: var(--color-text-muted); }
  .chm-titre small { font-size: 13px; font-weight: 800; color: var(--color-text); }
  .chm-ligne { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 18px; padding: 12px 14px; background: var(--color-surface); color: var(--color-text); font-family: inherit; text-align: left; cursor: pointer; }
  .chm-ligne__texte { flex: 1; min-width: 0; }
  .chm-ligne__texte b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chm-ligne__texte small { display: block; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
  .chm-ligne__montant { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; flex: none; }
}

.chm-ligne__icone, .cf-icone { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--txt-encre); flex: none; }
.cf-tete { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.cf-tete .cf-libelle { margin: 0; }
.cf-icone { width: 48px; height: 48px; border-radius: 16px; }

/* Communication : sous-pages Aujourd'hui / Calendrier / Clients / Contenus */
#com-tabs { overflow-x: auto; scrollbar-width: none; }
.com-hero { background: #DCF06E; color: var(--txt-encre); border-radius: 28px; padding: 18px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; --txt-encre: #1B1A17; }
.com-hero small { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #4A5016; }
.com-hero h2 { margin: 0; font-size: 28px; line-height: 1.02; letter-spacing: -0.04em; }
.com-hero__pastille { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 6px 12px; }
.com-hero__pastille svg { width: 16px; height: 16px; }
.com-hero__bas { margin-top: 8px; }
.com-hero__fiche { align-self: center; border: 0; background: none; color: #4A5016; font-family: inherit; font-weight: 700; font-size: 12px; cursor: pointer; padding: 2px; }
.com-hero--calme { background: var(--color-surface); }
.com-hero--calme small { color: var(--color-text-muted); letter-spacing: 0; font-weight: 600; font-size: 13px; }
.com-section { margin: 16px 4px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--color-text-muted); }
.com-jour-sep { margin: 10px 4px 4px; font-size: 13px; font-weight: 800; }
.com-ligne { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 20px; padding: 12px; margin-bottom: 8px; background: var(--color-surface); color: var(--color-text); font-family: inherit; text-align: left; cursor: pointer; }
.com-ligne.is-fait { opacity: 0.55; }
.com-ligne.is-fait b { text-decoration: line-through; }
.com-ligne__ic { width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.com-ligne__txt { flex: 1; min-width: 0; }
.com-ligne__txt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.com-ligne__txt small { display: block; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.com-ligne__ok { color: #6B4EFF; font-weight: 800; }
.com-vide { text-align: center; color: var(--color-text-muted); font-size: 13px; padding: 14px 0; }
.com-ajout { width: 100%; border: 2px dashed #6B4EFF; background: none; color: #6B4EFF; border-radius: 999px; padding: 12px; font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; margin-top: 4px; }

.com-mois { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.com-mois b { font-size: 22px; letter-spacing: -0.03em; }
.com-mois button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--color-surface); color: var(--color-text); font-size: 20px; line-height: 1; cursor: pointer; }
.com-grille-semaine, .com-grille { display: grid; grid-template-columns: repeat(7, 1fr); }
.com-grille-semaine { padding: 0 10px; text-align: center; font-size: 11px; font-weight: 700; color: var(--color-text-muted); margin-bottom: 4px; }
.com-grille { gap: 4px; background: var(--color-surface); border-radius: 24px; padding: 10px; }
.com-case { border: 0; background: none; border-radius: 14px; padding: 8px 0 4px; font-family: inherit; color: var(--color-text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; min-height: 44px; }
.com-case.is-auj span { color: #6B4EFF; }
.com-case.is-sel { background: #1B1A17; color: #fff; }
.com-case.is-sel span { color: #fff; }
.com-case em { display: flex; gap: 3px; height: 6px; }
.com-case u { width: 6px; height: 6px; border-radius: 50%; }
.com-grille .vide { min-height: 44px; }
.com-legende { display: flex; gap: 14px; justify-content: center; margin: 10px 0 4px; font-size: 12px; color: var(--color-text-muted); }
.com-legende i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.com-jour-titre { margin: 12px 4px 8px; font-size: 15px; font-weight: 800; }

.com-cli { display: flex; gap: 12px; width: 100%; border: 0; border-radius: 22px; padding: 14px; margin-bottom: 8px; background: var(--color-surface); color: var(--color-text); font-family: inherit; text-align: left; cursor: pointer; }
.com-cli__av { width: 44px; height: 44px; border-radius: 15px; background: #DCD3FF; color: var(--txt-encre); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; --txt-encre: #1B1A17; }
.com-cli__corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.com-cli__corps > b { font-size: 15px; }
.com-cli__corps small { font-size: 12px; color: var(--color-text-muted); }
.com-cli.sans { opacity: 0.75; }
.com-cli-l { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.com-cli-l span:first-child { width: 62px; color: var(--color-text-muted); }
.com-cli-l b { font-size: 12px; }
.com-barre { flex: 1; height: 8px; border-radius: 9px; background: var(--color-surface-hollow, #EDEAE3); display: flex; overflow: hidden; }
.com-barre .f { background: #6B4EFF; }
.com-barre .p { background: #BFB2FF; }

.com-filtres { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.com-filtres button { flex: none; border: 0; border-radius: 999px; padding: 9px 14px; font-family: inherit; font-size: 13px; font-weight: 700; background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.com-filtres button.on { background: #1B1A17; color: #fff; }
.com-mur { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.com-vignette { border: 0; border-radius: 24px; aspect-ratio: 3 / 4; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; font-family: inherit; color: var(--txt-encre); cursor: pointer; }
.com-vignette.sombre { color: #fff; }
.com-vignette__st { align-self: flex-start; font-size: 10px; font-weight: 800; background: rgba(255, 255, 255, 0.78); color: var(--txt-encre); border-radius: 999px; padding: 4px 9px; }
.com-vignette__st.fait { background: #1B1A17; color: #DCF06E; }
.com-vignette__bas b { display: block; font-size: 15px; line-height: 1.1; letter-spacing: -0.02em; }
.com-vignette__bas small { display: block; margin-top: 4px; font-size: 11px; opacity: 0.7; }

.cfi-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cfi-tete > div { flex: 1; min-width: 0; }
.cfi-tete b { display: block; font-size: 17px; }
.cfi-tete small { font-size: 12px; color: var(--color-text-muted); }
.cfi-ic { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--txt-encre); flex: none; }
.cfi-kv { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cfi-kv > div { flex: 1 1 40%; background: var(--color-surface-hollow, #F5F2EC); border-radius: 14px; padding: 10px 12px; }
.cfi-kv small, .cfi-bloc small { display: block; font-size: 11px; color: var(--color-text-muted); }
.cfi-kv b { font-size: 14px; }
.cfi-bloc { position: relative; background: var(--color-surface-hollow, #F5F2EC); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.cfi-bloc small { font-weight: 800; letter-spacing: 0.08em; }
.cfi-bloc p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; white-space: pre-wrap; padding-right: 64px; }
.cfi-copier { position: absolute; top: 10px; right: 10px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 11px; font-weight: 800; padding: 6px 10px; cursor: pointer; }
.com-fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.com-fiche-actions .btn { flex: 1 1 40%; height: 48px; border-radius: 999px; font-weight: 700; }
.com-fiche-actions .btn--primary { background: #6B4EFF; color: #fff; flex-basis: 100%; }
.com-fiche-actions .btn--danger { background: #FBD9D6; color: #E8554E; border: 0; --txt-encre: #1B1A17; }
.com-obj-aide { margin: 0 0 12px; font-size: 13px; color: var(--color-text-muted); }
.com-obj-ligne { display: flex; align-items: center; justify-content: space-between; background: var(--color-surface-hollow, #F5F2EC); border-radius: 18px; padding: 10px 14px; margin-bottom: 8px; font-weight: 700; }
.com-pas { display: flex; align-items: center; gap: 12px; }
.com-pas b { min-width: 28px; text-align: center; font-size: 20px; }
.com-pas button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--color-surface); color: var(--color-text); font-size: 20px; cursor: pointer; }
.com-fiche-actions .btn:not(.btn--primary):not(.btn--danger) { background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); border: 0; }

/* Communication : bande de la semaine (Aujourd'hui) reliée au calendrier */
.com-strip { display: flex; align-items: center; gap: 2px; background: var(--color-surface); border-radius: 24px; padding: 8px 6px; margin-bottom: 14px; }
.com-strip__nav { flex: none; width: 26px; height: 40px; border: 0; background: none; color: var(--color-text-muted); font-size: 20px; cursor: pointer; }
.com-strip__j { flex: 1; border: 0; background: none; border-radius: 16px; padding: 6px 0 4px; font-family: inherit; color: var(--color-text); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.com-strip__j small { font-size: 11px; font-weight: 700; color: var(--color-text-muted); }
.com-strip__j b { font-size: 16px; }
.com-strip__j em { display: flex; gap: 3px; height: 6px; }
.com-strip__j u { width: 6px; height: 6px; border-radius: 50%; }
.com-strip__j.is-auj b { color: #6B4EFF; }
.com-strip__j.is-sel { background: #1B1A17; color: #fff; }
.com-strip__j.is-sel b, .com-strip__j.is-sel small { color: #fff; }
.com-jour-tete { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.com-jour-tete b { font-size: 17px; letter-spacing: -0.02em; }
.com-jour-tete button { border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 12px; font-weight: 800; padding: 8px 12px; cursor: pointer; }
.com-ouvrir { width: 100%; border: 0; border-radius: 999px; padding: 14px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer; margin-top: 4px; }

/* Communication : bande de jours défilable, mois dépliable, sélecteur de mois façon Agenda */
.com-strip { display: flex; align-items: center; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 8px 0; margin-bottom: 0; }
.com-strip::-webkit-scrollbar { display: none; }
.com-strip[hidden] { display: none; }
.com-strip__j { flex: 0 0 calc(100% / 7); scroll-snap-align: center; }
.com-strip__nav { display: none; }
.com-deplier { display: flex; align-items: center; justify-content: center; width: 52px; height: 24px; margin: 4px auto 12px; border: 0; border-radius: 999px; background: var(--color-surface); color: var(--color-text-muted); cursor: pointer; }
.com-deplier svg { transition: rotate 0.2s; }
.com-deplier.is-ouvert svg { rotate: 180deg; }
.com-mois-bloc { margin-bottom: 2px; }
.com-mois-sel { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 12px; }
.com-mois-sel__titre { font-size: 22px; letter-spacing: -0.02em; }
.com-mois-sel__dots { display: flex; gap: 5px; }
.com-mois-sel__dots i { width: 6px; height: 6px; border-radius: 9px; background: var(--color-border-strong, #C8C4BA); }
.com-mois-sel__dots i.a { width: 20px; background: #6B4EFF; }
.com-mois-sel__auj { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 12px; background: var(--color-ink, #1B1A17); color: #DCF06E; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }

/* Transferts — rendu fidèle à la planche (téléphone) : une couleur par étape, carte aperçu et déplié */
.colis-pastille { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 5px 10px; flex: none; white-space: nowrap; background: var(--surf-creux); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.tr-attente .colis-pastille { background: #DCF06E; --txt-encre: #1B1A17; }
.tr-arecup .colis-pastille { background: #F4A56B; --txt-encre: #1B1A17; }
.tr-fait .colis-pastille { background: #CFE9DD; --txt-encre: #1B1A17; }
@media (max-width: 720px) {
  .colis-list { gap: 8px; }
  .colis-item { border: 0; box-shadow: none; border-radius: 22px; background: var(--surf-blanc); overflow: hidden; --txt-encre: var(--txt-neutre); }
  .colis-item.tr-arecup { box-shadow: 0 0 0 3px #F4A56B; }
  .colis-item.tr-arch { opacity: 0.85; }
  .colis-item.tr-envoi { background: #EDE8FF; --txt-encre: #1B1A17; }
  .colis-item__bandeau { padding: 12px; gap: 12px; }
  .colis-item__icone { width: 42px; height: 42px; border-radius: 14px; background: var(--surf-creux); color: var(--txt-encre); display: flex; align-items: center; justify-content: center; flex: none; --txt-encre: var(--txt-neutre); }
  .colis-item__icone svg { width: 20px; height: 20px; }
  .tr-envoi .colis-item__icone { background: #6B4EFF; color: #fff; }
  .tr-attente .colis-item__icone { background: #DCF06E; --txt-encre: #1B1A17; }
  .tr-arecup .colis-item__icone { background: #F4A56B; --txt-encre: #1B1A17; }
  .tr-fait .colis-item__icone { background: #CFE9DD; --txt-encre: #1B1A17; }
  .colis-item__titre { font-size: 14px; font-weight: 700; color: var(--txt-encre); }
  .colis-item__meta { font-size: 11px; color: var(--color-text-muted); font-weight: 400; margin-top: 2px; }
  .colis-item__chevron { display: none; }
  .colis-item__barre { display: block; height: 6px; border-radius: 9px; background: var(--surf-creux); margin: 6px 0 3px; overflow: hidden; --txt-encre: var(--txt-neutre); }
  .colis-item__barre i { display: block; height: 100%; background: #6B4EFF; border-radius: 9px; transition: width 0.2s; }
  .colis-item__barre.g i { background: #8D897F; }

  /* Déplié : plus de carte, l'en-tête disparaît, le bandeau coloré fait office de titre */
  .colis-item.is-open { background: transparent; border-radius: 0; overflow: visible; box-shadow: none; opacity: 1; }
  .colis-item.is-open .colis-item__bandeau { display: none; }
  .colis-item__detail-inner { padding: 0; display: flex; flex-direction: column; gap: 8px; }

  .colis-hero { position: relative; border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surf-creux); color: var(--txt-encre); cursor: pointer; --txt-encre: var(--txt-neutre); }
  .tr-attente .colis-hero { background: #DCF06E; --txt-encre: #1B1A17; }
  .tr-arecup .colis-hero { background: #F4A56B; --txt-encre: #1B1A17; }
  .tr-fait .colis-hero { background: #CFE9DD; --txt-encre: #1B1A17; }
  .tr-envoi .colis-hero { background: #DCD3FF; --txt-encre: #1B1A17; }
  .colis-hero small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: rgba(0, 0, 0, 0.72); padding-right: 28px; }
  .colis-hero h2 { margin: 0; font-size: 26px; line-height: 1; letter-spacing: -0.04em; font-weight: 800; color: var(--txt-encre); padding-right: 20px; }
  .colis-hero__pastille { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 5px 10px; color: var(--txt-encre); }
  .colis-hero__barre { height: 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.4); overflow: hidden; }
  .colis-hero__barre i { display: block; height: 100%; background: #1B1A17; border-radius: 9px; }
  .colis-hero .colis-hero__bas { font-weight: 500; letter-spacing: 0; padding-right: 0; }
  .colis-hero__fermer { position: absolute; top: 12px; right: 12px; opacity: 0.55; display: flex; }

  .colis-msg { background: var(--surf-blanc); border-radius: 16px; padding: 10px 12px; font-size: 12.5px; line-height: 1.4; color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
  .colis-msg small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 2px; }

  .colis-item__fichiers { display: flex; flex-direction: column; gap: 8px; }
  .colis-item__fichier { display: flex; flex-direction: row; align-items: center; gap: 10px; background: var(--surf-blanc); border: 0; border-radius: 14px; padding: 9px 12px; aspect-ratio: auto; text-align: left; transform: none; position: relative; --txt-encre: var(--txt-neutre); }
  .colis-item__fichier:hover { background: var(--surf-blanc); border: 0; transform: none; --txt-encre: var(--txt-neutre); }
  .colis-item__fichier-check { display: none; }
  .colis-item__fichier-icone { width: 28px; height: 28px; border-radius: 9px; background: var(--surf-sable); color: var(--txt-encre); display: flex; align-items: center; justify-content: center; flex: none; margin: 0; --txt-encre: var(--txt-neutre); }
  .colis-item__fichier-icone svg { width: 16px; height: 16px; }
  .colis-item__fichier-nom { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--txt-encre); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; }
  .colis-item__fichier-taille { font-size: 11px; color: var(--color-text-muted); }
  .colis-item__fichier.is-telecharge { background: var(--surf-blanc); border: 0; --txt-encre: var(--txt-neutre); }
  .colis-item__fichier.is-telecharge .colis-item__fichier-icone { color: #6B4EFF; }
  .colis-item__fichier.is-telecharge .colis-item__fichier-taille::before { content: '✓ '; color: #6B4EFF; font-weight: 800; }
  .colis-item__fichier.is-supprime { opacity: 0.5; pointer-events: none; }
  .colis-item__fichier.is-supprime .colis-item__fichier-nom { text-decoration: line-through; }

  .colis-frise { background: var(--surf-blanc); border-radius: 18px; padding: 12px 14px 2px; --txt-encre: var(--txt-neutre); }
  .colis-frise__j { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; font-size: 12px; color: var(--color-text-muted); }
  .colis-frise__j i { width: 10px; height: 10px; border-radius: 50%; background: #D1CCC1; flex: none; }
  .colis-frise__j.is-fait { color: var(--txt-encre); }
  .colis-frise__j.is-fait i { background: #1B1A17; }

  .colis-item__actions { display: flex; flex-direction: column; gap: 8px; justify-content: flex-start; }
  .colis-item__actions.colis-acts { flex-direction: row; margin-top: 4px; }
  .colis-b2 { flex: 1; text-align: center; background: var(--surf-blanc); color: var(--txt-encre); border: 0; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 13px; padding: 12px; cursor: pointer; --txt-encre: var(--txt-neutre); }
  .colis-b2.r { background: #FBD9D6; color: #E8554E; --txt-encre: #1B1A17; }
  .colis-b1 { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 999px; background: #6B4EFF; color: #fff; font-family: inherit; font-weight: 800; font-size: 14px; padding: 15px; cursor: pointer; }
  .colis-b1.o { background: #1B1A17; color: #DCF06E; }
  .colis-b1:disabled { opacity: 0.6; }
  .colis-lien { border: 0; background: none; color: #E8554E; font-family: inherit; font-weight: 700; font-size: 12px; padding: 6px; cursor: pointer; align-self: center; }
}
@media (min-width: 721px) {
  .colis-hero, .colis-msg, .colis-frise { margin-bottom: 10px; }
}

/* Notifications — design 4 : cartes pastel pleines, regroupement des doublons (×N), panneau clair */
.notif-item__x { font-style: normal; font-size: 11px; font-weight: 800; background: #1B1A17; color: #DCF06E; border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
.modal-backdrop--haut .notif-modal { background: var(--color-bg, #EDEAE3); color: var(--color-text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.notif-modal h2 { color: var(--color-text); }
.notif-x { background: var(--surf-blanc); color: var(--color-text); --txt-encre: var(--txt-neutre); }
.notif-filtres button { background: var(--surf-blanc); color: var(--color-text); --txt-encre: var(--txt-neutre); }
.notif-filtres button.on { background: #1B1A17; color: #FFFFFF; }
.notif-modal .notif-day-label { color: var(--color-text-muted); }
.notif-tout-lu { background: #1B1A17; color: #DCF06E; }
.notif-modal .notif-item, .notif-modal .notif-item.is-non-lue { background: var(--surf-creux); box-shadow: none; align-items: flex-start; padding: 12px; gap: 10px; color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.notif-modal .notif-item[data-tonalite='alerte'], .notif-modal .notif-item[data-categorie='factures'] { background: #F4A56B; --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-tonalite='succes'] { background: #DCF06E; --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-tonalite='argent'], .notif-modal .notif-item[data-categorie='transferts'] { background: #CFE9DD; --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-categorie='rendez_vous'] { background: #DCD3FF; --txt-encre: #1B1A17; }
.notif-modal .notif-item:not(.is-non-lue) { background: var(--surf-blanc); opacity: 0.7; --txt-encre: var(--txt-neutre); }
.notif-modal .notif-item__icone { background: transparent !important; width: auto; height: auto; color: var(--txt-encre); }
.notif-modal .notif-item__icone svg { width: 20px; height: 20px; }
.notif-modal .notif-item__titre, .notif-modal .notif-item:not(.is-non-lue) .notif-item__titre { color: var(--txt-encre); font-size: 13px; font-weight: 800; }
.notif-modal .notif-item__meta { color: var(--txt-encre); font-size: 12.5px; line-height: 1.35; opacity: 0.85; margin-top: 4px; }
.notif-modal .notif-item__temps { color: rgba(0, 0, 0, 0.55); font-size: 11px; }
.notif-act--ouvrir { background: #DCD3FF; --txt-encre: #1B1A17; }
.notif-act--lu { background: #6B4EFF; color: #FFFFFF; }
.notif-act--suppr { background: #E8554E; color: #FFFFFF; }
.notif-modal .empty-state { color: var(--color-text-muted); }
@media (max-width: 720px) { .modal-backdrop--haut { background: var(--color-bg, #EDEAE3); } }
/* Cartes lues : fond clair plein (pas d'opacité, sinon les boutons du glissement transparaissent) */
.notif-modal .notif-item:not(.is-non-lue) { background: var(--surf-sable-clair); opacity: 1; --txt-encre: var(--txt-neutre); }
.notif-modal .notif-item:not(.is-non-lue) .notif-item__titre, .notif-modal .notif-item:not(.is-non-lue) .notif-item__meta, .notif-modal .notif-item:not(.is-non-lue) .notif-item__icone { color: #6F6B62; }

/* Pile de notifications identiques */
.notif-pile { position: relative; margin-bottom: 16px; --pile: #E3DED4; }
.notif-pile[data-tonalite='alerte'], .notif-pile[data-categorie='factures'] { --pile: #F4A56B; }
.notif-pile[data-tonalite='succes'] { --pile: #DCF06E; }
.notif-pile[data-tonalite='argent'], .notif-pile[data-categorie='transferts'] { --pile: #CFE9DD; }
.notif-pile[data-categorie='rendez_vous'] { --pile: #DCD3FF; }
.notif-pile__fond { position: absolute; left: 0; right: 0; height: 100%; border-radius: 22px; background: var(--pile); filter: brightness(0.93); pointer-events: none; z-index: 0; }
.notif-pile__fond--1 { left: 10px; right: 10px; top: 7px; }
.notif-pile__fond--2 { left: 20px; right: 20px; top: 14px; filter: brightness(0.86); }
.notif-pile > .notif-swipe { position: relative; z-index: 1; }
.notif-pile.is-ouverte { margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.notif-pile__tete { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px; }
.notif-pile__tete b { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--color-text-muted); text-transform: uppercase; }
.notif-pile__reduire { border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 11px; font-weight: 800; padding: 6px 10px; cursor: pointer; }
.notif-pile.is-lue { --pile: #ECE9E2 !important; }

/* Header : interrupteur clair/sombre (design 4) et cloche nue avec pastille chiffrée (design 5) */
.app-header__user .app-header__switch { width: auto; height: auto; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--color-surface); font-size: 0; }
.app-header__user .app-header__switch:hover { background: var(--color-surface); }
.app-header__k { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #999; transition: background 0.2s, color 0.2s; }
.app-header__k.on { background: #1B1A17; color: #DCF06E; }
:root[data-theme='dark'] .app-header__k.on { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .app-header__k.on { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; } }
.app-header__user .app-header__notif-btn { width: 42px; height: 42px; position: relative; display: flex; align-items: center; justify-content: center; }
.app-header__user .app-header__notif-btn > svg { width: 24px; height: 24px; }
.app-header__user .app-header__notif-btn .app-header__notif-badge { position: absolute; top: 2px; right: 0; width: auto; height: 17px; min-width: 17px; padding: 0 4px; box-sizing: border-box; border: 0; border-radius: 999px; background: #DCF06E; color: var(--txt-encre); font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; animation: none; --txt-encre: #1B1A17; }

/* Notifications : feuille flottante qui descend du haut (plus de plein écran) */
@media (max-width: 720px) {
  .modal-backdrop--haut { padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: rgba(27, 26, 23, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); align-items: flex-start; }
  .modal-backdrop--haut .notif-modal {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 30px;
    padding: 18px 14px 16px;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  }
}

/* Rappels automatiques : ligne cliquable pour régler le délai et l'heure */
.regle-row { align-items: center; gap: 12px; }
.regle-row__corps { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; font-family: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.regle-row__meta { margin-top: 4px; font-size: 11px; font-weight: 800; color: #6B4EFF; }

/* Copilote (chat texte) : feuille claire qui monte du bas, accueil + suggestions ; micro dans la barre de saisie */
.copilote-fond { position: fixed; inset: 0; z-index: 199; background: rgba(27, 26, 23, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.copilote-fond.is-open { opacity: 1; pointer-events: auto; }
.copilote-panel { inset: auto 0 0 0; height: min(88dvh, 760px); max-width: 720px; margin: 0 auto; border-radius: 30px 30px 0 0; background: var(--color-bg, #EDEAE3); color: var(--color-text); padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); backdrop-filter: none; -webkit-backdrop-filter: none; opacity: 1; transform: translateY(105%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.18); }
.copilote-panel.is-open { transform: none; }
.copilote-panel .tabs { display: none; }
.copilote-panel__titre { color: var(--color-text); }
.copilote-panel__fermer { background: var(--surf-blanc); color: var(--color-text); --txt-encre: var(--txt-neutre); }
.copilote-panel .copilote-bubble--assistant { color: var(--color-text); }
.copilote-panel .copilote-bubble--assistant.is-loading { color: var(--color-text-muted); }
.copilote-panel .copilote-chat .empty-state.copilote-accueil { color: var(--color-text); text-align: left; padding: 0; margin-top: 0; display: flex; flex-direction: column; gap: 22px; justify-content: center; flex: 1; }
.copilote-accueil h2 { margin: 0; font-size: 38px; line-height: 1; letter-spacing: -0.05em; color: var(--color-text); }
.copilote-accueil u { text-decoration: none; color: #6B4EFF; }
.copilote-sugg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.copilote-sugg button { text-align: left; border: 0; border-radius: 22px; padding: 14px; min-height: 84px; background: var(--surf-blanc); color: var(--color-text); font-family: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; --txt-encre: var(--txt-neutre); }
.copilote-sugg button b { font-size: 14px; letter-spacing: -0.01em; }
.copilote-sugg button small { font-size: 11.5px; color: var(--color-text-muted); }
.copilote-sugg button:nth-child(1) { background: #F4A56B; --txt-encre: #1B1A17; }
.copilote-sugg button:nth-child(2) { background: #DCD3FF; --txt-encre: #1B1A17; }
.copilote-sugg button:nth-child(3) { background: #DCF06E; --txt-encre: #1B1A17; }
.copilote-sugg button:nth-child(4) { background: #CFE9DD; --txt-encre: #1B1A17; }
.copilote-sugg button small { color: rgba(0, 0, 0, 0.6); }
.copilote-panel .copilote-chat-form { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.copilote-micro { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--pastel-lime); color: var(--txt-encre); cursor: pointer; flex: none; --txt-encre: #1B1A17; }
.copilote-micro svg { width: 20px; height: 20px; }
.copilote-accueil::before, .copilote-accueil::after { display: none !important; }

/* Chat Copilote : design lime (comme l'écran « changer de statut ») */
.copilote-panel { background: #DCF06E; color: var(--txt-encre); box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.25); --txt-encre: #1B1A17; }
.copilote-panel__titre { color: var(--txt-encre); }
.copilote-spark { background: #1B1A17; color: #DCF06E; }
.copilote-panel__fermer { background: rgba(0, 0, 0, 0.1); color: var(--txt-encre); }
.copilote-panel .copilote-bubble--user { background: #1B1A17; color: #DCF06E; }
.copilote-panel .copilote-bubble--assistant { color: var(--txt-encre); }
.copilote-panel .copilote-bubble--assistant.is-loading { color: rgba(27, 26, 23, 0.55); }
.copilote-panel .copilote-chat .empty-state.copilote-accueil, .copilote-accueil h2 { color: var(--txt-encre); }
.copilote-accueil u { background: #1B1A17; color: #DCF06E; padding: 0 10px; border-radius: 16px; display: inline-block; }
.copilote-sugg button:nth-child(3) { background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.copilote-carte--lime { background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.copilote-panel .copilote-cartes__plus { color: rgba(27, 26, 23, 0.6); }
.copilote-micro { background: #1B1A17; color: #DCF06E; }
.copilote-panel .copilote-chat-form { box-shadow: none; }
.copilote-panel .copilote-send { background: #6B4EFF; }

/* ----- Vocal lime : sous-titres géants + ondes réelles (spectre du micro / de l'IA) ----- */
.copilote-voix-overlay { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
.copilote-voix-overlay__top { opacity: 1; }
.copilote-voix-overlay__duree { background: #1B1A17; color: #DCF06E; }
.copilote-voix-overlay__zone { padding-top: 0; }
.copilote-voix-overlay__statut { margin: 34px 0 0; text-align: left; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; opacity: 0.55; }
.copilote-voix-overlay__transcript { flex: 1; justify-content: flex-start; margin-top: 30px; color: var(--txt-encre); }
.copilote-voix-overlay__transcript .copilote-bubble--user { color: var(--txt-encre); opacity: 0.55; }
.copilote-voix-overlay__transcript .copilote-bubble--assistant { color: var(--txt-encre); font-size: 28px; }
.copilote-voix-overlay__transcript .copilote-bubble--assistant em { color: #DCF06E; background: #1B1A17; padding: 0 8px; border-radius: 999px; }
.copilote-voix-ondes { display: flex; align-items: center; justify-content: center; gap: 4px; height: 84px; margin: 8px 0 14px; scale: 1; transition: none; }
.copilote-voix-overlay.is-open .copilote-voix-ondes { scale: 1; }
.copilote-voix-ondes span { width: 5px; height: 6px; border-radius: 3px; background: #1B1A17; transition: height 0.06s linear; }
.copilote-voix-ondes.is-ia-parle span { background: #1B1A17; }
.copilote-voix-rond { background: rgba(27, 26, 23, 0.1); color: var(--txt-encre); }
.copilote-voix-rond[aria-pressed='true'] { background: #1B1A17; color: #DCF06E; }
.copilote-voix-overlay .copilote-overlay__stop { background: #1B1A17; color: #DCF06E; }
.copilote-voix-overlay .copilote-overlay__stop:hover { background: #2B2A26; }

/* Cartes (factures, devis, rendez-vous) sous les sous-titres du vocal */
.copilote-voix-cartes:empty { display: none; }
.copilote-voix-cartes .copilote-cartes { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.copilote-voix-cartes .copilote-cartes::-webkit-scrollbar { display: none; }
.copilote-voix-cartes .copilote-carte { flex: 0 0 150px; }
.copilote-voix-cartes .copilote-cartes__plus { flex: 0 0 auto; align-self: center; color: rgba(27, 26, 23, 0.6); }

/* ----- Abonnements : carte lime (montant en grand, action principale) ----- */
#abonnements-cards { display: flex; flex-direction: column; gap: 12px; }
.abo-carte { padding: 18px; border-radius: 26px; background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
.abo-carte--suspendu { background: var(--pastel-sable-fonce, #E4DFD0); --txt-encre: #1B1A17; }
.abo-carte--termine { background: var(--surf-sable); opacity: 0.75; --txt-encre: var(--txt-neutre); }
.abo-carte__haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.abo-carte__client { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abo-carte__statut { flex: none; padding: 3px 10px; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-size: 11px; font-weight: 700; }
.abo-carte--suspendu .abo-carte__statut, .abo-carte--termine .abo-carte__statut { background: rgba(27, 26, 23, 0.14); color: var(--txt-encre); }
.abo-carte__libelle { margin-top: 6px; font-size: 16px; font-weight: 700; }
.abo-carte__milieu { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.abo-carte__montant { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.abo-carte__sous { margin-top: 5px; font-size: 12px; font-weight: 600; opacity: 0.65; }
.abo-carte__prochain { text-align: right; }
.abo-carte__k { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.65; }
.abo-carte__date { font-size: 16px; font-weight: 700; }
.abo-carte__actions { display: flex; gap: 8px; margin-top: 16px; }
.abo-carte__facturer { flex: 1; height: 44px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }
.abo-carte__pause { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(27, 26, 23, 0.1); color: var(--txt-encre); cursor: pointer; }
.abo-carte--suspendu .abo-carte__pause { flex: 1; width: auto; background: #1B1A17; color: #DCF06E; }
.abo-carte__pause svg { width: 18px; height: 18px; }
@media (min-width: 721px) { #abonnements-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }

/* ----- Factures reçues : carte lilas, montant en grand, téléchargement rond ----- */
#factures-recues-cards { display: flex; flex-direction: column; gap: 12px; }
.recue-carte { padding: 16px 18px; border-radius: 26px; background: var(--pastel-lilas, #D5CCFF); color: var(--txt-encre); --txt-encre: #1B1A17; }
.recue-carte__haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; }
.recue-carte__num { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recue-carte__date { flex: none; }
.recue-carte__fournisseur { margin-top: 6px; font-size: 16px; font-weight: 700; }
.recue-carte__bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.recue-carte__montant { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.recue-carte__sous { margin-top: 5px; font-size: 12px; font-weight: 600; opacity: 0.65; }
.recue-carte__dl { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; cursor: pointer; }
.recue-carte__dl svg { width: 20px; height: 20px; }
@media (min-width: 721px) { #factures-recues-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }

/* ----- Reçues : bandeau sombre (état de connexion + synchronisation) ----- */
.recues-bandeau { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 26px; background: #1B1A17; color: #FFFFFF; }
.recues-bandeau__titre { font-size: 15px; font-weight: 700; }
.recues-bandeau__etat { margin-top: 3px; font-size: 12px; font-weight: 600; color: #DCF06E; }
.recues-bandeau__etat.is-test { color: #F0A070; }
.recues-bandeau__sync { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #DCF06E; color: var(--txt-encre); cursor: pointer; --txt-encre: #1B1A17; }
.recues-bandeau__sync svg { width: 21px; height: 21px; }
.recues-bandeau__sync.is-sync svg { animation: recues-tourne 0.9s linear infinite; }
@keyframes recues-tourne { to { transform: rotate(360deg); } }

/* ----- Rappel pop-up (tous les écrans) : carte lime, « C'est fait » / « Repousser » ----- */
.rp-fond { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 20px; background: rgba(27, 26, 23, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: rp-fond 0.2s ease-out; }
.rp-carte { width: min(100%, 420px); padding: 22px 22px 20px; border-radius: 32px; background: #DCF06E; color: var(--txt-encre); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); animation: rp-carte 0.35s cubic-bezier(0.2, 1.3, 0.4, 1); --txt-encre: #1B1A17; }
.rp-haut { display: flex; align-items: center; gap: 10px; }
.rp-icone { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #1B1A17; color: #DCF06E; }
.rp-icone svg { width: 20px; height: 20px; }
.rp-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.rp-quand { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: rgba(27, 26, 23, 0.1); font-size: 12px; font-weight: 700; }
.rp-titre { margin: 18px 0 0; font-size: 28px; line-height: 1.08; font-weight: 800; letter-spacing: -0.04em; color: var(--txt-encre); }
.rp-message { margin: 10px 0 0; font-size: 15px; font-weight: 600; opacity: 0.8; }
.rp-meta { margin: 10px 0 0; font-size: 13px; font-weight: 700; opacity: 0.75; }
.rp-meta:empty { display: none; }
.rp-meta a { color: inherit; }
.rp-actions { display: flex; gap: 10px; margin-top: 22px; }
.rp-actions[hidden], .rp-picker[hidden] { display: none; }
.rp-btn { flex: 1; height: 52px; border: 0; border-radius: 999px; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.rp-btn--fait { background: #1B1A17; color: #DCF06E; }
.rp-btn--repousser, .rp-btn--retour { background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.rp-btn:disabled { opacity: 0.55; }
.rp-picker { margin-top: 18px; }
.rp-picker__titre { margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.rp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-chips button { height: 46px; border: 0; border-radius: 999px; background: var(--surf-blanc); color: var(--txt-encre); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; --txt-encre: var(--txt-neutre); }
.rp-chips button:active { background: #1B1A17; color: #DCF06E; }
.rp-perso { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; }
.rp-perso input { display: block; width: 100%; height: 48px; margin-top: 6px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surf-blanc); color: var(--txt-encre); font-family: inherit; font-size: 16px; font-weight: 700; --txt-encre: var(--txt-neutre); }
.rp-erreur { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #8A2A12; }
@keyframes rp-fond { from { opacity: 0; } }
@keyframes rp-carte { from { opacity: 0; transform: translateY(24px) scale(0.94); } }

/* Carte « tâches » de l'accueil : nombre de tâches restantes qui me sont attribuées */
@media (max-width: 720px) {
  .datebar-tuile__texte { display: flex; flex-direction: column; min-width: 0; }
  .datebar-tuile--taches .datebar-tuile__mois { opacity: 0.9; }
}

/* ----- Carte équipe : avatars en anneaux — vert = en ligne, gris = absent, fantôme = jamais connecté ----- */
.team-presence-list { display: flex; flex-direction: row; gap: 18px; overflow-x: auto; padding: 8px 6px 4px; scrollbar-width: none; }
.team-presence-list::-webkit-scrollbar { display: none; }
body[data-page='dashboard'] .team-presence { display: flex; flex-direction: column; align-items: center; flex: none; min-width: 64px; padding: 0; gap: 0; border-radius: 0; background: none; text-align: center; }
.team-presence__avatar { width: 56px; height: 56px; font-size: 14px; font-weight: 600; color: var(--txt-encre); background: var(--surf-creux); --anneau: #B9B6A9; box-shadow: 0 0 0 3px var(--bento-card, #fff), 0 0 0 5px var(--anneau); --txt-encre: var(--txt-neutre); }
.team-presence__avatar--lilas { background: var(--pastel-lilas, #D5CCFF); --txt-encre: #1B1A17; }
.team-presence__avatar--orange { background: var(--pastel-orange, #F6C9A8); --txt-encre: #1B1A17; }
.team-presence__avatar--sable { background: var(--pastel-sable-fonce, #E4DFD0); --txt-encre: #1B1A17; }
.team-presence__avatar--menthe { background: var(--pastel-menthe, #CDE8DC); --txt-encre: #1B1A17; }
.team-presence--online .team-presence__avatar { --anneau: #3BB44A; }
.team-presence--jamais .team-presence__avatar { --anneau: #D3D1C7; opacity: 0.6; box-shadow: 0 0 0 3px var(--bento-card, #fff), 0 0 0 4px var(--bento-card, #fff), 0 0 0 5px var(--anneau); }
.team-presence__corps { flex: none; margin-top: 12px; }
.team-presence__nom { font-size: 14px; font-weight: 700; }
.team-presence--jamais .team-presence__nom { opacity: 0.6; }
.team-presence__fonction, .team-presence__dot { display: none; }
.team-presence__statut { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; opacity: 0.7; }
.team-presence--online .team-presence__statut { color: #2A7D34; opacity: 1; }

/* Rappel pop-up — design violet : texte géant, lien vers l'élément concerné */
.rp-carte { background: #6B4EFF; color: #FFFFFF; padding: 24px 22px 22px; }
.rp-haut { gap: 8px; }
.rp-point { width: 10px; height: 10px; border-radius: 50%; background: #DCF06E; box-shadow: 0 0 0 4px rgba(220, 240, 110, 0.25); animation: team-presence-pulse 2s ease-in-out infinite; --txt-encre: #1B1A17; }
.rp-kicker { color: #FFFFFF; }
.rp-titre { margin-top: 14px; font-size: 32px; line-height: 1.04; letter-spacing: -0.045em; color: #FFFFFF; }
.rp-message { opacity: 0.85; }
.rp-meta { opacity: 0.85; font-size: 14px; font-weight: 600; }
.rp-meta a { color: #FFFFFF; text-underline-offset: 3px; }
.rp-btn--fait { background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.rp-btn--repousser, .rp-btn--retour { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }
.rp-picker__titre { color: #FFFFFF; }
.rp-chips button { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }
.rp-chips button:active { background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.rp-perso { color: #FFFFFF; }
.rp-perso input { background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.rp-erreur { color: #DCF06E; }

/* Page Rappels : liste « À traiter » */
.rat { margin-bottom: 18px; padding: 16px; border-radius: 28px; background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.rat__titre { margin: 0 0 12px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; }
.rat__ligne { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 20px; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
.rat__ligne + .rat__ligne { margin-top: 8px; }
.rat__ligne--premier { background: #DCF06E; --txt-encre: #1B1A17; }
.rat__corps { flex: 1; min-width: 0; }
.rat__nom { margin: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rat__meta { margin: 2px 0 0; font-size: 12px; font-weight: 600; opacity: 0.7; }
.rat__btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surf-blanc); color: var(--txt-encre); cursor: pointer; --txt-encre: var(--txt-neutre); }
.rat__btn svg { width: 19px; height: 19px; }
.rat__btn--fait { background: #1B1A17; color: #DCF06E; }
.rat__btn:disabled { opacity: 0.5; }
#rappels-page[data-vue='auto'] #rappels-a-traiter { display: none; }

/* ----- Piles de notifications : les cartes glissent depuis l'arrière de la carte du dessus, sans disparaître ----- */
.notif-zone { position: relative; display: flow-root; }
.notif-zone.is-anime { will-change: height; }
.notif-pile.is-ouverte { margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.notif-pile__pied { display: flex; justify-content: center; }
.notif-swipe--sous { will-change: transform; }

/* ----- Accueil : les widgets « aperçu » (jours pris, renouvellements, prévisionnel, CA, brut/net) sont UNE seule carte colorée posée
   directement sur la page : titre, bouton de lien et poignée sont dans la carte, plus de carte blanche autour d'un bloc. ----- */
body[data-page='dashboard'] .dashboard-grid > .card--flat .streak-card,
body[data-page='dashboard'] .dashboard-grid > .card--flat .renouv-widget__track,
body[data-page='dashboard'] .dashboard-grid > .card--flat .yearchart,
body[data-page='dashboard'] .dashboard-grid > .card--flat .stocks,
body[data-page='dashboard'] .dashboard-grid > .card--flat .finstats {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
body[data-page='dashboard'] .dashboard-grid > .card--flat .streak-card,
body[data-page='dashboard'] .dashboard-grid > .card--flat .yearchart,
body[data-page='dashboard'] .dashboard-grid > .card--flat .stocks { padding: 0; }
body[data-page='dashboard'] .dashboard-grid > .card--flat .renouv-widget__slide { padding: 0; }

body[data-page='dashboard'] .dashboard-grid > [data-widget='clients_streak'] {
  background: #D7F25C;
  --bento-card-text: #1B1A17; --bento-card-muted: #4A5016;
  --bento-card-line: rgba(27, 26, 23, 0.14); --bento-card-hollow: rgba(255, 255, 255, 0.5);
  --bento-link: #1B1A17; --txt-encre: #1B1A17; }
body[data-page='dashboard'] .dashboard-grid > [data-widget='projets_renouvellements'] {
  background: #FF8A5B;
  --bento-card-text: #1B1A17; --bento-card-muted: #5A2A14;
  --bento-card-line: rgba(27, 26, 23, 0.16); --bento-card-hollow: rgba(255, 255, 255, 0.4);
  --bento-link: #1B1A17; --txt-encre: #1B1A17; }
body[data-page='dashboard'] .dashboard-grid > [data-widget='facturation_previsionnel'] {
  background: #1B1A17;
  --bento-card-text: #FFFFFF; --bento-card-muted: #C9C6BC;
  --bento-card-line: rgba(255, 255, 255, 0.14); --bento-card-hollow: rgba(255, 255, 255, 0.1);
  --bento-link: #D7F25C;
}
/* Brut / Net : la ligne violette va jusqu'aux bords bas de la carte. */
body[data-page='dashboard'] .dashboard-grid > [data-widget='compta_finstats'] { overflow: hidden; padding-bottom: 0; }
body[data-page='dashboard'] .dashboard-grid > [data-widget='compta_finstats'] .finstats { margin: 0 -20px; }
body[data-page='dashboard'] .dashboard-grid > [data-widget='compta_finstats'] .finstats__row:first-child { border-bottom: none; padding-top: 4px; }
body[data-page='dashboard'] .dashboard-grid > [data-widget='facturation_previsionnel'] .yearchart { overflow: visible; }
body[data-page='dashboard'] .dashboard-grid > [data-widget='facturation_previsionnel'] .yearchart::before { inset: -20px; }

/* Piles par catégorie : couleur de la carte du dessus et des cartes cachées derrière, selon le groupe */
.notif-modal .notif-item[data-groupe='factures'] { background: #F4A56B; --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-groupe='agenda'] { background: #DCD3FF; --txt-encre: #1B1A17; }
.notif-modal .notif-item[data-groupe='transferts'] { background: #CFE9DD; --txt-encre: #1B1A17; }
.notif-pile[data-categorie='factures'] { --pile: #F4A56B; }
.notif-pile[data-categorie='agenda'] { --pile: #DCD3FF; }
.notif-pile[data-categorie='transferts'] { --pile: #CFE9DD; }
.notif-modal .notif-item[data-groupe].is-non-lue .notif-item__titre { font-weight: 800; }
.notif-pile.is-lue .notif-item[data-groupe] { background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
.notif-modal .notif-item[data-groupe='agenda'] .notif-item__icone { background: rgba(255, 255, 255, 0.6); }

/* ----- Conformité · Facturation électronique : tuiles pastel + activité dépliante ----- */
.ei-tuiles { display: flex; gap: 10px; overflow-x: auto; margin: 0 -4px 12px; padding: 2px 4px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.ei-tuiles::-webkit-scrollbar { display: none; }
.ei-tuile { flex: none; width: 150px; padding: 16px; border-radius: 26px; scroll-snap-align: start; color: var(--txt-encre); }
.ei-tuile--lime { background: #DCF06E; --txt-encre: #1B1A17; } .ei-tuile--lilas { background: #DCD3FF; --txt-encre: #1B1A17; } .ei-tuile--orange { background: #F6C9A8; --txt-encre: #1B1A17; } .ei-tuile--menthe { background: #CFE9DD; --txt-encre: #1B1A17; } .ei-tuile--sable { background: var(--surf-creux); --txt-encre: var(--txt-neutre); }
.ei-tuile__icone { display: block; width: 26px; height: 26px; font-style: normal; }
.ei-tuile__icone svg { width: 26px; height: 26px; }
.ei-tuile__label { margin-top: 26px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.65; }
.ei-tuile__valeur { margin-top: 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.ei-tuile__sous { margin-top: 4px; font-size: 12px; font-weight: 600; opacity: 0.7; }
.ei-activite { margin-bottom: 18px; border-radius: 26px; background: var(--surf-blanc); color: var(--txt-encre); overflow: hidden; --txt-encre: var(--txt-neutre); }
.ei-activite__tete { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 18px; border: 0; background: none; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.ei-activite__titre { flex: 1; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.ei-activite__etat { padding: 3px 10px; border-radius: 999px; background: #CFE9DD; font-size: 11px; font-weight: 700; --txt-encre: #1B1A17; }
.ei-activite__etat.is-alerte { background: #F6C9A8; --txt-encre: #1B1A17; }
.ei-activite__fleche { width: 20px; height: 20px; flex: none; transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.3, 1); }
.ei-activite.is-ouvert .ei-activite__fleche { transform: rotate(180deg); }
.ei-activite__corps { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.22, 0.9, 0.3, 1); }
.ei-activite__interieur { padding: 0 18px 16px; }
.ei-fil { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.ei-fil::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
.ei-fil__ligne { position: relative; padding: 7px 0; }
.ei-fil__point { position: absolute; left: -18px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: #B9B6A9; }
.ei-fil__ligne--ok .ei-fil__point { background: #3BB44A; }
.ei-fil__ligne--info .ei-fil__point { background: #DCF06E; box-shadow: 0 0 0 1.5px #1B1A17; --txt-encre: #1B1A17; }
.ei-fil__ligne--alerte .ei-fil__point { background: #E2683C; }
.ei-fil__titre { margin: 0; font-size: 14px; font-weight: 700; }
.ei-fil__detail { margin: 2px 0 0; font-size: 12px; font-weight: 600; opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .ei-activite__corps, .ei-activite__fleche { transition: none; } }

/* ----- Conformité · Intégrité du journal : sceau de confiance ----- */
.integrite { margin-bottom: 18px; padding: 26px 20px; border-radius: 28px; background: #DCF06E; color: var(--txt-encre); text-align: center; --txt-encre: #1B1A17; }
.integrite[data-etat='ko'] { background: #F6C9A8; --txt-encre: #1B1A17; }
.integrite[data-etat='impossible'], .integrite[data-etat='verification'] { background: var(--surf-creux); --txt-encre: var(--txt-neutre); }
.integrite__sceau { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; background: #1B1A17; color: #DCF06E; }
.integrite[data-etat='ko'] .integrite__sceau { color: #F6C9A8; }
.integrite[data-etat='impossible'] .integrite__sceau, .integrite[data-etat='verification'] .integrite__sceau { color: #E4DFD0; }
.integrite__sceau svg { width: 40px; height: 40px; }
.integrite__titre { margin-top: 14px; font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.integrite__texte { margin: 6px auto 0; max-width: 340px; font-size: 14px; font-weight: 600; opacity: 0.75; }
.integrite__conseil { margin: 12px auto 0; max-width: 360px; padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.55); font-size: 13px; font-weight: 600; text-align: left; }
.integrite__bouton { margin-top: 18px; height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.integrite[data-etat='ko'] .integrite__bouton { color: #F6C9A8; }
.integrite__bouton:disabled { opacity: 0.55; }

.integrite__conseil strong { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 800; }
.integrite__conseil ol { margin: 0 0 8px; padding-left: 20px; }
.integrite__conseil li { margin-bottom: 6px; }
.integrite__conseil p { margin: 0; font-size: 12px; font-weight: 600; opacity: 0.8; }

/* Chaîne en petits carrés (cas d'une rupture) */
.integrite__chaine { margin: 16px auto 0; max-width: 360px; }
.integrite__maillons { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.integrite__maillon { display: inline-block; width: 18px; height: 18px; border-radius: 5px; flex: none; }
.integrite__maillon--ok { background: #3BB44A; }
.integrite__maillon--rompu { background: #D6401E; box-shadow: 0 0 0 3px rgba(214, 64, 30, 0.28); }
.integrite__maillon--apres { background: #B9B6A9; }
.integrite__legende { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; font-size: 11px; font-weight: 700; }
.integrite__legende span { display: inline-flex; align-items: center; gap: 6px; }
.integrite__legende .integrite__maillon { width: 11px; height: 11px; border-radius: 3px; box-shadow: none; }

/* Vérification animée + description directe du problème */
.integrite[data-etat='verification'] .integrite__sceau { animation: integrite-pouls 1.1s ease-in-out infinite; }
@keyframes integrite-pouls { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(27, 26, 23, 0.25); } 50% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(27, 26, 23, 0); } }
.integrite__maillon { transition: background-color 0.18s ease, transform 0.18s ease; }
.integrite__maillon--attente { background: rgba(27, 26, 23, 0.14); }
.integrite__maillon--ok { transform: scale(1); }
.integrite__maillon--rompu { animation: integrite-alerte 0.5s ease-in-out 3; }
@keyframes integrite-alerte { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.integrite__conseil { font-weight: 600; }
.integrite__diff { display: grid; gap: 2px; margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); font-size: 12px; word-break: break-word; }
.integrite__avant { color: #1B7A2A; }
.integrite__apres { color: #B3341A; }
.integrite__quand { margin: 8px 0 0; font-size: 12px; font-weight: 700; }
.integrite__action { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid rgba(27, 26, 23, 0.14); font-size: 12px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .integrite[data-etat='verification'] .integrite__sceau, .integrite__maillon--rompu { animation: none; } }

/* Version épurée du message de rupture */
.integrite__conseil { max-width: 340px; padding: 10px 14px; text-align: left; }
.integrite__conseil:empty { display: none; }
.integrite__diff { margin: 0; padding: 0; background: none; font-size: 13px; }
.integrite__quand { margin: 8px 0 0; font-size: 12px; font-weight: 700; opacity: 0.7; }
.integrite[data-etat='ko'] .integrite__titre { font-size: 24px; }
.integrite[data-etat='ko'] .integrite__texte { font-size: 13px; }

/* Pendant une vérification, le bouton « Revérifier maintenant » n'est pas visible (sa place reste réservée : la carte ne saute pas). */
.integrite[data-etat='verification'] .integrite__bouton { visibility: hidden; }

/* Avant / Après (design 4) : directement dans le composant, sans carte ni fond — police à empattements, ancien texte barré, flèche, nouveau texte en gras */
.integrite__conseil { max-width: 340px; padding: 0; border-radius: 0; background: none; text-align: center; font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Times New Roman', serif; }
.integrite__diff { display: block; margin: 0 0 8px; padding: 0; background: none; font-size: 15px; line-height: 1.4; }
.integrite__diff small { display: block; margin-bottom: 2px; font-family: inherit; font-size: 11px; font-style: italic; opacity: 0.7; }
.integrite__avant { display: block; font-weight: 400; text-decoration: line-through; text-decoration-color: #A62E14; text-decoration-thickness: 1.5px; color: inherit; opacity: 0.65; }
.integrite__fleche { display: block; margin: 2px 0; font-size: 18px; line-height: 1; color: #A62E14; }
.integrite__apres { display: block; font-size: 17px; font-weight: 700; color: inherit; }
.integrite__quand { margin: 10px 0 0; font-family: inherit; font-size: 13px; font-style: italic; font-weight: 400; opacity: 0.75; }

/* Avant / Après (design 1 « diff ») : lignes − et +, police normale de l'application, sans carte ni fond */
.integrite__conseil { max-width: 330px; padding: 0; border-radius: 0; background: none; text-align: left; font-family: inherit; }
.integrite__diff { display: grid; gap: 6px; margin: 0; padding: 0; background: none; font-size: 14px; line-height: 1.4; font-weight: 600; }
.integrite__diff small { font-size: 11px; font-weight: 700; opacity: 0.6; font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; }
.integrite__avant, .integrite__apres { display: flex; gap: 8px; text-decoration: none; opacity: 1; font-size: inherit; font-weight: inherit; }
.integrite__avant i, .integrite__apres i { flex: none; width: 12px; font-style: normal; font-weight: 800; }
.integrite__avant { color: #1B6F27; }
.integrite__apres { color: #A62E14; }
.integrite__fleche { display: none; }
.integrite__quand { margin: 12px 0 0; font-family: inherit; font-size: 12px; font-style: normal; font-weight: 700; opacity: 0.65; text-align: center; }

/* ----- Archives scellées : certificat (police de l'application) ----- */
#archives-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.certificat { padding: 24px 20px 20px; border-radius: 28px; background: var(--surf-blanc); color: var(--txt-encre); text-align: center; transition: background-color 0.3s ease; --txt-encre: var(--txt-neutre); }
.certificat.is-ok { background: #E4F5C9; --txt-encre: #1B1A17; }
.certificat.is-ko { background: #F6C9A8; --txt-encre: #1B1A17; }
.certificat__icone { display: block; width: 36px; height: 36px; margin: 0 auto; }
.certificat__icone svg { width: 36px; height: 36px; }
.certificat__titre { margin: 8px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; text-transform: none; }
.certificat__meta { margin: 4px 0 0; font-size: 12px; font-weight: 600; opacity: 0.65; }
.certificat__empreinte { margin: 14px auto 0; max-width: 300px; font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: 0.02em; word-break: break-all; opacity: 0.75; }
.certificat__resultat { margin: 12px 0 0; font-size: 13px; font-weight: 700; }
.certificat__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.certificat__bouton { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surf-sable); color: var(--txt-encre); font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; --txt-encre: var(--txt-neutre); }
.certificat__bouton--principal { background: #1B1A17; color: #DCF06E; }
.certificat__bouton:disabled { opacity: 0.55; }

/* ----- Archives scellées : calendrier de l'année, un sceau par mois ----- */
#archives-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.cal-arch { padding: 18px; border-radius: 28px; background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.cal-arch__tete { display: flex; align-items: baseline; justify-content: space-between; }
.cal-arch__tete h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; text-transform: none; }
.cal-arch__tete span { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.6; }
.cal-arch__grille { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.cal-arch__mois { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 14px; background: var(--surf-sable); color: var(--txt-encre); font-family: inherit; font-size: 11px; font-weight: 700; opacity: 0.5; --txt-encre: var(--txt-neutre); }
.cal-arch__mois svg { width: 15px; height: 15px; }
.cal-arch__mois--scelle { background: #DCF06E; opacity: 1; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; --txt-encre: #1B1A17; }
.cal-arch__mois--scelle.is-selectionne { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #1B1A17; transform: scale(1.04); }
.cal-arch__mois--encours { background: none; border: 1.5px dashed #B9B6A9; opacity: 1; }
.cal-arch__detail { margin-top: 16px; padding-top: 14px; border-top: 1px solid #EFEDE4; border-radius: 0; transition: background-color 0.3s ease; }
.cal-arch__phrase { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.45; }
.cal-arch__empreinte { margin: 8px 0 0; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; word-break: break-all; opacity: 0.6; }
.cal-arch__resultat { margin: 10px 0 0; font-size: 13px; font-weight: 700; }
.cal-arch__detail.is-ok .cal-arch__resultat { color: #1B6F27; }
.cal-arch__detail.is-ko .cal-arch__resultat { color: #A62E14; }
.cal-arch__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cal-arch__bouton { height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surf-sable); color: var(--txt-encre); font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; --txt-encre: var(--txt-neutre); }
.cal-arch__bouton--principal { background: #1B1A17; color: #DCF06E; }
.cal-arch__bouton:disabled { opacity: 0.55; }
.cal-arch__prochain { margin: 12px 0 0; font-size: 12px; font-weight: 600; opacity: 0.6; }

/* Archives scellées : détail du mois sélectionné, épuré — une ligne de texte et une icône de téléchargement */
.cal-arch__detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-arch__resume { display: grid; gap: 2px; min-width: 0; }
.cal-arch__resume b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.cal-arch__resume span { font-size: 12px; font-weight: 600; opacity: 0.6; }
.cal-arch__telecharger { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #1B1A17; color: #DCF06E; cursor: pointer; }
.cal-arch__telecharger svg { width: 20px; height: 20px; }

/* ----- Export de contrôle : dépliant discret ----- */
.exp { margin: 4px 0 18px; padding: 18px; border-radius: 28px; background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.exp__tete { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.exp__titre { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.exp__fleche { width: 20px; height: 20px; opacity: 0.5; transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.3, 1); }
.exp.is-ouvert .exp__fleche { transform: rotate(180deg); }
.exp__sous { margin: 4px 0 0; font-size: 13px; font-weight: 600; opacity: 0.6; }
.exp__dernier { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
.exp__dernier-texte { flex: 1; min-width: 0; display: grid; gap: 2px; }
.exp__dernier-texte span { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.6; }
.exp__dernier-texte b { font-size: 13px; font-weight: 700; }
.exp__refaire { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #1B1A17; color: #DCF06E; cursor: pointer; }
.exp__refaire svg { width: 17px; height: 17px; }
.exp__corps { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.22, 0.9, 0.3, 1); }
.exp__interieur { padding-top: 14px; }
.exp__dates { display: flex; gap: 8px; margin: 0 0 6px; }
.exp__dates label { flex: 1; min-width: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.8; }
.exp__dates input { display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surf-sable); color: var(--txt-encre); font-family: inherit; font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; --txt-encre: var(--txt-neutre); }
.exp__fichiers { margin-top: 6px; }
.exp__fichier { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid rgba(27, 26, 23, 0.1); background: none; color: inherit; font-family: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.exp__fichier i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
.exp__fichier svg { width: 17px; height: 17px; }
@media (prefers-reduced-motion: reduce) { .exp__corps, .exp__fleche { transition: none; } }

/* Export de contrôle : un seul bouton « Tout exporter (ZIP) » */
.exp__zip { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.exp__zip svg { width: 18px; height: 18px; }

/* ----- Journal d'audit récent : carte sombre, histogramme d'activité, trois dernières lignes ----- */
.jr { margin: 4px 0 18px; padding: 18px; border-radius: 28px; background: #1B1A17; color: #FFFFFF; }
.jr__tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jr__tete h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; color: #FFFFFF; text-transform: none; }
.jr__total { padding: 4px 11px; border-radius: 999px; background: #3A3934; font-size: 11px; font-weight: 700; }
.jr__histo { display: flex; align-items: flex-end; gap: 4px; height: 46px; margin: 16px 0 6px; }
.jr__barre { flex: 1; min-height: 4px; border-radius: 2px; background: #3A3934; }
.jr__barre--auj { background: #DCF06E; --txt-encre: #1B1A17; }
.jr__legende { margin: 0 0 12px; font-size: 11px; font-weight: 600; opacity: 0.6; }
.jr__ligne { padding: 8px 0; font-size: 14px; font-weight: 700; line-height: 1.35; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.jr__ligne:first-child { border-top: 0; }
.jr__ligne span { font-size: 12px; font-weight: 600; opacity: 0.55; white-space: nowrap; }
.jr__plus { max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(0.22, 0.9, 0.3, 1); }
.jr__plus-interieur .jr__ligne { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.jr__voir { display: block; margin: 12px auto 0; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #DCF06E; color: var(--txt-encre); font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; --txt-encre: #1B1A17; }
.jr .empty-state { color: rgba(255, 255, 255, 0.6); }
@media (prefers-reduced-motion: reduce) { .jr__plus { transition: none; } }

/* ----- Mes rappels : grosse carte à la couleur du type, date et heure en gras, avatars « de → pour » ----- */
.rappel-list { display: flex; flex-direction: column; gap: 12px; }
.rc { padding: 18px; border-radius: 26px; background: #CFE9DD; color: var(--txt-encre); --txt-encre: #1B1A17; }
.rc--rendez_vous { background: #DCD3FF; --txt-encre: #1B1A17; }
.rc--facture { background: #F6C9A8; --txt-encre: #1B1A17; }
.rc--autre { background: #CFE9DD; --txt-encre: #1B1A17; }
.rc.is-envoye { opacity: 0.6; }
.rc__haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rc__quand { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.rc__avatars { display: inline-flex; align-items: center; gap: 4px; }
.rc__avatars svg { width: 14px; height: 14px; }
.rc__av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 10px; font-weight: 800; background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.rc__av--de { background: #1B1A17; color: #FFFFFF; }
.rc__titre { margin: 12px 0 0; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; color: var(--txt-encre); text-transform: none; }
.rc__message { margin: 6px 0 0; font-size: 14px; font-weight: 600; opacity: 0.75; }
.rc__bas { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.rc__type { padding: 4px 12px; border-radius: 999px; background: #1B1A17; color: #FFFFFF; font-size: 11px; font-weight: 800; }
.rc__lien { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; opacity: 0.7; }
.rc__etat { margin-left: auto; font-size: 12px; font-weight: 800; }
.rc__suppr { display: grid; place-items: center; flex: none; margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(27, 26, 23, 0.1); color: var(--txt-encre); cursor: pointer; }
.rc__suppr svg { width: 18px; height: 18px; }

/* ----- Nouveau transfert : zone de dépôt, fichiers choisis et progression lisibles sur fond clair ----- */
#modal-colis .dropzone { min-height: 240px; padding: 28px 20px; gap: 10px; border: 2px dashed #B9B6A9; border-radius: 28px; background: var(--surf-sable); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
#modal-colis .dropzone:hover, #modal-colis .dropzone:focus-visible { border-color: #1B1A17; background: var(--surf-creux); --txt-encre: var(--txt-neutre); }
#modal-colis .dropzone.is-dragover { border-color: #6B4EFF; background: #E4DDFF; --txt-encre: #1B1A17; }
#modal-colis .dropzone__icon { width: 52px; height: 52px; padding: 12px; box-sizing: border-box; border-radius: 50%; background: #1B1A17; color: #DCF06E; }
#modal-colis .dropzone.is-dragover .dropzone__icon { background: #6B4EFF; color: #FFFFFF; }
#modal-colis .dropzone__label { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--txt-encre); }
#modal-colis .dropzone__hint { font-size: 13px; font-weight: 600; color: var(--txt-encre); opacity: 0.6; }
#modal-colis .file-chip { padding: 10px 14px; border-radius: 18px; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
#modal-colis .file-chip__nom { font-size: 14px; font-weight: 700; color: var(--txt-encre); }
#modal-colis .file-chip__taille { font-size: 12px; font-weight: 600; color: var(--txt-encre); opacity: 0.55; }
#modal-colis .file-chip__retirer { width: 26px; height: 26px; background: rgba(27, 26, 23, 0.12); color: var(--txt-encre); }
#modal-colis .upload-progress__row { font-size: 13px; font-weight: 700; color: var(--txt-encre); }
#modal-colis .upload-progress__track { height: 10px; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }

/* ----- Connexion : double authentification et mot de passe oublié ----- */
.auth-lien { display: block; margin: 14px auto 0; padding: 6px 10px; border: 0; background: none; color: #6B4EFF; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; }
.auth-lien[hidden] { display: none; }
.auth-vue[hidden] { display: none; }
.auth-vue__titre { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.auth-vue__texte { margin: 0 0 16px; font-size: 14px; font-weight: 600; opacity: 0.7; line-height: 1.45; }
.auth-vue__note { margin: 0 0 12px; font-size: 12px; font-weight: 600; opacity: 0.6; }
.auth-vue__ok { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: #E4F5C9; color: #1B6F27; font-size: 13px; font-weight: 700; --txt-encre: #1B1A17; }
#code-2fa, #code-reinit { letter-spacing: 0.25em; font-size: 20px; font-weight: 700; text-align: center; }

/* ----- Paramètres · Sécurité ----- */
.sec { max-width: 520px; }
.sec__bloc { margin-top: 16px; padding: 16px; border-radius: 22px; background: var(--surf-sable); --txt-encre: var(--txt-neutre); }
.sec__bloc h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; text-transform: none; }
.sec__bloc p { margin: 4px 0 0; font-size: 13px; font-weight: 600; opacity: 0.7; }
.sec__ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec__btn { flex: none; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.sec__btn--clair { background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
#sec-autres { margin-top: 12px; width: 100%; }
.sec__assistant { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(27, 26, 23, 0.12); }
.sec__assistant input { height: 46px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surf-blanc); color: var(--txt-encre); font-family: inherit; font-size: 16px; font-weight: 600; --txt-encre: var(--txt-neutre); }
.sec__etapes { margin: 0; padding-left: 20px; font-size: 13px; font-weight: 600; line-height: 1.5; }
.sec__etapes li { margin-bottom: 6px; }
.sec__cle { display: block; margin-top: 6px; padding: 10px 14px; border-radius: 14px; background: var(--surf-blanc); font-size: 16px; font-weight: 800; letter-spacing: 0.08em; word-break: break-all; user-select: all; --txt-encre: var(--txt-neutre); }
.sec__lien { font-size: 13px; font-weight: 700; color: #6B4EFF; }
.sec__erreur { color: #A62E14; font-weight: 700; }
.sec__ok { color: #1B6F27; font-weight: 800; font-size: 15px !important; opacity: 1 !important; }
.sec__aide { font-size: 13px; font-weight: 600; opacity: 0.75; }
.sec__codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sec__codes span { padding: 10px; border-radius: 12px; background: var(--surf-blanc); font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-align: center; user-select: all; --txt-encre: var(--txt-neutre); }
.sec__appareils { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sec__appareil { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.sec__appareil.is-courant { background: #DCF06E; --txt-encre: #1B1A17; }
.sec__appareil-icone { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(27, 26, 23, 0.08); }
.sec__appareil-icone svg { width: 18px; height: 18px; }
.sec__appareil-texte { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sec__appareil-texte b { font-size: 14px; font-weight: 800; }
.sec__appareil-texte b em { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-size: 10px; font-style: normal; font-weight: 800; }
.sec__appareil-texte small { font-size: 12px; font-weight: 600; opacity: 0.65; }
.sec__deco { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surf-sable); color: var(--txt-encre); font-size: 14px; cursor: pointer; --txt-encre: var(--txt-neutre); }

/* Facture reçue : actions (dépense en un toucher + téléchargement) */
.recue-carte__actions { display: flex; align-items: center; gap: 8px; }
.recue-carte__dep { height: 44px; padding: 0 16px; border: 1.5px solid #1B1A17; border-radius: 999px; background: transparent; color: var(--txt-encre); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.recue-carte__dep:disabled { opacity: .5; }
.recue-carte__fait { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(120, 160, 20, .16); color: #4A6A00; font-size: 14px; font-weight: 700; white-space: nowrap; }
.recue-carte__fait svg { width: 16px; height: 16px; }

/* Facture : temps passé à reprendre */
.temps-liste { display: grid; gap: 8px; margin-bottom: 12px; }
.temps-ligne { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .045); font-size: 14px; cursor: pointer; }
.temps-ligne span { flex: 1; min-width: 0; }
.temps-ligne input { width: 18px; height: 18px; accent-color: #1B1A17; }
:root[data-theme="dark"] .temps-ligne { background: rgba(255, 255, 255, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .temps-ligne { background: rgba(255, 255, 255, .07); } }

/* ---------- Comptabilité · Banque (rapprochement) : une carte à la fois, épuré ---------- */
.bq2-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bq2-tete h2 { margin: 0; }
.bq2-pos { font-size: 13px; font-weight: 600; opacity: .55; }
.bq2-import { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; background: #1B1A17; color: #DCF06E; cursor: pointer; }
.bq2-import svg { width: 20px; height: 20px; }
.bq2-import.is-busy { opacity: .5; pointer-events: none; }
.bq2-segments { display: flex; gap: 4px; margin: 14px 0 18px; }
.bq2-segments span { flex: 1; height: 4px; border-radius: 9px; background: rgba(0, 0, 0, .14); }
.bq2-segments span.is-fait { background: rgba(0, 0, 0, .14); background: #1B1A17; opacity: .35; }
.bq2-segments span.is-actif { background: #1B1A17; }
.bq2-carte { position: relative; padding: 24px 22px 20px; border-radius: 28px; background: var(--color-surface, #fff); }
.bq2-carte::before { content: ""; position: absolute; left: 16px; right: 16px; bottom: -8px; height: 16px; border-radius: 0 0 24px 24px; background: rgba(0, 0, 0, .07); z-index: -1; }
.bq2-date { font-size: 13px; font-weight: 600; opacity: .5; }
.bq2-montant { margin: 6px 0 2px; font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.bq2-montant--in { color: #3E6B00; }
.bq2-libelle { font-size: 14px; opacity: .6; overflow-wrap: anywhere; }
.bq2-cible { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, .09); }
.bq2-cible b { display: block; font-size: 17px; letter-spacing: -.01em; }
.bq2-cible p { margin: 4px 0 0; font-size: 14px; opacity: .65; }
.bq2-conf { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
.bq2-conf--ia { background: #E4DBFF; color: #2E1A8C; --txt-encre: #1B1A17; }
.bq2-aucune { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, .09); font-size: 15px; opacity: .6; }
.bq2-actions { display: flex; align-items: center; gap: 6px; margin-top: 22px; }
.bq2-valider { flex: 1; height: 50px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.bq2-lien { height: 50px; padding: 0 14px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 600; opacity: .65; cursor: pointer; }
.bq2-vide { padding: 48px 20px; text-align: center; }
.bq2-vide p { margin: 0 0 18px; font-size: 16px; opacity: .65; }
.bq2-vide label { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-weight: 700; cursor: pointer; }
.bq2-pied { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 22px; }
.bq2-pied button { border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; opacity: .55; cursor: pointer; padding: 6px 0; }
.bq2-pied button.is-on { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.bq2-pied .bq2-tout { opacity: 1; }
.bq2-note { margin: 14px 0 0; font-size: 12px; text-align: center; opacity: .45; }
.bq2-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.bq2-ligne small { display: block; opacity: .55; font-size: 12px; }
.bq2-ligne b { font-size: 15px; white-space: nowrap; }
.bq2-ligne .bq2-lien { height: 36px; font-size: 13px; }
:root[data-theme="dark"] .bq2-carte { background: rgba(255, 255, 255, .07); }
:root[data-theme="dark"] .bq2-import { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
:root[data-theme="dark"] .bq2-segments span { background: rgba(255, 255, 255, .18); }
:root[data-theme="dark"] .bq2-segments span.is-actif, :root[data-theme="dark"] .bq2-segments span.is-fait { background: #DCF06E; --txt-encre: #1B1A17; }
:root[data-theme="dark"] .bq2-valider, :root[data-theme="dark"] .bq2-vide label { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
:root[data-theme="dark"] .bq2-montant--in { color: #DCF06E; }
:root[data-theme="dark"] .bq2-cible, :root[data-theme="dark"] .bq2-aucune, :root[data-theme="dark"] .bq2-ligne { border-color: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bq2-carte { background: rgba(255, 255, 255, .07); }
  :root:not([data-theme="light"]) .bq2-import { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
  :root:not([data-theme="light"]) .bq2-segments span { background: rgba(255, 255, 255, .18); }
  :root:not([data-theme="light"]) .bq2-segments span.is-actif, :root:not([data-theme="light"]) .bq2-segments span.is-fait { background: #DCF06E; --txt-encre: #1B1A17; }
  :root:not([data-theme="light"]) .bq2-valider, :root:not([data-theme="light"]) .bq2-vide label { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
  :root:not([data-theme="light"]) .bq2-montant--in { color: #DCF06E; }
}

/* Transferts : pile de fichiers (le chiffre = nombre de fichiers), carte blanche sans contour */
.colis-item.tr-arecup { box-shadow: none; }
.tr-attente { --pile: #DCF06E; }
.tr-arecup { --pile: #F4A56B; }
.tr-fait { --pile: #CFE9DD; }
.tr-arch { --pile: #E3DED4; }
.tr-envoi { --pile: #6B4EFF; }
.colis-pile { position: relative; display: block; flex: none; width: 46px; height: 46px; color: var(--txt-encre); }
.colis-pile i, .colis-pile b { position: absolute; width: 34px; height: 34px; border-radius: 10px; }
.colis-pile i:nth-of-type(1) { left: 8px; top: 0; background: color-mix(in srgb, var(--pile, #E3DED4) 35%, #fff); display: none; }
.colis-pile i:nth-of-type(2) { left: 4px; top: 5px; background: color-mix(in srgb, var(--pile, #E3DED4) 65%, #fff); display: none; }
.colis-pile--2 i:nth-of-type(2), .colis-pile--3 i:nth-of-type(2), .colis-pile--3 i:nth-of-type(1) { display: block; }
.colis-pile b { left: 0; top: 10px; display: grid; place-items: center; background: var(--pile, #E3DED4); font-size: 15px; font-weight: 800; }
.tr-arch .colis-pile { opacity: .7; }

/* Transferts : titres de groupes (Nouveaux / En attente / Récupérés) */
.colis-groupe { margin: 10px 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .5; }
.colis-groupe:first-child { margin-top: 0; }

/* Facturation électronique : la tuile Émission est un bouton (activer / désactiver) */
.ei-tuile--bouton { border: 0; font: inherit; text-align: left; cursor: pointer; display: block; }
.ei-tuile--bouton:active { transform: scale(.98); }

/* Calendrier : le bouton rond « Catégories » près des onglets est remplacé par un lien discret en bas de page (mobile) */
#cal-categories-btn { display: none !important; }
.cal-cats-lien { display: none; }
@media (max-width: 720px) {
  .cal-cats-lien { display: block; margin: 22px auto 8px; padding: 8px 14px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; opacity: .55; cursor: pointer; }
}

/* Paramètres : fiche de consultation (valeurs actuelles avant modification) */
.fiche { display: grid; margin-bottom: 8px; }
.fiche__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; border-top: 1px solid rgba(0, 0, 0, .08); font-size: 15px; }
.fiche__ligne:first-child { border-top: 0; }
.fiche__ligne span { flex: none; opacity: .55; }
.fiche__ligne b { text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.fiche__note { margin: 12px 0 0; font-size: 13px; opacity: .6; }
:root[data-theme="dark"] .fiche__ligne { border-color: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fiche__ligne { border-color: rgba(255, 255, 255, .12); } }
#modal-fiche .modal__actions { position: sticky; bottom: 0; padding: 18px 0 4px; background: linear-gradient(to bottom, transparent, var(--color-surface, #fff) 38%); }

/* ---------- Paramètres : fiches de consultation (infos perso = icônes colorées, entreprise = carte de visite) ---------- */
#modal-fiche .fiche { display: block; }
.fiche-ic { display: grid; gap: 4px; }
.fiche-ic__ligne { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.fiche-ic__pastille { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; color: var(--txt-encre); }
.fiche-ic__pastille svg { width: 20px; height: 20px; }
.fiche-ic__ligne small { display: block; font-size: 12px; opacity: .55; }
.fiche-ic__ligne b { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.fiche-vis { margin-top: 8px; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, .92); color: var(--txt-encre); }
.fiche-vis:first-child { margin-top: 0; }
.fiche-vis small { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .5; }
.fiche-vis b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.fiche-vis--encre { background: #1B1A17; color: #fff; }
.fiche-vis--encre b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.fiche-vis--encre span { display: block; margin-top: 2px; opacity: .6; font-size: 14px; }
.fiche-vis--encre p { margin: 12px 0 0; font-size: 14px; opacity: .88; line-height: 1.4; }
.fiche-vis--lime { background: #DCF06E; --txt-encre: #1B1A17; }
.fiche-vis__puces { display: flex; flex-wrap: wrap; gap: 6px; }
.fiche-vis__puces span { padding: 4px 11px; border-radius: 999px; background: var(--surf-sable); font-size: 12px; font-weight: 700; --txt-encre: var(--txt-neutre); }

/* ---------- Paramètres : modale Sécurité (carte bouclier + liste d'appareils) ---------- */
.sec2__carte { position: relative; margin-top: 12px; padding: 22px 18px 18px; border-radius: 24px; background: #1B1A17; color: #fff; text-align: center; display: grid; justify-items: center; gap: 4px; }
.sec2__carte.is-off { background: #F6C9A8; color: var(--txt-encre); --txt-encre: #1B1A17; }
.sec2__bouclier { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 999px; background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
.sec2__carte.is-off .sec2__bouclier { background: #1B1A17; color: #F6C9A8; }
.sec2__bouclier svg { width: 26px; height: 26px; }
.sec2__carte h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; text-transform: none; }
.sec2__carte p { margin: 0 0 10px; font-size: 13px; opacity: .65; }
.sec2__carte .sec__btn { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
.sec2__carte .sec__btn--clair { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.sec2__carte .sec__assistant { width: 100%; text-align: left; border-top-color: rgba(255, 255, 255, .15); color: #fff; }
.sec2__carte.is-off .sec__assistant { color: var(--txt-encre); border-top-color: rgba(0, 0, 0, .15); }
.sec2__titre { margin: 22px 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .55; }
.sec2__liste { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.sec2__appareil { display: flex; align-items: center; gap: 14px; padding: 4px 2px; }
.sec2__pastille { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; color: var(--txt-encre); }
.sec2__pastille svg { width: 21px; height: 21px; }
.sec2__texte { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sec2__texte b { font-size: 15px; font-weight: 700; }
.sec2__texte small { font-size: 12px; opacity: .6; }
.sec2__deco { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: inherit; cursor: pointer; }
.sec2__deco svg { width: 18px; height: 18px; }

/* Feuille blanche (fiches Infos perso / Entreprise, modale Sécurité) : même fond que les autres modales */
.modal-backdrop--blanc { background: rgba(27, 26, 23, 0.35); }
.modal-backdrop--blanc .modal { background: var(--color-surface); color: var(--color-text); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12); border-radius: 30px 30px 0 0; padding-top: 22px; }
.modal-backdrop--blanc .modal::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--color-border, #D4CFC4); margin: -12px auto 12px; }
.modal-backdrop--blanc .modal__header h2 { color: var(--color-text); }
.modal-backdrop--blanc .modal__header [data-close] { background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); }
.modal-backdrop--blanc .modal__actions .btn { flex: 1; height: 50px; border-radius: 999px; font-weight: 700; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); border: 0; }
.modal-backdrop--blanc .modal__actions .btn--primary { background: #6B4EFF; color: #fff; }
.modal-backdrop--blanc .fiche-vis { background: var(--surf-sable-clair); --txt-encre: var(--txt-neutre); }
.modal-backdrop--blanc .fiche-vis--encre { background: #1B1A17; color: #fff; }
.modal-backdrop--blanc .fiche-vis--lime { background: #DCF06E; --txt-encre: #1B1A17; }
.modal-backdrop--blanc .fiche-vis__puces span { background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.modal-backdrop--blanc .sec2__deco { background: rgba(0, 0, 0, .06); }
.modal-backdrop--blanc .sec__assistant input { background: var(--surf-blanc); --txt-encre: var(--txt-neutre); }
.modal-backdrop--blanc .sec2__carte .sec__assistant input { background: var(--surf-blanc); color: var(--txt-encre); --txt-encre: var(--txt-neutre); }
.modal-backdrop--blanc .sec2__carte { margin-top: 4px; }

/* Communication : le mois se déplie en douceur — hauteur animée en JS (voir animerMois dans communication.js) */
.com-mois-bloc { height: 0; overflow: hidden; visibility: hidden; margin-bottom: 0; contain: layout paint; }
.com-mois-bloc.is-ouvert { height: auto; visibility: visible; margin-bottom: 2px; }
.com-mois-bloc__in { will-change: transform, opacity; }
.com-deplier svg { transition: rotate .5s cubic-bezier(.32, .72, 0, 1); }
@media (prefers-reduced-motion: reduce) { .com-deplier svg { transition: none; } }

/* Communication > Contenus : tuile « Ajouter un contenu » en tête du mur */
.com-vignette--ajout { align-items: center; justify-content: center; gap: 6px; background: transparent; border: 2px dashed rgba(27, 26, 23, .28); color: inherit; }
.com-vignette--ajout span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-size: 26px; font-weight: 500; line-height: 1; }
.com-vignette--ajout b { font-size: 14px; letter-spacing: -.01em; }
:root[data-theme="dark"] .com-vignette--ajout { border-color: rgba(255, 255, 255, .3); }
:root[data-theme="dark"] .com-vignette--ajout span { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .com-vignette--ajout { border-color: rgba(255, 255, 255, .3); } :root:not([data-theme="light"]) .com-vignette--ajout span { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; } }

/* Communication > Clients : carte avec actions visibles (programme + planifier) */
.com-cli { cursor: default; }
.com-cli__actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.com-cli__prog { height: 34px; padding: 0 14px; border: 1.5px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.com-cli__prog.is-def { background: #1B1A17; color: #DCF06E; border-color: #1B1A17; }
.com-cli__plus { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: #DCF06E; color: var(--txt-encre); font-size: 20px; font-weight: 500; line-height: 1; cursor: pointer; --txt-encre: #1B1A17; }
:root[data-theme="dark"] .com-cli__prog.is-def { background: #DCF06E; color: var(--txt-encre); border-color: #DCF06E; --txt-encre: #1B1A17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .com-cli__prog.is-def { background: #DCF06E; color: var(--txt-encre); border-color: #DCF06E; --txt-encre: #1B1A17; } }
.com-cli.sans { opacity: 1; }

/* Communication > Clients : bouton « Ajouter un programme » (seuls les clients avec programme sont listés) */
.com-ajout-prog { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; margin: 0 0 12px; border: 2px dashed rgba(27, 26, 23, .28); border-radius: 22px; background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.com-ajout-prog span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: #1B1A17; color: #DCF06E; font-size: 18px; line-height: 1; }
.com-obj-client { margin-bottom: 14px; }
.com-obj-client label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; opacity: .6; }
.com-obj-client select { width: 100%; height: 48px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text); font: inherit; font-size: 16px; font-weight: 600; }
:root[data-theme="dark"] .com-ajout-prog { border-color: rgba(255, 255, 255, .3); }
:root[data-theme="dark"] .com-ajout-prog span { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .com-ajout-prog { border-color: rgba(255, 255, 255, .3); } :root:not([data-theme="light"]) .com-ajout-prog span { background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; } }

/* ---------- Projet : accès à l'hébergement (données confidentielles) ---------- */
.acces-ouvrir { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.acces-etat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surf-sable-clair); --txt-encre: var(--txt-neutre); }
.acces-cadenas { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: #DCF06E; color: var(--txt-encre); --txt-encre: #1B1A17; }
.acces-etat b { display: block; font-size: 15px; }
.acces-etat small { display: block; opacity: .6; font-size: 12px; }
.acces-reveler { display: grid; gap: 10px; margin: 16px 0 12px; }
.acces-reveler label { font-size: 13px; font-weight: 600; opacity: .7; }
.acces-reveler input { height: 50px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--surf-sable-clair); color: inherit; font: inherit; font-size: 16px; --txt-encre: var(--txt-neutre); }
.acces-btn { height: 50px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--color-surface-hollow, #EDEAE3); color: var(--color-text, #1B1A17); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.acces-btn--ok { background: #6B4EFF; color: #fff; }
.acces-btn--danger { background: #FBE3DE; color: #A32D2D; --txt-encre: #1B1A17; }
.acces-actions { display: flex; gap: 8px; } .acces-actions .acces-btn { flex: 1; }
.acces-err { margin: 0; color: #A32D2D; font-weight: 700; font-size: 13px; }
.acces-vide { text-align: center; padding: 8px 0 4px; display: grid; gap: 10px; justify-items: center; }
.acces-vide p { margin: 0; opacity: .65; font-size: 14px; }
.acces-liste { display: grid; gap: 8px; margin-bottom: 10px; }
.acces-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surf-sable-clair); --txt-encre: var(--txt-neutre); }
.acces-ligne small { display: block; font-size: 11px; opacity: .55; }
.acces-ligne b { display: block; font-size: 15px; overflow-wrap: anywhere; user-select: all; }
.acces-ligne b.is-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.acces-copier { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: #1B1A17; color: #DCF06E; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }

/* Fiche projet : prix et date de renouvellement en gras, date de début en petit */
.renouv-widget__sub b { font-weight: 800; }
.renouv-widget__debut { margin: 6px 0 0; font-size: 12px; font-weight: 500; opacity: .65; }
/* Fiche projet (Hébergement / Domaine) : le prix et la date de renouvellement sont les éléments forts, le nom passe au second plan */
.renouv-widget__nom { margin: 4px 0 0; font-size: 14px; font-weight: 600; opacity: .75; }
.renouv-widget__renouv { margin: 2px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: var(--color-text); }
.renouv-widget__debut { margin-top: 8px; }

/* ---------- Contrastes (clair ET sombre) : textes explicitement lisibles sur leur fond ---------- */
/* Tuile « date » du dashboard : fond lime → texte encre, quel que soit le thème. */
.datebar-tuile--date, .datebar-tuile--date * { color: #1B1A17; }
/* Bannière Copilote : fond = « encre » du thème (noir en clair, crème en sombre) → texte = contraste de l'encre. */
.app-aibanner__line2, .app-aibanner__line2:-webkit-autofill { color: var(--color-ink-contrast); }
.app-aibanner__line2::placeholder { color: var(--color-ink-contrast); opacity: .62; }
.app-aibanner .app-aibanner__icon, .app-aibanner svg { color: inherit; }
/* Suggestions du Copilote : cartes pastel → texte encre. */
.copilote-sugg button, .copilote-sugg button b { color: var(--txt-encre); }
.copilote-sugg button small { color: var(--txt-encre); opacity: .75; }
/* Pastilles d'étapes projets */
.stage-bubbles__bubble--3 { color: #1B1A17; }
.stage-bubbles__bubble--1 { color: #8F3A1E; }
/* Présence équipe : le statut garde la couleur du texte secondaire (pas d'opacité en plus). */
.team-presence__statut { opacity: 1; color: var(--color-text-muted); }
.team-presence--online .team-presence__statut { color: #2A7D34; }
:root[data-theme="dark"] .team-presence--online .team-presence__statut { color: #8FE08A; }
/* Initiales du profil (violet sur violet translucide) : plus clair en sombre. */
:root[data-theme="dark"] .app-header__profile-btn .app-header__avatar, :root[data-theme="dark"] .app-header__avatar { color: #D4CAFF; }
/* Facture reçue (carte pastel) : le tampon « Dépense créée » et la ligne « TTC » restent lisibles dans les deux thèmes. */
.recue-carte .recue-carte__fait { background: rgba(255, 255, 255, .62); color: #1B1A17; }
.recue-carte .recue-carte__dep { border-color: #1B1A17; color: #1B1A17; }
.recue-carte .recue-carte__sous { color: #1B1A17; opacity: .75; }
/* Bandeau « Net (trésorerie) » sur fond accent */
.finstats__label--accent { color: var(--color-accent-contrast); opacity: .85; }
.ei-activite__etat.is-alerte { color: #1B1A17; }
.cal-arch__mois { opacity: 1; }
.abo-carte__sous, .abo-carte__k { opacity: .82; }
.colis-pile b { color: #1B1A17; }
.bq2-note { opacity: .7; }
.finstats__label--accent { opacity: 1; }
.charges-kpi small { opacity: .85; }
.cal-mm__jour--hors .cal-mm__nb, .cal-mm__jour.is-hors .cal-mm__nb, .cal-mm__jour.is-autre .cal-mm__nb { color: var(--color-text-muted); }
/* Conteneurs pastel : on redéfinit localement les couleurs de texte pour que TOUT ce qu'ils contiennent reste lisible en sombre */
.fiche-entete, #fiche-infos .renouv-widget, #fiche-infos .renouv-widget__slide { --color-text: #1B1A17; --color-text-muted: #55524A; --txt-encre: #1B1A17; color: #1B1A17; }
#fiche-infos .renouv-widget__debut, #fiche-infos .renouv-widget__nom, #fiche-infos .renouv-widget__label { color: #1B1A17; }
#fiche-infos .renouv-widget__debut { opacity: .8; }

/* ---------- Contrastes : corrections communes aux deux thèmes ---------- */
.app-header__profile-btn .app-header__avatar, .app-header__avatar { color: #4A33D6; }
:root[data-theme="dark"] .app-header__profile-btn .app-header__avatar, :root[data-theme="dark"] .app-header__avatar { color: #D4CAFF; }
.datebar-tuile--taches .datebar-tuile__mois { opacity: 1; }
.tache-suppr, .btn-delete-tache { color: var(--color-text-muted); }
.progress-stepper__label { color: var(--color-text-muted); }
.progress-stepper__step.is-actif .progress-stepper__label, .progress-stepper__step.is-active .progress-stepper__label, .progress-stepper__step.is-courant .progress-stepper__label { color: var(--color-text); }
@media (max-width: 720px) {
  :is(#cal-view-tabs, #messagerie-tabs, #contacts-filter-tabs, #compta-tabs, #suivi-tabs, #type-tabs, #admin-tabs, #rappels-tabs, #com-tabs, #facturation-tabs) button:not(.active) { color: var(--color-text-muted); }
}
.yearchart__pin-label, .yearchart__pin-label * { color: #1B1A17; }
.abo-carte__client { opacity: .85; }
.colis-groupe { opacity: .78; }
.cal-cats-lien { opacity: .85; }
.bq2-pied button { opacity: .8; }
.charges-kpi small { opacity: 1; }
.cal-mm__jour.is-hors { opacity: .9; }
.finstats__icon--accent { color: #1B1A17; }
.auth-lien { color: var(--color-accent); }
