/* ==========================================================================
   LPX CRM — style Apple (2026-11-14 ; avant : « L'établi »)
   Jetons et composants de base. Remplace public/css/crm.css tel quel :
   mêmes noms de classes, les vues existantes en profitent sans réécriture.
   Direction complète : docs/design/direction.md · Maquette : docs/design/maquette.html

   Trois idées tiennent tout le système :
   1. Le chanfrein. Le coin haut-droit coupé à 45°, pris dans le L et le X du
      logo. Coin coupé = une pièce qu'on emboîte (bloc, tuile, puce, bouton
      principal). Coin rond = un outil (champ, menu, toast, palette).
   2. La plaque. Les pièces se posent sur un fond plus sombre, sans ombre :
      l'élévation se lit par le ton, pas par le flou. Ça reste net en plein soleil.
   3. La brique de couleur. Chaque module a sa couleur, montrée en petit
      (tenon, icône, bord d'un rendez-vous), jamais en grand aplat.

   Couleurs : light-dark() suit le thème. Pour forcer : <html data-theme="light|dark">.
   Style Apple (décision de Vincent, 2026-11-14) : la police du système (San Francisco sur iPhone et Mac,
   Inter ailleurs), titres serrés en 600-700, casse normale, coins arrondis, fonds unis.
   Après une fusion : python3 -I outils/style-apple.py public/css/crm.css
   ========================================================================== */

