/* La disposition des écrans connectés (spec 2026-11-18-disposition-apple,
   section 3.1), posée après systeme.css et valable pour tous les thèmes :
   police système, fond groupé uni, cellules arrondies, colonne en matière
   translucide, grands titres qui se replient dans la barre, listes groupées
   à chevrons, tuiles à compte, onglets en contrôle segmenté. Un thème change
   les couleurs, jamais la mise en page : cette feuille ne pose aucun jeton du
   contrat de garage/themes.py, elle en dérive les siens. Les pièces que la
   feuille ne peut pas composer seule sont posées par disposition.js. */

/* 1. Jetons dérivés ---------------------------------------------------------- */
html[data-charte] {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Inter", "Segoe UI Variable Text", "Noto Sans", system-ui, sans-serif;
  --apparat: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter", "Segoe UI Variable Display", "Noto Sans", system-ui, sans-serif;
  --mono: var(--sans);
  --chiffres: var(--sans);
  --carte: var(--ground-2);
  --filet-doux: var(--hair-2);
  --creux: color-mix(in srgb, #767680 12%, transparent);
  --remplissage: color-mix(in srgb, #767680 12%, transparent);
  --remplissage-fort: color-mix(in srgb, #767680 20%, transparent);
  --separateur: color-mix(in srgb, var(--ink) 16%, transparent);
  --materiau: color-mix(in srgb, var(--ground) 80%, transparent);
  --materiau-menu: color-mix(in srgb, var(--ground-2) 94%, transparent);
  --colonne-fond: color-mix(in srgb, var(--frame) 80%, transparent);
  --rayon: 12px;
  --rayon-petit: 10px;
  --r-vif: 10px;
  --retrait: 16px; /* le retrait d'une cellule d'iOS : rien ne touche le bord d'une carte */
  --ombre-cellule: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
  --ombre-tiroir: 0 18px 50px -12px rgba(0, 0, 0, 0.28);
  --anneau: none;
}
html[data-charte][data-schema="dark"] {
  --creux: color-mix(in srgb, #767680 24%, transparent);
  --remplissage: color-mix(in srgb, #767680 24%, transparent);
  --remplissage-fort: color-mix(in srgb, #767680 32%, transparent);
  --separateur: color-mix(in srgb, var(--ink) 22%, transparent);
  --materiau: color-mix(in srgb, var(--ground-2) 78%, transparent);
  --ombre-cellule: none;
}

html[data-charte] body.dashboard-app {
  background: var(--ground);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;

  /* Ni tracés de circuits ni grain : le fond est uni. */
  &::before, &::after { display: none !important; }

  & :is(h1, h2, h3, h4, .section-title, legend, .vname, .tabs a) em { font-family: inherit; font-style: normal; }
  & .num, & strong, & dd, & time { font-variant-numeric: tabular-nums; }
  & :is(.metric-label, .bandeau-surtitre, .dashboard-nav-label, .groupe-titre, .groupe-date) {
    font-family: var(--sans); text-transform: none; letter-spacing: 0;
  }

  /* 2. Barre latérale façon macOS ------------------------------------------ */
  & .masthead {
    background: var(--colonne-fond);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border-right: 0.5px solid var(--separateur);
    padding: 12px 10px;
  }
  & .masthead .marque-pc { max-width: 64px; max-height: 64px; margin: 4px auto 6px; }
  & .masthead .dashboard-nav-label {
    margin: 18px 10px 4px; font-size: 11px; font-weight: 600; color: var(--ink-faint);
  }
  & .mast-nav a, & .navigation-plus > summary {
    min-height: 32px; padding: 5px 10px; gap: 10px; border-radius: 8px;
    color: var(--ink); font-size: 13.5px; font-weight: 500;
  }
  & .mast-nav a .icon, & .navigation-plus > summary .icon { color: var(--accent-texte); stroke-width: 1.8; width: 18px; height: 18px; }
  & .mast-nav a:hover { background: var(--remplissage); color: var(--ink); }
  & .mast-nav a[aria-current="page"] { background: var(--remplissage-fort); color: var(--ink); font-weight: 600; }
  & .mast-nav a[aria-current="page"]::before { display: none; }
  & .masthead .dashboard-ajouter {
    border-radius: 10px; min-height: 34px; font-size: 13.5px; font-weight: 600; box-shadow: none;
  }
  & .dashboard-sidebar-foot, & .dashboard-concierge { font-size: 12px; color: var(--ink-2); }

  /* 3. Barre du haut : matière, recherche arrondie, titre réduit ---------- */
  & .ears { border-bottom: 0; background: transparent; }
  & .ears .search input, & .ears .search :is(input[type=search], input[type=text]) {
    border: 0; border-radius: 10px; background: var(--remplissage); box-shadow: none;
    font-size: 15px; min-height: 36px;
  }
  & .ears .search input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 0; }
  & .compte > summary .monogram { background: linear-gradient(180deg, #8E8E93, #636366); color: #fff; font-weight: 600; letter-spacing: 0; }
  /* Le titre replié ne croise rien de ce que la barre peint (décision du
     26/11/2026) : disposition.js pose son centre (`--titre-centre`) et sa
     largeur permise (`--titre-place`), et `titre-efface` sur chaque voisin
     que le titre croiserait (la bascule du thème, la recherche, l'identité
     de la maison, un à un et dans cet ordre). Un voisin effacé, à toute
     largeur, se masque à la fin de son fondu de 160 ms (visibilité retardée
     d'autant) : il quitte l'ordre de tabulation, et revient sans délai au
     déplié.
     Même liste d'effaçables que disposition.js. */
  & .titre-barre {
    position: absolute; left: var(--titre-centre, 50%); top: 50%; transform: translate(-50%, -50%);
    max-width: var(--titre-place, 40%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 15px; font-weight: 600; color: var(--ink);
    opacity: 0; pointer-events: none; transition: opacity 160ms ease;
  }
  & .ears { position: sticky; top: 0; z-index: var(--z-barre); }
  &.titre-replie .titre-barre { opacity: 1; }
  & .ears :is(.marque-carre-telephone, .ears-identite > .ears-marque, .search, .bascule-theme) { transition: opacity 160ms ease, visibility 0s linear; }
  /* La même liste que la règle du dessus, pour l'emporter sur elle : la
     spécificité d'un `:is()` est celle de son argument le plus spécifique
     (`.ears-identite > .ears-marque`), et `.ears .titre-efface` seul perdait,
     la visibilité tombant sans attendre la fin du fondu (contre-vérification
     du round 1, N1). */
  & .ears :is(.marque-carre-telephone, .ears-identite > .ears-marque, .search, .bascule-theme).titre-efface {
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 160ms ease, visibility 0s linear 160ms;
  }
  &.titre-replie .ears {
    background: var(--materiau);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 0.5px 0 var(--separateur);
  }

  /* 4. Grands titres --------------------------------------------------------- */
  & main.content > header :is(h1), & main.content > h1, & .fiche-bandeau h1.vname {
    font-family: var(--apparat); font-size: 34px; line-height: 1.12; font-weight: 700;
    letter-spacing: -0.022em; color: var(--ink);
  }
  & .bandeau-court { gap: 6px; padding-top: 4px; }
  & .bandeau-surtitre { font-size: 13px; font-weight: 600; color: var(--ink-2); }
  & .bandeau-sous, & .date-du-jour { color: var(--ink-2); font-size: 15px; }

  /* 5. Titres de section et listes groupées en retrait ----------------------- */
  & :is(.dashboard-section-head h2, h2.section-title, .groupe-titre, section > h2) {
    font-family: var(--apparat); font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -0.016em; color: var(--ink);
  }
  & .dashboard-section-head { align-items: baseline; margin-bottom: 8px; border: 0; }
  & .dashboard-section-head > a, & .bandeau-renvois a { font-size: 15px; font-weight: 400; color: var(--accent-texte); text-decoration: none; }
  & .groupe-date { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 18px 16px 6px; border: 0; }
  & .groupe-titre.alerte { color: var(--danger); }

  & :is(.feuille, .deadline-list, .a-venir-liste, .demande, .graphique, .en-vedette, .synthese, .fiche-bref, .lot-main > section > .feuille) {
    background: var(--carte); border: 0; border-radius: 12px; box-shadow: var(--ombre-cellule);
  }
  /* Retrait de la cellule (retour du 19/11) : le contenu d'une carte se tient à
     16 px de ses bords ; les rangées seules débordent jusqu'aux bords et
     reprennent le retrait dans leur propre marge, comme une liste groupée d'iOS. */
  & :is(.feuille, .deadline-list, .a-venir-liste) { padding: 0 var(--retrait); overflow: hidden; }
  & :is(.feuille, .deadline-list, .a-venir-liste) > :is(a.echeance, .filet-row, a, .ligne) { margin-inline: calc(-1 * var(--retrait)); }
  /* Les rangées d'un repli posé dans la carte (« Faites », « Non tenues »,
     « Clos », « Rendus » de la fiche) débordent de même : sans quoi elles
     gardaient le retrait de la carte en plus du leur (recette du 26/11). */
  & :is(.feuille, .deadline-list, .a-venir-liste) > details.repli > :is(a.echeance, .filet-row, a, .ligne) { margin-inline: calc(-1 * var(--retrait)); }
  & :is(.demande, .graphique, .synthese) { padding: var(--retrait); }
  & :is(.feuille-texte, .marge-panneau) { padding-block: 12px; }
  & .lot-aside { background: none; box-shadow: none; padding: 0; }
  /* Les pictogrammes suspendus dans la marge du registre rentrent dans leur rangée. */
  & :is(.feuille, .deadline-list, .a-venir-liste) :is(.filet-row, .row-lien, .rangee-sortie) > :is(.gravure, .monogram):first-child { margin-left: 0; }
  /* La voiture en vedette : le texte de la diapositive au retrait de la carte,
     les flèches en boutons ronds (guide d'Apple : un bouton à icône seule est
     un cercle), posés au retrait du coin, jamais dans l'angle. */
  & .en-vedette .vedette-id { padding: 14px var(--retrait) var(--retrait); padding-right: calc(var(--retrait) + 150px); }
  & .en-vedette .vedette-nom { font-family: var(--apparat); font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
  & .en-vedette .vedette-sub { font-size: 13px; color: var(--ink-2); }
  & .en-vedette .vedette-nav { right: var(--retrait); bottom: var(--retrait); left: auto; padding: 0; gap: 8px; align-items: center; background: none; border: 0; }
  & .en-vedette .vedette-nav button {
    width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%;
    display: inline-grid; place-items: center; background: var(--remplissage); color: var(--accent-texte); box-shadow: none; outline-offset: 2px;
  }
  & .en-vedette .vedette-nav .num { font-size: 13px; color: var(--ink-2); }
  /* Le chevron propre d'une rangée reste à droite, centré, sans passer à la ligne. */
  & :is(.feuille, .deadline-list, .a-venir-liste) > .filet-row > .chev,
  & :is(.feuille, .deadline-list, .a-venir-liste) > details.repli > .filet-row > .chev { position: absolute; right: var(--retrait); top: 50%; translate: 0 -50%; margin: 0; }

  /* Rangées : séparateur en retrait, chevron à droite. */
  & :is(a.echeance, .filet-row, .entry.liste, .feuille > a, .feuille > .ligne) {
    position: relative; padding: 11px 36px 11px 16px; border-bottom: 0; min-height: 44px;
    background: transparent; transition: background-color 120ms ease;
  }
  & :is(a.echeance, .filet-row, .feuille > a, .feuille > .ligne) + :is(a.echeance, .filet-row, .feuille > a, .feuille > .ligne)::before {
    content: ""; position: absolute; top: 0; left: 16px; right: 0; bottom: auto; width: auto; height: 0.5px; border: 0; border-radius: 0; background: var(--separateur);
  }
  & :is(a.echeance, .feuille > a, .filet-row:has(> a)):not(:has(.chev, .icon-chev))::after {
    content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 13px; margin-top: -6.5px;
    background: var(--ink-faint); opacity: 0.55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath d='M1.5 1.5 6.5 6.5l-5 5' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%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 8 13'%3E%3Cpath d='M1.5 1.5 6.5 6.5l-5 5' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  & .a-venir .deadline-list > .filet-row::before { left: 16px; }
  & :is(a.echeance, .feuille > a, .filet-row > a):active { background: var(--remplissage); }
  & .filet-row > a.row-lien { margin: -11px -36px -11px -16px; padding: 11px 36px 11px 16px; }
  /* Suivi d'autres contrôles (la date et les gestes d'une rangée de document, une tâche, une ligne de devis), le lien s'arrête devant eux : ses 36 px de droite se posaient
     sous la date et « Télécharger », et au téléphone, où ils passent sous le titre, ses 11 px du bas mordaient de 9 px
     sur leur ligne (spec chevauchements du 26/11/2026, 2.4). Marge et retrait s'annulent, rien ne bouge. */
  & .filet-row > a.row-lien:not(:last-child) { margin-right: 0; padding-right: 0; margin-bottom: 0; padding-bottom: 0; }
  & .filet-row > a.row-lien:hover, & a.echeance:hover { background: color-mix(in srgb, var(--remplissage) 50%, transparent); }

  /* L'échéance : la date dans un carré arrondi, le statut en texte coloré. */
  & a.echeance { grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 14px; }
  & .echeance-date {
    align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px;
    background: var(--remplissage); text-align: center;
  }
  /* Le jour et son mois, à la manière d'une pastille de calendrier : le premier
     enfant est le texte des lecteurs d'écran, d'où `b` et non `b:first-child`. */
  & .echeance-date { gap: 2px; padding: 5px 0; height: auto; min-height: 44px; box-sizing: border-box; overflow: hidden; }
  & .echeance-date b { font-family: var(--apparat); font-size: 18px; line-height: 1; font-weight: 700; letter-spacing: 0; }
  /* Hors de l'année en cours, le mois porte l'année (`i.an`) : il passe sur deux
     lignes centrées, et le carré grandit avec lui. */
  & .echeance-date i { text-align: center; white-space: normal; }
  & .echeance-date i.an { font-size: 10px; line-height: 1.1; max-width: 40px; }
  & .echeance-date i { font-style: normal; font-size: 11px; line-height: 1; font-weight: 600; color: var(--ink-2); }
  & a.echeance.echu .echeance-date { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
  & a.echeance.echu .echeance-date i { color: var(--danger); }
  & :is(.etiquette, .badge, .statut, .echeance-statut) { border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; }

  /* 6. Chiffres : tuiles à la Santé ------------------------------------------- */
  & .chiffres { gap: 12px; border: 0; }
  & .chiffres-case {
    background: var(--carte); border: 0; border-radius: 12px; padding: 14px 16px; box-shadow: var(--ombre-cellule);
  }
  & .chiffres-case::before, & .chiffres-case::after { display: none; }
  & .chiffres-case .metric-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
  & .chiffres-case strong { font-family: var(--apparat); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
  & .chiffres-case small { font-size: 13px; color: var(--ink-2); }
  & .reglette.fiche-bref { gap: 0; padding: 4px 0; }
  & .reglette.fiche-bref .chiffre { padding: 10px 16px !important; }
  & .reglette.fiche-bref .chiffre + .chiffre { border-left: 0.5px solid var(--separateur) !important; }
  & .reglette .metric-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
  & .reglette dd strong { font-family: var(--apparat); font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }

  /* 7. Raccourcis : tuiles à la Rappels (pastille d'icône, compte, libellé). */
  & :is(.raccourcis, section.raccourcis) { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; border: 0; }
  & :is(div, section).raccourcis > .raccourci, & .raccourci {
    padding: 14px var(--retrait);
    position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center;
    gap: 10px 8px; min-height: 0; border: 0; border-radius: 12px;
    background: var(--carte); box-shadow: var(--ombre-cellule); color: var(--ink); text-decoration: none;
  }
  & .raccourci::before, & .raccourci::after { display: none; }
  & .raccourci > .icon {
    width: 30px; height: 30px; padding: 6px; box-sizing: border-box; border-radius: 50%;
    background: var(--teinte-tuile, var(--accent)); color: #fff; stroke: #fff; stroke-width: 2.2;
  }
  & .raccourci > div { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; }
  & .raccourci strong { font-size: 15px; font-weight: 600; }
  & .raccourci small { font-size: 12.5px; color: var(--ink-2); }
  & .raccourci .tuile-compte {
    grid-row: 1; grid-column: 2; justify-self: end;
    font-family: var(--apparat); font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
  }
  & .raccourci.zero { opacity: 1; }
  & .raccourci.zero .tuile-compte, & .raccourci.zero strong { color: var(--ink-faint); }
  & .raccourci.zero > .icon { background: #AEAEB2; }
  & .raccourci:nth-child(6n+1) { --teinte-tuile: #0A84FF; }
  & .raccourci:nth-child(6n+2) { --teinte-tuile: #FF3B30; }
  & .raccourci:nth-child(6n+3) { --teinte-tuile: #FF9500; }
  & .raccourci:nth-child(6n+4) { --teinte-tuile: #34C759; }
  & .raccourci:nth-child(6n+5) { --teinte-tuile: #AF52DE; }
  & .raccourci:nth-child(6n+6) { --teinte-tuile: #5AC8FA; }
  & .raccourci:active { transform: scale(0.97); }

  /* 8. Boutons : rempli à la teinte, gris teinté, arrondis à 10 px -------- */
  & :is(.btn, a.btn, button.btn) {
    border: 0; border-radius: 10px; min-height: 34px; padding: 7px 14px;
    background: var(--remplissage); color: var(--accent-texte); font-family: var(--sans);
    font-size: 15px; font-weight: 600; box-shadow: none; text-decoration: none;
  }
  & :is(.btn.premier, .btn-primary, .btn.btn-primary, button[type=submit]:not(.btn, .lien, .chip, .trait, [class*=fleche])) {
    background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px;
  }
  & :is(.btn, .btn-primary):hover { filter: brightness(0.97); }
  & :is(.btn, .btn-primary, .chip):active { transform: scale(0.97); filter: brightness(0.92); }

  /* Puces de filtre : capsules grises, la choisie à la teinte. */
  & .chip { border: 0; border-radius: 999px; background: var(--remplissage); color: var(--ink); font-size: 13.5px; font-weight: 500; padding: 6px 12px; min-height: 30px; }
  & .chip.on, & .chip[aria-current], & .chip[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
  & .chip .gravure { filter: none; }

  /* Champs : remplissage gris, sans trait. */
  & :is(input:not([type=checkbox], [type=radio], [type=range], [type=file]), select, textarea) {
    border: 0; border-radius: 10px; background: var(--remplissage); box-shadow: none; font-family: var(--sans); font-size: 15px;
  }

  /* 9. Ouverture du tableau de bord : une photo arrondie, le titre posé dessus. */
  & .ouverture { border-radius: 16px; min-height: 280px; background: #111; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.5); }
  & .ouverture-photo { width: 100%; object-position: center 62%; }
  & .ouverture-pan {
    width: 100%; justify-content: flex-end; padding: 24px 26px; border-radius: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.55)) !important;
  }
  & main.content > header.ouverture h1 { font-family: var(--apparat); font-size: 34px; font-weight: 700; letter-spacing: -0.022em; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25); }
  & .ouverture .ouverture-geste {
    border: 0; border-radius: 999px; padding: 8px 14px; color: #fff; font-weight: 600;
    background: rgba(40, 40, 40, 0.35); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  }
  & .ouverture .ouverture-geste .icon { color: #fff; stroke: #fff; }
  & .installer { background: var(--carte); border: 0; border-radius: 12px; box-shadow: var(--ombre-cellule); }

  /* 10. Fiche : la photo d'abord, puis le grand titre, deux gestes et « … ». */
  & .fiche-bandeau { display: flex; flex-direction: column-reverse; gap: 18px; background: none; border: 0; padding: 0; }
  & .fiche-bandeau::before, & .fiche-bandeau::after { display: none; }
  & .fiche-bandeau .bandeau-photo { width: 100%; max-width: none; border-radius: 16px; overflow: hidden; background: var(--carte); box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.5); }
  & .fiche-galerie .photo-piste, & .fiche-galerie > .plate { aspect-ratio: auto; height: min(52vh, 460px); border-radius: 0; }
  & .fiche-galerie .photo-piste img { height: 100%; object-fit: cover; border-radius: 0; }
  @media (max-width: 720px) { & .fiche-galerie .photo-piste, & .fiche-galerie > .plate { height: auto; aspect-ratio: 4 / 3; } }
  & .fiche-bandeau .bandeau-texte { padding: 0; background: none; }
  & .fiche-fil { font-size: 15px; font-weight: 400; color: var(--accent-texte); }
  & .vsub { gap: 6px; color: var(--ink-2); font-size: 15px; }
  & .vsub > span + span::before { content: "·"; margin-right: 6px; color: var(--ink-faint); }
  & .vsub .plaque { border: 0; padding: 0; background: none; font: inherit; color: inherit; letter-spacing: 0; }
  & .fiche-gestes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  & .fiche-gestes > .btn { font-size: 15px; }
  & .fiche-vues { padding: 10px var(--retrait); }

  /* Le menu « … » (gestes rares) : une liste flottante à la macOS. */
  & .gestes-plus { position: relative; z-index: 7; }
  & .fiche-bandeau { position: relative; z-index: 7; }
  & .gestes-plus > summary {
    list-style: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--remplissage); color: var(--accent-texte); cursor: pointer; font-size: 18px; font-weight: 700; line-height: 1;
  }
  & .gestes-plus > summary::-webkit-details-marker { display: none; }
  & .menu-deroulant {
    position: absolute; z-index: var(--z-menu); top: calc(100% + 6px); left: 0; min-width: 230px; padding: 5px;
    border-radius: 12px; background: var(--materiau-menu);
    -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 0 0 0.5px var(--separateur), 0 14px 40px -10px rgba(0, 0, 0, 0.3);
    transform-origin: top left; animation: menu-deroulant 220ms cubic-bezier(.2, .9, .3, 1.1);
  }
  & .menu-deroulant a.btn {
    display: flex; width: 100%; justify-content: flex-start; min-height: 32px; padding: 6px 10px; border-radius: 7px;
    background: none; color: var(--ink); font-size: 14px; font-weight: 500;
  }
  & .menu-deroulant a.btn:hover { background: var(--accent); color: var(--on-accent); }

  /* 11. Onglets de la fiche : contrôle segmenté, quatre entrées et « Plus ». */
  & nav.tabs {
    display: inline-flex; flex-wrap: nowrap; gap: 0; max-width: 100%; margin: 22px 0 18px; padding: 2px;
    border: 0; border-radius: 9px; background: var(--remplissage); position: relative; isolation: isolate; z-index: 6;
  }
  & nav.tabs a, & nav.tabs .onglets-plus > summary {
    position: relative; z-index: 1; height: 30px; min-height: 30px; min-width: 0; padding: 0 14px; line-height: 30px;
    border-radius: 7px; color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 500; white-space: nowrap;
  }
  & nav.tabs a::after { display: none; content: none; }
  & nav.tabs a[aria-current=true] { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink); }
  & nav.tabs a[aria-current=true] .num { font-size: 13px; font-family: var(--sans); }
  & nav.tabs a .num { color: var(--ink-faint); margin-left: 4px; font-size: 12px; }
  & nav.tabs > a + a:not([aria-current=true])::before, & nav.tabs > .onglets-plus::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 0.5px; background: var(--separateur);
  }
  & nav.tabs a.onglet-cache { display: none; }
  & nav.tabs .onglets-curseur {
    z-index: 0; top: 2px; height: 30px; border-radius: 7px; background: var(--ground-2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  }
  & .onglets-plus { position: relative; z-index: 2; }
  & .onglets-plus > summary { list-style: none; display: block; cursor: pointer; }
  & .onglets-plus > summary::-webkit-details-marker { display: none; }
  & .onglets-plus > summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 7px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); opacity: 0.6; }
  & .onglets-plus.porte > summary { font-weight: 600; }
  & .onglets-plus .menu-deroulant { left: auto; right: 0; transform-origin: top right; }
  & .onglets-plus .menu-deroulant a { display: flex; justify-content: space-between; gap: 12px; height: auto; min-height: 32px; line-height: 1.3; padding: 6px 10px; border-radius: 7px; font-size: 14px; }
  & .onglets-plus .menu-deroulant a:hover { background: var(--accent); color: var(--on-accent); }
  & .onglets-plus .menu-deroulant a:hover .num { color: inherit; }

  /* 12. Collection : cartes arrondies ----------------------------------------- */
  & :is(.vignette, .entry) { border: 0; border-radius: 12px; background: var(--carte); box-shadow: var(--ombre-cellule); overflow: hidden; }
  & :is(.vignette, .entry)::before { display: none; }
  & .vignette .plate { border-radius: 0; }
  & .vignette :is(.vignette-nom, .vignette-spec) { padding-inline: 12px; }
  & .vignette .nom { font-weight: 600; font-size: 15px; }
  & .etat { border: 0; border-radius: 6px; font-weight: 600; }

  /* 13. Feuilles et voiles ---------------------------------------------------- */
  & .compte-menu {
    border: 0; border-radius: 12px; padding: 5px; background: var(--materiau-menu);
    -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 0 0 0.5px var(--separateur), 0 14px 40px -10px rgba(0, 0, 0, 0.3);
  }
  & .compte-menu :is(a, button) { border-radius: 7px; padding: 6px 10px; font-size: 14px; }
  & .compte-menu :is(a, button):hover { background: var(--accent); color: var(--on-accent); }
  & .mv-toast { border: 0; border-radius: 14px; background: var(--materiau); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3); }

  /* 13 bis. Le menu en familles (spec navigation simplifiée du 20/11/2026).
     Le titre du panneau « Plus » n'existe qu'au téléphone : à l'ordinateur la
     colonne est une liste plate. La barre de sous-rubriques : les écrans d'une
     famille en capsules, au-dessus du titre de la page, celle de la page à la
     teinte, comme une puce de filtre choisie. */
  & .mast-nav .panneau-titre { display: none; }
  & .sous-rubriques {
    display: flex; gap: 6px; margin: 0 0 20px; padding: 2px 0; min-width: 0;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  }
  & .sous-rubriques::-webkit-scrollbar { display: none; }
  & .sous-rubriques a {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 32px; padding: 6px 14px;
    border-radius: 999px; background: var(--remplissage); color: var(--ink);
    font-family: var(--sans); font-size: 13.5px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
  }
  & .sous-rubriques a:hover { background: var(--remplissage-fort); }
  & .sous-rubriques a[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
  & .sous-rubriques .badge {
    display: inline-grid; place-items: center; box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 5px;
    border: 0; border-radius: 999px; background: var(--carte); color: var(--accent-texte); font: 600 12px/1 var(--sans);
  }

  /* La rangée d'un devis au module fermé (spec navigation simplifiée du
     20/11/2026, 5) se lit sans mener nulle part : elle garde la disposition
     d'une rangée à lien, sans son survol. */
  & div.row-lien:hover > :is(.titre, .deadline-kind, .grow) { color: inherit; text-decoration: none; }

  /* 13 ter. La zone de dépôt de l'import (spec navigation simplifiée du
     20/11/2026, 6) : une cellule au trait pointillé que le champ de fichier
     couvre ; au survol d'un fichier glissé, le trait prend la teinte. Sans
     script (`armee` absent) le champ reste en vue sous le libellé. */
  & .depot {
    position: relative; display: grid; justify-items: center; gap: 6px; padding: 28px var(--retrait, 16px);
    border: 1.5px dashed var(--separateur); border-radius: 12px; background: var(--carte); text-align: center;
  }
  & .depot > .icon { width: 28px; height: 28px; color: var(--accent-texte); }
  & .depot > strong { font-size: 15px; }
  & .depot.armee input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  & .depot.armee:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  & .depot.survol { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--carte)); }
  & .depot-liste { position: relative; z-index: 1; width: 100%; margin: 10px 0 0; padding: 0; list-style: none; text-align: left; }
  & .depot-liste li {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 12px;
    border-top: 0.5px solid var(--separateur); font-size: 14px;
  }
  & .depot-liste li > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  & .depot-retirer {
    width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: none;
    color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
  }
  & .depot-retirer:hover { background: var(--remplissage); color: var(--ink); }
  & .depot-modele { margin: 16px 0 0; }

  /* 13 quater. La prise en main (spec navigation simplifiée du 20/11/2026, 7) :
     le rang de l'étape dans un rond, coché quand elle est faite ; l'étape
     faite s'efface d'un ton, la première à faire porte son rond à la teinte. */
  & .prise-en-main-etapes .etape-etat {
    display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
    background: var(--remplissage); color: var(--ink-2); font: 600 13px/1 var(--sans); font-variant-numeric: tabular-nums;
  }
  & .prise-en-main-etapes .etape-etat .icon { width: 15px; height: 15px; stroke: currentColor; }
  & .prise-en-main-etapes a.faite .titre { color: var(--ink-2); font-weight: 400; }
  & .prise-en-main-etapes a.faite .etape-etat { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-texte); }
  & .prise-en-main-etapes a[aria-current="step"] .etape-etat { background: var(--accent); color: var(--on-accent); }
  & .prise-en-main-gestes { margin: 10px 0 0; display: flex; justify-content: flex-end; gap: 8px; }
  & .prise-en-main-gestes form { margin: 0; }

  /* 13 quinquies. La visite du menu (spec navigation simplifiée du 20/11/2026,
     7.1) : une bulle en matière, posée à côté de l'entrée visée, que cerne
     un anneau à la teinte. */
  & .visite-bulle {
    position: fixed; z-index: var(--z-bulle); box-sizing: border-box; width: 300px; padding: 16px 16px 14px;
    border-radius: 14px; background: var(--carte); color: var(--ink);
    box-shadow: 0 0 0 0.5px var(--separateur), 0 18px 44px -12px rgba(0, 0, 0, 0.35);
  }
  & .visite-compte { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
  & .visite-titre { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
  & .visite-texte { margin: 6px 0 14px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
  & .visite-gestes { display: flex; justify-content: flex-end; gap: 8px; }
  & .visite-fermer {
    position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0;
    border-radius: 50%; background: none; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
  }
  & .visite-fermer:hover { background: var(--remplissage); color: var(--ink); }
  & .mast-nav a.visite-cible { box-shadow: 0 0 0 2px var(--accent); border-radius: 10px; }

  /* 14. Téléphone : barre d'onglets d'iOS, titres à 34 px, marges de 16 px. */
  @media (max-width: 720px) {
    font-size: 17px;
    /* La barre de sous-rubriques défile de côté dans son cadre, d'un bord à l'autre de l'écran. */
    & .mast-nav .panneau-titre { display: block; }
    & .sous-rubriques { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
    & .sous-rubriques a { min-height: 44px; padding-inline: 16px; }
    & .masthead { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; padding: 0; }
    & .mast-nav {
      background: var(--materiau); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
      border-top: 0.5px solid var(--separateur); padding-top: 4px;
    }
    & .mast-nav > a, & .navigation-plus > summary {
      min-height: 49px; padding: 4px 0 2px; gap: 2px; border-radius: 0; background: none;
      font-size: 10px; font-weight: 500; letter-spacing: 0.01em; color: #8E8E93;
    }
    & .mast-nav > a .icon, & .navigation-plus > summary .icon { width: 25px; height: 25px; color: inherit; }
    & .mast-nav > a[aria-current="page"], & .navigation-plus[open] > summary, & .navigation-plus > .navigation-plus-active { color: var(--accent-texte); background: none; }
    & .navigation-outils { border: 0; border-radius: 14px; background: var(--ground-2); box-shadow: var(--ombre-tiroir); }
    & .navigation-outils a { border-radius: 10px; }
    & main.content { padding-inline: 16px; }
    & .ears { padding-inline: 16px; }
    & :is(.raccourcis, section.raccourcis) { grid-template-columns: 1fr 1fr; gap: 10px; }
    & .chiffres { grid-template-columns: 1fr 1fr; gap: 10px; }
    & .chiffres-case strong { font-size: 22px; overflow-wrap: anywhere; }
    & .raccourci .tuile-compte { font-size: 24px; }
    & .raccourci strong { font-size: 15px; }
    & .chiffres-case .metric-label { font-size: 13px; }
    & .ouverture { min-height: 220px; border-radius: 14px; }
    & main.content > header.ouverture h1 { font-size: 28px; }
    & nav.tabs { display: flex; width: 100%; box-sizing: border-box; overflow: visible; }
    & nav.tabs > a, & nav.tabs > .onglets-plus { flex: 1 1 auto; min-width: 0; text-align: center; }
    & nav.tabs > a, & nav.tabs > .onglets-plus > summary { overflow: hidden; text-overflow: ellipsis; }
    /* Au téléphone, la marque de la maison s'efface avec la recherche quand
       le titre se replie, et revient quand il se déplie (décision du 26/11). */
    /* Même seuil et même liste que `AU_TELEPHONE` dans disposition.js. */
    &.titre-replie .ears :is(.search, .marque-carre-telephone) {
      opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 160ms ease, visibility 0s linear 160ms;
    }
    & .titre-barre { max-width: var(--titre-place, 60%); font-size: 17px; }
    & nav.tabs a, & nav.tabs .onglets-plus > summary { padding: 0 8px; height: 44px; min-height: 44px; line-height: 44px; }
    & nav.tabs .onglets-curseur { height: 44px; }
    /* Cible tactile de 44 px au téléphone, la règle de l'application et celle d'Apple. */
    & :is(.btn, a.btn, button.btn, .btn-primary, .chip, .gestes-plus > summary, button[type=submit]:not(.lien, .trait, [class*=fleche])) { min-height: 44px; }
    & .gestes-plus > summary { width: 44px; height: 44px; }
    & :is(input:not([type=checkbox], [type=radio], [type=range], [type=file]), select) { min-height: 44px; }
    & .menu-deroulant :is(a, a.btn) { min-height: 44px; }
    & .reglette.fiche-bref { grid-template-columns: 1fr 1fr; }
    /* Au téléphone, les flèches de la vedette passent sous le texte, alignées à droite. */
    & .en-vedette .vedette-id { padding-right: var(--retrait); }
    & .en-vedette .vedette-nav { position: static; justify-content: flex-end; padding: 0 var(--retrait) var(--retrait); }
    & .reglette.fiche-bref .chiffre:nth-of-type(odd) { border-left: 0 !important; }
    & .reglette.fiche-bref .chiffre:nth-of-type(n+3) { border-top: 0.5px solid var(--separateur) !important; }
  }
}

@keyframes menu-deroulant { from { opacity: 0; transform: scale(0.94); } }
@media (prefers-reduced-motion: reduce) { html[data-charte] .menu-deroulant { animation: none; } }
@media (prefers-reduced-transparency: reduce) {
  html[data-charte] { --materiau: var(--ground-2); --materiau-menu: var(--ground-2); --colonne-fond: var(--ground); }
}