/* ---- 1. Jetons ------------------------------------------------------------ */
:root {
    color-scheme: light dark;

    /* Marque (fixes) */
    --lpx-bleu: #0066FF;
    --lpx-cyan: #00B8F5;
    --lpx-glacier: #C4F3FF;
    --lpx-noir: #101820;

    /* Surfaces : l'établi (derrière), la plaque (zone de travail), les pièces */
    --etabli:    light-dark(#E8E8ED, #000000);
    --fond:      light-dark(#F5F5F7, #000000);
    --surface:   light-dark(#FFFFFF, #1C1C1E);
    --surface-2: light-dark(#F2F2F7, #2C2C2E);
    --surface-3: light-dark(#E5E5EA, #3A3A3C);
    --ligne:       light-dark(#E5E5EA, #38383A);
    --ligne-forte: light-dark(#8E8E93, #636366); /* bord des champs : 3:1 minimum, lisible au soleil */
    --tenon:       light-dark(#E5E5EA, #2C2C2E); /* points de la plaque */

    /* Texte */
    --texte:   light-dark(#1D1D1F, #F5F5F7);
    --texte-2: light-dark(#5E5E63, #AEAEB2);
    --texte-3: light-dark(#6E6E73, #98989D);

    /* Bleu LPX : « plein » pour les aplats (toujours #0066FF + blanc = 4,8:1),
       « bleu » pour le texte et les liens (éclairci en sombre). */
    --bleu-plein: #0066FF;
    --bleu-plein-survol: light-dark(#0052D1, #1F7BFF);
    --sur-bleu: #FFFFFF;
    --bleu:      light-dark(#0060F0, #6EA8FF);
    --bleu-fond: light-dark(#E7F0FF, #12284B);
    --cyan: #00B8F5;
    --glacier: light-dark(#C4F3FF, #0D3444);

    /* La dalle : le seul bloc foncé de l'écran (« Aujourd'hui ») */
    --encre:   light-dark(#1D1D1F, #1C1C1E);
    --sur-encre: #F2F6FA;
    --sur-encre-2: light-dark(#9AA8B8, #9FB7DA);

    /* Sémantiques */
    --succes:      light-dark(#0A7A4A, #4BDB9C);
    --succes-fond: light-dark(#E1F5EA, #0E2D21);
    --attention:      light-dark(#9A5800, #FFC655);
    --attention-fond: light-dark(#FFF2D3, #372809);
    --danger:      light-dark(#C42318, #FF8D83);
    --danger-fond: light-dark(#FCEAE8, #3B1512);
    --info: var(--bleu);
    --info-fond: var(--bleu-fond);
    /* Anciens noms, gardés pour les vues actuelles */
    --erreur: var(--danger);
    --erreur-fond: var(--danger-fond);
    --bleu-fonce: var(--bleu-plein-survol);
    --surface-2-ancien: var(--surface-2);

    /* Briques : une couleur par module (aplat + texte posé dessus) */
    --b-dossiers: #0066FF;          --sur-b-dossiers: #FFFFFF;
    --b-calendrier: #00B8F5;        --sur-b-calendrier: #101820;
    --b-rendez-vous: #22C7A0;       --sur-b-rendez-vous: #101820;
    --b-formulaire: #C4F3FF;        --sur-b-formulaire: #101820;
    --b-portail: #A99BFF;           --sur-b-portail: #101820;
    --b-rapports: #FF6B1A;          --sur-b-rapports: #101820;
    --b-soumissions: #5B5BD6;       --sur-b-soumissions: #FFFFFF;
    --b-factures: #3DBE6E;          --sur-b-factures: #101820;
    --b-messages: #F0457E;          --sur-b-messages: #101820;
    --b-entretiens: #FFC21A;        --sur-b-entretiens: #101820;
    --b-punch: #8A9BB0;             --sur-b-punch: #101820;
    --b-fournisseurs: #C9965A;      --sur-b-fournisseurs: #101820;

    /* Typographie */
    --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --police-titre: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --taille-xs: 12px;
    --taille-s: 13.5px;
    --taille-m: 16px;     /* texte, ordinateur */
    --taille-l: 17px;
    --taille-xl: 20px;
    --taille-2xl: 26px;
    --taille-3xl: 34px;
    --taille-4xl: 46px;
    --taille-5xl: 64px;   /* gros chiffres de la dalle */

    /* Espacements (base 4) */
    --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px;
    --e-5: 24px; --e-6: 32px; --e-7: 48px; --e-8: 64px;

    /* Rayons et chanfreins */
    --r-piece: 14px;     /* cartes, tuiles, blocs */
    --r-outil: 12px;     /* champs, boutons */
    --r-flottant: 20px;  /* palette, toasts, menus, feuilles */
    --coupe-s: 7px;      /* puces, boutons */
    --coupe: 12px;       /* blocs, tuiles */
    --coupe-l: 22px;     /* dalle, panneau principal */

    /* Élévation : seulement pour ce qui flotte au-dessus de la plaque */
    --ombre-flottant: 0 0 0 1px var(--ligne), 0 2px 6px light-dark(rgba(16,24,32,.06), rgba(0,0,0,.35)), 0 18px 40px -12px light-dark(rgba(16,24,32,.28), rgba(0,0,0,.65));
    --ombre: var(--ombre-flottant); /* ancien nom */

    /* Mouvement */
    --duree-1: 120ms;
    --duree-2: 180ms;
    --duree-3: 280ms;
    --courbe: cubic-bezier(.2, .8, .2, 1);
    --courbe-emboite: cubic-bezier(.3, 1.45, .55, 1); /* léger rebond : une pièce qui clique */

    /* Cibles tactiles */
    --cible: 44px;
    --cible-pouce: 52px;

    /* Anciens noms */
    --rayon: var(--r-outil);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* ---- 2. Base -------------------------------------------------------------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--fond); color: var(--texte);
    font: 400 var(--taille-m)/1.47 var(--police);
    letter-spacing: -.011em;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
@media (max-width: 820px) { body { font-size: 17px; } }
h1, h2, h3 { line-height: 1.12; margin: 0; text-wrap: balance; }
h1 {
    font-family: var(--police-titre); font-weight: 700;
    font-size: clamp(28px, 3.6vw, var(--taille-3xl)); letter-spacing: -.022em;
}
h2 { font-family: var(--police-titre); font-weight: 600; font-size: var(--taille-xl); letter-spacing: -.017em; }
h3 { font-size: var(--taille-l); font-weight: 600; letter-spacing: -.014em; }
p { margin: 0; }
a { color: var(--bleu); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
code, kbd { font: 500 .92em ui-monospace, "SF Mono", Menlo, monospace; }
kbd {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 5px; background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--ligne-forte); color: var(--texte-2); font-size: 11.5px;
}
::selection { background: color-mix(in srgb, var(--cyan) 35%, transparent); }
.discret { color: var(--texte-2); }
.petit { font-size: var(--taille-s); }
.chiffres-tab, time, .heure { font-variant-numeric: tabular-nums; }

/* Les coins arrondis des pièces (ancienne règle du chanfrein). */
.chanfrein, .bloc, .tuile, .metier, .point, .question, .membre, .carte-form, .dalle, .chiffre,
.bouton:not(.secondaire):not(.danger):not(.fantome), .option > span, .creneau, .rdv, .evenement, .brique, .action-pouce {
    --c: var(--coupe);
    border-radius: var(--r-piece);
}
/* Les pièces : coins arrondis, à la façon d'Apple (plus de coin coupé). */
.bloc, .tuile, .metier, .point, .question, .membre, .carte-form, .chiffre, .liste-clients { position: relative; }

/* Focus : à l'intérieur de la pièce (le chanfrein couperait un contour extérieur). */
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.bouton:focus-visible, .tuile:focus-visible, .metier:focus-visible, .creneau:focus-visible, .rdv:focus-visible,
.liste-clients a:focus-visible, .menu nav a:focus-visible { outline: 2px solid var(--bleu); outline-offset: -3px; }
.bouton:not(.secondaire):not(.danger):not(.fantome):focus-visible { outline-color: var(--sur-bleu); outline-offset: -4px; }

/* ---- 3. Icônes (Lucide, ISC, SVG en ligne) -------------------------------- */
.icone { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icone.s { width: 16px; height: 16px; stroke-width: 2; }
.icone.l { width: 24px; height: 24px; }

/* La brique : la tuile carrée d'un module, avec son icône */
.brique {
    --c: 7px;
    display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
    background: var(--b, var(--b-dossiers)); color: var(--sur-b, var(--sur-b-dossiers)); border-radius: var(--r-piece);
}
.brique.s { --c: 5px; width: 24px; height: 24px; }
.brique.l { --c: 10px; width: 44px; height: 44px; }
.m-dossiers     { --b: var(--b-dossiers);     --sur-b: var(--sur-b-dossiers); }
.m-calendrier   { --b: var(--b-calendrier);   --sur-b: var(--sur-b-calendrier); }
.m-rendez_vous  { --b: var(--b-rendez-vous);  --sur-b: var(--sur-b-rendez-vous); }
.m-formulaire_client { --b: var(--b-formulaire); --sur-b: var(--sur-b-formulaire); }
.m-portail      { --b: var(--b-portail);      --sur-b: var(--sur-b-portail); }
.m-rapports     { --b: var(--b-rapports);     --sur-b: var(--sur-b-rapports); }
.m-soumissions  { --b: var(--b-soumissions);  --sur-b: var(--sur-b-soumissions); }
.m-factures     { --b: var(--b-factures);     --sur-b: var(--sur-b-factures); }
.m-messages     { --b: var(--b-messages);     --sur-b: var(--sur-b-messages); }
.m-entretiens   { --b: var(--b-entretiens);   --sur-b: var(--sur-b-entretiens); }
.m-punch        { --b: var(--b-punch);        --sur-b: var(--sur-b-punch); }
.m-fournisseurs { --b: var(--b-fournisseurs); --sur-b: var(--sur-b-fournisseurs); }

/* ---- 4. Boutons ----------------------------------------------------------- */
.bouton {
    --c: var(--coupe-s);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: var(--r-outil); padding: 10px 18px; min-height: var(--cible);
    background: var(--bleu-plein); color: var(--sur-bleu); font: 600 var(--taille-m)/1.2 var(--police);
    text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--duree-1) var(--courbe), transform var(--duree-1) var(--courbe), color var(--duree-1);
}
.bouton:hover { background: var(--bleu-plein-survol); text-decoration: none; }
.bouton:active { transform: translateY(1px) scale(.985); }
.bouton.secondaire { background: var(--surface-2); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne); }
.bouton.secondaire:hover { background: var(--surface-3); }
.bouton.fantome { background: transparent; color: var(--texte-2); }
.bouton.fantome:hover { background: var(--surface-2); color: var(--texte); }
.bouton.danger { background: none; color: var(--danger); padding-inline: 10px; }
.bouton.danger:hover { background: var(--danger-fond); }
.bouton.encre { background: var(--encre); color: var(--sur-encre); }
.bouton.grand { min-height: var(--cible-pouce); font-size: 16px; padding-inline: 22px; }
.bouton.icone-seule { padding: 0; width: var(--cible); }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: .45; pointer-events: none; }
@media (max-width: 820px) { .bouton { min-height: 48px; } }

/* ---- 5. Champs ------------------------------------------------------------ */
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ label { font-weight: 600; font-size: 14px; }
.champ input, .champ textarea, .ajout-note textarea, .recherche input, select, .heure-jour input[type="time"] {
    font: 16px var(--police); color: var(--texte); background: var(--surface);
    border: 1px solid var(--ligne-forte); border-radius: var(--r-outil); padding: 11px 12px; min-height: var(--cible); width: 100%;
    transition: border-color var(--duree-1), box-shadow var(--duree-1);
}
.champ textarea, .ajout-note textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.champ input:hover, .champ textarea:hover, .recherche input:hover, select:hover { border-color: var(--texte-3); }
.champ input:focus, .champ textarea:focus, .ajout-note textarea:focus, .recherche input:focus, select:focus, .heure-jour input:focus {
    outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bleu) 22%, transparent);
}
.champ input[aria-invalid="true"], .champ:has(.erreur-champ) input { border-color: var(--danger); }
::placeholder { color: var(--texte-3); opacity: 1; }
.erreur-champ { color: var(--danger); font-size: 13px; font-weight: 500; }
select { width: auto; max-width: 100%; appearance: none; padding-right: 36px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667183' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.champ select { width: 100%; }
.case { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.case input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--bleu-plein); }
.case span { display: flex; flex-direction: column; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- 6. Puces de choix (questionnaire, canal, filtres) -------------------- */
.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.option { position: relative; display: inline-flex; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option > span {
    --c: var(--coupe-s);
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--cible); padding: 9px 16px;
    border-radius: var(--r-piece); background: var(--surface-2); color: var(--texte); font-size: 14.5px; font-weight: 500;
    box-shadow: inset 0 0 0 1px var(--ligne);
    transition: background-color var(--duree-1), color var(--duree-1), transform var(--duree-2) var(--courbe-emboite);
}
.option:hover > span { background: var(--surface-3); }
.option input:checked + span { background: var(--bleu-plein); color: var(--sur-bleu); font-weight: 600; box-shadow: none; animation: emboite var(--duree-2) var(--courbe-emboite); }
.option input:checked + span::before {
    content: ""; width: 16px; height: 16px; flex: none; background: currentColor; margin-left: -4px;
    -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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.option input:focus-visible + span { outline: 2px solid var(--bleu); outline-offset: -3px; }
.option input:checked:focus-visible + span { outline-color: var(--sur-bleu); }
@keyframes emboite { 0% { transform: translateY(-3px); } 100% { transform: none; } }

/* ---- 7. Messages et pastilles --------------------------------------------- */
.message {
    border-radius: var(--r-outil); padding: 12px 14px 12px 16px; font-size: 14.5px; font-weight: 500;
    background: var(--info-fond); color: var(--texte); box-shadow: inset 3px 0 0 var(--info);
}
.message.succes { background: var(--succes-fond); box-shadow: inset 3px 0 0 var(--succes); }
.message.erreur { background: var(--danger-fond); box-shadow: inset 3px 0 0 var(--danger); }
.message.attention { background: var(--attention-fond); box-shadow: inset 3px 0 0 var(--attention); }
.lien-copie { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.lien-copie code {
    flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; background: var(--surface);
    color: var(--texte); border-radius: var(--r-outil); padding: 9px 11px; font-size: 13px; box-shadow: inset 0 0 0 1px var(--ligne);
}
.pastille {
    display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1;
    padding: 5px 8px; border-radius: 4px; background: var(--surface-2); color: var(--texte-2); white-space: nowrap;
}
.pastille.bleue  { background: var(--bleu-fond); color: var(--bleu); }
.pastille.verte  { background: var(--succes-fond); color: var(--succes); }
.pastille.ambre  { background: var(--attention-fond); color: var(--attention); }
.pastille.rouge  { background: var(--danger-fond); color: var(--danger); }
.pastille.avec-point::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bandeau-essai {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 14.5px; border-radius: var(--r-outil);
    background: var(--glacier); color: light-dark(#0B3A4D, #BDEEFF);
}

/* ---- 8. Pièces : blocs, tuiles ------------------------------------------- */
.bloc {
    background: var(--surface); border-radius: var(--r-piece); padding: 20px;
    box-shadow: inset 0 0 0 1px var(--ligne); display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
details.bloc summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
details.bloc summary::-webkit-details-marker { display: none; }
details.bloc summary::after {
    content: ""; width: 18px; height: 18px; flex: none; background: var(--texte-3); transition: transform var(--duree-2) var(--courbe);
    -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' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%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' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
details.bloc[open] summary::after { transform: rotate(180deg); }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tuile, .metier, .point {
    --b: var(--b-dossiers);
    background: var(--surface); border-radius: var(--r-piece); padding: 18px 18px 16px;
    box-shadow: inset 0 0 0 1px var(--ligne); display: flex; flex-direction: column; gap: 6px; color: var(--texte); text-decoration: none; min-width: 0;
    transition: background-color var(--duree-1), box-shadow var(--duree-1), transform var(--duree-2) var(--courbe);
}
/* Le tenon : la petite barre de couleur du module, en haut à gauche */
.tuile::before, .metier::before {
    content: ""; display: block; width: 22px; height: 5px; border-radius: 1px; background: var(--b); margin-bottom: 8px;
    transition: width var(--duree-2) var(--courbe);
}
.tuile:hover, .metier:hover, .metier.actuel { --bord: var(--b); box-shadow: inset 0 0 0 1.5px var(--b); text-decoration: none; }
.tuile:hover::before, .metier:hover::before, .metier.actuel::before { width: 40px; }
.tuile:active, .metier:active { transform: translateY(1px); }
.metier { font-weight: 600; min-height: 72px; align-items: flex-start; }
.metier .discret { font-weight: 400; }

/* La dalle : le bloc foncé « Aujourd'hui », un seul par écran */
.dalle {
    --c: var(--coupe-l);
    position: relative; overflow: hidden; background: var(--encre); color: var(--sur-encre); border-radius: var(--r-piece);
    padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.dalle .discret { color: var(--sur-encre-2); }
.dalle a { color: var(--lpx-glacier); }
/* Le trait du X, en grand, coupé par le bord */
.dalle::before {
    display: none; /* style Apple : plus de grand trait du X sur la dalle */
    content: ""; position: absolute; top: -48px; right: 0; width: 170px; height: 150px; pointer-events: none;
    background: linear-gradient(180deg, var(--lpx-cyan), var(--lpx-bleu));
    clip-path: polygon(0 0, 26% 0, 100% 100%, 74% 100%); transform: translateX(38%);
}
.dalle > * { position: relative; }

/* Chiffres clés */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.chiffre {
    --c: 10px; background: var(--surface); border-radius: var(--r-piece); padding: 16px; box-shadow: inset 0 0 0 1px var(--ligne);
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.chiffre__etiquette, .etiquette {
    font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--texte-2);
}
.chiffre__valeur, .gros-chiffre {
    font-family: var(--police-titre); font-weight: 700; font-size: var(--taille-2xl); line-height: 1.1;
    letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.chiffre__ecart { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.chiffre__ecart.hausse { color: var(--succes); }
.chiffre__ecart.baisse { color: var(--danger); }

/* Avatars (initiales) : le seul élément vraiment rond */
.avatar {
    --a: var(--b-dossiers);
    display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
    background: color-mix(in srgb, var(--a) 22%, var(--surface)); color: var(--texte);
    font: 700 11px/1 var(--police); letter-spacing: .02em; box-shadow: inset 0 0 0 1.5px var(--a);
}
.avatar.l { width: 40px; height: 40px; font-size: 14px; }

/* ---- 9. Pages publiques --------------------------------------------------- */
/* La plaque : la grille de tenons, réservée aux écrans de montage et publics */
.plaque, .public {
    background-color: var(--fond);
}
.public {
    min-height: 100dvh; display: flex; flex-direction: column;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.public__tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1080px; width: 100%; margin: 0 auto; }
.marque {
    display: inline-flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none;
    font-family: var(--police-titre); font-weight: 700; font-size: 17px; letter-spacing: -.01em;
}
.marque:hover { text-decoration: none; }
.marque img, .marque svg { height: 20px; width: auto; }
.marque .clair { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marque .sombre { display: none; } :root:not([data-theme="light"]) .marque .clair { display: inline; } }
:root[data-theme="dark"] .marque .sombre { display: none; }
:root[data-theme="dark"] .marque .clair { display: inline; }
.public__corps { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 1080px; width: 100%; margin: 0 auto; padding-block: 32px; }

.accueil { display: flex; flex-direction: column; gap: 22px; max-width: 720px; }
.accueil .sur-titre, .etape, .menu .titre-groupe {
    font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--bleu);
}
.accueil h1 { font-size: clamp(36px, 7vw, var(--taille-5xl)); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.accueil .chapo { font-size: 18px; color: var(--texte-2); max-width: 56ch; }
.accueil .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }
.point { padding: 16px; gap: 4px; }

.carte-form {
    --c: var(--coupe-l);
    width: 100%; max-width: 440px; margin: 0 auto; background: var(--surface); border-radius: var(--r-piece);
    box-shadow: inset 0 0 0 1px var(--ligne); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px;
}
.carte-form form { display: flex; flex-direction: column; gap: 14px; }

/* ---- 10. L'application : établi, menu, panneau ---------------------------- */
.app { min-height: 100dvh; display: grid; grid-template-columns: 240px minmax(0, 1fr); background: var(--etabli); }
.menu {
    position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: transparent;
    padding: max(18px, env(safe-area-inset-top)) 10px 18px max(12px, env(safe-area-inset-left));
    display: flex; flex-direction: column; gap: 18px;
}
.menu .marque { padding: 6px 10px; font-size: 15.5px; }
.menu nav { display: flex; flex-direction: column; gap: 1px; }
.menu .titre-groupe { color: var(--texte-3); padding: 16px 10px 6px; }
.menu nav a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 38px; border-radius: var(--r-outil);
    color: var(--texte-2); text-decoration: none; font-weight: 500; font-size: 14.5px;
    transition: background-color var(--duree-1), color var(--duree-1);
}
.menu nav a .icone { width: 18px; height: 18px; }
.menu nav a:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--texte); }
.menu nav a[aria-current="page"] {
    background: var(--surface); color: var(--texte); font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--ligne), inset 3px 0 0 var(--bleu-plein);
}
.menu .pied { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 10px; }
.menu .pied form button { background: none; border: 0; padding: 0; color: var(--texte-3); font: 500 14px var(--police); cursor: pointer; text-align: left; }
.menu .pied form button:hover { color: var(--texte); }

/* Le panneau : la plaque de travail, posée sur l'établi, coin coupé. */
.contenu {
    --c: var(--coupe-l);
    min-width: 0; margin: 8px 8px 8px 0; min-height: calc(100dvh - 16px);
    background: var(--fond); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--ligne);
    border-radius: var(--r-piece);
    padding: max(28px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 48px 32px;
    display: flex; flex-direction: column; gap: 22px;
}
.contenu > * { width: 100%; max-width: 1120px; }
.entete { display: flex; flex-direction: column; gap: 6px; }
.entete-rangee { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.rangee { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Équipe */
.membres { display: flex; flex-direction: column; gap: 6px; }
.membre { background: var(--surface); border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); --c: 10px; }
.membre summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 56px; }
.membre summary::-webkit-details-marker { display: none; }
.membre[open] { --bord: var(--bleu-plein); box-shadow: inset 0 0 0 1.5px var(--bleu-plein); }
.membre .corps { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.grille-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 16px; }

/* ---- 11. Questionnaire de départ ------------------------------------------ */
.demarrage { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.famille { display: flex; flex-direction: column; gap: 10px; }
.grille-metiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.questionnaire { display: flex; flex-direction: column; gap: 14px; overflow-x: clip; }
.questionnaire h2 { margin-top: 10px; }
.question { --c: 16px; background: var(--surface); border: 0; border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); padding: 16px 18px 18px; margin: 0; min-width: 0; }
.question legend { font-weight: 600; padding: 0; float: left; width: 100%; } /* flottante : reste dans le bloc au lieu de chevaucher le bord */
.question legend + * { clear: both; }
.question.en-erreur { --bord: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.question .aide { margin-top: 6px; }
/* Une question par écran */
.questionnaire.pas-a-pas .question { display: none; }
.questionnaire.pas-a-pas .question.courante { display: block; padding: 28px 24px 28px; animation: arrive var(--duree-3) var(--courbe); }
.questionnaire.pas-a-pas .question.courante legend {
    font-family: var(--police-titre); font-weight: 700; font-size: clamp(22px, 4.6vw, 30px); line-height: 1.15; letter-spacing: -.015em;
}
.questionnaire.pas-a-pas .options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 20px; }
.questionnaire.pas-a-pas .option > span { width: 100%; min-height: var(--cible-pouce); padding: 12px 18px; font-size: 16px; font-weight: 500; }
@keyframes arrive { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.progression { display: flex; flex-direction: column; gap: 10px; }
.progression__texte { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; }
/* La barre se remplit de briques */
.progression__barre { height: 10px; background: repeating-linear-gradient(90deg, var(--surface-3) 0 22px, transparent 22px 26px); }
.progression__barre span {
    display: block; height: 100%; width: 0; transition: width var(--duree-3) var(--courbe-emboite);
    background: repeating-linear-gradient(90deg, var(--bleu-plein) 0 22px, transparent 22px 26px);
}
.liste-pret, .liste-champs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.liste-pret li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--ligne); }
.liste-pret li:last-child { border-bottom: 0; padding-bottom: 0; }
.liste-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.liste-champs li { background: var(--surface-2); border-radius: var(--r-piece); padding: 9px 11px; font-size: 14px; }
.navigation { gap: 10px; }
@media (max-width: 820px) {
    .questionnaire.pas-a-pas .navigation {
        position: sticky; bottom: 0; margin-inline: -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--fond) 88%, transparent); backdrop-filter: blur(10px);
    }
    .questionnaire.pas-a-pas .navigation .bouton:not([hidden]) { flex: 1; }
}

/* ---- 12. Dossiers clients et fournisseurs --------------------------------- */
.formulaire { display: flex; flex-direction: column; gap: 14px; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.choix-type { border: 0; padding: 0; margin: 0; }
.recherche { display: flex; gap: 8px; }
.recherche input {
    flex: 1; min-width: 0; padding-left: 40px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667183' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px center;
}
.liste-clients { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); overflow: hidden; }
.liste-clients li + li { border-top: 1px solid var(--ligne); }
.liste-clients a { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 13px 44px 13px 16px; color: var(--texte); text-decoration: none; min-width: 0; min-height: 56px; justify-content: center; }
.liste-clients a::after {
    content: ""; position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--texte-3); opacity: .7;
    -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' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%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' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.liste-clients a:hover { background: var(--surface-2); }
.liste-clients .nom { font-weight: 600; }
.liste-clients .discret { overflow-wrap: anywhere; }
.echeance { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; min-height: 60px; }
.echeance > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.echeance .nom { color: var(--texte); text-decoration: none; font-weight: 600; }
.echeance a.nom:hover { color: var(--bleu); }
.vide { align-items: flex-start; }
.pagination { justify-content: space-between; }
.pagination span[aria-disabled] { opacity: .45; }
.dossier { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 12px; align-items: start; }
.dossier__cote { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.coordonnees { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; }
.coordonnees dt { font-size: 12.5px; color: var(--texte-2); margin-top: 10px; }
.coordonnees dt:first-child { margin-top: 0; }
.coordonnees dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.coordonnees dd a { text-decoration: none; }
.texte-libre { white-space: pre-line; overflow-wrap: anywhere; }
.ajout-note { display: flex; flex-direction: column; gap: 8px; }
.etapes-import { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Ligne du temps : un rail, des pièces carrées par type */
.temps { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: flex; flex-direction: column; gap: 18px; }
.temps::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--ligne); border-radius: 1px; }
.temps__item { --b: var(--texte-3); position: relative; display: flex; flex-direction: column; gap: 4px; }
.temps__item::before {
    content: ""; position: absolute; left: -22px; top: 5px; width: 14px; height: 14px; border-radius: 3px;
    background: var(--b); box-shadow: 0 0 0 3px var(--surface); border-radius: 50%;
}
.temps__item.type-note       { --b: var(--b-dossiers); }
.temps__item.type-rendez_vous{ --b: var(--b-calendrier); }
.temps__item.type-message    { --b: var(--b-messages); }
.temps__item.type-facture    { --b: var(--b-factures); }
.temps__item.type-rapport    { --b: var(--b-rapports); }
.temps__item.type-entretien  { --b: var(--b-entretiens); }
.temps__item.type-formulaire, .temps__item.type-portail { --b: var(--b-portail); }
.temps__item.type-creation, .temps__item.type-import { --b: var(--b-rendez-vous); }
.temps__item.type-modification, .temps__item.type-archive { --b: var(--texte-3); }
.temps__item.type-note .texte-libre {
    background: var(--surface-2); border-radius: var(--r-piece); padding: 10px 12px; margin-top: 2px;
}
/* Séparateur de jour dans la ligne du temps (<li class="temps__jour">Aujourd'hui</li>) */
.temps__jour {
    position: relative; margin: 4px 0 -8px -22px; padding-left: 22px; background: var(--surface); list-style: none;
    font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--texte-3);
}
.temps__tete { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
@media (max-width: 820px) { .dossier { grid-template-columns: minmax(0, 1fr); } }

/* ---- 13. Calendrier et réservation ---------------------------------------- */
.barre-semaine { align-items: center; }
/* Les jours s'emboîtent : pas d'espace, une ligne fine entre eux */
.semaine {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
    background: var(--ligne); border-radius: var(--r-piece); overflow: hidden; box-shadow: 0 0 0 1px var(--ligne);
}
.jour { background: var(--surface); padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 160px; }
.jour.aujourdhui { background: color-mix(in srgb, var(--bleu-fond) 55%, var(--surface)); box-shadow: inset 0 3px 0 var(--bleu-plein); }
.jour h2 { font-family: var(--police); font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; padding: 0 2px 4px; color: var(--texte-2); }
.jour.aujourdhui h2 { color: var(--bleu); }
.rdv {
    --c: 8px; --b: var(--b-calendrier);
    display: flex; flex-direction: column; gap: 2px; padding: 7px 9px 8px 11px; border-radius: 4px;
    background: color-mix(in srgb, var(--b) 14%, var(--surface)); box-shadow: inset 3px 0 0 var(--b);
    color: var(--texte); text-decoration: none; font-size: 13px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere;
    transition: background-color var(--duree-1);
}
.rdv:hover { background: color-mix(in srgb, var(--b) 24%, var(--surface)); text-decoration: none; }
.rdv .heure { font-weight: 700; font-size: 12px; color: var(--texte-2); }
.rdv .pastille { align-self: flex-start; margin-top: 3px; }
.rdv.statut-annule { opacity: .55; text-decoration: line-through; --b: var(--texte-3); }
.rdv.statut-termine { --b: var(--succes); }
.rdv.statut-termine .heure::after { content: " · terminé"; font-weight: 500; }
.ajout-rapide { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 4px; text-decoration: none; color: var(--texte-3); opacity: 0; transition: opacity var(--duree-1); box-shadow: inset 0 0 0 1px var(--ligne); }
.jour:hover .ajout-rapide, .ajout-rapide:focus-visible { opacity: 1; }
@media (hover: none) { .ajout-rapide { opacity: 1; } }
.liste-types { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-types summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; cursor: pointer; padding: 6px 0; }
.heures { display: flex; flex-direction: column; gap: 6px; }
.heure-jour { display: grid; grid-template-columns: 130px auto auto auto; gap: 8px; align-items: center; }
.heure-jour input[type="time"] { width: auto; min-height: 40px; padding: 6px 8px; font-size: 15px; }
.jour-public { display: flex; flex-direction: column; gap: 8px; }
.jour-public h2 { font-size: 16px; }
.creneau {
    --c: var(--coupe-s);
    display: inline-flex; align-items: center; justify-content: center; min-height: var(--cible-pouce); min-width: 92px; padding: 8px 16px;
    border-radius: var(--r-piece); background: var(--surface); color: var(--texte); text-decoration: none; font-weight: 600;
    font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px var(--ligne-forte);
    transition: background-color var(--duree-1), color var(--duree-1);
}
.creneau:hover { background: var(--bleu-fond); color: var(--bleu); box-shadow: inset 0 0 0 1.5px var(--bleu); text-decoration: none; }
.creneau[aria-pressed="true"] { background: var(--bleu-plein); color: var(--sur-bleu); box-shadow: none; }
.propulse { text-align: center; padding-top: 24px; }
.document-legal { max-width: 760px; margin: 0 auto; line-height: 1.65; overflow-wrap: anywhere; }
.document-legal h1 { margin-bottom: 12px; }
.document-legal h2 { margin: 28px 0 10px; }
.document-legal table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.document-legal td, .document-legal th { border: 1px solid var(--ligne); padding: 6px 8px; text-align: left; }
.prochains-rdv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lien-public, .liens-partage { gap: 10px; }
.infos-utiles summary { cursor: pointer; font-weight: 600; }
@media (max-width: 1000px) {
    .semaine { grid-template-columns: minmax(0, 1fr); }
    .jour { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    .jour h2 { flex: 0 0 100%; }
    .jour .rdv { flex: 1 1 220px; }
    .ajout-rapide { opacity: 1; flex: 1 1 100%; }
}
@media (max-width: 480px) { .heure-jour { grid-template-columns: 1fr auto auto auto; } }

/* Grille horaire (nouvelle) : rendez-vous placés à l'heure, --debut et --duree en minutes */
.grille-heures {
    --h: 52px; --ouverture: 420; /* 7 h */
    display: grid; grid-template-columns: 52px repeat(var(--jours, 7), minmax(0, 1fr)); position: relative;
    background: var(--surface); border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); overflow: hidden;
}
.grille-heures__col { position: relative; border-left: 1px solid var(--ligne); min-height: calc(var(--plage, 11) * var(--h));
    background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--h) - 1px), var(--ligne) calc(var(--h) - 1px) var(--h)); }
.grille-heures__col.aujourdhui { background-color: color-mix(in srgb, var(--bleu-fond) 50%, transparent); }
.evenement {
    --c: 8px; --b: var(--b-calendrier);
    position: absolute; left: 3px; right: 3px; top: calc((var(--debut) - var(--ouverture)) / 60 * var(--h) + 1px);
    height: calc(var(--duree) / 60 * var(--h) - 3px); overflow: hidden;
    background: color-mix(in srgb, var(--b) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--b);
    border-radius: 4px; padding: 5px 7px 5px 10px; font-size: 12.5px; line-height: 1.3; color: var(--texte); text-decoration: none;
}
.maintenant { position: absolute; left: 0; right: 0; top: calc((var(--min) - var(--ouverture)) / 60 * var(--h)); height: 2px; background: var(--danger); z-index: 2; }
.maintenant::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* ---- 14. Couches flottantes : palette ⌘K, toasts ------------------------- */
.voile { position: fixed; inset: 0; z-index: 50; background: light-dark(rgba(16,24,32,.32), rgba(0,0,0,.55)); backdrop-filter: blur(3px); display: grid; place-items: start center; padding: 12vh 16px 16px; }
@keyframes palette-ouvre { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }

.toasts { position: fixed; z-index: 60; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast {
    display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r-flottant);
    background: var(--encre); color: var(--sur-encre); box-shadow: var(--ombre-flottant); font-size: 14.5px; font-weight: 500;
    animation: toast-monte var(--duree-3) var(--courbe-emboite);
}
.toast .icone { color: var(--b-factures); }
.toast.erreur .icone { color: #FF8D83; }
.toast button { margin-left: auto; background: none; border: 0; color: var(--lpx-glacier); font: 600 14px var(--police); padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.toast button:hover { background: rgba(255,255,255,.08); }
@keyframes toast-monte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) { .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* États vides illustrés */
.etat-vide { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px 24px; }
.etat-vide svg { width: 132px; height: auto; color: var(--bleu-plein); }
.etat-vide h2 { font-size: var(--taille-xl); }

/* Listes de rangées (prochains rendez-vous, entretiens dus) */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--ligne); min-height: 60px; }
.liste__item:first-child { border-top: 0; padding-top: 4px; }
.liste__heure { font-family: var(--police-titre); font-weight: 700; font-size: 15px; min-width: 52px; font-variant-numeric: tabular-nums; }
.liste__titre { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13.5px; color: var(--texte-2); }
.liste__fin { display: flex; gap: 6px; align-items: center; }

/* Contrôle segmenté (Jour / Semaine, thème) */
.segment { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ligne); }
.segment button, .segment a {
    display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 7px; background: none;
    color: var(--texte-2); font: 600 13.5px var(--police); text-decoration: none; cursor: pointer;
}
.segment [aria-pressed="true"], .segment [aria-current="page"] { background: var(--surface); color: var(--texte); box-shadow: 0 1px 2px light-dark(rgba(16,24,32,.08), rgba(0,0,0,.4)), inset 0 0 0 1px var(--ligne); }

/* ---- 14 b. Moments de plaisir (sobres, courts, jamais bloquants) ---------- */
/* Une tâche terminée : la pièce descend et s'emboîte, puis la coche se dessine. */
.emboite { animation: emboite-fait 420ms var(--courbe-emboite) both; }
@keyframes emboite-fait {
    0% { transform: translateY(-10px) scale(1.02); }
    55% { transform: translateY(1px) scale(.995); }
    100% { transform: none; }
}
.coche-dessinee path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: coche 320ms 120ms var(--courbe) forwards; }
@keyframes coche { to { stroke-dashoffset: 0; } }
/* Éclats : 6 mini-briques aux couleurs des modules, une seule fois, 600 ms. */
.eclats { position: relative; }
.eclats > i {
    position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 1px; pointer-events: none;
    background: var(--e, var(--b-entretiens)); opacity: 0; animation: eclat 620ms var(--courbe) forwards;
    clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}
.eclats > i:nth-child(1) { --x: -26px; --y: -22px; --e: var(--b-dossiers); }
.eclats > i:nth-child(2) { --x: 24px;  --y: -26px; --e: var(--b-entretiens); }
.eclats > i:nth-child(3) { --x: 32px;  --y: 4px;   --e: var(--b-messages); }
.eclats > i:nth-child(4) { --x: -30px; --y: 8px;   --e: var(--b-rendez-vous); }
.eclats > i:nth-child(5) { --x: -8px;  --y: -34px; --e: var(--b-rapports); }
.eclats > i:nth-child(6) { --x: 12px;  --y: 28px;  --e: var(--b-calendrier); }
@keyframes eclat {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(.6) rotate(0); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(90deg); }
}
/* Ti-Bloc : la petite brique qui accompagne les états vides et les réussites. */
.ti-bloc { width: 72px; height: auto; flex: none; }
.ti-bloc .yeux { transform-box: fill-box; transform-origin: center; animation: cligne 5s infinite; }
@keyframes cligne { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* ---- 15. Téléphone : le menu passe en bas, à portée du pouce -------------- */
.action-pouce {
    --c: 12px;
    display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-piece);
    background: var(--bleu-plein); color: var(--sur-bleu); border: 0; cursor: pointer;
}
/* ---- 15. Cellulaire : la coquille (barre du haut, barre du bas, feuilles) ---- */
.barre-haut, .barre-bas, .voile-menu, .menu__poignee { display: none; }

/* Les feuilles qui montent du bas (ajout rapide). À l'ordinateur : une petite boîte au centre. */
.tiroir { border: 0; padding: 0; background: transparent; color: var(--texte); width: min(100%, 460px); max-height: 86dvh; margin: auto; overflow: visible; }
.tiroir::backdrop { background: rgb(16 24 32 / .45); backdrop-filter: blur(2px); }
.tiroir__boite { background: var(--surface); border-radius: 18px; padding: 10px 14px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--ombre-flottant); }
.tiroir h2 { font-size: var(--taille-l); margin: 6px 8px 4px; }
.tiroir__action { display: flex; align-items: center; gap: 14px; padding: 10px 8px; min-height: 64px; border-radius: 12px; color: var(--texte); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tiroir__action:hover, .tiroir__action:active { background: var(--surface-2); text-decoration: none; }
.tiroir__action .brique { width: 44px; height: 44px; --c: 10px; }
.tiroir__action > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tiroir__action strong { font-size: 16px; }
.tiroir form { margin: 6px 0 0; display: flex; }
.tiroir form .bouton { flex: 1; }

@media (max-width: 820px) {
    .app { display: block; background: var(--fond); }

    /* Barre du haut : l'entreprise et la recherche, toujours là */
    .barre-haut {
        display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 15;
        padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
        background: color-mix(in srgb, var(--fond) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px);
    }
    .barre-haut__marque { display: flex; align-items: center; color: var(--texte); }
    .barre-haut__marque svg { height: 15px; width: auto; display: block; }
    .barre-haut__nom {
        flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texte-2);
        font-family: var(--police-titre); font-weight: 700; font-size: 13.5px; padding-left: 10px; border-left: 1px solid var(--ligne-forte);
    }
    .rond {
        display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
        background: var(--surface); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne); -webkit-tap-highlight-color: transparent;
    }
    .rond:active { background: var(--surface-2); }

    /* Barre du bas : cinq places, à portée du pouce */
    .barre-bas {
        display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center;
        position: fixed; inset: auto 0 0 0; z-index: 20;
        padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
        background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.5) blur(18px);
        box-shadow: 0 -1px 0 var(--ligne);
    }
    .barre-bas > a, .barre-bas > button:not(.barre-bas__plus) {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; min-width: 0; padding: 2px;
        border: 0; background: none; cursor: pointer; color: var(--texte-2); font: 600 11px/1.15 var(--police); text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .barre-bas > * > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .barre-bas .icone { width: 56px; height: 30px; padding: 4px 16px; box-sizing: border-box; border-radius: 999px; transition: background-color var(--duree-2), color var(--duree-2); }
    .barre-bas > [aria-current="page"], .barre-bas > [aria-expanded="true"] { color: var(--texte); font-weight: 700; }
    .barre-bas > [aria-current="page"] .icone, .barre-bas > [aria-expanded="true"] .icone { background: var(--bleu-fond); color: var(--bleu); }
    .barre-bas > a:active .icone, .barre-bas > button:active .icone { background: var(--surface-2); }
    .barre-bas__plus {
        justify-self: center; display: grid; place-items: center; width: 54px; height: 54px; margin-top: -20px; border: 0; cursor: pointer;
        border-radius: 17px; background: var(--bleu-plein); color: var(--sur-bleu); -webkit-tap-highlight-color: transparent;
        box-shadow: 0 0 0 5px var(--fond), 0 10px 22px -6px color-mix(in srgb, var(--bleu-plein) 70%, transparent);
        transition: transform var(--duree-2) var(--courbe-emboite);
    }
    .barre-bas__plus .icone { width: 26px; height: 26px; padding: 0; border-radius: 0; stroke-width: 2.4; background: none !important; color: inherit !important; }
    .barre-bas__plus:active { transform: scale(.92); }

    /* Le menu complet : une feuille qui monte du bas, avec chaque bloc en brique de couleur */
    .menu {
        position: fixed; inset: auto 0 0 0; top: auto; z-index: 40; height: auto; max-height: min(88dvh, 760px); overflow-y: auto; overscroll-behavior: contain;
        background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px -10px rgb(16 24 32 / .35);
        padding: 8px max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
        display: flex; flex-direction: column; gap: 10px;
        transform: translateY(105%); visibility: hidden; transition: transform var(--duree-3) var(--courbe), visibility 0s linear var(--duree-3);
    }
    .menu-ouvert .menu { transform: none; visibility: visible; transition: transform var(--duree-3) var(--courbe); }
    .menu-ouvert { overflow: hidden; }
    .menu__poignee { display: block; width: 40px; height: 5px; flex: none; border-radius: 3px; background: var(--ligne-forte); margin: 2px auto 2px; }
    .voile-menu { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(16 24 32 / .45); backdrop-filter: blur(2px); }
    .voile-menu[hidden] { display: none; }
    .menu .marque { display: flex; padding: 2px 6px 4px; font-size: 16px; }
    .menu .chercher-rapide { display: none; }
    .menu nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 2px; }
    .menu nav a {
        flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 0; padding: 10px 2px 8px; border-radius: 14px;
        color: var(--texte); font-size: 12px; font-weight: 600; text-align: center; -webkit-tap-highlight-color: transparent;
    }
    .menu nav a .icone {
        width: 50px; height: 50px; padding: 13px; box-sizing: border-box; border-radius: var(--r-piece);
        background: var(--b, var(--surface-2)); color: var(--sur-b, var(--texte));
        border-radius: var(--r-piece);
    }
    .menu nav a.reglage .icone { background: var(--surface-2); color: var(--texte); }
    .menu nav a .nom { font-size: 0; }
    .menu nav a .nom::after { content: attr(data-court); font-size: 12px; line-height: 1.2; }
    .menu nav a:hover { background: none; }
    .menu nav a:active { background: var(--surface-2); }
    .menu nav a[aria-current="page"] { background: var(--surface-2); box-shadow: none; font-weight: 700; }
    .menu .titre-groupe { display: block; grid-column: 1 / -1; padding: 10px 6px 0; }
    .menu .pied { margin: 0; padding: 12px 6px 0; border-top: 1px solid var(--ligne); flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
    .menu .pied .qui { display: inline; font-size: 14px; }
    .menu .pied form button { min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--surface-2); color: var(--texte); font-size: 14px; font-weight: 600; }

    /* La feuille « Ajouter » colle au bas de l'écran */
    .tiroir { width: 100%; max-width: none; margin: auto 0 0; }
    .tiroir__boite { border-radius: 22px 22px 0 0; padding: 8px max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); box-shadow: none; }
    .tiroir .menu__poignee { display: block; }

    /* La page */
    .contenu {
        margin: 0; min-height: 0; border-radius: 0; box-shadow: none; clip-path: none;
        padding: 6px max(16px, env(safe-area-inset-right)) calc(108px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        gap: 16px;
    }
    .bloc { padding: 16px; }
    .entete-rangee > .rangee .bouton { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
    .tiroir[open] .tiroir__boite { animation: monter var(--duree-3) var(--courbe) both; }
}
@keyframes monter { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- 16. Mouvement réduit et impression ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .menu, .toasts, .voile { display: none !important; }
    .app { display: block; background: none; }
    .contenu { margin: 0; clip-path: none; box-shadow: none; }
}

/* ==========================================================================
   CLASSES NOUVELLES (absentes de l'ancien crm.css)
   --------------------------------------------------------------------------
   Utilitaires  .chanfrein (coin coupé ; régler --c)  .plaque (fond à tenons)
                .chiffres-tab  .etiquette  .gros-chiffre
   Icônes       .icone  .icone.s  .icone.l   (SVG Lucide en ligne)
   Modules      .brique  .brique.s  .brique.l
                .m-dossiers .m-calendrier .m-rendez_vous .m-formulaire_client .m-portail
                .m-rapports .m-factures .m-messages .m-entretiens .m-punch .m-fournisseurs
                (posent --b et --sur-b ; à mettre sur .tuile, .brique, .rdv, .evenement)
   Boutons      .bouton.fantome  .bouton.encre  .bouton.grand  .bouton.icone-seule  .action-pouce
   Messages     .message.attention
   Pastilles    .pastille.verte  .pastille.ambre  .pastille.rouge  .pastille.avec-point
   Pièces       .dalle  .chiffres  .chiffre  .chiffre__etiquette  .chiffre__valeur  .chiffre__ecart(.hausse|.baisse)
                .avatar  .avatar.l
   Ligne temps  .temps__jour (séparateur de jour)  .temps__item.type-message  .type-facture  .type-rapport  (prêtes pour les lots à venir)
   Calendrier   .grille-heures  .grille-heures__col  .evenement (--debut, --duree en minutes)  .maintenant (--min)
                .creneau[aria-pressed="true"]
   Flottant     .voile  .palette  .palette__champ  .palette__liste  .palette__groupe  .palette__item  .palette__pied
                .toasts  .toast  .toast.erreur
   Listes       .liste  .liste__item  .liste__heure  .liste__titre  .liste__meta  .liste__fin
   Contrôles    .segment (boutons aria-pressed ou liens aria-current)
   États vides  .etat-vide  .ti-bloc (petite brique illustrée, yeux .yeux qui clignent)
   Plaisir      .emboite (pièce qui s'emboîte)  .coche-dessinee  .eclats (+ 6 <i> vides)
   Jetons ajoutés : --etabli --surface-3 --ligne-forte --tenon --texte-3 --bleu-plein --bleu-fond --glacier
                --encre --sur-encre --attention(-fond) --danger(-fond) --info(-fond) --b-* --sur-b-*
                --police-titre --taille-* --e-* --r-* --coupe* --ombre-flottant --duree-* --courbe* --cible*
   Anciens jetons gardés comme alias : --erreur --erreur-fond --bleu-fonce --rayon --ombre
   ========================================================================== */


/* ==========================================================================
   Compléments : écrans bâtis après la maquette (rapports, punch, factures,
   abonnement, « Aujourd'hui »). Mêmes jetons ; à raffiner au fil des retouches.
   ========================================================================== */
.galerie {display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;}
.galerie figure {margin: 0; display: flex; flex-direction: column; gap: 6px;}
.galerie img {width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2); display: block;}
.bouton-fichier {position: relative; overflow: hidden; align-self: flex-start;}
.bouton-fichier input {position: absolute; inset: 0; opacity: 0; cursor: pointer;}
.verification {display: flex; flex-direction: column; gap: 10px;}
.case.grande {padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 10px; background: var(--surface);}
.case.grande input {width: 24px; height: 24px;}
.punch {align-items: center; text-align: center; padding: 28px 18px;}
.punch.en-cours {border-color: var(--succes);}
.chrono {font-size: clamp(40px, 10vw, 64px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums;}
.bouton.gros {min-height: 64px; padding: 16px 32px; font-size: 18px; border-radius: 16px; width: min(100%, 380px);}
.bouton.danger-plein {background: var(--erreur); color: #fff;}
.tableau-defilant {overflow-x: auto;}
.feuille {border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums;}
.feuille th, .feuille td {padding: 8px 10px; border-bottom: 1px solid var(--ligne); text-align: left; white-space: nowrap;}
.feuille thead th {font-size: 12.5px; color: var(--texte-2);}
.chiffre.alerte strong, .pastille.alerte {color: var(--erreur);}
.filtres .pastille {text-decoration: none; padding: 6px 12px; font-size: 13px;}
.lignes {display: flex; flex-direction: column; gap: 8px;}
.ligne {display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px auto 100px; gap: 8px; align-items: center;}
.ligne input:not([type="checkbox"]) {font: 15px var(--police); color: var(--texte); background: var(--surface); border: 1px solid var(--ligne); border-radius: 8px; padding: 9px 10px; min-width: 0;}
.ligne .montant {text-align: right; font-variant-numeric: tabular-nums; font-weight: 600;}
.totaux {display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; margin: 0 0 0 auto; min-width: min(100%, 300px); font-variant-numeric: tabular-nums;}
.totaux dd {margin: 0; text-align: right;}
.facture__tete {display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;}
.facture__numero {display: flex; flex-direction: column; gap: 2px; align-items: flex-end; text-align: right;}
.facture__numero strong {font-size: 22px;}
.facture__client {display: flex; flex-direction: column; gap: 2px;}
.facture__paiement {background: var(--surface-2); border-radius: 10px; padding: 12px 14px;}
.desc-ligne {white-space: normal !important;}
@media (max-width: 600px) {
    .ligne {grid-template-columns: 1fr 64px 96px;}
    .ligne .montant, .ligne .case {grid-column: span 1;}
}
@media print {
    .menu, .non-imprime, .public__tete, .propulse, .message {display: none !important;}
    body, .bloc, .facture {background: #fff !important; color: #000 !important; border: 0 !important; box-shadow: none !important;}
}
.plans {display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;}
.plan {background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px; display: flex; flex-direction: column; gap: 8px;}
.plan.actuel {border-color: var(--bleu); box-shadow: 0 0 0 1px var(--bleu) inset;}
.plan .prix {font-size: 30px; font-weight: 700; letter-spacing: -.02em;}
.plan .bouton {margin-top: auto;}
.tarifs {display: flex; flex-direction: column; gap: 24px;}
.partage {margin-top: 4px;}
.compteur-parrainage {display: flex; align-items: center; gap: 8px; flex-wrap: wrap;}
.bloc-lego {width: 34px; height: 22px; border-radius: 5px; background: var(--surface-2); position: relative;}
.bloc-lego::before {content: ""; position: absolute; top: -5px; left: 5px; width: 24px; height: 6px;
    background: radial-gradient(circle at 4px 3px, var(--surface-2) 3px, transparent 3.5px) 0 0 / 12px 6px repeat-x;}
.bloc-lego.gagne {background: var(--bleu);}
.bloc-lego.gagne::before {background-image: radial-gradient(circle at 4px 3px, var(--bleu) 3px, transparent 3.5px);}
.option-abonnement {justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--ligne);}
.option-abonnement:last-child {border-bottom: 0;}
.vue-aujourdhui {display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start;}
.vue-aujourdhui__cote {display: flex; flex-direction: column; gap: 12px; min-width: 0;}
.route {list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: arret;}
.route li {display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2);}
.route li > a:first-child {display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; align-items: center; color: var(--texte); text-decoration: none; flex: 1; min-width: 0;}
.route__texte {display: flex; flex-direction: column; gap: 1px; min-width: 0;}
.route__texte > span {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.route__texte strong {overflow-wrap: anywhere; line-height: 1.25;}
.route__prochain {font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--lpx-cyan);}
.route li.prochain {box-shadow: inset 3px 0 0 var(--lpx-cyan);}
.route .heure {font-weight: 700; color: var(--bleu); font-variant-numeric: tabular-nums;}
.route li.statut-termine {opacity: .55;}
.lien-chiffre {text-decoration: none; color: var(--texte);}
.lien-chiffre:hover {border-color: var(--bleu);}
.punch-rapide {justify-content: space-between;}
.journee-pluie summary {cursor: pointer; color: var(--texte-2);}
.journee-pluie form {margin-top: 8px;}
.journee-pluie input[type="date"] {font: 14px var(--police); color: var(--texte); background: var(--surface); border: 1px solid var(--ligne); border-radius: 8px; padding: 6px 8px;}
@media (max-width: 900px) {
    .vue-aujourdhui {grid-template-columns: minmax(0, 1fr);}
}

/* Chiffres écrits en <strong> dans les anciennes vues : même voix que .chiffre__valeur */
.chiffre strong { font-family: var(--police-titre); font-weight: 700; font-size: var(--taille-2xl); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chiffre > .discret.petit:first-child { font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; }
.chrono, .plan .prix { font-family: var(--police-titre); font-weight: 700; }
.dalle .route li { background: color-mix(in srgb, var(--sur-encre) 8%, transparent); }
.dalle .route li > a:first-child { color: var(--sur-encre); }
.dalle .route .heure { color: var(--lpx-cyan); }
.dalle h2 { color: var(--sur-encre); }
.tuile .brique { margin-bottom: 2px; }

/* Au téléphone, le menu du bas montre le nom court du module (data-court). */
@media (max-width: 820px) {
    .menu nav a .nom { font-size: 0; }
    .menu nav a .nom::after { content: attr(data-court); font-size: 11.5px; }
}

/* Aujourd'hui : finitions */
.titre-section { font-size: var(--taille-l, 18px); margin: 28px 0 10px; }
.tuile:has(.brique)::before { display: none; }
.itineraire { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 600; }
.dalle .itineraire { color: var(--lpx-cyan); }
.dalle h2 { font-family: var(--police-titre); font-weight: 700; font-size: var(--taille-2xl); margin: 2px 0 0; }
.dalle .bouton.secondaire { background: color-mix(in srgb, var(--sur-encre) 10%, transparent); color: var(--sur-encre); box-shadow: none; align-self: flex-start; }
.vue-aujourdhui .chiffre { transition: transform var(--duree-2) var(--courbe), box-shadow var(--duree-1); }
.vue-aujourdhui .chiffre:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--bleu); }
@media (max-width: 820px) { .vue-aujourdhui { grid-template-columns: minmax(0, 1fr); } }
/* Arrivée douce des pièces, comme des blocs qu'on pose */
@media (prefers-reduced-motion: no-preference) {
    .vue-aujourdhui > *, .tuiles > * { animation: poser .42s var(--courbe) both; }
    .vue-aujourdhui > *:nth-child(2) { animation-delay: .06s; }
    .tuiles > *:nth-child(2) { animation-delay: .04s; } .tuiles > *:nth-child(3) { animation-delay: .08s; }
    .tuiles > *:nth-child(4) { animation-delay: .12s; } .tuiles > *:nth-child(5) { animation-delay: .16s; }
    .tuiles > *:nth-child(n+6) { animation-delay: .2s; }
}
@keyframes poser { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Mes liens à partager */
.liens-partage { display: grid; gap: 12px; }
.lien-partage { display: flex; flex-direction: column; gap: 12px; }
.lien-partage .rangee { align-items: flex-start; flex-wrap: nowrap; }
.lien-partage h2 { margin: 0 0 2px; }
.lien-partage code { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }

/* « C'est prêt » : les blocs tombent et s'empilent */
.montage { display: flex; align-items: flex-end; justify-content: center; gap: 18px; min-height: 150px; margin: 8px 0 4px; }
.pile { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.pile .piece {
    --c: 6px; display: grid; place-items: center; width: 64px; height: 22px; border-radius: var(--r-piece);
    background: var(--b); color: var(--sur-b); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .14);
}
.pile .piece:nth-child(even) { transform: translateX(10px); }
.pile .piece:nth-child(3n) { transform: translateX(-8px); }
.montage__ti .ti-bloc { width: 76px; height: auto; }
.liste-pret li { flex-direction: row; align-items: flex-start; gap: 12px; }
.liste-pret li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
@media (prefers-reduced-motion: no-preference) {
    .pile .piece { animation: tomber .5s var(--courbe) both; animation-delay: calc(var(--i) * .16s + .15s); }
    .montage__ti { animation: sautiller .6s var(--courbe) both; animation-delay: calc(var(--n) * .16s + .3s); }
    .liste-pret li { animation: poser .4s var(--courbe) both; animation-delay: calc(var(--i) * .07s + .2s); }
}
@keyframes tomber {
    0% { opacity: 0; translate: 0 -120px; }
    70% { opacity: 1; translate: 0 4px; }
    100% { opacity: 1; translate: 0 0; }
}
@keyframes sautiller {
    0% { opacity: 0; transform: translateY(12px) scale(.9); }
    50% { opacity: 1; transform: translateY(-10px) scale(1.04); }
    100% { opacity: 1; transform: none; }
}

/* Recherche rapide ⌘K */
.palette { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - 80px)); margin: 10vh auto auto; overflow: visible; }
.palette::backdrop { background: rgb(16 24 32 / .45); backdrop-filter: blur(3px); }
.palette__boite { --c: 14px; display: flex; flex-direction: column; background: var(--surface); color: var(--texte); border-radius: var(--r-piece); box-shadow: 0 24px 60px rgb(16 24 32 / .28), inset 0 0 0 1px var(--ligne); max-height: inherit; overflow: hidden; }
.palette__champ { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--ligne); }
.palette__champ input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 17px/1.3 var(--police); color: var(--texte); }
.palette__champ input::-webkit-search-cancel-button { display: none; }
.palette kbd { font: 600 11px/1 var(--police); color: var(--texte-2); background: var(--surface-2); border-radius: 5px; padding: 4px 6px; box-shadow: inset 0 -1px 0 var(--ligne); margin-inline: 1px; }
.palette__liste { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.palette__groupe { font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--texte-2); padding: 10px 10px 4px; }
.palette__item a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--texte); text-decoration: none; }
.palette__item[aria-selected="true"] a { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--b, var(--bleu)); }
.palette__texte { display: flex; flex-direction: column; min-width: 0; }
.palette__texte > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__vide { padding: 18px 12px; color: var(--texte-2); }
.palette__pied { margin: 0; padding: 9px 14px; border-top: 1px solid var(--ligne); }
@media (prefers-reduced-motion: no-preference) { .palette[open] .palette__boite { animation: poser .22s var(--courbe) both; } }
@media (max-width: 820px) { .palette { margin-top: 12px; } .palette__pied { display: none; } }
.chercher-rapide { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; cursor: pointer; background: var(--surface-2); color: var(--texte-2); font: 500 14px var(--police); padding: 8px 10px; border-radius: 9px; margin: 4px 0 8px; }
.chercher-rapide kbd { margin-left: auto; font: 600 11px/1 var(--police); background: var(--surface); padding: 3px 6px; border-radius: 5px; }
@media (max-width: 820px) { .chercher-rapide { display: none; } }

/* Réservation : bande des jours + créneaux par moment */
.jours-choix { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-inline: -2px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.jour-pastille {
    --c: 8px; flex: none; scroll-snap-align: start; display: grid; justify-items: center; gap: 0; width: 74px; padding: 10px 6px;
    border-radius: var(--r-piece); background: var(--surface); color: var(--texte); text-decoration: none; box-shadow: inset 0 0 0 1px var(--ligne-forte);
    transition: background-color var(--duree-1), transform var(--duree-2) var(--courbe);
}
.jour-pastille:hover { text-decoration: none; transform: translateY(-1px); }
.jour-pastille__nom, .jour-pastille__mois { font-size: 12px; font-weight: 600; color: var(--texte-2); text-transform: capitalize; }
.jour-pastille__date { font-family: var(--police-titre); font-weight: 700; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.jour-pastille__nb { font-size: 11px; color: var(--bleu); font-weight: 600; margin-top: 2px; }
.jour-pastille[aria-current="true"] { background: var(--bleu-plein); color: var(--sur-bleu); box-shadow: none; }
.jour-pastille[aria-current="true"] > span { color: var(--sur-bleu); }
html:not(.un-jour) .jour-pastille[aria-current="true"] { background: var(--surface); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne-forte); }
html:not(.un-jour) .jour-pastille[aria-current="true"] > span { color: inherit; }
.jour-public { scroll-margin-top: 16px; }
.jour-public[hidden] { display: none; }
.moment { display: flex; flex-direction: column; gap: 6px; }
.grille-creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.grille-creneaux .creneau { min-width: 0; }
@media (prefers-reduced-motion: no-preference) { .un-jour .jour-public:not([hidden]) .creneau { animation: poser .3s var(--courbe) both; } }

/* Ti-Bloc vient tenir compagnie aux écrans vides */
.bloc.vide { position: relative; padding-left: 118px; min-height: 112px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
    background-image: url("../img/ti-bloc.svg"); background-repeat: no-repeat; background-position: 24px 50%; background-size: 72px auto; }
.bloc.vide > :first-child { margin-top: 0; }
@media (max-width: 520px) { .bloc.vide { padding-left: 18px; padding-top: 104px; background-position: 18px 18px; background-size: 64px auto; } }
@media (prefers-reduced-motion: no-preference) { .bloc.vide { animation: poser .4s var(--courbe) both; } }
.ajout-rapide { gap: 4px; }
@media (max-width: 560px) { .barre-semaine .texte-large { display: none; } }

/* Les petites fêtes */
.fete { --c: 14px; position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 14px;
    border-radius: var(--r-piece); background: color-mix(in srgb, var(--b-entretiens) 22%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--b-entretiens); }
.fete[hidden] { display: none; }
.fete .ti-bloc { width: 60px; height: auto; flex: none; }
.fete > div:not(.fete__confettis) { flex: 1; min-width: 0; }
.fete strong { font-family: var(--police-titre); font-weight: 700; font-size: var(--taille-xl, 20px); }
.fete p { margin: 2px 0 0; }
.fete__confettis { position: absolute; inset: 0; pointer-events: none; }
.fete__confettis span { position: absolute; top: -14px; left: var(--x); width: 9px; height: 6px; border-radius: 1px; background: var(--b); opacity: 0; }
.fete--part { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; }
@media (prefers-reduced-motion: no-preference) {
    .fete:not([hidden]) { animation: poser .45s var(--courbe) both; }
    .fete:not([hidden]) .ti-bloc { animation: sautiller .7s var(--courbe) .2s both; }
    .fete__confettis span { animation: confetti 1.6s cubic-bezier(.3, .6, .5, 1) var(--d) both; }
}
@keyframes confetti {
    0% { opacity: 1; transform: translateY(0) rotate(0); }
    100% { opacity: 0; transform: translateY(150px) rotate(var(--r)); }
}

/* ---- Accueil (vitrine) ---------------------------------------------------- */
.lien-tete { color: var(--texte); font-weight: 600; text-decoration: none; padding: 8px 10px; }
.vitrine { display: flex; flex-direction: column; gap: clamp(48px, 8vw, 96px); min-width: 0; }
.bouton.gros { min-height: 52px; padding: 12px 22px; font-size: 16.5px; }
.heros { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.heros__texte { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.heros h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 700; letter-spacing: -.035em; line-height: .98; margin: 0; text-wrap: balance; }
.heros .chapo { font-size: 18.5px; color: var(--texte-2); max-width: 52ch; margin: 0; }
.heros .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sur-titre { font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--bleu); }

.atelier { --c: 18px; background: var(--surface); border-radius: var(--r-piece); box-shadow: 0 30px 60px -30px rgb(16 24 32 / .35), inset 0 0 0 1px var(--ligne);
    padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.atelier__metiers { display: flex; flex-wrap: wrap; gap: 6px; }
.atelier__metier { border: 0; cursor: pointer; font: 600 13px/1 var(--police); padding: 8px 11px; border-radius: 999px; background: var(--surface-2); color: var(--texte-2); transition: background-color var(--duree-1), color var(--duree-1); }
.atelier__metier:hover { color: var(--texte); }
.atelier__metier[aria-pressed="true"] { background: var(--encre); color: var(--sur-encre); }
.atelier__plan { display: flex; align-items: flex-end; gap: 14px; min-height: 280px; padding: 14px; border-radius: 12px;
    background-color: var(--fond); }
.atelier__pile { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: flex; flex-direction: column-reverse; gap: 5px; }
.atelier__pile li { --c: 7px; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: var(--r-piece);
    background: var(--surface); box-shadow: inset 4px 0 0 var(--b), inset 0 0 0 1px var(--ligne); font-weight: 600; font-size: 14px; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atelier__ti .ti-bloc { width: 74px; height: auto; display: block; }
.atelier__note { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
    .atelier__pile li { animation: tomber .48s var(--courbe) both; animation-delay: calc(var(--i) * .08s); }
    .atelier__ti.saute .ti-bloc { animation: sautiller .6s var(--courbe) .25s both; }
}

.bande-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bande-chiffres > div { --c: 10px; display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }
.bande-chiffres strong { font-family: var(--police-titre); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.bande-chiffres span { color: var(--texte-2); font-size: 14px; }

.section-vitrine { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.section-vitrine h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; margin: 6px 0 10px; text-wrap: balance; }
.section-vitrine__texte { max-width: 640px; }
.section-vitrine__texte.centre { text-align: center; margin-inline: auto; }
.journee-demo { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.dalle.demo { pointer-events: none; }
.demo__chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dalle .chiffre { background: color-mix(in srgb, var(--sur-encre) 8%, transparent); box-shadow: none; }
.dalle .chiffre .chiffre__etiquette { color: var(--sur-encre-2); }
.dalle .chiffre strong { color: var(--sur-encre); font-size: var(--taille-xl, 22px); }
.automatismes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.automatisme { --c: 12px; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne);
    transition: transform var(--duree-2) var(--courbe), box-shadow var(--duree-1); }
.automatisme:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--b); }
.automatisme h3 { margin: 6px 0 0; font-size: 18px; }
.automatisme p { margin: 0; }
.prix-vitrine .plans { max-width: 860px; margin-inline: auto; width: 100%; }
.promo-vitrine { text-align: center; margin: 0; }
.promo-vitrine code { background: var(--b-entretiens); color: #101820; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.ici { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details p { margin: 10px 0 0; }
.appel-final { align-items: center; text-align: center; padding: clamp(32px, 6vw, 64px) 24px; }
.appel-final h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 700; letter-spacing: -.03em; margin: 0; color: var(--sur-encre); }
.appel-final .bouton { align-self: center; }
.pied-vitrine { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding-bottom: 8px; }
.pied-vitrine a { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
    .heros__texte > * { animation: poser .5s var(--courbe) both; }
    .heros__texte > *:nth-child(2) { animation-delay: .05s; } .heros__texte > *:nth-child(3) { animation-delay: .1s; }
    .heros__texte > *:nth-child(4) { animation-delay: .15s; } .heros__texte > *:nth-child(5) { animation-delay: .2s; }
}
@media (max-width: 900px) {
    .heros, .journee-demo, .ici { grid-template-columns: minmax(0, 1fr); }
    .automatismes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bande-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .automatismes { grid-template-columns: minmax(0, 1fr); }
    .lien-tete { display: none; }
    .atelier__plan { min-height: 0; }
    .atelier__ti .ti-bloc { width: 56px; }
}
.heros .actions .bouton { flex: 0 0 auto; width: auto; }
@media (max-width: 560px) { .heros .actions .bouton { flex: 1 1 100%; } }

/* Les couleurs de bloc gagnent toujours sur les couleurs par défaut des pièces (placé à la fin exprès). */
.m-dossiers     { --b: var(--b-dossiers);     --sur-b: var(--sur-b-dossiers); }
.m-calendrier   { --b: var(--b-calendrier);   --sur-b: var(--sur-b-calendrier); }
.m-rendez_vous  { --b: var(--b-rendez-vous);  --sur-b: var(--sur-b-rendez-vous); }
.m-formulaire_client { --b: var(--b-formulaire); --sur-b: var(--sur-b-formulaire); }
.m-portail      { --b: var(--b-portail);      --sur-b: var(--sur-b-portail); }
.m-rapports     { --b: var(--b-rapports);     --sur-b: var(--sur-b-rapports); }
.m-soumissions  { --b: var(--b-soumissions);  --sur-b: var(--sur-b-soumissions); }
.m-factures     { --b: var(--b-factures);     --sur-b: var(--sur-b-factures); }
.m-messages     { --b: var(--b-messages);     --sur-b: var(--sur-b-messages); }
.m-entretiens   { --b: var(--b-entretiens);   --sur-b: var(--sur-b-entretiens); }
.m-punch        { --b: var(--b-punch);        --sur-b: var(--sur-b-punch); }
.m-fournisseurs { --b: var(--b-fournisseurs); --sur-b: var(--sur-b-fournisseurs); }
/* Une boîte de dialogue fermée ne s'affiche jamais, peu importe les autres règles. */
dialog:not([open]) { display: none !important; }

/* Mon abonnement : paiement */
.paiement { display: flex; flex-direction: column; gap: 10px; }
.paiement.en-attente { box-shadow: inset 0 0 0 2px var(--b-entretiens); }
.paiement form { margin: 0; }

/* Contrats de saison */
.liste-contrats { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; }
.liste-contrats li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--ligne); min-width: 0; }
.liste-contrats li:last-child { border-bottom: 0; }
.liste-contrats input[type="checkbox"], .liste-contrats .case-vide { width: 20px; height: 20px; flex: none; }
.liste-contrats__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.liste-contrats__texte a { color: var(--texte); }
.liste-contrats li.statut-refuse { opacity: .6; }
.tableau-renouvellement { width: 100%; border-collapse: collapse; margin: 12px 0; font-variant-numeric: tabular-nums; }
.tableau-renouvellement th, .tableau-renouvellement td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--ligne); }
.tableau-renouvellement th { font-size: 13px; color: var(--texte-2); letter-spacing: 0; }
@media (max-width: 560px) { .tableau-renouvellement th:nth-child(3), .tableau-renouvellement td:nth-child(3) { display: none; } }
.contrat-public__inclus { margin: 0 0 14px; }
.pastille.alerte { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

/* Premiers pas */
.premiers-pas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.premiers-pas__tete { display: flex; align-items: center; gap: 14px; }
.premiers-pas__tete > div:first-child { flex: 1; min-width: 0; }
.premiers-pas h2 { margin: 0; }
.premiers-pas p { margin: 2px 0 0; }
.premiers-pas__pile { display: flex; flex-direction: column-reverse; gap: 2px; }
.premiers-pas__pile span { --c: 3px; display: block; width: 34px; height: 8px; border-radius: 2px; background: var(--surface-3); clip-path: none; }
.premiers-pas__pile span.pose { background: var(--b); }
.premiers-pas__liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.premiers-pas__liste li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; min-width: 0; }
.premiers-pas__liste li a { color: var(--texte); }
.premiers-pas__liste li.fait { color: var(--texte-2); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--ligne-forte); }
.premiers-pas__liste li:not(.fait) .brique { background: var(--surface); color: var(--b); box-shadow: inset 0 0 0 1.5px var(--b); }

/* Pages métier (référencement) */
.liste-metier { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-metier li { --c: 8px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }
.liste-metier li .icone { color: var(--bleu); margin-top: 2px; }
.autres-metiers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.autres-metiers .pastille { text-decoration: none; }

/* Titres de vitrine : les longs mots (« thermopompes ») se coupent au lieu de déborder au téléphone. */
.heros h1, .section-vitrine h2, .appel-final h2 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 560px) { .heros h1 { font-size: clamp(30px, 9vw, 40px); } }

/* ---- Cellulaire : l'écran « Aujourd'hui » ---------------------------------
   Au téléphone, la journée passe en premier. Le bouton « + » remplace les raccourcis,
   la feuille « Menu » remplace les tuiles. */
@media (max-width: 820px) {
    .entete h1 { font-size: clamp(26px, 7.4vw, 32px); line-height: 1.08; }
    .entete .etape { font-size: 11.5px; }
    .actions-rapides { display: none; }
    .contenu > .premiers-pas { order: 5; }
    .contenu > .bandeau-essai { order: 6; }
    .contenu > .titre-section, .contenu > .tuiles { display: none; }

    .bandeau-essai { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 14px; font-size: 14px; }
    .bandeau-essai a { margin-left: auto; font-weight: 600; }

    .punch-rapide { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }
    .punch-rapide span { flex: 1; min-width: 0; font-size: 14.5px; color: var(--texte-2); }
    .punch-rapide .bouton { flex: none; padding-inline: 14px; }
    .punch-rapide span { font-size: 13.5px; line-height: 1.3; }

    .dalle { padding: 18px 14px 14px; gap: 12px; }
    .dalle > div:first-child { padding: 0 4px; }
    .dalle h2 { font-size: 30px; }
    .route { gap: 6px; }
    .route li { align-items: stretch; gap: 0; padding: 0; border-radius: 12px; overflow: hidden; }
    .route li > a:first-child { padding: 12px 4px 12px 12px; min-height: 60px; }
    .route .heure { font-size: 15px; white-space: nowrap; }
    .route .itineraire { flex: none; width: 56px; justify-content: center; font-size: 0; gap: 0; border-left: 1px solid color-mix(in srgb, var(--sur-encre) 10%, transparent); }
    .route .itineraire .icone { width: 22px; height: 22px; }
    .route li.statut-termine .heure { text-decoration: line-through; }
    .dalle .bouton.secondaire { align-self: stretch; min-height: 46px; }

    .vue-aujourdhui { gap: 12px; }
    .vue-aujourdhui__cote { gap: 10px; }
    .vue-aujourdhui .chiffre { padding: 14px 16px; }
    .prochains-rdv li { padding: 4px 0; line-height: 1.4; }

    .premiers-pas__tete { align-items: flex-start; }
    .premiers-pas__pile { display: none; }
    .premiers-pas__liste { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .premiers-pas__liste li.fait { display: none; }
    .premiers-pas__liste li { min-height: 52px; }
}

/* ---- Listes riches : pastille d'initiales à gauche, action (appeler) à droite ---- */
.liste-clients.riche li { display: flex; align-items: stretch; }
.liste-clients.riche li > a:first-child { flex: 1; flex-direction: row; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; }
.liste-clients.riche li > a:first-child::after { display: none; }
.initiales {
    --c: 8px; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-piece);
    background: var(--surface-2); color: var(--texte-2); font-family: var(--police-titre); font-weight: 700; font-size: 14px; letter-spacing: .02em;
    border-radius: var(--r-piece);
}
.ligne__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ligne__texte > .discret { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.ligne__texte .rangee { gap: 4px; margin-top: 2px; }
.liste-clients .action-ligne {
    flex: none; display: grid; place-items: center; width: 56px; min-height: 56px; padding: 0; color: var(--bleu);
    border-left: 1px solid var(--ligne); -webkit-tap-highlight-color: transparent;
}
.liste-clients .action-ligne::after { display: none; }
.liste-clients .action-ligne:hover, .liste-clients .action-ligne:active { background: var(--bleu-fond); }
.recherche .bouton .icone { display: none; }
@media (max-width: 820px) {
    .ordi { display: none !important; }
    .liste-clients.riche li > a:first-child { padding: 12px 6px 12px 12px; min-height: 64px; }
    .initiales { width: 42px; height: 42px; }
    /* La recherche : le champ prend toute la largeur, le bouton devient une loupe. */
    .recherche { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 5; gap: 6px; }
    .recherche input { min-height: 48px; box-shadow: 0 6px 16px -10px rgb(16 24 32 / .35); }
    .recherche .bouton { flex: none; width: 48px; padding: 0; }
    .recherche .bouton .icone { display: block; width: 20px; height: 20px; }
    .recherche .bouton span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    /* En-tête de page : le titre à gauche, les actions compactes à droite */
    .entete-rangee { align-items: flex-start; gap: 10px; }
    .entete-rangee > .entete { flex: 1 1 160px; }
    .entete-rangee > .rangee { flex: 1 1 100%; gap: 8px; }
}

/* ---- Fiche de travail (un rendez-vous) ------------------------------------ */
.quand { font-weight: 600; font-size: var(--taille-l); margin: 0; }
.gestes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; max-width: 520px; }
.geste { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne);
    color: var(--texte); font-weight: 600; font-size: 13px; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform var(--duree-2) var(--courbe), box-shadow var(--duree-1); }
.geste:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--ligne-forte); }
.geste:active { transform: scale(.96); }
.fiche-travail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.a-savoir { box-shadow: inset 0 0 0 1.5px var(--b-entretiens); background: color-mix(in srgb, var(--b-entretiens) 9%, var(--surface)); }
.a-savoir h2 { display: flex; align-items: center; gap: 8px; font-size: var(--taille-m); margin: 0 0 10px; }
.etapes-visite { display: flex; flex-direction: column; gap: 0; padding: 4px 16px; }
.etape-visite { display: flex; align-items: center; gap: 12px; padding: 14px 0; margin: 0; }
.etape-visite + .etape-visite { border-top: 1px solid var(--ligne); }
.etape-visite__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.etape-visite select { width: auto; max-width: 100%; min-height: 40px; padding: 6px 10px; font-size: 15px; }
.etape-visite.fait .brique { opacity: .55; }
.etape-visite .bouton { flex: none; }
.autres-actions .rangee { margin-top: 12px; }
@media (max-width: 820px) {
    .gestes { max-width: none; }
    .etape-visite { flex-wrap: wrap; }
    .etape-visite .bouton { flex: 1 1 100%; margin-left: 44px; min-height: 50px; }
    .etapes-visite { padding: 2px 14px; }
}

/* ---- Répartition : la journée en colonnes, une par personne (chantier 5) ---
   Dans cette section : le choix « Semaine | Répartition », le tableau de répartition et ses cartes,
   la semaine au cellulaire (un jour à la fois), les coéquipiers dans le formulaire du rendez-vous.
   Script : public/js/repartition.js. */

/* Semaine | Répartition : deux vues du même calendrier */
.vues-calendrier { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-outil); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ligne); }
.vues-calendrier a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 14px; border-radius: 6px; color: var(--texte-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.vues-calendrier a:hover { color: var(--texte); text-decoration: none; }
.vues-calendrier a[aria-current="page"] { background: var(--surface); color: var(--texte); box-shadow: 0 0 0 1px var(--ligne); }

/* Le tableau : les pastilles pour sauter à une personne, puis les colonnes (seules à défiler de côté) */
.contenu > .tableau-repartition { max-width: none; }
.tableau-repartition { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tableau-repartition[aria-busy="true"] { cursor: progress; }
#repartition-erreur[hidden] { display: none; }
.sauts-colonnes { position: relative; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sauts-colonnes .pastille { gap: 6px; padding: 7px 10px; font-size: 13px; text-decoration: none; }
.sauts-colonnes__nb { font-variant-numeric: tabular-nums; opacity: .7; }
/* position: relative garde les étiquettes cachées (.sr) dans la zone qui défile : la page ne s'élargit pas. */
.colonnes-repartition { position: relative; display: flex; align-items: stretch; gap: 10px; min-width: 0; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
.colonne-repartition { flex: 1 0 264px; max-width: 380px; min-width: 0; min-height: 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); transition: background-color var(--duree-1), box-shadow var(--duree-1); }
.colonne-repartition.a-placer { background: color-mix(in srgb, var(--attention-fond) 55%, var(--surface)); box-shadow: inset 0 0 0 1px var(--ligne), inset 0 3px 0 var(--attention); }
.colonne-repartition.cible { background: var(--bleu-fond); box-shadow: inset 0 0 0 2px var(--bleu-plein); }
.colonne-repartition__tete { display: flex; flex-direction: column; gap: 2px; padding: 2px 4px 8px; border-bottom: 1px solid var(--ligne); }
.colonne-repartition__tete h2 { margin: 0; font-family: var(--police); font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.colonne-repartition__tete p { margin: 0; }
.colonne-repartition__tete .itineraire { align-self: flex-start; min-height: 30px; white-space: normal; }
.colonne-repartition__cartes { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.colonne-repartition__vide { margin: 0; padding: 16px 6px; text-align: center; }
.colonne-repartition__cartes:has(.carte-rdv) .colonne-repartition__vide { display: none; }

/* La carte d'un rendez-vous (reprend .rdv : la couleur du statut sur le bord gauche) */
.carte-rdv { position: relative; gap: 4px; padding: 9px 10px 10px 12px; font-size: 13.5px; }
.carte-rdv[draggable="true"] { cursor: grab; }
.carte-rdv[draggable="true"]:active { cursor: grabbing; }
.carte-rdv.en-deplacement { opacity: .4; }
.carte-rdv.en-attente { opacity: .6; pointer-events: none; }
.carte-rdv.statut-absent { --b: var(--danger); }
.carte-rdv.statut-annule { text-decoration: none; }
.carte-rdv.statut-annule .carte-rdv__titre { text-decoration: line-through; }
.carte-rdv.statut-termine .heure::after { content: none; }
.carte-rdv.renfort { background: var(--surface); box-shadow: inset 3px 0 0 var(--b), inset 0 0 0 1px var(--ligne); }
.carte-rdv.conflit { --b: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); box-shadow: inset 0 0 0 2px var(--danger); }
.carte-rdv__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px; }
.carte-rdv .heure { font-size: 13px; color: var(--texte); }
.carte-rdv__titre { color: var(--texte); text-decoration: none; overflow-wrap: anywhere; }
.carte-rdv__titre:hover { text-decoration: underline; }
.carte-rdv__qui { color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-rdv__pastilles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.carte-rdv .pastille { align-self: auto; margin-top: 0; white-space: normal; line-height: 1.25; }
.carte-rdv .pastille .icone { width: 13px; height: 13px; }
.carte-rdv__actions { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--texte) 12%, transparent); }
.carte-rdv__heures, .carte-rdv__donner { display: flex; gap: 6px; margin: 0; min-width: 0; }
.carte-rdv__heures .bouton { flex: 1 1 0; min-width: 0; gap: 4px; padding: 6px 8px; font-size: 13px; }
.carte-rdv__donner select { flex: 1 1 0; width: auto; min-width: 0; }
.carte-rdv__donner .bouton { flex: none; padding-inline: 12px; font-size: 13px; }
@media (min-width: 821px) {
    .carte-rdv__actions .bouton, .carte-rdv__donner select { min-height: 34px; }
    .carte-rdv__donner select { padding: 5px 30px 5px 9px; font-size: 13.5px; background-position: right 8px center; }
}

/* La semaine au cellulaire : la bande des sept jours (cachée à l'ordinateur) */
.bande-semaine { display: none; }

/* Les coéquipiers, sous « Qui y va » dans le formulaire du rendez-vous */
.equipiers { margin-top: 2px; }
.equipiers summary { cursor: pointer; padding: 6px 0; color: var(--texte-2); font-weight: 600; }
.equipiers .options { margin-top: 4px; }
.equipiers .option input { min-height: 0; padding: 0; border: 0; }
.equipiers .option > span { min-height: 40px; padding: 7px 12px; font-size: 14px; }

@media (max-width: 820px) {
    .vues-calendrier { flex: 1 1 100%; }
    .vues-calendrier a { flex: 1 1 0; min-height: 44px; }

    /* Une colonne à la fois ; la suivante dépasse un peu pour montrer qu'on peut glisser. */
    .sauts-colonnes { flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; }
    .sauts-colonnes::-webkit-scrollbar { display: none; }
    .sauts-colonnes .pastille { flex: none; min-height: 44px; padding-inline: 14px; font-size: 14px; }
    .sauts-colonnes .pastille[aria-current="true"] { background: var(--bleu-plein); color: var(--sur-bleu); }
    /* Pas de glisser-déposer au cellulaire : une colonne vide reste courte au lieu de s’étirer. */
    .colonnes-repartition { gap: 8px; align-items: flex-start; scroll-snap-type: x mandatory; }
    .colonne-repartition { flex: 0 0 88%; max-width: none; }
    .colonne-repartition__tete .itineraire { min-height: 44px; }
    .carte-rdv { padding: 12px 12px 12px 14px; font-size: 15px; }
    .carte-rdv .heure { font-size: 14.5px; }
    /* Le titre ouvre la fiche : une vraie cible pour le pouce. */
    .carte-rdv__titre { display: flex; align-items: center; min-height: 44px; font-size: 16px; }
    .carte-rdv__actions { gap: 8px; }
    .carte-rdv__heures, .carte-rdv__donner { gap: 8px; }
    .carte-rdv__heures .bouton, .carte-rdv__donner .bouton { font-size: 14.5px; }

    /* La semaine : sept jours qui tiennent dans l'écran, un seul jour affiché (avec JavaScript). */
    .bande-semaine { display: flex; gap: 6px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
    .bande-semaine .jour-pastille { flex: 1 1 0; width: auto; min-width: 0; min-height: 64px; padding: 8px 2px; align-content: center; overflow: hidden; }
    .bande-semaine .jour-pastille__nom { font-size: 11.5px; }
    .bande-semaine .jour-pastille__date { font-size: 20px; }
    .bande-semaine .jour-pastille.aujourdhui:not([aria-current="true"]) { box-shadow: inset 0 0 0 1.5px var(--bleu); }
    .bande-semaine .jour-pastille.aujourdhui:not([aria-current="true"]) .jour-pastille__nom { color: var(--bleu); }
    .semaine .jour { scroll-margin-top: 72px; }
    .semaine .journee-pluie { flex: 1 1 100%; }
    .un-jour .semaine { display: block; overflow: visible; border-radius: 0; background: none; box-shadow: none; }
    .un-jour .semaine .jour:not(.choisi) { display: none; }
    .un-jour .semaine .jour { gap: 8px; padding: 14px 12px; border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); }
    .un-jour .semaine .jour.aujourdhui { box-shadow: inset 0 0 0 1px var(--ligne), inset 0 3px 0 var(--bleu-plein); }
    .un-jour .semaine .jour h2 { align-items: center; font-size: 16px; color: var(--texte); }
    .un-jour .semaine .jour h2 a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; }
    .un-jour .semaine .jour .rdv { flex: 1 1 100%; gap: 3px; padding: 12px 12px 12px 14px; font-size: 15px; }
    .un-jour .semaine .jour .rdv .heure { font-size: 14px; }
    .un-jour .semaine .ajout-rapide { min-height: 48px; }
    .equipiers summary { padding: 12px 0; }
    .equipiers .option > span { min-height: 44px; }
}
/* ---- Cellulaire : règles communes à tous les écrans ------------------------ */
@media (max-width: 820px) {
    /* Les chiffres : deux par rangée, compacts. Un chiffre seul au bout prend toute la largeur. */
    .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .chiffres > .chiffre:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .chiffres .chiffre { padding: 12px 14px; }
    .chiffres .chiffre strong, .chiffres .chiffre__valeur { font-size: clamp(19px, 5.6vw, 24px); overflow-wrap: anywhere; }
    .chiffre__etiquette, .chiffre > .discret.petit:first-child { font-size: 10.5px; }

    /* Les filtres en pastilles : une seule ligne qui glisse sous le doigt. */
    .filtres {
        flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
        margin-inline: calc(-1 * max(16px, env(safe-area-inset-left))); padding: 2px max(16px, env(safe-area-inset-left));
    }
    .filtres::-webkit-scrollbar { display: none; }
    .filtres .pastille { flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; font-size: 14px; text-decoration: none; }

    /* Un bouton au long texte passe à la ligne au lieu de pousser la page. */
    .bouton { white-space: normal; text-align: center; max-width: 100%; }

    /* Formulaires : un champ par ligne, gros champs, bouton d'envoi pleine largeur. */
    .grille-champs { grid-template-columns: minmax(0, 1fr); }
    .champ input, .champ textarea, .champ select, select { min-height: 48px; }
    .formulaire > .rangee:last-child > .bouton, .formulaire > div:last-child > .bouton, .formulaire > .bouton { flex: 1 1 100%; width: 100%; }

    /* Titres et cartes */
    .bloc h2, .contenu h2 { font-size: 18px; }
    .contenu > .entete > p.discret, .entete-rangee .entete > p.discret { font-size: 14.5px; }
    .lien-copie { flex-direction: column; align-items: stretch; }
    .lien-copie code { flex: none; font-size: 13px; }
    .lien-copie .bouton { width: 100%; }

    /* Les longues listes de détails : repliées, une grosse ligne à toucher. */
    details.bloc > summary { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
}

/* Fin de ligne d'une liste riche : un montant et son état, à droite. */
.ligne__fin { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-right: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.ligne__fin strong { font-weight: 700; white-space: nowrap; }
.liste-clients.riche li > a:first-child:has(.ligne__fin) { padding-right: 14px; }

/* Facture au cellulaire : chaque ligne devient une petite fiche (description, puis quantité × prix = montant). */
@media screen and (max-width: 600px) {
    .facture table.feuille, .facture table.feuille tbody { display: block; width: 100%; }
    .facture table.feuille thead { display: none; }
    .facture table.feuille tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 6px; padding: 12px 0; border-bottom: 1px solid var(--ligne); align-items: baseline; }
    .facture table.feuille td { display: block; padding: 0; border: 0; white-space: normal; }
    .facture table.feuille td.desc-ligne { grid-column: 1 / -1; font-weight: 600; overflow-wrap: anywhere; }
    .facture table.feuille td:nth-child(2) { color: var(--texte-2); }
    .facture table.feuille td:nth-child(2)::after { content: " ×"; }
    .facture table.feuille td:nth-child(3) { color: var(--texte-2); }
    .facture table.feuille td:nth-child(4) { font-weight: 700; text-align: right; }
    .facture { padding: 18px 16px; }
    .facture__tete { flex-direction: column; gap: 14px; }
    .facture__numero { align-items: flex-start; text-align: left; }
}
.derniers-envois { display: flex; flex-direction: column; gap: 10px; }
.derniers-envois h2 { margin: 0; }
@media (max-width: 820px) {
    .liste-contrats li { flex-wrap: wrap; row-gap: 2px; padding: 12px 0; }
    .liste-contrats__texte { flex: 1 1 50%; }
    .liste-contrats li > a.petit { flex: 1 1 100%; padding-left: 32px; min-height: 30px; display: flex; align-items: center; }
}

/* Ligne du temps : les couleurs des textos et courriels, et les longs messages repliés à trois lignes (un toucher les déplie). */
.temps__item.type-texto, .temps__item.type-courriel { --b: var(--b-messages); }
.temps__item.type-contrat { --b: var(--b-entretiens); }
.temps__item .texte-libre.replie { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; cursor: pointer; }
.temps__item .texte-libre { overflow-wrap: anywhere; }

/* Barre « semaine précédente / cette semaine / semaine suivante » : toujours sur une ligne. */
.barre-semaine { flex-wrap: nowrap; }
@media (max-width: 820px) {
    .barre-semaine { gap: 6px; }
    .barre-semaine > .bouton { flex: 1 1 0; min-width: 0; padding-inline: 8px; font-size: 14px; }
    .barre-semaine > .bouton .texte-large { display: none; }
    .barre-semaine > .filtre-employe { flex: 1 1 100%; }
    .barre-semaine:has(.filtre-employe) { flex-wrap: wrap; }
    /* Tableaux qui défilent : la première colonne (le nom) reste en place. */
    .tableau-defilant table th:first-child, .tableau-defilant table td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
}
.liste-clients .action-ligne.texte { width: auto; padding: 0 16px; font-weight: 600; font-size: 14px; text-decoration: none; }

/* ---- Soumissions ------------------------------------------------------------
   L'éditeur de lignes avec options, l'aperçu et la page du client.
   Tout le reste vient des pièces communes (.liste-clients.riche, .ligne__fin, .chiffres, .filtres, .lignes, .totaux, .etapes-visite…). */
.temps__item.type-soumission { --b: var(--b-soumissions); }
.soumission-titre { overflow-wrap: anywhere; }

/* L'éditeur de lignes : les cases « Taxes » et « Option » */
.ligne__cases { display: flex; align-items: center; gap: 14px; }
.ligne__cases .case { padding: 0; align-items: center; gap: 6px; min-height: var(--cible); }
.ligne__cases .case input { margin-top: 0; }
.lignes-edition .ligne.est-option .montant { color: var(--texte-2); }
.lignes-edition .ligne.est-option .desc { border-style: dashed; border-color: var(--b-soumissions); }

/* Le document : lignes claires, options à cocher, totaux */
.soumission-doc { gap: 18px; }
.lignes-soumission { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lignes-soumission > li + li { border-top: 1px solid var(--ligne); }
.ligne-soumission { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; min-width: 0; }
.ligne-soumission__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ligne-soumission__desc { font-weight: 600; overflow-wrap: anywhere; }
.ligne-soumission__montant { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.soumission-doc__options { display: flex; flex-direction: column; gap: 8px; }
.lignes-soumission.options { gap: 8px; }
.lignes-soumission.options > li + li { border-top: 0; }
.option-soumission {
    align-items: center; min-height: 60px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
    box-shadow: inset 0 0 0 1.5px var(--ligne); -webkit-tap-highlight-color: transparent;
    transition: background-color var(--duree-1), box-shadow var(--duree-1);
}
label.option-soumission { cursor: pointer; }
label.option-soumission:hover { box-shadow: inset 0 0 0 1.5px var(--ligne-forte); }
.option-soumission input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--b-soumissions); }
.option-soumission.choisie { background: color-mix(in srgb, var(--b-soumissions) 10%, var(--surface)); box-shadow: inset 0 0 0 2px var(--b-soumissions); }
.option-soumission.ecartee { opacity: .6; }
.totaux-soumission { width: min(100%, 380px); gap: 6px 20px; padding-top: 14px; border-top: 2px solid var(--texte); }
.totaux-soumission dt { min-width: 0; }
.totaux-soumission__total { padding-top: 6px; font-size: var(--taille-xl); }
.totaux-soumission__total strong { font-family: var(--police-titre); font-weight: 700; }
.soumission-doc__conditions { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--ligne); }
.soumission-doc .soumission-doc__conditions h2 { font-size: var(--taille-m); }
.soumission-doc__taxes { margin-top: -8px; text-align: right; overflow-wrap: anywhere; }
.soumission-contact { text-align: center; }
#accepter { scroll-margin-top: 16px; }

/* La suite d'une soumission acceptée : le bouton « Facturer » est dans un formulaire */
.etapes-soumission .etape-visite form { flex: none; margin: 0; }

/* Au cellulaire : le total reste collé en bas pendant que le client coche ses options */
.barre-total { display: none; }
@media (max-width: 820px) {
    .actions-soumission > form { display: flex; flex: 1 1 auto; }
    .actions-soumission > form > .bouton, .actions-soumission > .bouton { flex: 1 1 auto; }
    .etapes-soumission .etape-visite form { flex: 1 1 100%; display: flex; }
    .totaux-soumission { width: 100%; }
    .barre-total {
        position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
        margin: 0 -16px -16px; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: var(--surface);
        box-shadow: 0 -1px 0 var(--ligne), 0 -10px 18px -14px rgb(16 24 32 / .35);
    }
    .barre-total__texte { display: flex; flex-direction: column; min-width: 0; }
    .barre-total__texte strong { font-family: var(--police-titre); font-weight: 700; font-size: var(--taille-xl); line-height: 1.15; font-variant-numeric: tabular-nums; }
    .barre-total .bouton { flex: none; }
}
@media (max-width: 600px) {
    /* Comme les fiches de la facture : description, puis quantité et prix, puis les cases et le montant. */
    .lignes-edition .ligne .ligne__cases { grid-column: 1 / span 2; }
    .lignes-edition .ligne input:not([type="checkbox"]) { width: 100%; }
}
@media print {
    .barre-total, .lien-copie { display: none !important; }
}
/* ---- Fin des soumissions ---------------------------------------------------- */

/* ---- Mes blocs : chaque bloc est une carte avec sa brique et un interrupteur ---- */
.blocs-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.bloc-choix {
    --c: 12px; display: flex; align-items: center; gap: 14px; padding: 14px; min-height: 76px; cursor: pointer; border-radius: var(--r-piece);
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); transition: box-shadow var(--duree-1); -webkit-tap-highlight-color: transparent;
}
.bloc-choix:has(.interrupteur:checked) { box-shadow: inset 0 0 0 1.5px var(--b); }
.bloc-choix:not(:has(.interrupteur:checked)) .brique { filter: grayscale(1); opacity: .45; }
.bloc-choix__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* L'interrupteur : une case à cocher habillée (elle reste une vraie case pour le clavier et les lecteurs d'écran). */
.interrupteur {
    appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin: 0; border-radius: 999px; cursor: pointer;
    background: var(--ligne-forte); transition: background-color var(--duree-2);
}
.interrupteur::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgb(16 24 32 / .35); transition: transform var(--duree-2) var(--courbe-emboite);
}
.interrupteur:checked { background: var(--bleu-plein); }
.interrupteur:checked::after { transform: translateX(20px); }
.interrupteur:disabled { opacity: .55; cursor: default; }
.interrupteur:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* Aujourd'hui : les arrêts finis se replient sous ceux qui restent. */
.dalle__sous { font-size: .55em; font-weight: 700; color: var(--sur-encre-2); letter-spacing: 0; white-space: nowrap; }
.route-faits { border-top: 1px solid color-mix(in srgb, var(--sur-encre) 12%, transparent); padding-top: 10px; }
.route-faits > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 4px; color: var(--sur-encre-2); font-weight: 600; font-size: 14px; }
.route-faits > summary::-webkit-details-marker { display: none; }
.route-faits > summary::after { content: "Voir"; color: var(--lpx-cyan); }
.route-faits[open] > summary::after { content: "Masquer"; }
.route-faits .route { margin-top: 8px; }

/* Le bandeau d'essai : une phrase qui coule, pas trois colonnes. */
.bandeau-essai { display: block; }
.bandeau-essai a { white-space: nowrap; font-weight: 600; margin-left: 6px; }
@media (max-width: 820px) {
    .bandeau-essai { display: block; padding: 10px 14px; }
    .bandeau-essai a { margin-left: 4px; }
    /* Rapport terrain : deux photos par rangée, et un gros bouton pour l'appareil photo. */
    .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .bouton-fichier { align-self: stretch; min-height: 56px; font-size: 16.5px; }
    .case.grande { min-height: 56px; align-items: center; }
    .case.grande input { width: 24px; height: 24px; margin-top: 0; }
}

/* Lignes d'une facture au cellulaire : la description sur toute la largeur, puis quantité, prix, taxes et montant. */
@media (max-width: 600px) {
    .lignes { gap: 10px; }
    .ligne { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
    .ligne .desc { grid-column: 1 / -1; }
    .ligne input:not([type="checkbox"]) { font-size: 16px; min-height: 48px; }
    .ligne .case { grid-column: 1 / span 2; padding: 2px 0; align-items: center; }
    .ligne .montant { grid-column: 3; align-self: center; }
    .ligne:not(:has(.case)) .montant { grid-column: 1 / -1; }
}
/* En-tête d'une fiche : un seul bouton secondaire reste discret au cellulaire. */
@media (max-width: 820px) {
    .entete-rangee > .rangee:has(> .bouton.secondaire:only-child) { flex: 0 0 auto; }
    .entete-rangee > .rangee > .bouton.secondaire:only-child { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; font-size: 14px; }
    details.bloc:not([open]) { padding-block: 14px; }
}

/* ==========================================================================
   Chiffres — le tableau de bord du patron (resources/views/chiffres).
   Tout ce qui suit ne sert qu'à cette page. Les graphiques sont des SVG écrits
   par le serveur : leurs couleurs sont celles des blocs, en clair comme en sombre.
   ========================================================================== */
:root {
    --g-facture: var(--b-dossiers);
    --g-encaisse: var(--b-factures);
    --g-piste: var(--surface-2);
    --g-age-0: var(--b-factures);
    --g-age-1: var(--b-entretiens);
    --g-age-2: var(--b-rapports);
    --g-age-3: var(--danger);
}
.g-facture { --g: var(--g-facture); }
.g-encaisse { --g: var(--g-encaisse); }
.g-service { --g: var(--b-calendrier); }
.g-reservation { --g: var(--b-rendez-vous); }
.g-formulaire { --g: var(--b-portail); }
.g-import { --g: var(--b-dossiers); }
.g-main { --g: var(--b-punch); }
.g-age-0 { --g: var(--g-age-0); }
.g-age-1 { --g: var(--g-age-1); }
.g-age-2 { --g: var(--g-age-2); }
.g-age-3 { --g: var(--g-age-3); }
svg [class^="g-"] { fill: var(--g); }
.pastille-couleur { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--g, var(--g-facture)); }

/* La période : des pastilles qu'on touche du pouce */
.periodes { gap: 8px; }
.periodes .pastille { text-decoration: none; min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.periodes .pastille:hover { color: var(--texte); background: var(--surface-3); }
.periodes .pastille.bleue:hover { color: var(--bleu); background: var(--bleu-fond); }
.bloc.periode-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)) auto; gap: 12px; align-items: end; justify-content: start; }

/* Les six tuiles */
.chiffres.six { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.chiffres.six .chiffre { gap: 5px; }
.chiffres.six .chiffre strong { white-space: nowrap; }
.chiffres.six .chiffre strong.long { font-size: 22px; }
.chiffres.six .chiffre strong.tres-long { font-size: 20px; }
.chiffres.six .chiffre__ecart { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; line-height: 1.35; }
.chiffre__avant { font-weight: 500; color: var(--texte-2); }
.chiffre__note { font-size: 12.5px; line-height: 1.35; color: var(--texte-2); }
.chiffre__note.alerte { color: var(--danger); font-weight: 600; }
.chiffres.serre { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.chiffres.serre .chiffre { padding: 12px 14px; box-shadow: none; background: var(--surface-2); }
.chiffres.serre .chiffre::after { display: none; }
.chiffres.serre .chiffre strong { font-size: var(--taille-xl); white-space: nowrap; }
.chiffres.serre.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Les sections : un titre, une phrase qui dit ce qui est compté, puis le contenu */
.section-chiffres { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.section-chiffres > .bloc { gap: 16px; }
.section-chiffres__tete { display: flex; flex-direction: column; gap: 3px; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 22px 16px; align-items: start; }
.ce-qui-compte { font-size: 13.5px; color: var(--texte-2); line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.ce-qui-compte strong { color: var(--texte); }

/* Légende : une pastille de couleur, le nom, le chiffre écrit */
.legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--texte-2); }
.legende li { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.legende strong { color: var(--texte); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Barres par mois : l'axe est en HTML (texte net), les barres en SVG (pourcentages) */
.barres { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.barres__axe { position: relative; flex: none; width: 46px; height: 160px; margin-top: 8px; font-size: 11px; line-height: 1; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.barres__axe span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.barres__axe .haut { top: 0; }
.barres__axe .milieu { top: 50%; }
.barres__axe .bas { top: 100%; }
.barres__dessin { flex: 1; min-width: 0; display: block; overflow: visible; }
.barres__dessin .grille { stroke: var(--ligne); stroke-width: 1; }
.barres__dessin .base { stroke: var(--ligne-forte); stroke-width: 1; }
.barres__dessin text { font: 500 11px var(--police); fill: var(--texte-2); }
.barres__dessin rect { transition: opacity var(--duree-1); }
.barres__dessin rect:hover { opacity: .78; }
.graphique__chiffres summary { cursor: pointer; color: var(--bleu); font-weight: 600; font-size: 14px; min-height: var(--cible); display: inline-flex; align-items: center; }
.graphique__chiffres[open] summary { margin-bottom: 4px; }
.tableau-chiffres { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
.tableau-chiffres th, .tableau-chiffres td { padding: 8px 0 8px 14px; border-bottom: 1px solid var(--ligne); text-align: right; white-space: nowrap; }
.tableau-chiffres th:first-child { text-align: left; padding-left: 0; font-weight: 500; }
.tableau-chiffres thead th { font-size: 12.5px; font-weight: 600; color: var(--texte-2); }
.tableau-chiffres tfoot th, .tableau-chiffres tfoot td { border-bottom: 0; font-weight: 600; }

/* Barre en segments (âge des comptes) et listes de barres (services, origines) */
.segments { display: block; border-radius: 6px; overflow: hidden; }
.segments .ecart { fill: var(--surface); }
.barres-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.barres-liste li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: center; }
.barres-liste__nom { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.barres-liste__valeur { font-variant-numeric: tabular-nums; white-space: nowrap; }
.barres-liste__trait { grid-column: 1 / -1; display: block; }
.barres-liste__trait .piste { fill: var(--g-piste); }
.barres-liste li > .discret { grid-column: 1 / -1; }

/* Listes riches de cette page : un montant à droite, et des lignes qui ne sont pas des liens */
.ligne__montant { flex: none; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.liste-clients.riche li > a:first-child .ligne__montant { padding-right: 8px; }
.liste-clients.riche li > .ligne-fixe { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; min-height: 60px; }
.ligne-fixe .ligne__texte .rangee { gap: 4px; margin-top: 3px; }

/* Taux horaires et fichiers pour le comptable */
.taux-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.taux-corps { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.ligne__texte > .discret.libre { white-space: normal; overflow: visible; }
.taux-liste .champ label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comptable .bouton, .taux-corps .bouton { align-self: flex-start; }

@media (max-width: 820px) {
    /* Six périodes sur deux rangées plutôt qu'une ligne qui glisse : la période choisie reste toujours visible. */
    .filtres.periodes { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; gap: 8px; }
    .periodes .pastille { min-height: 44px; font-size: 14px; }
    .bloc.periode-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bloc.periode-dates .bouton { grid-column: 1 / -1; }
    .chiffres.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chiffres.six .chiffre { padding: 13px 12px 13px 14px; }
    .chiffres.six .chiffre strong { font-size: 21px; }
    .chiffres.six .chiffre strong.long { font-size: 18px; }
    .chiffres.six .chiffre strong.tres-long { font-size: 16px; }
    .chiffres.serre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chiffres.serre.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .chiffres.serre.trois .chiffre { padding: 10px; }
    /* Trois sur une rangée : la règle commune « le dernier, seul, prend toute la largeur » ne vaut pas ici. */
    .chiffres.serre.trois > .chiffre:last-child:nth-child(odd) { grid-column: auto; }
    .chiffres.serre .chiffre strong { font-size: 18px; }
    .barres__axe { width: 40px; font-size: 10.5px; }
    .barres__dessin text { font-size: 10.5px; }
    .comptable .bouton, .taux-corps .bouton { align-self: stretch; white-space: normal; text-align: center; }
    .liste-clients.riche li > .ligne-fixe { padding: 12px; min-height: 64px; }
}
@media (prefers-reduced-motion: no-preference) {
    .chiffres.six .chiffre { animation: poser .35s var(--courbe) both; }
    .chiffres.six .chiffre:nth-child(2) { animation-delay: 40ms; }
    .chiffres.six .chiffre:nth-child(3) { animation-delay: 80ms; }
    .chiffres.six .chiffre:nth-child(4) { animation-delay: 120ms; }
    .chiffres.six .chiffre:nth-child(5) { animation-delay: 160ms; }
    .chiffres.six .chiffre:nth-child(6) { animation-delay: 200ms; }
}
/* ---- Fin de la section Chiffres ------------------------------------------- */
/* Heures d'ouverture au cellulaire : le jour sur sa ligne, puis « de … à … » qui ne dépasse jamais la carte
   (sur un téléphone en format 12 heures, « 09:00 AM » est plus large). */
@media (max-width: 560px) {
    .heure-jour { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 8px; padding: 6px 0; border-bottom: 1px solid var(--ligne); }
    .heure-jour:last-child { border-bottom: 0; }
    .heure-jour > .case { grid-column: 1 / -1; padding: 4px 0; }
    .heure-jour input[type="time"] { width: 100%; min-width: 0; min-height: 44px; padding: 6px 8px; }
}
/* ---- Équipe et accès, journal d'activité (rôles et permissions) ----------- */
/* Une ligne de liste riche qui ne s'ouvre pas (pas un lien) : même mise en page que le lien. */
.liste-clients.riche li > .ligne-fixe { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; min-height: 56px; }
.liste-clients.equipe .rangee { flex-wrap: wrap; }
.equipe__fleche { flex: none; color: var(--texte-3); }
/* Les six rôles : des cartes à choisir (un bouton radio caché dans chaque carte). */
.cartes-role { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.cartes-role legend, .form-acces .ajustables > p { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
.carte-role { position: relative; display: block; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.carte-role input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.carte-role > span {
    display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 64px; padding: 14px 44px 14px 16px;
    background: var(--surface); border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne);
    transition: box-shadow var(--duree-1), background var(--duree-1);
}
.carte-role:hover > span { box-shadow: inset 0 0 0 1.5px var(--ligne-forte); }
.carte-role input:checked + span { background: var(--bleu-fond); box-shadow: inset 0 0 0 2px var(--bleu-plein); }
.carte-role input:checked + span::after {
    content: ""; position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--bleu-plein) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.carte-role input:focus-visible + span { outline: 2px solid var(--bleu); outline-offset: -3px; }
/* « Ajuster » : les blocs et les trois interrupteurs. */
.form-acces .ajustables { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; }
.form-acces .ajustables > p { margin-top: 10px; }
.form-acces .ajustables[disabled] { opacity: .5; }
.form-acces > .bouton { align-self: flex-start; }
details.retirer summary { cursor: pointer; color: var(--danger); min-height: var(--cible); display: flex; align-items: center; }
details.retirer form { margin-top: 8px; }
/* « Qui voit quoi » */
.roles-expliques { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.roles-expliques li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; min-width: 0; overflow-wrap: anywhere; }
.roles-expliques li + li { border-top: 1px solid var(--ligne); }
/* Journal */
.filtres-journal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; align-items: end; }
.journal__detail { overflow-wrap: anywhere; }
@media (max-width: 820px) {
    .form-acces > .bouton { align-self: stretch; }
    .liste-clients.riche li > .ligne-fixe { padding: 12px; min-height: 64px; }
}
/* ---- fin : équipe, accès et journal ---- */

/* Aujourd'hui : le raccourci vers la journée de toute l'équipe (pour ceux qui voient tout l'horaire). */
.dalle__equipe { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: 12px; text-decoration: none;
    background: color-mix(in srgb, var(--lpx-cyan) 14%, transparent); color: var(--sur-encre) !important; font-size: 14.5px; }
.dalle__equipe > span:last-child { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--lpx-cyan); white-space: nowrap; }

/* Répartition au cellulaire : quand tout est placé, la colonne « À placer » passe au bout. On ouvre sur la première personne. */
@media (max-width: 820px) {
    .colonne-repartition.a-placer:has(.colonne-repartition__vide) { order: 99; }
}

/* ---- La boucle de l'argent : versements des contrats, clauses du déneigement, portail client ----
   Tout le reste vient des pièces communes (.liste-clients.riche, .ligne__fin, .etapes-visite, .bloc-choix, .totaux…). */
/* Une section d'un formulaire (échéancier, clauses) : un titre, puis des champs. */
.section-form { border: 0; border-top: 1px solid var(--ligne); margin: 4px 0 0; padding: 16px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.section-form > legend { float: left; width: 100%; padding: 0; font-family: var(--police-titre); font-weight: 600; font-size: var(--taille-l); }
.section-form > legend + * { clear: both; margin-top: 0; }
.section-form > p { margin: 0; }
.libelle-champ { font-weight: 600; font-size: 14px; }
/* L'échéancier dans le formulaire du contrat : une fiche par versement (date, montant). */
.versements-form { display: flex; flex-direction: column; gap: 8px; }
.versements-form:empty { display: none; }
.versement-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 10px; padding: 12px; background: var(--surface-2); border-radius: var(--r-piece); min-width: 0; }
.versement-form__titre { grid-column: 1 / -1; font-weight: 600; font-size: 14px; }
.versement-form .champ label { font-weight: 500; font-size: 12.5px; color: var(--texte-2); }
.versement-form .champ input { background: var(--surface); min-width: 0; }
.versements-form__somme { margin: 0; padding: 10px 12px; border-radius: var(--r-outil); font-size: 14.5px; font-weight: 600; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.versements-form__somme.juste { background: var(--succes-fond); color: var(--succes); }
.versements-form__somme.faux { background: var(--danger-fond); color: var(--danger); }
/* Les clauses du déneigement, comme le client les lit : une étiquette, une phrase. */
.clauses-contrat { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px 20px; margin: 0; padding: 14px 16px; background: var(--surface-2); border-radius: var(--r-piece); }
.clauses-contrat > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clauses-contrat dt { font-size: 12.5px; color: var(--texte-2); }
.clauses-contrat dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.contrat-public .totaux { margin-top: 4px; }
/* L'échéancier : un versement par ligne, avec son rang, sa date, son montant et son état. */
.echeancier { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); overflow: hidden; }
.echeancier__ligne + .echeancier__ligne { border-top: 1px solid var(--ligne); }
.echeancier__corps { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 60px; padding: 10px 14px; color: var(--texte); text-decoration: none; }
a.echeancier__corps:hover { background: var(--surface-2); text-decoration: none; }
a.echeancier__corps:focus-visible { outline: 2px solid var(--bleu); outline-offset: -3px; }
.echeancier__corps .ligne__fin { padding-right: 0; }
.echeancier__rang {
    flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--texte-2);
    font-family: var(--police-titre); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.est-paye .echeancier__rang { background: var(--succes-fond); color: var(--succes); }
.est-a_payer .echeancier__rang { background: var(--bleu-fond); color: var(--bleu); }
.est-en_retard .echeancier__rang { background: var(--danger-fond); color: var(--danger); }
.echeancier__note { margin: 0; }
/* Les listes de versements à surveiller, et le dossier d'un contrat. */
.section-versements { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.section-versements__tete { display: flex; flex-direction: column; gap: 3px; }
.section-versements__tete h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.section-versements__tete p, .section-versements > p { margin: 0; }
.reglage-versements { display: flex; flex-direction: column; gap: 8px; }
/* Fiche de travail : le lien vers la soumission acceptée. */
.lien-soumission { margin: 0; padding-top: 12px; border-top: 1px solid var(--ligne); }
.lien-soumission a { display: inline-flex; align-items: center; gap: 10px; min-height: var(--cible); font-weight: 600; text-decoration: none; }
/* Le portail client : la vitrine de nos clients auprès des leurs. */
.portail { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.portail-a-faire { --bord: var(--bleu-plein); box-shadow: inset 0 0 0 1.5px var(--bleu-plein); }
.portail-a-faire > h2 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 0 4px; }
.portail-a-faire .etape-visite__texte strong { overflow-wrap: anywhere; }
.portail-a-faire .etape-visite__texte .pastille { margin-right: 4px; }
.portail-section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.portail-section__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.portail-section__tete h2 { margin: 0; }
.portail-section > .bloc { margin: 0; }
.portail-contrat { padding: 0; gap: 0; }
.portail-contrat__tete { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px; padding: 14px; color: var(--texte); text-decoration: none; }
.portail-contrat__tete:hover { background: var(--surface-2); text-decoration: none; }
.portail-contrat__tete:focus-visible { outline: 2px solid var(--bleu); outline-offset: -3px; }
.portail-contrat__tete .nom { font-weight: 600; overflow-wrap: anywhere; }
.portail-contrat__tete .ligne__fin { padding-right: 0; }
.portail-contrat .echeancier { border-radius: 0; box-shadow: none; border-top: 1px solid var(--ligne); }
.portail-contrat .echeancier__note { padding: 10px 14px 14px; border-top: 1px solid var(--ligne); }
.portail-historique { margin-top: 12px; }
.portail-sortie { display: flex; justify-content: center; }
@media (max-width: 820px) {
    .echeancier__corps { padding: 10px 12px; gap: 10px; }
    .portail { gap: 18px; }
    .portail-contrat__tete { padding: 12px; }
    .portail-section__tete .bouton { min-height: var(--cible); }
    .section-form > div > .bouton { width: 100%; }
}
@media (max-width: 380px) {
    .versement-form { grid-template-columns: minmax(0, 1fr); }
}
/* ---- fin : la boucle de l'argent (versements, clauses, portail) ---- */
/* ---- Trousse confiance : Mon compte, double authentification, appareils, anciens, page Sécurité ---- */
/* Mon compte : une colonne de cartes, pas plus large qu'un formulaire. */
.compte { display: flex; flex-direction: column; gap: 12px; max-width: 720px; min-width: 0; }
.compte .bloc > form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.compte form.bloc > .bouton, .compte .formulaire > div > .bouton { align-self: flex-start; }
.compte__titre { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.compte__titre > .discret { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compte__entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.champ .titre-champ { font-weight: 600; font-size: 14px; }
/* Une carte repliée : pas d'espace perdu sous son titre. */
.compte details.bloc:not([open]), details.bloc.anciens:not([open]) { gap: 0; }
/* Une section repliée dans une carte (codes de secours, désactiver…). */
details.sous-section > summary { cursor: pointer; color: var(--bleu); min-height: var(--cible); display: flex; align-items: center; }
details.sous-section.retirer > summary { color: var(--danger); }
details.sous-section > form, details.sous-section > .champ { margin-top: 8px; }
/* Le champ du code à 6 chiffres : gros, espacé, facile à relire. */
.champ input.champ-code { font-size: 22px; font-weight: 600; letter-spacing: .18em; font-variant-numeric: tabular-nums; max-width: 13em; }
/* Les trois étapes de l'activation. */
.etapes-double h2 { display: flex; align-items: center; gap: 10px; }
.etape-numero { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bleu-fond); color: var(--bleu); font-size: 14px; font-weight: 700; }
/* Le code QR : toujours noir sur blanc, même en thème foncé (les lecteurs en ont besoin). */
.code-qr { width: 100%; max-width: 232px; padding: 8px; background: #fff; border-radius: var(--r-outil); box-shadow: inset 0 0 0 1px var(--ligne); }
.code-qr svg { display: block; width: 100%; height: auto; }
#cle-double { font-size: 15px; letter-spacing: .04em; }
/* Les codes de secours : deux colonnes de gros codes. */
.codes-secours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.codes-secours li { display: grid; place-items: center; min-height: 44px; padding: 8px 4px; border-radius: var(--r-outil); background: var(--surface-2); }
.codes-secours code { font-size: 16px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
/* Mes appareils connectés : « Déconnecter » est un bouton au bout de la ligne. */
.liste-clients.appareils li > form { display: flex; flex: none; }
.liste-clients.appareils button.action-ligne { border: 0; border-left: 1px solid var(--ligne); background: none; cursor: pointer; font: 600 14px var(--police); color: var(--bleu); min-height: 56px; }
.liste-clients.appareils .brique { --b: var(--surface-2); --sur-b: var(--texte-2); }
/* Ce qu'il y a dans l'export complet. */
.liste-fichiers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste-fichiers li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; min-width: 0; }
.liste-fichiers li + li { border-top: 1px solid var(--ligne); }
.liste-fichiers li > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.liste-fichiers li > span:last-child { flex: none; white-space: nowrap; }
/* Équipe : les anciens, et le réglage « exiger la double authentification ». */
.anciens .initiales { opacity: .6; }
.exiger-double .bloc-choix { --b: var(--bleu-plein); }
.exiger-double > div > .bouton { align-self: flex-start; }
/* La page publique « Sécurité et confidentialité ». */
.page-securite { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 920px; margin: 0 auto; min-width: 0; }
.page-securite .entete { gap: 12px; }
.page-securite h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.page-securite .chapo { font-size: 18px; color: var(--texte-2); max-width: 60ch; }
.page-securite .points { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.pas-encore { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
/* Le lien « Mon compte » au pied du menu (le nom de la personne devient un lien). */
.menu .pied a.qui { color: var(--texte-2); text-decoration: none; min-height: var(--cible); display: inline-flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .pied a.qui:hover, .menu .pied a.qui[aria-current="page"] { color: var(--texte); }
@media (max-width: 820px) {
    .compte { max-width: none; }
    .compte form.bloc > .bouton, .compte .formulaire > div > .bouton, .compte .bloc > div > .bouton, .compte .bloc > form > .bouton,
    .exiger-double > div > .bouton { align-self: stretch; width: 100%; }
    .champ input.champ-code { max-width: none; }
    .compte-desactive .bouton, .page-securite .rangee > .bouton { width: 100%; }
    .code-qr { margin: 0 auto; }
    .liste-clients.appareils button.action-ligne { min-height: 64px; padding: 0 12px; }
}
@media print {
    .codes-secours__gestes, .barre-haut, .barre-bas { display: none !important; }
}
/* ---- fin : trousse confiance ---- */
/* ---- Paie et preuve de passage : feuille de temps de l'équipe, « Mon punch », page « Passages » ----
   Pièces réutilisées : .bloc, .chiffres.serre.trois, .pastille, .initiales, .ligne__texte, .liste-clients.riche,
   .ligne__fin, .etapes-visite, .taux-liste, .taux-corps, .message, .filtres, .vues-calendrier.
   Ici : seulement ce qui manquait. Script : public/js/position.js. */
.note-paie { margin: 0; }
/* La feuille de temps : une carte par personne, jamais de tableau. */
.cartes-paie { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
.carte-paie { min-width: 0; }
.carte-paie__tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.carte-paie__tete .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-paie__tete .pastille { flex: none; }
.carte-paie .chiffre.en-plus strong { color: var(--attention); }
.carte-paie .message { margin: 0; }
/* Les sept jours de la semaine, en une bande : le jour, puis les heures (« 8h30 »). */
.jours-paie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.jours-paie li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-width: 0; border-radius: var(--r-outil); background: var(--surface-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jours-paie li.vide { background: none; box-shadow: inset 0 0 0 1px var(--ligne); color: var(--texte-3); font-weight: 500; }
.jours-paie__nom { font-size: 10.5px; font-weight: 600; color: var(--texte-2); letter-spacing: .02em; }
.carte-paie__approbation { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.carte-paie__approbation > span { min-width: 0; }
.carte-paie__approbation .bouton { flex: none; }
.carte-paie__approuver { width: 100%; }
/* Les punchs d'une personne, repliés : une ligne par punch ; « Corriger » ouvre le petit formulaire. */
.punchs-paie > summary, .punch-paie__corriger > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: var(--cible); font-weight: 600; list-style: none; }
.punchs-paie > summary::-webkit-details-marker, .punch-paie__corriger > summary::-webkit-details-marker { display: none; }
.punchs-paie > summary { justify-content: space-between; border-top: 1px solid var(--ligne); padding-top: 4px; }
.punchs-paie > summary .discret { font-weight: 600; color: var(--bleu); }
.punchs-paie > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.punch-paie { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--ligne); }
.punch-paie__resume { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-variant-numeric: tabular-nums; }
.punch-paie__resume .discret { overflow-wrap: anywhere; }
.punch-paie__corriger { grid-column: 1 / -1; min-width: 0; }
.punch-paie__corriger > summary { color: var(--bleu); font-size: 14px; }
.punch-paie__corriger form + form { margin-top: 10px; }
/* Date, arrivée, départ, note : deux colonnes ; « large » prend toute la largeur. */
.champs-punch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.champs-punch .champ.large { grid-column: 1 / -1; }
.champs-punch input, .champs-punch select { min-width: 0; }
.ajout-punch, .dates-passages { margin-top: 12px; }
.ajout-punch > .bouton, .dates-passages > .bouton, .punch-paie__corriger .formulaire > .bouton { align-self: flex-start; }
.semaine-normale { max-width: 220px; }
/* Le fichier pour la paie : une semaine, ou deux. */
.export-paie__choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.export-paie__periode { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border-radius: var(--r-piece); background: var(--surface-2); }
.export-paie__periode .message { margin: 0; background: var(--attention-fond); }
.export-paie__periode .bouton { white-space: normal; text-align: center; }
/* « Mon punch » : ma semaine pour la paie. */
.ma-paie__tete, .ma-paie__avant { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; }
.ma-paie__tete h2 { margin: 0; }
.ma-paie__avant > span:first-child { min-width: 0; flex: 1 1 200px; }
/* La page « Passages » et « Ses passages » sur le dossier d'un client : la même ligne (calendrier/passage-ligne). */
.liste-clients.passages .ligne__fin .discret { white-space: nowrap; }
.ses-passages .liste-clients { background: none; box-shadow: none; border-radius: 0; }
.ses-passages .liste-clients.riche li > a:first-child { padding-left: 0; }
.etape-visite[data-passage] .bouton { align-self: center; }
@media (max-width: 820px) {
    .cartes-paie { grid-template-columns: minmax(0, 1fr); }
    .carte-paie { padding: 16px 14px; }
    .jours-paie { gap: 3px; }
    .jours-paie li { font-size: 11.5px; padding: 6px 0; }
    .ajout-punch > .bouton, .dates-passages > .bouton, .punch-paie__corriger .formulaire > .bouton { align-self: stretch; }
    .punch-paie__corriger .bouton.danger { min-height: var(--cible); }
    .semaine-normale { max-width: none; }
}
/* ---- fin : paie et preuve de passage ---- */
/* ---- Adresses et contacts d'un client (plusieurs adresses de service, plusieurs personnes à joindre) ---- */
/* Une liste riche posée dans une carte : sans son propre cadre, d'un bord à l'autre de la carte. */
.bloc > .liste-clients.dans-bloc { margin-inline: -20px; border-radius: 0; background: none; box-shadow: none; border-block: 1px solid var(--ligne); }
.liste-clients.dans-bloc .nom { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; overflow-wrap: anywhere; }
.liste-clients.dans-bloc .brique, .liste-clients.dans-bloc .initiales { align-self: flex-start; margin-top: 2px; }
.lieux-client h2 .discret { font-weight: 400; }
/* « + Ajouter une adresse », « + Ajouter un contact » : une cible de 44 px. */
.lieux-client > details > summary, .contacts-client > details > summary { cursor: pointer; padding-block: 11px; }
.lieux-client > details[open] > summary, .contacts-client > details[open] > summary { margin-bottom: 6px; }
@media (max-width: 820px) {
    .bloc > .liste-clients.dans-bloc { margin-inline: -16px; }
}
/* Un numéro de téléphone ne se coupe pas en deux lignes (contact sur place, fiche de travail). */
.coordonnees dd a[href^="tel:"], .prochains-rdv a[href^="tel:"] { white-space: nowrap; }
/* ---- fin : adresses et contacts d'un client ---- */
/* ---- Boîte à idées et nouveautés (resources/views/idees, la page publique /idees) ---- */
.pleine-largeur { width: 100%; }
.pastille.grise { background: var(--surface-2); color: var(--texte-2); }
.pastille.mauve { background: light-dark(#ECEBFF, #24224D); color: light-dark(#4B45C6, #B9B6FF); }
/* « Comment ça marche » : quatre étapes, et « Vos idées » pour la personne connectée. */
.comment-ca-marche { gap: 12px; }
.comment-ca-marche h2 { margin: 0; }
.etapes-idee { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: etape; }
.etapes-idee li { counter-increment: etape; display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 12px; border-radius: var(--r-outil); background: var(--surface-2); font-size: 14.5px; }
.etapes-idee li::before { content: counter(etape); display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
    background: var(--encre); color: var(--sur-encre); font: 700 13px/1 var(--police-titre); }
.etapes-idee li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.etapes-idee li.cadeau { background: var(--succes-fond); }
.etapes-idee li.cadeau::before { background: var(--succes); color: light-dark(#FFFFFF, #0E2D21); }
.etapes-idee strong { font-size: 15px; }
.mes-idees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; padding-top: 12px; border-top: 1px solid var(--ligne); }
.mes-idees strong { font-family: var(--police-titre); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
.mes-idees .gagne strong { color: var(--succes); }
/* « Proposer une idée » : une grosse rangée qui s'ouvre sur le formulaire. */
details.bloc.proposer-idee { padding: 0; gap: 0; }
details.bloc.proposer-idee > summary { justify-content: flex-start; gap: 14px; padding: 14px 16px; min-height: 72px; }
details.bloc.proposer-idee > summary::after { margin-left: auto; }
.proposer-idee[open] > summary { border-bottom: 1px solid var(--ligne); }
.proposer-idee__ampoule { --c: 8px; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-piece);
    background: var(--b-entretiens); color: var(--sur-b-entretiens); border-radius: var(--r-piece); }
.proposer-idee__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proposer-idee__texte strong { font-size: 17px; }
.proposer-idee__form { padding: 16px; }
.proposer-idee__form > p { margin: 0; }
/* Les idées semblables, pendant qu'on tape le titre. */
.semblables { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-outil); background: var(--attention-fond); box-shadow: inset 3px 0 0 var(--attention); }
.semblables[hidden] { display: none; }
.semblables__titre { margin: 0; font-size: 14.5px; }
.semblables__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.semblables__liste a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 9px 12px; border-radius: var(--r-outil);
    background: var(--surface); color: var(--texte); text-decoration: none; box-shadow: inset 0 0 0 1px var(--ligne); }
.semblables__liste a:hover { box-shadow: inset 0 0 0 1.5px var(--bleu); }
.semblable__titre { font-weight: 600; overflow-wrap: anywhere; }
.idees-filtres { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* La liste : une carte par idée, le gros bouton de vote à gauche. */
.idees { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.idee-carte { --c: 12px; display: flex; align-items: stretch; min-width: 0; background: var(--surface); border-radius: var(--r-piece);
    box-shadow: inset 0 0 0 1px var(--ligne); border-radius: var(--r-piece); }
.idee-carte.en-attente { box-shadow: inset 0 0 0 1px var(--ligne), inset 3px 0 0 var(--attention); }
.vote { display: flex; flex: none; margin: 0; padding: 10px 0 10px 10px; }
.vote__bouton { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 64px; min-height: 76px; padding: 6px 4px;
    border: 0; border-radius: var(--r-outil); background: var(--surface-2); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne);
    font: inherit; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--duree-1), color var(--duree-1), transform var(--duree-1) var(--courbe); }
a.vote__bouton:hover, button.vote__bouton:hover { background: var(--bleu-fond); color: var(--bleu); text-decoration: none; }
button.vote__bouton:active { transform: translateY(1px) scale(.97); }
.vote__bouton .icone { width: 22px; height: 22px; stroke-width: 2.5; }
.vote__bouton strong { font-family: var(--police-titre); font-weight: 700; font-size: 20px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.vote__mot { font-size: 11.5px; font-weight: 600; color: var(--texte-2); text-align: center; line-height: 1.15; }
.vote__bouton[aria-pressed="true"] { background: var(--bleu-plein); color: var(--sur-bleu); box-shadow: none; }
.vote__bouton[aria-pressed="true"] .vote__mot { color: inherit; }
.vote__bouton:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
/* Sa propre idée : le compte, sans bouton (le vote de sa propre entreprise ne compte pas). */
.vote__bouton.mienne { cursor: default; background: var(--glacier); box-shadow: none; }
.idee-carte__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px 18px 12px 14px; color: var(--texte); text-decoration: none; }
.idee-carte__texte:hover { text-decoration: none; }
.idee-carte__texte:hover .idee-carte__titre { color: var(--bleu); }
.idee-carte__titre { font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.idee-carte__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.idee-carte__bulle { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--texte-2); }
.idee-carte__qui { display: flex; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.idee-carte__signature { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idee-carte__seuil { font-size: 12.5px; font-weight: 600; color: var(--texte-2); }
.vote-fait { color: var(--succes); font-weight: 600; }
.vote-fait[hidden], [data-pas-fait][hidden] { display: none; }
/* Le seuil : « 7 votes sur 10 pour être étudiée ». */
.seuil-idee { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
.seuil-idee p { margin: 0; }
.seuil-idee__barre { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.seuil-idee__barre span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--lpx-cyan), var(--lpx-bleu)); }
/* La page d'une idée. */
.idee__titre { overflow-wrap: anywhere; }
.idee__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.idee-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 290px); gap: 12px; align-items: start; min-width: 0; }
.idee-pourquoi h2, .reponse-lpx h2, .precisions h2 { margin: 0; }
.idee-pourquoi p, .reponse-lpx p { margin: 0; }
.idee-vote { align-items: center; text-align: center; }
.vote--grand { padding: 0; }
.vote--grand .vote__bouton { width: 112px; min-height: 112px; border-radius: var(--r-flottant); }
.vote--grand .vote__bouton .icone { width: 28px; height: 28px; }
.vote--grand .vote__bouton strong { font-size: 34px; }
.vote--grand .vote__mot { font-size: 14px; }
.idee-vote__texte { margin: 0; }
.idee-vote > .bouton, .partage-idee, .partage-idee .bouton { width: 100%; }
.partage-idee { display: flex; flex-direction: column; gap: 8px; }
.texte-a-coller summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--texte-2); }
.texte-a-coller textarea { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--ligne-forte); border-radius: var(--r-outil);
    background: var(--surface); color: var(--texte); font: 16px/1.45 var(--police); resize: vertical; }
.heros .comment-ca-marche .etapes-idee { grid-template-columns: minmax(0, 1fr); }
/* La carte « Une idée pour améliorer… ? » de l'écran « C'est prêt ». */
.bloc.carte-idee { gap: 4px; color: var(--texte); text-decoration: none; box-shadow: inset 0 0 0 1px var(--ligne), inset 4px 0 0 var(--b-entretiens); }
.bloc.carte-idee:hover { text-decoration: none; background: var(--surface-2); }
.reponse-lpx { box-shadow: inset 0 0 0 1px var(--ligne), inset 4px 0 0 var(--bleu-plein); background: color-mix(in srgb, var(--bleu-fond) 50%, var(--surface)); }
.reponse-lpx h2 { display: flex; align-items: center; gap: 8px; }
.reponse-lpx__marque { display: inline-grid; place-items: center; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--bleu-plein); color: var(--sur-bleu);
    font-family: var(--police-titre); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.precisions__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.precision { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--ligne); min-width: 0; }
.precision:first-child { border-top: 0; padding-top: 0; }
.precision p, .precision form { margin: 0; }
.precision__qui { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.precision--equipe { padding-left: 12px; box-shadow: inset 3px 0 0 var(--bleu-plein); }
.precision--cachee { opacity: .55; }
.precision .bouton.fantome { align-self: flex-start; padding-inline: 0; }
.moderation-idee .formulaire + .formulaire { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--ligne); }
.action-ligne-form { display: flex; align-items: center; flex: none; margin: 0; padding: 0 12px 0 4px; }
/* « Nouveautés » : ce qui a été livré. */
.nouveautes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nouveaute { gap: 8px; }
.nouveaute h2, .nouveaute h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.nouveaute p { margin: 0; }
.nouveaute__date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--texte-2); }
.nouveaute--neuve { box-shadow: inset 0 0 0 1px var(--ligne), inset 4px 0 0 var(--succes); }
.nouveaute__origine { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; max-width: 100%; min-height: 44px; padding: 8px 12px;
    border-radius: var(--r-outil); background: var(--surface-2); color: var(--texte); text-decoration: none; font-size: 14px; font-weight: 600; }
.nouveaute__origine:hover { background: var(--surface-3); text-decoration: none; }
.nouveaute__origine span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Le petit point « nouveauté » du menu (à poser après le nom du lien « Nouveautés »). */
.point-nouveau { display: inline-block; width: 8px; height: 8px; margin-left: 6px; flex: none; vertical-align: middle; border-radius: 50%;
    background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
/* La page publique « On bâtit LPX avec vous ». */
.trois-temps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.trois-temps li { --c: 12px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-width: 0; border-radius: var(--r-piece);
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); border-radius: var(--r-piece); }
.trois-temps li > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trois-temps strong { font-size: 17px; }
.feuille-route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.feuille-route__colonne { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }
.feuille-route__colonne h3, .feuille-route__colonne p { margin: 0; }
.feuille-route ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.feuille-route a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 10px 12px; border-radius: var(--r-outil); background: var(--surface-2); color: var(--texte); text-decoration: none; }
.feuille-route a:hover { background: var(--surface-3); text-decoration: none; }
.feuille-route__titre { font-weight: 600; overflow-wrap: anywhere; }
.feuille-route a .discret { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nouveautes--publiques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.idee-publique { gap: clamp(32px, 6vw, 64px); }
.idee-publique__corps { display: flex; flex-direction: column; gap: 14px; min-width: 0; width: 100%; max-width: 900px; }
.idee-publique__corps > p { margin: 0; }
.idee-publique h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
@media (max-width: 900px) {
    .feuille-route, .nouveautes--publiques { grid-template-columns: minmax(0, 1fr); }
    .etapes-idee { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .idee-corps { grid-template-columns: minmax(0, 1fr); }
    /* Au téléphone, le vote passe avant le texte : c'est le geste principal. */
    .bloc.idee-vote { order: -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; text-align: left; }
    /* Tout sauf le gros bouton et sa phrase prend toute la largeur (sinon la colonne « auto » s'élargit à la taille d'une longue phrase). */
    .idee-vote > :not(.vote):not(.idee-vote__texte) { grid-column: 1 / -1; }
    .vote--grand .vote__bouton { width: 92px; min-height: 92px; }
    .vote--grand .vote__bouton strong { font-size: 28px; }
    .vote { padding: 8px 0 8px 8px; }
    .vote__bouton { width: 60px; min-height: 72px; }
    .idee-carte__texte { padding: 10px 14px 10px 12px; }
    .action-ligne-form { padding-right: 8px; }
    .etapes-idee { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .etapes-idee li { padding: 10px 12px; }
}
@media (prefers-reduced-motion: no-preference) {
    .vote__bouton.vient-de-voter .icone { animation: sautiller .45s var(--courbe) both; }
    .semblables:not([hidden]) { animation: poser .25s var(--courbe) both; }
}
/* ---- fin : boîte à idées et nouveautés ---- */

/* ==========================================================================
   Mini-CRM (produits) et bloc Unités : logements, chalets — docs/05-mini-crm.md
   Pièces : .plus-flottant (le « + » rond d'un mini-CRM), .pastille.etat-<couleur>, .numero-unite,
   .groupe-lieu, .cartes-unites > .carte-unite, .bande-photos, .etat-unite, .occupant-unite,
   .dalle.parc > .parc__etats, .liste-recentes, .liste-a-venir, .telephone (pages de vente).
   ========================================================================== */
:root { --b-unites: #A6D83A; --sur-b-unites: #101820; }
.m-unites { --b: var(--b-unites); --sur-b: var(--sur-b-unites); }
.temps__item.type-unite, .temps__item.type-occupant { --b: var(--b-unites); }
.temps__item.type-etat { --b: var(--b-entretiens); }

/* Les états d'une unité : la couleur vient du produit (config/produits.php : verte, bleue, ambre, rouge, grise). */
.etat-verte { --etat: var(--succes); --etat-fond: var(--succes-fond); --point: #4BDB9C; }
.etat-bleue { --etat: var(--bleu); --etat-fond: var(--bleu-fond); --point: var(--lpx-cyan); }
.etat-ambre { --etat: var(--attention); --etat-fond: var(--attention-fond); --point: #FFC655; }
.etat-rouge { --etat: var(--danger); --etat-fond: var(--danger-fond); --point: #FF8D83; }
.etat-grise { --etat: var(--texte-2); --etat-fond: var(--surface-2); --point: #9AA8B8; }
.pastille[class*="etat-"] { background: var(--etat-fond); color: var(--etat); }
.pastille.plein[class*="etat-"] { background: var(--surface); box-shadow: 0 1px 6px rgb(16 24 32 / .28); }

/* Le « + » d'un mini-CRM : la barre du bas garde ses trois onglets, le « + » flotte au-dessus, en bas à droite. */
.plus-flottant { display: none; }
@media (max-width: 820px) {
    .plus-flottant {
        display: grid; place-items: center; position: fixed; z-index: 19; right: max(16px, env(safe-area-inset-right));
        bottom: calc(78px + env(safe-area-inset-bottom)); width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
        background: var(--bleu-plein); color: var(--sur-bleu); -webkit-tap-highlight-color: transparent;
        box-shadow: 0 0 0 4px var(--fond), 0 12px 24px -8px color-mix(in srgb, var(--bleu-plein) 75%, transparent);
        transition: transform var(--duree-2) var(--courbe-emboite);
    }
    .plus-flottant .icone { width: 26px; height: 26px; stroke-width: 2.4; }
    .plus-flottant:active { transform: scale(.92); }
    .menu-ouvert .plus-flottant { visibility: hidden; }
    /* La page laisse la place au bouton : rien d'important ne reste caché dessous. */
    .app--mini .contenu { padding-bottom: calc(156px + env(safe-area-inset-bottom)); }
    .app--mini ~ .toasts { bottom: calc(150px + env(safe-area-inset-bottom)); }
}

/* Mes blocs, « C'est prêt », Aujourd'hui : les blocs annoncés, pas encore bâtis. */
.bloc.a-venir { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.liste-a-venir { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.liste-a-venir li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.liste-a-venir li > span:nth-child(2) { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.liste-a-venir .brique { --b: var(--surface-3); --sur-b: var(--texte-2); }
.liste-a-venir .pastille { flex: none; }

/* Inscription : le produit choisi sur la page de vente. */
.produit-choisi { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; }

/* Un très long nom d'immeuble ou de chalet se coupe au lieu de pousser la page. */
.m-unites h1, .m-unites p, .unites-du-client .nom { overflow-wrap: anywhere; }

/* ---- La liste des unités ---- */
.filtres-etat .pastille { gap: 6px; }
.filtres-etat .compte { font-weight: 700; font-variant-numeric: tabular-nums; }
.filtres-etat .pastille.choisie { box-shadow: inset 0 0 0 2px var(--etat); }

/* Le numéro d'un logement : une petite pièce à la couleur de son état. */
.numero-unite {
    --c: 8px; display: grid; place-items: center; flex: none; min-width: 44px; height: 44px; padding: 0 6px; border-radius: var(--r-piece);
    background: var(--etat-fond, var(--surface-2)); color: var(--etat, var(--texte-2));
    font-family: var(--police-titre); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap;
    border-radius: var(--r-piece);
}
.liste-unites .nom.libre { color: var(--texte-2); font-weight: 500; }
.liste-unites .ligne__fin { padding-right: 2px; }

/* Un lieu (un immeuble) et ses unités. */
.groupe-lieu { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.groupe-lieu + .groupe-lieu { margin-top: 6px; }
.groupe-lieu__tete {
    display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 6px 6px 2px; border-radius: 12px; min-width: 0;
    color: var(--texte); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
a.groupe-lieu__tete:hover { text-decoration: none; background: var(--surface-2); }
.groupe-lieu__tete .brique { width: 40px; height: 40px; --c: 9px; }
.groupe-lieu__tete .nom { font-family: var(--police-titre); font-weight: 700; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.groupe-lieu__fleche { color: var(--texte-3); }
.groupe-lieu__vide { margin: 0; padding: 14px 16px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }

/* Une carte par unité, avec sa photo (chalets). */
.cartes-unites { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.cartes-unites > li { min-width: 0; display: flex; }
.carte-unite {
    display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; border-radius: var(--r-flottant);
    background: var(--surface); border: 1px solid var(--ligne); color: var(--texte); text-decoration: none; -webkit-tap-highlight-color: transparent;
    transition: transform var(--duree-2) var(--courbe), border-color var(--duree-1);
}
.carte-unite:hover { text-decoration: none; border-color: var(--ligne-forte); }
.carte-unite:active { transform: scale(.985); }
.carte-unite__photo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--b-unites) 16%, var(--surface-2)); color: var(--texte-3); }
.carte-unite__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.carte-unite__photo > .icone { width: 44px; height: 44px; stroke-width: 1.4; }
.carte-unite__photo .pastille { position: absolute; left: 10px; top: 10px; font-size: 12.5px; padding: 6px 9px; }
.carte-unite__texte { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; min-width: 0; }
.carte-unite__texte .nom { font-family: var(--police-titre); font-weight: 700; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.carte-unite__texte > .discret { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-unite__occupant { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- La fiche d'une unité ---- */
/* Les photos en tête : une bande qui glisse sous le doigt, la suivante dépasse un peu. */
.bande-photos { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: var(--r-flottant); }
.bande-photos::-webkit-scrollbar { display: none; }
.bande-photos a { flex: 0 0 min(86%, 460px); scroll-snap-align: start; border-radius: var(--r-flottant); overflow: hidden; background: var(--surface-2); }
.bande-photos a:only-child { flex-basis: min(100%, 460px); }
.bande-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* L'état en gros, et le changement en un geste. */
.etat-unite { box-shadow: inset 0 0 0 1px var(--ligne), inset 5px 0 0 var(--etat); }
.etat-unite__actuel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.etat-unite__nom { font-family: var(--police-titre); font-weight: 700; font-size: clamp(30px, 8vw, 40px); line-height: 1.04; letter-spacing: -.025em; color: var(--etat); overflow-wrap: anywhere; }
.etat-unite__choix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.etat-unite__choix > .discret { flex: 1 1 100%; }
.etat-unite__choix form { flex: 1 1 auto; display: flex; margin: 0; min-width: 0; }
.etat-unite__choix .bouton { flex: 1; min-height: 48px; background: var(--etat-fond); color: var(--etat); box-shadow: none; font-weight: 700; }
.etat-unite__choix .bouton:hover { background: var(--etat-fond); box-shadow: inset 0 0 0 1.5px var(--etat); }

.occupant-unite__qui { display: flex; align-items: center; gap: 12px; min-width: 0; }
.occupant-unite__qui .nom { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.occupant-unite .gestes { max-width: none; }
.changer-occupant summary, .photos-unite details summary { cursor: pointer; min-height: var(--cible); display: flex; align-items: center; color: var(--bleu); font-weight: 600; list-style: none; }
.changer-occupant summary::-webkit-details-marker, .photos-unite details summary::-webkit-details-marker { display: none; }
.changer-occupant[open] summary, .photos-unite details[open] summary { margin-bottom: 8px; }
.photos-unite .galerie figcaption form { margin: 0; }

/* Formulaires : un groupe de choix (cases ou boutons) avec sa légende ; les deux numéros d'un lot. */
fieldset.champ-groupe { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.champ-groupe legend { font-weight: 600; font-size: 14px; padding: 0; }
fieldset.champ-groupe .options { margin-top: 8px; }
.lot-suite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lot-apercu, .lot-communs { margin: 0; }
.chiffres-etats .chiffre[class*="etat-"] strong { color: var(--etat); }

/* ---- Aujourd'hui d'un mini-CRM : le parc d'un coup d'œil ---- */
.parc h2 { font-size: clamp(48px, 14vw, 64px); font-weight: 700; line-height: .95; letter-spacing: -.03em; }
.parc__etats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.parc__etat {
    display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 68px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
    background: color-mix(in srgb, var(--sur-encre) 8%, transparent); color: var(--sur-encre) !important; transition: background-color var(--duree-1);
}
.parc__etat:hover, .parc__etat:active { text-decoration: none; background: color-mix(in srgb, var(--sur-encre) 15%, transparent); }
.parc__etat strong { font-family: var(--police-titre); font-weight: 700; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.parc__etat span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--sur-encre-2); min-width: 0; }
.parc__etat span::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--point, var(--sur-encre-2)); }

.liste-recentes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste-recentes li + li { border-top: 1px solid var(--ligne); }
.liste-recentes a { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 9px 0; min-width: 0; color: var(--texte); text-decoration: none; }
.liste-recentes .nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-recentes .pastille { flex: none; }

/* ---- Pages de vente des mini-CRM : les trois onglets, montrés comme sur un téléphone ---- */
.vitrine-telephone { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.vitrine-telephone__note { margin: 0; text-align: center; }
.telephone { width: min(100%, 320px); padding: 10px; border-radius: 44px; background: var(--lpx-noir); box-shadow: 0 30px 60px -28px rgb(16 24 32 / .55), inset 0 0 0 2px #2A3848; }
.telephone__ecran { position: relative; display: flex; flex-direction: column; min-height: 500px; border-radius: 34px; overflow: hidden; background: var(--fond); color: var(--texte); }
.telephone__haut { display: flex; align-items: center; gap: 8px; padding: 18px 16px 6px; color: var(--texte-2); font-family: var(--police-titre); font-weight: 700; font-size: 12px; }
.telephone__haut svg { height: 12px; width: auto; color: var(--texte); }
.telephone__corps { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 8px 14px 14px; min-width: 0; }
.telephone__titre { font-family: var(--police-titre); font-weight: 700; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.telephone__sous { font-size: 12.5px; }
.telephone__groupe { margin-top: 10px; font-family: var(--police-titre); font-weight: 700; font-size: 13px; letter-spacing: 0; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telephone__liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }
.telephone__liste li { display: flex; align-items: center; gap: 9px; padding: 9px 10px; min-width: 0; }
.telephone__liste li + li { border-top: 1px solid var(--ligne); }
.telephone__liste .numero-unite { --c: 6px; min-width: 34px; height: 34px; font-size: 12.5px; }
.telephone__liste .nom { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telephone__liste .discret { font-size: 11.5px; }
.telephone__liste .pastille { flex: none; font-size: 10.5px; padding: 4px 6px; }
.telephone__barre { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 4px 12px; background: var(--surface); box-shadow: 0 -1px 0 var(--ligne); }
.telephone__barre span { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--texte-2); font: 600 9.5px/1.15 var(--police); }
.telephone__barre .icone { width: 40px; height: 24px; padding: 3px 11px; box-sizing: border-box; border-radius: 999px; }
.telephone__barre .actif { color: var(--texte); font-weight: 700; }
.telephone__barre .actif .icone { background: var(--bleu-fond); color: var(--bleu); }
.telephone__barre .a-venir { opacity: .42; }
.telephone__plus { position: absolute; right: 12px; bottom: 68px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--bleu-plein); color: var(--sur-bleu); box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--bleu-plein) 70%, transparent); }
.onglets-produit .automatisme .pastille { align-self: flex-start; margin-top: auto; }
.automatisme.a-venir { background: transparent; }
.automatisme.a-venir:hover { transform: none; box-shadow: inset 0 0 0 1px var(--ligne); }
.automatisme.a-venir .brique { --b: var(--surface-3); --sur-b: var(--texte-2); }
.automatisme.a-venir h3 { color: var(--texte-2); }
.liste-pas li .icone { color: var(--danger); }
.liste-pas li span { min-width: 0; }
.vitrine-produit .plan .bouton { text-align: center; }

@media (max-width: 820px) {
    .etat-unite__choix form { flex: 1 1 calc(50% - 4px); }
    .groupe-lieu__tete { padding-left: 0; }
    .numero-unite { min-width: 46px; height: 46px; }
    .lot-suite { gap: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
    .cartes-unites > li, .groupe-lieu { animation: poser .36s var(--courbe) both; }
}
/* ---- Fin : mini-CRM et bloc Unités ---------------------------------------- */
/* ---- La bande de la phase fondateurs (pages de vente) ---- */
.bande-lancement { display: flex; align-items: flex-start; gap: 10px; max-width: 1080px; width: 100%; margin: 14px auto 0; padding: 12px 14px;
    border-radius: var(--r-outil); background: var(--succes-fond); box-shadow: inset 3px 0 0 var(--succes); min-width: 0; }
.bande-lancement p { margin: 0; min-width: 0; font-size: 15px; line-height: 1.45; }
.bande-lancement a { color: inherit; font-weight: 600; }
.bande-lancement__marque { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--succes); color: var(--surface);
    font-size: 13px; font-weight: 700; letter-spacing: 0; line-height: 1.6; }
@media (max-width: 560px) { .bande-lancement { flex-direction: column; gap: 6px; } }
/* ---- fin : bande de la phase fondateurs ---- */
/* ---- Le premier « wow » : questionnaire qui monte, arrivée, visite guidée, exemples ---- */
/* Les exemples : une pastille partout, un bandeau tant qu'il y en a. */
.pastille.exemple { background: var(--attention-fond); color: var(--attention); vertical-align: middle; margin-left: 4px; }
.ligne__fin .pastille.exemple { margin: 0 0 4px; }
.bandeau-exemples { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; padding: 10px 12px 10px 14px;
    border-radius: var(--r-outil); background: var(--attention-fond); min-width: 0; }
.bandeau-exemples p { flex: 1 1 200px; margin: 0; min-width: 0; font-size: 14.5px; line-height: 1.4; }
.bandeau-exemples .pastille.exemple { margin: 0; background: var(--surface); }
.bandeau-exemples.pret { background: var(--succes-fond); }
.exemples-vide { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--ligne); }
.exemples-vide p { margin: 0; }

/* Le questionnaire : les écrans qui montent la plateforme. */
.questionnaire .navigation #passer { color: var(--texte-2); }
.ecran-montage .aide strong { color: var(--texte); font-weight: 600; }
.services-montage, .equipe-montage { list-style: none; margin: 18px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.service-ligne { display: grid; grid-template-columns: 44px minmax(0, 1fr) 104px; grid-template-areas: "coche nom nom" "coche detail prix";
    align-items: center; gap: 2px 8px; padding: 6px 10px 8px 4px; border-radius: var(--r-piece); background: var(--surface-2); }
.service-ligne__coche { grid-area: coche; align-self: start; }
.service-ligne__texte { grid-area: nom; }
.service-ligne__detail { grid-area: detail; padding-left: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-ligne__prix { grid-area: prix; }
.service-ligne__coche { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.service-ligne__coche input { width: 22px; height: 22px; accent-color: var(--bleu-plein); margin: 0; }
.service-ligne__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.service-ligne__texte input, .service-ligne__prix input {
    font: 16px var(--police); color: var(--texte); background: transparent; border: 1px solid transparent; border-radius: 8px;
    padding: 6px 6px; min-height: 40px; width: 100%; min-width: 0;
}
.service-ligne__texte input { font-weight: 600; }
.service-ligne__texte input:focus, .service-ligne__prix input:focus { outline: none; border-color: var(--bleu); background: var(--surface); }
.service-ligne__prix { display: flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 10px; padding-right: 8px; box-shadow: inset 0 0 0 1px var(--ligne); }
.service-ligne__prix input { text-align: right; font-variant-numeric: tabular-nums; }
.service-ligne__prix span { color: var(--texte-2); font-weight: 600; }
.service-ligne:has(.service-ligne__coche input:not(:checked)) .service-ligne__texte,
.service-ligne:has(.service-ligne__coche input:not(:checked)) .service-ligne__prix { opacity: .45; }
.ajouter-ligne { align-self: flex-start; }
.personne-ligne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 12px; border-radius: var(--r-piece); background: var(--surface-2); }
.personne-ligne__contact { grid-column: 1 / -1; }
.champs-montage { display: grid; gap: 12px; margin-top: 18px; }
.champs-montage.deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.questionnaire.pas-a-pas .jours-montage { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.questionnaire.pas-a-pas .jours-montage .option > span { padding: 12px 6px; justify-content: center; }
.depot-logo { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px; min-height: 88px; cursor: pointer;
    border-radius: var(--r-piece); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ligne-forte); }
.depot-logo:hover { background: var(--surface-3); }
.depot-logo:focus-within, .depot-logo:has(+ input:focus-visible) { outline: 2px solid var(--bleu); outline-offset: 2px; }
.depot-logo__apercu { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: var(--surface); flex: none; }
.depot-logo__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.depot-logo__texte strong { color: var(--bleu); overflow-wrap: anywhere; }
.apercu-message { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }
.bulle-texto { margin: 0; align-self: flex-start; max-width: 100%; padding: 10px 14px; border-radius: 18px 18px 18px 6px;
    background: var(--surface-2); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }

/* La preuve : ce qu'on a monté, ligne par ligne. */
.liste-preuves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste-preuves li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ligne); min-width: 0; }
.liste-preuves li:last-child { border-bottom: 0; padding-bottom: 0; }
.liste-preuves li:first-child { padding-top: 4px; }
.preuve__texte { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.preuve__texte strong { font-weight: 600; line-height: 1.3; }
.preuve__coche { color: var(--succes); flex: none; margin-top: 4px; }
.preuve__lien { flex: none; display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; padding: 0 4px; font-weight: 600; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
    .preuves .liste-preuves li { animation: tomber .5s var(--courbe) both; animation-delay: calc(var(--i) * .14s + .4s); }
    .preuves .preuve__coche { animation: sautiller .5s var(--courbe) both; animation-delay: calc(var(--i) * .14s + .75s); }
}

/* L'arrivée : « Votre plateforme, montée pour vous ». */
.arrivee { width: 100%; max-width: 760px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.arrivee > * { min-width: 0; }
.arrivee__tete { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 4px; }
.arrivee__tete h1 { margin: 0; }
.arrivee__marque { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); margin-bottom: 6px; }
.arrivee__logo { width: 100%; height: 100%; object-fit: contain; }
.arrivee__initiale { font-family: var(--police-titre); font-weight: 700; font-size: 30px; color: var(--sur-bleu); background: var(--bleu-plein);
    width: 100%; height: 100%; display: grid; place-items: center; }
.arrivee__chapo { margin: 0; font-size: var(--taille-l); line-height: 1.45; color: var(--texte-2); }
.arrivee__actions { margin-top: 8px; }
.arrivee .bloc h2 { margin: 0 0 10px; }
.liste-prochaines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-prochaines a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 8px; border-radius: var(--r-piece);
    background: var(--surface-2); color: var(--texte); text-decoration: none; }
.liste-prochaines a:hover { background: var(--surface-3); }
.liste-prochaines a > .icone { color: var(--texte-3); flex: none; }
.prochaines__numero { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
    background: var(--b, var(--bleu-plein)); color: var(--sur-b, var(--sur-bleu)); font-weight: 700; }
.liste-prochaines .ligne__texte { flex: 1; min-width: 0; }
.liste-prochaines strong { font-weight: 600; overflow-wrap: anywhere; }
.exemples-offre { display: flex; flex-direction: column; gap: 10px; background: var(--attention-fond); box-shadow: none; }
.exemples-offre p { margin: 0; }
.liste-invitations { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-invitations li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.liste-invitations .ligne__texte { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; }
.plan-depart__aide { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.plan-depart__aide a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
.plan-depart .premiers-pas__liste li a { display: flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; }
.carte-aide { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--texte); }
.carte-aide .ligne__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-aide .ligne__texte > .discret { white-space: normal; overflow: visible; }
.carte-aide:hover { background: var(--surface-2); }
.logo-entreprise { width: 28px; height: 28px; object-fit: contain; border-radius: 8px; flex: none; background: var(--surface); }
.public__tete .logo-entreprise { width: 36px; height: 36px; }
.formulaire-rappel, .formulaire-entreprise { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.formulaire-entreprise .sous-section { display: flex; flex-direction: column; gap: 10px; }
.formulaire-entreprise h2 { margin: 0; font-size: var(--taille-l); }

/* La visite guidée : un trou de lumière sur le vrai élément, une bulle à côté. */
.visite { position: fixed; inset: 0; z-index: 90; }
.visite[hidden] { display: none; }
.visite__trou { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .55); pointer-events: none;
    transition: top var(--duree-3) var(--courbe), left var(--duree-3) var(--courbe), width var(--duree-3) var(--courbe), height var(--duree-3) var(--courbe); }
.visite__bulle { position: fixed; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 12px; border-radius: var(--r-flottant);
    background: var(--surface); color: var(--texte); box-shadow: var(--ombre-flottant);
    transition: top var(--duree-3) var(--courbe), left var(--duree-3) var(--courbe); }
.visite__bulle h2 { margin: 0; font-size: var(--taille-xl); }
.visite__bulle p { margin: 0; color: var(--texte-2); line-height: 1.45; }
.visite__compte { color: var(--bleu); font-weight: 600; }
.visite__boutons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.visite.calme .visite__trou, .visite.calme .visite__bulle { transition: none; }
@media (prefers-reduced-motion: reduce) { .visite__trou, .visite__bulle { transition: none; } }

@media (max-width: 820px) {
    .questionnaire.pas-a-pas .navigation #passer { order: 9; flex: 1 1 100%; min-height: 40px; }
    .service-ligne { grid-template-columns: 40px minmax(0, 1fr) 100px; padding-right: 8px; }
    .service-ligne__coche { width: 40px; }
    .personne-ligne { grid-template-columns: minmax(0, 1fr); }
    .arrivee__actions .bouton { flex: 1 1 100%; }
    /* La preuve : le lien « Changer » passe sous le texte, aligné avec lui. */
    .liste-preuves li { flex-wrap: wrap; }
    .preuve__lien { flex: 0 1 calc(100% - 44px); max-width: calc(100% - 44px); margin: -8px 0 -6px 44px; }
    .liste-invitations__gestes { flex: 1 1 100%; justify-content: flex-start; }
}
/* L'équipe, les véhicules, « Autre : ___ » et ce que la recherche a trouvé. */
.autre-precision { margin-top: 14px; }
.vehicules-montage { list-style: none; margin: 18px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vehicule-ligne { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: var(--r-piece); background: var(--surface-2); min-width: 0; }
.vehicule-ligne .champs-montage { margin-top: 0; }
.questionnaire.pas-a-pas .question.courante .vehicule-ligne legend { font: 600 14px/1.3 var(--police); letter-spacing: 0; float: none; margin-bottom: 6px; }
.questionnaire.pas-a-pas .options.options-petites { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); margin-top: 0; }
.questionnaire.pas-a-pas .options-petites .option > span { min-height: var(--cible); padding: 10px 12px; font-size: 15px; }
.vehicule-autre { margin-top: 8px; }
.questionnaire.pas-a-pas .vehicule-ligne .champ-groupe .options.options-petites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.vehicule-ligne .titre-champ { font-weight: 600; font-size: 14px; }
.trouve-ia { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-outil);
    background: var(--bleu-fond); font-size: 14.5px; line-height: 1.4; }
.trouve-ia[hidden] { display: none; }
.trouve-ia--metier { flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; text-decoration: none; color: var(--texte); }
.trouve-ia--metier .bouton { margin-top: 4px; }
.service-ligne.trouve { box-shadow: inset 0 0 0 1.5px var(--bleu); }
.liste-invitations__gestes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; }
.liste-invitations li { flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--ligne); }
.liste-invitations li:last-child { border-bottom: 0; }
.envoyer-acces { display: flex; justify-content: flex-end; padding: 0 12px 10px; }
.vehicule-fixe { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--texte-2); overflow-wrap: anywhere; }
.chercher-public { align-items: flex-start; }
.logo-trouve { display: flex; align-items: center; gap: 12px; margin-top: 16px; min-width: 0; }
.logo-trouve > span { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* ---- Fin : le premier « wow » ---- */

/* ==========================================================================
   Baux et loyers (LPX Logements) — resources/views/loyers/*
   Pièces : .onglets-loyers, .mois-loyers, .chiffres-loyers, .liste-loyers (.payer-vite), .etat-loyer,
   .modes-paiement, .liste-paiements, .groupe-fin, .bail-unite, .baux-client, .tuile-loyers, .exports-loyers.
   ========================================================================== */
:root { --b-loyers: #E4A72A; --sur-b-loyers: #101820; }
.m-loyers { --b: var(--b-loyers); --sur-b: var(--sur-b-loyers); }
.temps__item.type-loyer, .temps__item.type-bail { --b: var(--b-loyers); }
.temps__item.type-rappel { --b: var(--b-messages); }
.m-loyers h1, .m-loyers .discret { overflow-wrap: anywhere; }
.texte-alerte { color: var(--danger); }

/* Les onglets du bloc : des pastilles, avec le compte. */
.onglets-loyers .pastille { gap: 6px; }
.onglets-loyers .compte { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Le mois : précédent, le nom, suivant. */
.mois-loyers { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.mois-loyers .bouton { gap: 4px; padding: 8px 12px; min-width: 0; }
.mois-loyers__nom { text-align: center; font-family: var(--police-titre); font-weight: 700; font-size: var(--taille-l); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.retour-mois { margin: -4px 0 0; text-align: center; }

/* Attendu, reçu, en retard : trois chiffres côte à côte, même au téléphone. */
.chiffres.chiffres-loyers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chiffres.chiffres-loyers > .chiffre { grid-column: auto; }
.chiffres-loyers .chiffre { padding: 12px; }
.chiffres-loyers .chiffre strong { font-size: clamp(17px, 4.6vw, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chiffres-loyers .chiffre.recu strong { color: var(--succes); }
.chiffres-loyers .sur { font-size: .6em; color: var(--texte-2); font-weight: 700; }
.chiffres-loyers .lien-chiffre:hover { box-shadow: inset 0 0 0 1.5px var(--bleu); }

/* Une ligne de loyer : ✓ « payé au complet » en un geste, à droite. */
.liste-loyers .payer-vite { display: flex; margin: 0; }
.liste-loyers .payer-vite .action-ligne { height: 100%; border: 0; border-left: 1px solid var(--ligne); background: none; cursor: pointer; color: var(--succes); }
.liste-loyers .payer-vite .action-ligne:hover, .liste-loyers .payer-vite .action-ligne:active { background: var(--succes-fond); }
.liste-loyers .payer-vite .action-ligne .icone { width: 24px; height: 24px; stroke-width: 2.6; }
.liste-loyers .action-ligne.fait { color: var(--texte-3); }
.liste-loyers li.loyer-paye .ligne__fin strong { color: var(--texte-2); font-weight: 600; }
.liste-loyers .ligne__fin .pastille { white-space: nowrap; }
.liste-loyers .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* « Marquer payé » : l'état en gros, puis la façon de payer = le bouton. */
.payer-loyer .dossier__temps, .fiche-bail .dossier__temps { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.etat-loyer { gap: 4px; box-shadow: inset 0 0 0 1px var(--ligne), inset 5px 0 0 var(--etat); }
.etat-loyer__nom { font-family: var(--police-titre); font-weight: 700; font-size: clamp(26px, 7vw, 36px); line-height: 1.05; letter-spacing: -.02em; color: var(--etat); }
.totaux-loyer { margin: 10px 0 0; width: 100%; }
.totaux-loyer dt { color: var(--texte-2); }
.modes-paiement { border: 0; padding: 0; margin: 0; min-width: 0; }
.modes-paiement legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.modes-paiement__choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.modes-paiement__choix .bouton { min-height: 56px; white-space: normal; text-align: center; line-height: 1.2; }
.liste-paiements { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste-paiements li { display: flex; align-items: center; gap: 10px; padding: 10px 0; min-width: 0; }
.liste-paiements li + li { border-top: 1px solid var(--ligne); }
.liste-paiements form { margin: 0; flex: none; }

/* Renouvellements : un groupe par date de fin. */
.groupe-fin { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.groupe-fin__tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0 0; font-size: var(--taille-l); }
.groupe-fin .ligne__fin .pastille { white-space: nowrap; }
.renouvellement-bail p { margin: 0; }
.geste-renouvellement { border-top: 1px solid var(--ligne); }
.geste-renouvellement > summary { cursor: pointer; list-style: none; min-height: var(--cible); display: flex; align-items: center; justify-content: space-between; color: var(--bleu); font-weight: 600; }
.geste-renouvellement > summary::-webkit-details-marker { display: none; }
.geste-renouvellement > summary::after { content: "+"; font-size: 22px; font-weight: 500; color: var(--texte-2); }
.geste-renouvellement[open] > summary::after { content: "–"; }
.geste-renouvellement[open] > summary { margin-bottom: 4px; }
.inclusions { gap: 6px; }

/* Le formulaire d'un bail : les deux dates côte à côte, même au téléphone. */
.grille-champs.champs-bail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grille-champs.champs-bail input { min-width: 0; width: 100%; }
.form-bail .aide-dates { margin-top: -6px; }

/* Sur la fiche d'un logement et dans le dossier d'un locataire. */
.bail-unite__resume { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 0; color: var(--texte); text-decoration: none; }
.bail-unite__resume .nom { font-weight: 700; overflow-wrap: anywhere; }
.bail-unite__resume .ligne__texte > .discret { white-space: normal; }
.bail-unite__mois { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: var(--r-outil); background: var(--surface-2); min-width: 0; }
.bail-unite__mois .ligne__texte { gap: 4px; align-items: flex-start; }
.bail-unite__mois .bouton { flex: none; }
.historique-baux > summary { cursor: pointer; min-height: var(--cible); display: flex; align-items: center; color: var(--bleu); list-style: none; }
.historique-baux > summary::-webkit-details-marker { display: none; }
.baux-client h3 { margin: 4px 0 0; color: var(--texte-2); }
.baux-client .montant { flex: none; font-variant-numeric: tabular-nums; }

/* La tuile de l'écran du jour. */
.tuile-loyers h2 { display: flex; align-items: center; gap: 8px; }
.tuile-loyers .chiffre { gap: 2px; }
.tuile-loyers .chiffre .discret { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Les exports, le portail, les réglages. */
.exports-loyers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.exports-loyers h2 { display: flex; align-items: center; gap: 8px; }
.a-savoir-texte { margin: 0; padding: 10px 12px; border-radius: var(--r-outil); background: var(--attention-fond); color: var(--attention); font-weight: 600; }
.reglages-loyers { display: flex; flex-direction: column; gap: 12px; }
.portail-bail__texte { white-space: normal !important; }
.portail-payer { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-outil); background: var(--surface-2); overflow-wrap: anywhere; }

@media (max-width: 820px) {
    .mois-loyers .bouton { min-height: 44px; padding: 8px 10px; font-size: 14px; }
    .chiffres.chiffres-loyers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .chiffres.chiffres-loyers > .chiffre:last-child:nth-child(odd) { grid-column: auto; }
    .chiffres-loyers .chiffre { padding: 10px; }
    .chiffres-loyers .chiffre__etiquette { font-size: 12px; }
    .liste-loyers li > a:first-child { gap: 10px; padding-left: 12px; }
    .liste-loyers .numero-unite { min-width: 42px; height: 42px; font-size: 14px; }
    .liste-loyers .ligne__fin { padding-right: 4px; }
    .liste-loyers .ligne__fin .pastille { font-size: 11.5px; padding: 3px 7px; }
}
@media (prefers-reduced-motion: no-preference) {
    .liste-loyers > li { animation: poser .32s var(--courbe) both; }
}
/* ---- fin : Baux et loyers ---------------------------------------------------- */
   Bloc Demandes (réparations des logements et des chalets) — resources/views/demandes/*
   Pièces : .liste-demandes (li.urgente, li.nouvelle, .vignette-demande), .gestes-demande, details.action-demande,
   .cartes-donner > .carte-donner, .cartes-urgence > .carte-urgence, .tuiles-categorie > .tuile-categorie,
   .choix-photos, .fil (.fil__ligne, .fil__mot), .suivi-demande, .tuile-demandes, .badge-onglet.
   ========================================================================== */
:root { --b-demandes: #FF7A59; --sur-b-demandes: #101820; }
.m-demandes { --b: var(--b-demandes); --sur-b: var(--sur-b-demandes); }
.temps__item.type-demande { --b: var(--b-demandes); }
/* Le titre d'une demande dans l'historique d'un logement peut être un seul long mot : il se coupe. */
.temps__item.type-demande .temps__tete strong { min-width: 0; overflow-wrap: anywhere; }
.m-demandes h1, .m-demandes p, .portail-demande h1 { overflow-wrap: anywhere; }
.texte-urgent { color: var(--danger); }

/* Le petit chiffre rouge de l'onglet « Demandes » (barre du bas et menu). */
.badge-onglet { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--danger); color: #FFFFFF; font: 700 11px/1 var(--police); font-variant-numeric: tabular-nums; }
.menu nav a .badge-onglet { margin-left: auto; }
.barre-bas > a { position: relative; }
.barre-bas > a .badge-onglet { position: absolute; top: 2px; left: calc(50% + 10px); box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 820px) {
    .menu nav a { position: relative; }
    .menu nav a .badge-onglet { position: absolute; top: 4px; right: calc(50% - 32px); margin: 0; }
}

/* ---- La liste ---- */
.filtres-demandes .pastille.choisie { box-shadow: inset 0 0 0 2px currentColor; }
.liste-demandes li { position: relative; }
.liste-demandes li.urgente { background: color-mix(in srgb, var(--danger-fond) 70%, var(--surface)); }
.liste-demandes li.urgente::before, .liste-demandes li.nouvelle::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bleu-plein); }
.liste-demandes li.urgente::before { background: var(--danger); }
.liste-demandes li.nouvelle .nom { font-weight: 700; }
.liste-demandes .nom { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.3; }
.liste-demandes li > a:first-child { align-items: flex-start; }
.liste-demandes .pastilles-ligne { gap: 4px; margin-top: 4px; }
.vignette-demande { --c: 8px; flex: none; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden;
    border-radius: var(--r-piece); background: var(--surface-2); }
.vignette-demande img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette-demande.vide { background: var(--b); color: var(--sur-b); }
.liens-demandes { margin-top: 4px; gap: 16px; }

/* ---- La fiche ---- */
.entete-demande h1 { font-size: clamp(24px, 6.6vw, 32px); }
.pastilles-demande { gap: 6px; margin-top: 2px; }
.description-demande { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: var(--texte); }
.photos-demande img { aspect-ratio: 4 / 3; }
.gestes-demande { max-width: 640px; }
.gestes-demande .geste { min-height: 84px; justify-content: center; text-align: center; }
.lien-demande { display: flex; flex-direction: column; gap: 6px; }
.lien-demande .lien-copie code { font-size: 12px; }
.qui-demande { gap: 12px; }
.qui-demande__tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.qui-demande__tete .nom { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.qui-demande__tete .brique { width: 40px; height: 40px; }
.qui-demande .gestes { max-width: none; }
details.action-demande { scroll-margin-top: 72px; }
details.action-demande > summary h2 { margin: 0; font-size: var(--taille-l); }
details.action-demande[open] { box-shadow: inset 0 0 0 1.5px var(--b-demandes); }
details.action-demande > summary { min-height: var(--cible); }
details.action-demande:not([open]) { gap: 0; padding-block: 8px; }
.choix-donner { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.choix-donner legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--texte-2); }
.cartes-donner { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.carte-donner { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; min-width: 0; cursor: pointer;
    border-radius: var(--r-outil); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); -webkit-tap-highlight-color: transparent;
    transition: box-shadow var(--duree-1), background-color var(--duree-1); }
.carte-donner input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.carte-donner strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-donner .discret { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-donner:has(input:checked) { background: var(--bleu-fond); box-shadow: inset 0 0 0 2px var(--bleu-plein); }
.carte-donner:has(input:focus-visible) { outline: 2px solid var(--bleu); outline-offset: 2px; }
.carte-donner:has(input:checked)::after { content: "✓"; margin-left: auto; flex: none; display: grid; place-items: center; width: 24px; height: 24px;
    border-radius: 50%; background: var(--bleu-plein); color: var(--sur-bleu); font-weight: 700; font-size: 14px; }
.options-fournisseur { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.deux-champs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.deux-champs input { min-width: 0; }
.detail-demande .texte-libre { margin: 0; font-size: 16px; line-height: 1.5; }
.gestes-fin { justify-content: space-between; }
.fiche-demande .dossier__cote { gap: 12px; }

/* ---- Le fil (l'équipe, le locataire, le fournisseur) ---- */
.fil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fil__ligne { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 2px 0 2px 14px; position: relative; color: var(--texte-2); font-size: 14px; }
.fil__ligne::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--texte-3); }
.fil__ligne > span:first-child { overflow-wrap: anywhere; min-width: 0; }
.fil__mot { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--r-flottant); background: var(--surface-2); min-width: 0; }
.fil__mot p { margin: 0; }
.fil__tete { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fil__mot.auteur-locataire, .fil__mot.auteur-moi { background: var(--bleu-fond); }
.fil__mot.auteur-fournisseur { background: color-mix(in srgb, var(--b-fournisseurs) 18%, var(--surface)); }
.fil__mot.auteur-systeme, .fil__mot.auteur-entreprise { background: color-mix(in srgb, var(--b-demandes) 12%, var(--surface)); }
.fil-portail .fil__mot.auteur-moi { margin-left: 24px; }
.fil-portail .fil__mot.auteur-entreprise { margin-right: 24px; }

/* ---- Formulaires : catégories, urgence, photos ---- */
.form-demande { gap: 18px; }
.cartes-urgence { display: grid; gap: 8px; margin-top: 8px; }
.carte-urgence { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px; cursor: pointer; min-width: 0;
    border-radius: var(--r-outil); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne-forte); -webkit-tap-highlight-color: transparent; }
.carte-urgence input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--bleu-plein); }
.carte-urgence > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-urgence strong { font-size: 16px; }
.carte-urgence:has(input:checked) { background: var(--bleu-fond); box-shadow: inset 0 0 0 2px var(--bleu-plein); }
.carte-urgence.urgence-urgent strong { color: var(--danger); }
.carte-urgence.urgence-urgent:has(input:checked) { background: var(--danger-fond); box-shadow: inset 0 0 0 2px var(--danger); }
.carte-urgence.urgence-urgent input { accent-color: var(--danger); }
.case-urgente:has(input:checked) { border-color: var(--danger); background: var(--danger-fond); }
.case-urgente strong { color: var(--danger); }
.choix-photos { gap: 8px; }
.choix-photos__libelle { font-weight: 600; font-size: 14px; }
.etape-demande .choix-photos__libelle { font-family: var(--police-titre); font-size: 18px; }
.choix-photos__bouton { align-self: stretch; min-height: 56px; border: 2px dashed var(--ligne-forte); background: var(--surface); font-size: 16px; }
.choix-photos.pleine .choix-photos__bouton { opacity: .5; pointer-events: none; }
.choix-photos__vignettes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.choix-photos__vignettes:empty { display: none; }
.choix-photos__vignettes li { position: relative; aspect-ratio: 1; border-radius: var(--r-outil); overflow: hidden; background: var(--surface-2); }
.choix-photos__vignettes img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choix-photos__retirer { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgb(16 24 32 / .72); color: #FFFFFF; font: 700 20px/1 var(--police); display: grid; place-items: center; }

/* ---- Le portail du locataire ---- */
.portail-demandes .bouton-demande { align-self: stretch; }
.portail-demandes .bouton-demande .icone { width: 22px; height: 22px; }
.portail-demande { gap: 16px; }
.urgence-portail { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; }
.urgence-portail .icone { color: var(--danger); margin-top: 2px; }
.urgence-portail a { font-weight: 700; white-space: nowrap; }
.form-portail-demande { gap: 12px; }
.etape-demande { border: 0; margin: 0; min-width: 0; }
fieldset.etape-demande > legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-family: var(--police-titre); font-weight: 600; font-size: 18px; }
fieldset.etape-demande > legend + * { clear: both; }
.etape-demande .champ > label { font-family: var(--police-titre); font-weight: 600; font-size: 18px; }
.numero-etape { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; vertical-align: 2px;
    background: var(--b-demandes); color: var(--sur-b-demandes); font: 700 14px/1 var(--police); }
.ou-demande { flex-direction: row; align-items: center; gap: 10px; }
.tuiles-categorie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.tuile-categorie { position: relative; display: flex; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tuile-categorie input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tuile-categorie > span { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 84px; padding: 12px; min-width: 0;
    border-radius: var(--r-outil); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ligne); font-weight: 600; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere;
    transition: background-color var(--duree-1), box-shadow var(--duree-1); }
.tuile-categorie .icone { color: var(--texte-2); }
.tuile-categorie input:checked + span { background: var(--bleu-plein); color: var(--sur-bleu); box-shadow: none; }
.tuile-categorie input:checked + span .icone { color: var(--sur-bleu); }
.tuile-categorie input:focus-visible + span { outline: 2px solid var(--bleu); outline-offset: 2px; }
.options-larges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options-larges .option > span { width: 100%; justify-content: center; text-align: center; }
.bouton-envoyer-demande { width: 100%; min-height: 56px; font-size: 17px; }
.centre { text-align: center; }
.suivi-demande { list-style: none; margin: 0; padding: 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
    border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }
.suivi-demande li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.suivi-demande li + li::before { content: ""; position: absolute; top: 15px; right: calc(50% + 18px); width: calc(100% - 30px); height: 3px; border-radius: 2px; background: var(--surface-3); }
.suivi-demande li.fait + li.fait::before { background: var(--succes); }
.suivi-demande__point { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--texte-2); font-weight: 700; }
.suivi-demande li.fait .suivi-demande__point { background: var(--succes); color: #FFFFFF; }
.suivi-demande li.courante .suivi-demande__point { box-shadow: 0 0 0 4px var(--succes-fond); }
.suivi-demande .ligne__texte { align-items: center; }
.suivi-demande .petit { overflow-wrap: anywhere; }
.suivi-demande .ligne__texte > .discret { white-space: normal; overflow: visible; text-overflow: clip; text-align: center; line-height: 1.3; }

/* ---- L'écran du jour et la fiche d'un logement ---- */
.tuile-demandes__tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tuile-demandes__tete h2 { margin: 0; }
.chiffres-demandes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chiffres-demandes .chiffre { padding: 12px; min-width: 0; }
.chiffres-demandes .chiffre__etiquette { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demandes-unite .bouton { align-self: flex-start; }
.groupe-lieu__total { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; }

/* ---- La page du fournisseur ---- */
.page-fournisseur .public__corps { justify-content: flex-start; }
.action-demande-public { box-shadow: inset 0 0 0 1.5px var(--b-demandes); }

@media (max-width: 820px) {
    .gestes-demande { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gestes-demande .geste { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 60px; padding: 8px 12px; font-size: 15px; text-align: left; }
    .gestes-demande .geste .brique.l { width: 40px; height: 40px; }
    .vignette-demande { width: 52px; height: 52px; }
    .fil-portail .fil__mot.auteur-moi { margin-left: 12px; }
    .fil-portail .fil__mot.auteur-entreprise { margin-right: 12px; }
    .gestes-fin { flex-direction: column; align-items: stretch; }
    .gestes-fin .bouton, .gestes-fin form .bouton { width: 100%; }
}
@media (max-width: 380px) {
    .chiffres-demandes .chiffre strong { font-size: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
    .liste-demandes > li, .carte-donner, .tuile-categorie > span { animation: poser .34s var(--courbe) both; }
}
/* ---- fin : bloc Demandes ---------------------------------------------------- */

/* ---- « Voir la démo » : la page /demo et le bandeau de la démonstration publique ---- */
.page-demo { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-demo__tete { display: flex; flex-direction: column; gap: 12px; max-width: 640px; min-width: 0; }
.page-demo__tete h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; overflow-wrap: anywhere; }
.page-demo__tete .chapo { margin: 0; max-width: 52ch; font-size: 17px; color: var(--texte-2); }
.cartes-demo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.carte-demo {
    display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px;
    background: var(--surface); border-radius: var(--r-flottant); box-shadow: inset 0 0 0 1px var(--ligne);
    scroll-margin-top: 16px;
}
.carte-demo:target { box-shadow: inset 0 0 0 2px var(--b, var(--bleu-plein)); }
.carte-demo__tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.carte-demo__noms { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-demo__produit { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.carte-demo h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.carte-demo__texte { flex: 1; margin: 0; font-size: 15px; line-height: 1.45; color: var(--texte-2); }
.carte-demo form { margin: 0; }
.carte-demo .bouton { width: 100%; }
.page-demo__pied { margin: 0; text-align: center; }
@media (max-width: 820px) {
    .cartes-demo { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .carte-demo { padding: 16px; }
}

/* Le bandeau : discret, toujours en haut ; ce qui colle en haut de l'écran se pose sous lui. */
:root { --haut-demo: calc(44px + env(safe-area-inset-top)); }
.bandeau-demo {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 12px;
    height: var(--haut-demo); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
    background: var(--encre); color: var(--sur-encre); font: 400 13px/1.2 var(--police);
}
.bandeau-demo__texte { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau-demo__texte strong { font-weight: 600; }
.bandeau-demo__court { display: none; }
.bandeau-demo form { flex: none; margin: 0; }
.bandeau-demo__lien {
    min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
    color: var(--lpx-glacier); font: 600 13px/1.2 var(--police); text-decoration: underline; text-underline-offset: 3px;
}
.bandeau-demo__lien:hover { color: #FFFFFF; }
@media (min-width: 821px) {
    .en-demo .menu { top: var(--haut-demo); height: calc(100dvh - var(--haut-demo)); }
}
@media (max-width: 820px) {
    .en-demo .barre-haut { top: var(--haut-demo); padding-top: 8px; }
    .en-demo .recherche { top: calc(56px + var(--haut-demo)); }
    .en-demo .menu .pied { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    .bandeau-demo { justify-content: space-between; }
    .bandeau-demo__long { display: none; }
    .bandeau-demo__court { display: inline; }
}
/* ---- fin : « Voir la démo » ------------------------------------------------- */

/* ==========================================================================
   LPX Dispatch — le bloc Routes (resources/views/routes, public/js/routes.js)
   Une colonne par équipe, la couleur de l'équipe en tenon ; la carte en dessous du titre.
   Les colonnes défilent dans LEUR boîte : l'écran, lui, ne glisse jamais sur le côté.
   ========================================================================== */
.m-routes { --b: #6D5BFF; --sur-b: #FFFFFF; }
.rt-barre {
    position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 12px 14px; margin-inline: -4px; background: color-mix(in srgb, var(--fond) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne);
}
.rt-barre form { display: contents; }
.rt-barre .rt-etat { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rt-optimiser { background: linear-gradient(135deg, #6D5BFF, #0066FF) !important; color: #fff !important; }
.rt-optimiser[data-calcul] { pointer-events: none; opacity: .85; }
.rt-optimiser[data-calcul] .icone { animation: rt-tourne 1s linear infinite; }
@keyframes rt-tourne { to { transform: rotate(360deg); } }
.rt-case { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texte-2); }

.rt-jours { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-jours a[aria-current="page"] { background: var(--encre); color: var(--sur-encre); box-shadow: none; }

.rt-carte {
    position: relative; border-radius: var(--r-piece); overflow: hidden; background: light-dark(#EEF1F6, #12161C);
    box-shadow: inset 0 0 0 1px var(--ligne); aspect-ratio: 640 / 420; max-height: 460px; width: 100%;
}
.rt-carte img, .rt-carte svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rt-carte img { object-fit: cover; }
.rt-carte .rt-trace { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.rt-carte .rt-trace-fond { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.rt-carte .rt-point circle { stroke: #fff; stroke-width: 2.5; }
.rt-carte .rt-point text { fill: #fff; font: 700 11px var(--police); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.rt-carte .rt-point.depot rect { stroke: #fff; stroke-width: 2.5; }
.rt-carte .rt-point { cursor: default; transition: opacity var(--duree-2); }
.rt-carte[data-equipe] .rt-point:not([data-equipe-active]), .rt-carte[data-equipe] .rt-trace:not([data-equipe-active]) { opacity: .18; }
.rt-carte__vide { position: absolute; inset: 0; display: grid; place-items: center; color: var(--texte-3); font-size: 14px; padding: 20px; text-align: center; }
.rt-legende { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-legende button {
    display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; font: 600 12.5px var(--police);
    padding: 6px 10px; border-radius: 999px; background: var(--surface); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne);
}
.rt-legende button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--c); }
.rt-pastille-equipe { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--texte-3)); flex: none; }

.rt-colonnes {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 8px; scroll-snap-type: x proximity;
}
.rt-colonne {
    background: var(--surface); border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne);
    display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; overflow: hidden;
}
.rt-colonne__tete { padding: 14px 14px 10px; border-top: 5px solid var(--c, var(--texte-3)); display: flex; flex-direction: column; gap: 4px; }
.rt-colonne__tete h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; }
.rt-colonne__chiffres { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.rt-arrets { list-style: none; margin: 0; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 0; min-height: 60px; flex: 1; }
.rt-arrets.rt-survol { background: color-mix(in srgb, var(--c, var(--bleu)) 8%, transparent); }
.rt-trajet { font-size: 11.5px; color: var(--texte-3); padding: 2px 0 2px 38px; display: flex; align-items: center; gap: 6px; }
.rt-trajet::before { content: ""; width: 2px; height: 14px; background: var(--ligne-forte); border-radius: 1px; margin-left: -23px; margin-right: 15px; }
.rt-arret {
    display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 8px 6px;
    border-radius: 10px; background: var(--surface); cursor: grab; -webkit-tap-highlight-color: transparent;
}
.rt-arret:hover { background: var(--surface-2); }
.rt-arret.rt-glisse { opacity: .4; }
.rt-numero {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12.5px var(--police);
    background: var(--c, var(--texte-3)); color: #fff; font-variant-numeric: tabular-nums;
}
.rt-arret__texte { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rt-arret__titre { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-arret__adresse { font-size: 12.5px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-arret__heure { font: 700 13px var(--police); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rt-arret__heure small { display: block; font-weight: 500; font-size: 11.5px; color: var(--texte-3); }
.rt-arret__etiquettes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rt-arret__etiquettes .pastille { padding: 3px 6px; font-size: 11px; }
.rt-arret__menu { grid-column: 2 / -1; display: flex; gap: 6px; align-items: center; }
.rt-arret__menu select { font-size: 12.5px; padding: 4px 6px; min-height: 30px; border-radius: 8px; max-width: 170px; }
.rt-raison { font-size: 12px; color: var(--attention); }
.rt-colonne--placer { --c: #94a3b8; }
.rt-colonne--placer .rt-numero { background: #94a3b8; }
.rt-colonne__pied { padding: 10px 14px 14px; border-top: 1px solid var(--ligne); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.rt-lien { display: flex; gap: 6px; align-items: center; min-width: 0; }
.rt-lien code { font-size: 11.5px; background: var(--surface-2); padding: 4px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

.rt-vide { text-align: center; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rt-vide .brique { width: 52px; height: 52px; }
.rt-ajout { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.rt-ajout .champ-large { grid-column: 1 / -1; }

.rt-equipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.rt-equipe { border-top: 5px solid var(--c); }
.rt-equipe h2 { font-size: 18px; margin: 0; }
.rt-couleurs { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-couleurs label { position: relative; cursor: pointer; }
.rt-couleurs input { position: absolute; opacity: 0; inset: 0; }
.rt-couleurs span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.rt-couleurs input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.rt-couleurs input:focus-visible + span { outline: 2px solid var(--bleu); outline-offset: 4px; }
.rt-deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.rt-apercu { position: relative; width: 0; min-width: 100%; overflow-x: auto; border-radius: var(--r-piece); box-shadow: inset 0 0 0 1px var(--ligne); background: var(--surface); }
.rt-apercu table { border-collapse: collapse; width: 100%; font-size: 13px; }
.rt-apercu th, .rt-apercu td { padding: 8px 10px; border-bottom: 1px solid var(--ligne); text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.rt-apercu th select { min-width: 130px; font-size: 13px; }
.rt-apercu tr.rt-titres td { color: var(--texte-3); font-style: italic; }

/* La page d'une équipe (/equipe/{jeton}) : un cellulaire, en plein soleil, d'une main. */
.rt-publique { max-width: 620px; margin: 0 auto; padding: 16px 14px 90px; display: flex; flex-direction: column; gap: 14px; }
.rt-publique__tete { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-piece); background: var(--encre); color: var(--sur-encre); border-top: 6px solid var(--c); }
.rt-publique__tete h1 { margin: 0; font-size: 24px; color: inherit; }
.rt-publique__tete .discret { color: var(--sur-encre-2); }
.rt-publique__chiffres { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.rt-stop { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px; border-radius: var(--r-piece); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ligne); }
.rt-stop .rt-numero { width: 34px; height: 34px; font-size: 14px; }
.rt-stop h2 { font-size: 17px; margin: 0; }
.rt-stop__heure { font: 700 15px var(--police); font-variant-numeric: tabular-nums; }
.rt-stop__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rt-stop__actions .bouton { flex: 1; min-width: 120px; }
.rt-stop.rt-prochain { box-shadow: inset 0 0 0 2px var(--c); }
.rt-stop.rt-fait { opacity: .55; }
.rt-retour { text-align: center; font-size: 13px; color: var(--texte-2); }

@media (max-width: 700px) {
    .rt-colonnes { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }
    .rt-barre { position: static; }
    .rt-barre .rt-etat { margin-left: 0; }
    .rt-carte { aspect-ratio: 4 / 3; }
}
/* Ajuster une équipe pour un jour (absente, fin plus tôt, inverser, échanger) */
.rt-ajuster { margin-top: 4px; font-size: 13px; }
.rt-ajuster summary { cursor: pointer; color: var(--bleu); font-weight: 600; }
.rt-ajuster[open] { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.rt-ajuster__form { display: flex; flex-direction: column; gap: 8px; }
.rt-ajuster .rt-deux { grid-template-columns: 1fr 1fr; gap: 8px; }
.rt-ajuster select { min-width: 0; flex: 1; }
/* L'assistant des routes : une boîte pour le dire, puis la liste de ce qui va changer */
.rt-assistant { gap: 8px; }
.rt-assistant__ligne { display: flex; gap: 8px; align-items: stretch; }
.rt-assistant__ligne textarea { flex: 1; min-width: 0; resize: vertical; }
.liste-assistant { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-assistant li { display: flex; gap: 10px; align-items: flex-start; }
.liste-assistant .icone { margin-top: 3px; color: var(--bleu); }
@media (max-width: 700px) { .rt-assistant__ligne { flex-direction: column; } }
.rt-toute { margin: 12px 0; text-align: center; }
.rt-toute .bouton { width: 100%; max-width: 420px; justify-content: center; }
.rt-sans-depot p { margin: 0 0 8px; }
.rt-sans-depot form { flex-wrap: wrap; gap: 8px; }
.rt-sans-depot input { flex: 1 1 220px; min-width: 0; }
.rt-agenda { margin-top: 16px; }
.rt-agenda h2 { font-size: var(--taille-l, 18px); margin: 0 0 4px; }
.rt-agenda .rangee { flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.rt-reprendre { display: inline-block; }
.rt-reprendre summary { list-style: none; cursor: pointer; }
.rt-reprendre summary::-webkit-details-marker { display: none; }
.rt-reprendre[open] form { margin-top: 8px; flex-wrap: wrap; gap: 8px; align-items: center; }
.rt-reprendre[open] form .petit { flex-basis: 100%; }
.rt-installer { margin-top: 16px; text-align: center; }
.rt-installer .bouton { width: 100%; max-width: 420px; justify-content: center; }
.rt-installer__etapes { text-align: left; margin: 8px auto; max-width: 420px; padding-left: 22px; }
.rt-installer__etapes li { margin: 6px 0; }
.rt-installer__partager { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--bleu-plein, #0066ff); }
.rt-agenda-branche { flex-wrap: wrap; gap: 8px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--ligne); }
.rt-agenda-branche > span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.rt-agendas-liste { list-style: none; padding: 0; margin: 8px 0 16px; }
.rt-terminer { grid-column: 1 / -1; margin-top: 10px; }
.rt-terminer summary { list-style: none; cursor: pointer; width: 100%; justify-content: center; }
.rt-terminer summary::-webkit-details-marker { display: none; }
.rt-terminer[open] summary { display: none; }
.rt-terminer form { display: flex; flex-direction: column; gap: 8px; }
.rt-terminer textarea { width: 100%; }
.rt-terminer__photos { position: relative; width: 100%; justify-content: center; cursor: pointer; }
.rt-terminer__photos:focus-within { outline: 2px solid var(--c, #2563eb); outline-offset: 2px; }
.rt-termine { grid-column: 1 / -1; margin: 10px 0 0; display: flex; align-items: center; gap: 6px; font-weight: 600; color: #16a34a; }

/* LPX Dispatch : l'avancement de la journée (visites terminées sur les liens des équipes), sans GPS. */
.rt-avancement { display: block; width: 100%; height: 8px; margin-top: 8px; border: 0; border-radius: 99px; overflow: hidden; background: var(--surface-3); accent-color: var(--succes); appearance: none; -webkit-appearance: none; }
.rt-avancement::-webkit-progress-bar { background: var(--surface-3); border-radius: 99px; }
.rt-avancement::-webkit-progress-value { background: var(--succes); border-radius: 99px; }
.rt-avancement::-moz-progress-bar { background: var(--succes); border-radius: 99px; }
