/* Navigation de l'app (lot 1) : en-tête, barre capsule, carte tirée, menu ☰, feuilles, visite, ordinateur, premier lancement.
   Tout s'appuie sur les jetons du socle (app.css : --esp-*, --r-*, --cible, --marge, zones sûres). Les valeurs propres à la barre sont
   des variables ci-dessous, faciles à changer d'un coup (R63, 24/10/2026 : « la barre d'onglets comme celle d'iOS 26 »).

   Règle d'Apple des formes concentriques : une forme posée dans une autre garde la même courbure. Rayon intérieur = rayon extérieur
   moins le retrait, et le retrait est le même tout autour. Ici : barre 76 pt de haut, rayon 26 ; pastille de la section active
   60 pt de haut, retrait de 8 pt en haut, en bas et contre les bords de la barre, rayon 26 − 8 = 18, centrée sur l'icône. */
:root {
  --capsule-h: 76px;                                   /* hauteur de la barre */
  --barre-rayon: 26px;                                 /* rayon de la barre (R63) */
  --barre-marge: var(--esp-3);                         /* distance de la barre aux bords de l'écran */
  --barre-pad-v: var(--esp-2);                         /* marge intérieure haut et bas de la barre */
  --barre-pad-h: var(--esp-1);                         /* marge intérieure côtés de la barre */
  --pastille-retrait: var(--esp-2);                    /* retrait de la pastille active : haut, bas et bords de la barre */
  --pastille-retrait-x: calc(var(--pastille-retrait) - var(--barre-pad-h)); /* ce qui reste à prendre dans la case, de chaque côté */
  --pastille-rayon: calc(var(--barre-rayon) - var(--pastille-retrait));      /* 18 */
  --plus-d: 56px;                                      /* le « + » : rond, centré en hauteur */
  --plus-colonne: 64px;                                /* sa colonne dans la barre */
  --poignee-l: 34px; --poignee-h: 4px; --poignee-haut: 3px;
  --panneau-rayon: var(--barre-rayon);                 /* la carte tirée prolonge la barre : même rayon, pas de jonction visible */
  --r-tuile: max(var(--r-3), calc(var(--panneau-rayon) - var(--esp-4)));   /* concentrique avec la carte et son retrait de 16 */
  --icone-barre: 26px;
  --notes-d: 52px;
}

/* ---------- Place sous la barre, toast ---------- */
body:not(.mode-tel) .toast { bottom: calc(var(--esp-5) + var(--bas-sur)); }

/* ---------- En-tête de navigation (05a) : ☰ · espace ⌄ · recherche · assistant ---------- */
.entete-nav { display: grid; grid-template-columns: var(--cible) minmax(0, 1fr) var(--cible) var(--cible); align-items: center; gap: var(--esp-1); width: 100%; padding-inline: var(--esp-2); }
.entete-nav .entete-titre { justify-content: center; }
.entete-nav .entete-bouton .ic { width: 24px; height: 24px; }
.entete-espace { font-size: 19px; }

/* ---------- La barre : capsule flottante, icônes seules (R61) ---------- */
.barre {
  position: fixed; left: var(--barre-marge); right: var(--barre-marge); bottom: var(--capsule-bas); height: var(--capsule-h); z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--plus-colonne) minmax(0, 1fr); align-items: stretch;
  padding: var(--barre-pad-v) var(--barre-pad-h); border-radius: var(--barre-rayon); background: var(--barre-fond);
  box-shadow: 0 14px 34px -16px rgba(36, 21, 43, .45), 0 0 0 1px var(--ligne); touch-action: none; /* le geste vers le haut ouvre la carte */
}
.barre-cote { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; }
.tirette, .panneau-prise .tirette { width: var(--poignee-l); height: var(--poignee-h); border-radius: var(--r-1); background: color-mix(in srgb, var(--texte) 26%, transparent); }
.barre .tirette { position: absolute; top: var(--poignee-haut); left: 50%; transform: translateX(-50%); transition: opacity 160ms ease; pointer-events: none; }
.panneau-ouvert .barre, .barre.edition { box-shadow: none; }
.panneau-ouvert .barre .tirette { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .barre.indice .tirette { animation: tirette-indice 1.6s var(--ease-out) 2; }
  @keyframes tirette-indice { 0%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-3px); } }
}
.onglet {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--esp-1); min-width: var(--cible); height: auto;
  font-size: 11px; font-weight: 600; color: var(--texte-doux); border-radius: var(--pastille-rayon); isolation: isolate;
  transition: transform 160ms var(--ease-out), color var(--duree) ease;
}
.onglet:active { transform: scale(.94); }
/* La pastille de la section active : épouse la forme de la barre, centrée sur l'icône (R63). */
.onglet::before { content: ""; position: absolute; inset: 0 var(--pastille-retrait-x); border-radius: var(--pastille-rayon); background: var(--accent-voile); z-index: -1; opacity: 0; transition: opacity var(--duree) ease; }
.onglet[aria-current="page"], .onglet.choisie { color: var(--accent-texte); }
.onglet[aria-current="page"]::before, .onglet.choisie::before { opacity: 1; }
.panneau-ouvert .onglet[aria-current="page"]:not(.choisie)::before { opacity: 0; }
.panneau-ouvert .onglet[aria-current="page"]:not(.choisie) { color: var(--texte-doux); }
.onglet-ic { position: relative; display: grid; place-items: center; }
.onglet .ic { width: var(--icone-barre); height: var(--icone-barre); }
.onglet .nom-onglet { display: none; line-height: 1.1; }
.barre.avec-noms .onglet .nom-onglet { display: block; }
.barre.avec-noms .onglet .ic { width: 24px; height: 24px; }
/* Nombres : pastilles posées sur l'angle de l'icône, qui restent dans la barre (A19). */
.onglet .badge { position: absolute; top: calc(var(--esp-2) * -1); left: calc(100% - var(--esp-2)); min-width: 17px; height: 17px; padding: 0 var(--esp-1); font-size: 10.5px; box-shadow: 0 0 0 2px var(--barre-fond); }
.onglet-plus { display: grid; place-items: center; align-self: center; }
.plus {
  display: grid; place-items: center; width: var(--plus-d); height: var(--plus-d); border-radius: 50%; background: var(--accent); color: var(--accent-contraste);
  box-shadow: 0 8px 18px -10px rgba(36, 21, 43, .5); transition: transform 160ms var(--ease-out), background var(--duree) ease;
}
.plus:active { transform: scale(.95); }
.plus .ic { width: 27px; height: 27px; stroke-width: 2; transition: transform var(--duree) var(--ease-out); }
.plus[aria-expanded="true"] .ic { transform: rotate(45deg); }
/* La place du bouton Notes (R18) : au-dessus à droite de la barre, au même endroit dans tous les espaces ; le lot 3 y monte le bouton. */
.emplacement-notes { position: fixed; z-index: 21; right: var(--marge); bottom: calc(var(--capsule-bas) + var(--capsule-h) + var(--esp-3)); min-width: var(--notes-d); min-height: var(--notes-d); pointer-events: none; }
.emplacement-notes > * { pointer-events: auto; }
body:not(.mode-tel) .emplacement-notes, body.sans-notes .emplacement-notes { display: none; } /* sans-notes : Réglages et Compte (listes et textes jusqu au bord : le crayon couvrirait leur dernière ligne) */
body.couche-ouverte .emplacement-notes, body.panneau-ouvert .emplacement-notes { visibility: hidden; }
/* Le bas du contenu passe au-dessus du bouton Notes (12 pt au-dessus de la barre, 52 pt de haut) : sa dernière ligne ne reste jamais dessous. */
body.mode-tel:not(.sans-notes) .contenu:not(.sans-barre):not(.avec-reponse) { padding-bottom: calc(var(--barre-h) + var(--esp-3) + var(--notes-d) + var(--esp-4)); }

/* Modifier ma barre (08b) : mêmes cases, noms visibles ; la réserve de sections dans une carte au-dessus. */
.barre.edition { z-index: 33; }
.barre.edition .place { color: var(--texte); }
.barre.edition .place::before { opacity: 1; background: none; box-shadow: inset 0 0 0 1px var(--ligne); }
.barre.edition .place.choisie::before, .barre.edition .place.survol::before { background: var(--accent-voile); box-shadow: none; }
.barre.edition .place.choisie, .barre.edition .place.survol { color: var(--accent-texte); }
.barre.edition .place.libre { color: var(--texte-doux); }
.barre.edition .place.libre::before { box-shadow: none; outline: 1.5px dashed var(--ligne); outline-offset: -2px; }
.barre.edition .place[disabled] { opacity: 1; }
.barre.edition .nom-onglet { display: block; }
.barre.edition .retirer { position: absolute; top: calc(var(--cible) / -2 + var(--esp-1)); left: calc(var(--cible) / -2 + var(--esp-3)); z-index: 2; width: var(--cible); height: var(--cible); color: #fff; display: grid; place-items: center; }
.barre.edition .retirer::before { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--erreur); box-shadow: 0 0 0 2px var(--barre-fond); }
.barre.edition .retirer .ic { position: relative; width: 13px; height: 13px; stroke-width: 2.6; }
.barre.edition .onglet-plus { opacity: .45; pointer-events: none; }
.reserve-barre {
  position: fixed; left: var(--barre-marge); right: var(--barre-marge); bottom: var(--capsule-bas); z-index: 32; padding: var(--esp-5) var(--esp-4) calc(var(--capsule-h) + var(--esp-4));
  border-radius: var(--panneau-rayon); background: var(--barre-fond); user-select: none; -webkit-user-select: none;
  box-shadow: 0 22px 50px -20px rgba(36, 21, 43, .55), 0 0 0 1px var(--ligne); opacity: 0; transform: translateY(14px); transition: opacity 200ms ease, transform 260ms var(--ease-out);
}
.reserve-barre.visible { opacity: 1; transform: none; }
.reserve-barre:focus { outline: none; }
.reserve-tete { display: flex; align-items: center; gap: var(--esp-2); color: var(--accent-texte); }
.reserve-tete h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 600; color: var(--texte); }
.reserve-barre > p { margin: var(--esp-2) 0 var(--esp-3); }
.reserve-puces { display: flex; flex-wrap: wrap; gap: var(--esp-2); margin-bottom: var(--esp-2); touch-action: none; }
.puce-reserve { cursor: grab; min-height: var(--cible); }
.puce.fantome { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; box-shadow: 0 12px 26px -12px rgba(36, 21, 43, .6); }
.btn-petit { min-height: var(--cible); padding: 0 var(--esp-4); font-size: 14px; width: auto; }

/* ---------- La carte tirée : son bas reste collé à la barre, sa hauteur suit le doigt (js/barre-tiree.js) ---------- */
.panneau {
  position: fixed; left: var(--barre-marge); right: var(--barre-marge); bottom: var(--capsule-bas); z-index: 19; height: var(--capsule-h); overflow: hidden;
  border-radius: var(--panneau-rayon); background: var(--barre-fond); box-shadow: 0 22px 50px -20px rgba(36, 21, 43, .55), 0 0 0 1px var(--ligne);
  touch-action: none; contain: layout paint; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.panneau:focus { outline: none; }
.panneau-int { display: flex; flex-direction: column; padding: 0 var(--esp-4) calc(var(--capsule-h) + var(--esp-4)); }
.panneau-prise { flex: none; display: grid; place-items: center; height: 26px; cursor: grab; }
.panneau-corps { flex: 1; min-height: 0; overflow: hidden; overscroll-behavior: contain; }
.panneau.defilable .panneau-corps { overflow-y: auto; touch-action: pan-y; }
.panneau.en-grand .panneau-encore { visibility: hidden; }
.panneau-encore { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: var(--cible); margin-top: var(--esp-2); color: var(--texte-doux); font-size: 13px; }
.voile-scene.avec-panneau { z-index: 18; transition: none; }
.pn-bloc { margin-top: var(--esp-5); }
.pn-bloc.premier { margin-top: var(--esp-1); }
.pn-titre { display: flex; align-items: center; gap: var(--esp-2); color: var(--accent-texte); min-height: 28px; }
.pn-titre h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--texte); flex: 1; min-width: 0; }
.pn-titre > span { font-size: 13px; color: var(--texte-doux); }
.pn-titre.petit-t h2 { font-size: 13.5px; color: var(--texte-doux); }
.lien-doux { display: inline-flex; align-items: center; gap: var(--esp-1); min-height: var(--cible); padding: 0 var(--esp-1); color: var(--accent-texte); font-size: 13px; }
.pn-titre .lien-doux { margin-block: -8px; }
/* Pastille d'une partie : sa teinte (--t), comme dans l'espace web. */
.pi { width: 40px; height: 40px; border-radius: var(--r-4); display: grid; place-items: center; flex: none; position: relative;
  background: color-mix(in srgb, var(--t, var(--violet)) 12%, var(--carte)); color: var(--t, var(--accent-texte)); }
.pi .ic { width: 21px; height: 21px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pi { background: color-mix(in srgb, var(--t, var(--violet)) 36%, var(--carte)); color: var(--ts, color-mix(in srgb, var(--t, var(--violet)) 35%, #fff)); } }
:root[data-theme="dark"] .pi { background: color-mix(in srgb, var(--t, var(--violet)) 36%, var(--carte)); color: var(--ts, color-mix(in srgb, var(--t, var(--violet)) 35%, #fff)); }
.nb-pi { position: absolute; top: -6px; right: -10px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--prune); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--barre-fond); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nb-pi { background: var(--pastel); color: var(--prune); } }
:root[data-theme="dark"] .nb-pi { background: var(--pastel); color: var(--prune); }
.tuiles-autres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--esp-2); margin-top: var(--esp-2); }
.t-autre { aspect-ratio: 1; border-radius: var(--r-tuile); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--texte); min-width: 0; padding: 0; transition: transform 160ms var(--ease-out); }
.t-autre:active { transform: scale(.96); }
.t-autre .pi { width: 38px; height: 38px; }
.t-autre .pi .ic { width: 20px; height: 20px; }
.t-nom-a { max-width: 100%; padding: 0 var(--esp-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--esp-2); margin-top: var(--esp-2); }
.sp { display: flex; align-items: center; gap: var(--esp-2); min-height: 48px; padding: 5px var(--esp-3) 5px 6px; border-radius: var(--r-tuile); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne);
  font-size: 13.5px; font-weight: 600; color: var(--texte); text-align: left; min-width: 0; transition: transform 160ms var(--ease-out); }
.sp:active { transform: scale(.97); }
.sp .pi { width: 32px; height: 32px; border-radius: var(--r-3); }
.sp .pi .ic { width: 17px; height: 17px; }
.sp-n { flex: 1; min-width: 0; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nb { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--voile); color: var(--texte); font-size: 12.5px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; flex: none; font-variant-numeric: tabular-nums; }
.ligne-titre, .ligne-sous { display: block; }
.pn-attente h3 { font-size: 15px; font-weight: 600; margin: var(--esp-3) 2px var(--esp-1); }
.liens-utiles { display: flex; flex-wrap: wrap; gap: var(--esp-2); margin-top: var(--esp-3); }
.lien-utile { display: inline-flex; align-items: center; gap: 6px; min-height: var(--cible); padding: 0 var(--esp-3); border-radius: var(--r-4); background: var(--accent-voile); color: var(--accent-texte); font-size: 13.5px; font-weight: 600; }
/* Indice du premier usage (05a), au-dessus de la barre. */
.astuce-tirer { display: inline-flex; align-items: center; gap: 6px; position: fixed; left: 50%; bottom: calc(var(--capsule-bas) + var(--capsule-h) + var(--esp-3) + var(--notes-d) + var(--esp-3)); z-index: 20; pointer-events: none; /* au-dessus du bouton Notes, jamais dessus, et sans prendre les touchers */ max-width: calc(100% - 2 * var(--marge)); padding: var(--esp-3) var(--esp-4); border-radius: var(--r-4);
  background: var(--prune); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 12px 26px -14px rgba(36, 21, 43, .6);
  opacity: 0; transform: translate(-50%, 6px); transition: opacity 200ms ease, transform 200ms var(--ease-out); }
.astuce-tirer.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; } /* touché, il ouvre la carte */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .astuce-tirer { background: var(--pastel); color: var(--prune); } }
:root[data-theme="dark"] .astuce-tirer { background: var(--pastel); color: var(--prune); }
body.mode-bureau .astuce-tirer, body.couche-ouverte .astuce-tirer { display: none; }
/* Choix (Personnaliser, Choisir). */
.choix-liste { display: grid; gap: 6px; margin-top: var(--esp-1); }
.choix-ligne { display: flex; align-items: center; gap: var(--esp-3); min-height: 52px; padding: 6px var(--esp-3) 6px var(--esp-2); border: 1px solid var(--ligne); border-radius: var(--r-5); background: var(--carte); color: var(--texte); font-size: 15px; text-align: left; }
.choix-ligne[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-voile); }
.choix-nom { flex: 1; min-width: 0; font-weight: 600; }
.choix-rang { min-width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--accent); color: var(--accent-contraste); }
.choix-rang:empty { visibility: hidden; }
.choix-coche { visibility: hidden; color: var(--accent-texte); }
.choix-ligne[aria-pressed="true"] .choix-coche { visibility: visible; }
.note-bas { margin-top: var(--esp-5); }

/* ---------- Menu ☰ : tiroir à gauche (05d) ---------- */
.tiroir {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(86vw, 360px); display: flex; flex-direction: column;
  padding: calc(var(--haut-sur) + var(--esp-3)) var(--esp-3) max(var(--esp-4), var(--bas-sur)); background: var(--fond);
  border-radius: 0 var(--r-6) var(--r-6) 0; box-shadow: 8px 0 32px rgba(36, 21, 43, .18);
  transform: translateX(-104%); transition: transform 240ms var(--ease-drawer); overflow: hidden;
}
.tiroir.visible { transform: none; }
.tiroir:focus { outline: none; }
.tiroir-haut { display: flex; align-items: center; gap: var(--esp-3); padding: 0 var(--esp-1) var(--esp-2); }
.tiroir-haut h2 { font-family: "Gilda Display", serif; font-size: 26px; font-weight: 400; flex: 1; margin: 0; }
.tiroir-haut .fermer { position: static; }
.tiroir-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 calc(var(--esp-1) * -1); padding: 0 var(--esp-1); }
.tiroir-titre { margin: var(--esp-4) var(--esp-2) var(--esp-1); font-size: 13px; font-weight: 600; color: var(--texte-doux); }
.tiroir-ligne { display: flex; align-items: center; gap: var(--esp-3); width: 100%; min-height: var(--cible); padding: var(--esp-2) var(--esp-3); border-radius: var(--r-4); font-size: 16px; text-align: left; transition: background var(--duree) ease; }
.tiroir-ligne:active { background: var(--voile); }
.tiroir-ligne[aria-current="true"] { background: var(--accent-voile); font-weight: 600; }
.tiroir-ligne .ic-s { color: var(--texte-doux); }
.tiroir-nom { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tiroir-sous { display: block; font-size: 12.5px; font-weight: 400; color: var(--texte-doux); }
.tiroir-ligne .compte { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--voile); font-size: 13px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; color: var(--texte); }
.tiroir-chevron, .tiroir-web { color: var(--texte-doux); }
.tiroir-ligne.espace { padding-left: var(--esp-4); }
.tiroir-attente { margin: var(--esp-2) var(--esp-3); }
.tiroir-branche-tete { display: flex; align-items: center; }
.tiroir-branche-tete .tiroir-ligne { flex: 1; }
.tiroir-bascule { width: var(--cible); height: var(--cible); display: grid; place-items: center; color: var(--texte-doux); border-radius: var(--r-4); flex: none; }
.tiroir-enfants { display: grid; padding-left: var(--esp-6); }
.tiroir-ligne.enfant { min-height: var(--cible); font-size: 15px; padding-left: var(--esp-2); }
.tiroir-ligne.enfant .pi { width: 32px; height: 32px; border-radius: var(--r-3); }
.tiroir-ligne.enfant .pi .ic { width: 17px; height: 17px; color: inherit; }
.tiroir-bas { display: flex; flex-wrap: wrap; gap: var(--esp-1) var(--esp-4); padding: var(--esp-3) var(--esp-1) 0; border-top: 1px solid var(--ligne); }
.btn-texte-ic { display: inline-flex; align-items: center; gap: var(--esp-2); min-height: var(--cible); padding: 0 6px; color: var(--accent-texte); font-weight: 600; }
.menu-deroulant { z-index: 42; }
body.mode-bureau .tiroir { display: none; }
.feuille { z-index: 45; }

/* ---------- Actions d'un espace, couleurs ---------- */
.action-espace { min-height: 56px; }
.action-espace.danger, .action-espace.danger .ligne-titre, .action-espace.danger .ic { color: var(--erreur); }
.btn.danger { background: var(--erreur); color: #fff; }
.couleurs-espace { display: grid; grid-template-columns: repeat(4, var(--cible-confort)); gap: var(--esp-4); justify-content: center; padding: var(--esp-3) 0 var(--esp-2); }
.couleur-espace { width: var(--cible-confort); height: var(--cible-confort); border-radius: 50%; border: 3px solid var(--fond); background: var(--c); box-shadow: 0 0 0 1px var(--ligne); }
.couleur-espace[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.champ-texte { width: 100%; min-height: var(--cible-confort); padding: 0 var(--esp-4); border-radius: var(--r-champ); border: 1px solid var(--ligne); background: var(--carte); color: var(--texte); font: inherit; font-size: 17px; }
.champ-texte:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Visite de première ouverture (js/tutoriel.js) ---------- */
.tuto-fond { position: fixed; inset: 0; z-index: 60; touch-action: none; }
.tuto-fond.sans-cible { background: rgba(36, 21, 43, .62); }
.tuto-projecteur { position: fixed; border-radius: var(--r-5); box-shadow: 0 0 0 200vmax rgba(36, 21, 43, .62); transition: all 260ms var(--ease-out); pointer-events: none; }
.tuto-carte { position: fixed; left: var(--marge); right: var(--marge); max-width: 420px; margin: 0 auto; padding: var(--esp-5); border-radius: var(--r-6); background: var(--carte); color: var(--texte); box-shadow: 0 16px 40px rgba(36, 21, 43, .3); display: grid; gap: var(--esp-2); }
.tuto-carte:focus { outline: none; }
.tuto-carte.en-bas { bottom: calc(var(--barre-h) + var(--esp-6)); }
.tuto-carte.en-haut { top: calc(var(--haut-sur) + 72px); }
.tuto-carte.au-centre { top: 50%; transform: translateY(-50%); }
.tuto-carte h2 { font-family: "Gilda Display", serif; font-size: 24px; font-weight: 400; margin: 0; }
.tuto-carte p { margin: 0; line-height: 1.45; }
.tuto-compte { font-size: 12.5px; font-weight: 600; color: var(--texte-doux); }
.tuto-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--esp-3); margin-top: 6px; }
.tuto-actions .btn { width: auto; }
.sans-mouvement .tuto-projecteur { transition: none; }

/* ---------- Écrans provisoires (contrôle interne, jamais livrés) ---------- */
.provisoire h1 { font-family: "Gilda Display", serif; font-weight: 400; font-size: 32px; margin: var(--esp-2) 0 var(--esp-5); }
.provisoire-carte { display: flex; gap: var(--esp-3); padding: var(--esp-4); border-radius: var(--r-carte); background: var(--voile); color: var(--texte-doux); }
.provisoire-carte strong { color: var(--texte); font-size: 16px; }
.provisoire-carte p { margin: var(--esp-1) 0 0; }

@media (prefers-reduced-motion: reduce) { .tiroir, .astuce-tirer, .reserve-barre, .t-autre, .sp, .onglet, .onglet::before { transition: none; } }

/* ---------- Ordinateur (A28, maquette melange) : rail, tiroir à arborescence, parties en onglets, planning en bas ----------
   Mise en page choisie par la page (MEDIA_BUREAU de js/outils.js : 1024 px, ou 640 px avec une souris) ; les éléments du lot 1
   sont posés par js/ecrans/ordinateur.js quand `body.mode-bureau` est là. */
:root { --rail-l: 64px; --colonne-l: 248px; --bureau-bt: 36px; --bureau-haut: 52px; }
.nav-bureau { display: none; }
@media (min-width: 1024px), (min-width: 640px) and (hover: hover) and (pointer: fine) {
  :root { --barre-h: 0px; }
  .barre, .panneau, .emplacement-notes { display: none; }
  /* Contenu, feuilles et messages d'un écran large (ce que l'enveloppe donnait déjà à l'ordinateur). */
  .contenu { padding: var(--esp-2) 40px 48px; max-width: 1200px; width: 100%; }
  .contenu.large { max-width: none; }
  .feuille { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border-radius: var(--r-feuille); padding-bottom: 28px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform 220ms var(--ease-out), opacity 160ms ease; }
  .feuille.visible { transform: translate(-50%, -50%); opacity: 1; }
  .poignee-zone, .feuille .poignee { display: none; }
  .toast { bottom: var(--esp-6); }
  .menu-deroulant { left: calc(var(--rail-l) + var(--esp-3)); right: auto; width: 380px; }
  body.mode-bureau { overflow: hidden; }
  body.mode-bureau .coquille { display: grid; grid-template-columns: auto minmax(0, 1fr); height: 100dvh; min-height: 0; }
  body.mode-bureau .nav-bureau { display: flex; height: 100dvh; min-height: 0; position: relative; z-index: 12; }
  body.mode-bureau .cadre { height: 100dvh; min-height: 0; }
  body.mode-bureau .contenu { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: var(--esp-8); }
  body.mode-bureau .contenu.sans-barre { padding-bottom: var(--esp-8); }
  body.mode-bureau .entete { position: static; height: auto; padding: 0; display: block; border-bottom: 1px solid var(--ligne); z-index: 14; }
}

/* Rail des espaces */
.rail { width: var(--rail-l); flex: none; display: flex; flex-direction: column; align-items: center; gap: var(--esp-2); padding: var(--esp-3) 0; background: color-mix(in srgb, var(--texte) 3%, var(--fond)); border-right: 1px solid var(--ligne); overflow-y: auto; scrollbar-width: none; }
.rail-ensemble, .rail-logo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.rail-ensemble[aria-current="true"] { background: var(--accent-voile); box-shadow: 0 0 0 1.5px var(--accent); }
.rail-liste { display: grid; gap: var(--esp-2); justify-items: center; }
.rail-espace { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--e); box-shadow: inset 0 0 0 1.5px var(--e); background: var(--carte); font-size: 13px; font-weight: 700; letter-spacing: .02em; transition: transform 160ms var(--ease-out); }
.rail-espace:active { transform: scale(.95); }
.rail-espace[aria-current="true"] { background: var(--e); color: #fff; box-shadow: 0 0 0 2px var(--fond), 0 0 0 4px var(--e); }
.rail-espace .compte, .rail-ensemble .compte { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--prune); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 2px var(--fond); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rail-espace .compte { background: var(--pastel); color: var(--prune); } }
:root[data-theme="dark"] .rail-espace .compte { background: var(--pastel); color: var(--prune); }
.bt-bureau { width: var(--bureau-bt); height: var(--bureau-bt); border-radius: var(--r-4); display: grid; place-items: center; color: var(--texte-doux); transition: background var(--duree) ease, color var(--duree) ease; flex: none; }
.bt-bureau .ic { width: 20px; height: 20px; }
.rail-plus { border: 1.5px dashed color-mix(in srgb, var(--texte) 30%, var(--ligne)); border-radius: 50%; width: 44px; height: 44px; }
.rail-ressort { flex: 1; }

/* Tiroir à gauche : l'arborescence (sections et sous-sections) */
.colonne { width: var(--colonne-l); flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--fond); border-right: 1px solid var(--ligne); }
body.tiroir-replie .colonne { display: none; }
.col-tete { padding: var(--esp-4) var(--esp-3) var(--esp-2); display: grid; gap: var(--esp-1); }
.col-espace { display: flex; align-items: center; gap: var(--esp-2); }
.col-titre { font-family: "Gilda Display", serif; font-weight: 400; font-size: 22px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.col-sous { margin: 0; font-size: 13px; color: var(--texte-doux); }
.col-cherche { margin-top: var(--esp-2); height: var(--bureau-bt); border-radius: var(--r-3); border: 1px solid var(--ligne); background: var(--carte); padding: 0 var(--esp-3); font: inherit; font-size: 14px; color: var(--texte); min-width: 0; }
.col-cherche:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.col-corps { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--esp-1) var(--esp-2); }
.col-ligne { display: flex; align-items: center; gap: var(--esp-2); width: 100%; min-height: 36px; padding: 0 var(--esp-2); border-radius: var(--r-3); font-size: 14.5px; text-align: left; color: var(--texte); }
.col-ligne:hover { background: color-mix(in srgb, var(--texte) 5%, transparent); }
.col-ligne.active, .col-ligne[aria-current="page"] { background: var(--accent-voile); font-weight: 600; }
.col-ligne .ic-s { color: var(--texte-doux); }
.col-ligne.partie { min-height: 40px; }
.col-ligne .pi { width: 26px; height: 26px; border-radius: var(--r-3); }
.col-ligne .pi .ic { width: 15px; height: 15px; }
.col-enfants { padding-left: var(--esp-6); margin-bottom: var(--esp-1); }
.col-ligne.enfant { min-height: 32px; font-size: 14px; }
.col-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-ligne .compte { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--voile); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; }
.col-attente { margin: var(--esp-3); }
.col-pied { padding: var(--esp-2) var(--esp-3) var(--esp-3); display: grid; gap: var(--esp-1); border-top: 1px solid var(--ligne); }
.btn-reglages-espace { display: flex; align-items: center; gap: var(--esp-2); min-height: 40px; padding: 0 var(--esp-3); border-radius: var(--r-4); border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-texte); font-size: 14.5px; font-weight: 600; }
.colonne .tiroir-ligne { min-height: 40px; font-size: 14.5px; padding: var(--esp-1) var(--esp-2); }
.colonne .tiroir-titre { margin-top: var(--esp-3); }
.colonne .tiroir-ligne .compte { min-width: 22px; height: 22px; font-size: 12px; }
@media (max-width: 1179px) {
  /* Fenêtre étroite : le tiroir s'ouvre par-dessus le travail (le bouton du rail), les parties passent en icônes. */
  .colonne { position: absolute; left: var(--rail-l); top: 0; bottom: 0; z-index: 26; box-shadow: 0 24px 60px -24px rgba(36, 21, 43, .45); animation: colonne-entre 200ms var(--ease-out); }
  @keyframes colonne-entre { from { transform: translateX(-12px); opacity: 0; } }
}

/* Barre du haut : navigation, recherche, réglages de l'app, Capturer ; en dessous, les parties */
.bureau-ligne { display: flex; align-items: center; gap: var(--esp-3); height: var(--bureau-haut); padding: 0 var(--esp-4); }
.bureau-g, .bureau-d { display: flex; align-items: center; gap: var(--esp-1); }
.bureau-d { margin-left: auto; gap: var(--esp-2); }
.bureau-cherche { flex: 0 1 380px; display: flex; align-items: center; gap: var(--esp-2); height: var(--bureau-bt); padding: 0 var(--esp-3); border-radius: var(--r-3); box-shadow: inset 0 0 0 1px var(--ligne); background: var(--carte); color: var(--texte-doux); font-size: 14px; min-width: 0; }
.bureau-cherche span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { font: inherit; font-size: 11.5px; padding: 1px 6px; border-radius: var(--r-2); background: var(--voile); color: var(--texte-doux); }
.btn-capturer { display: inline-flex; align-items: center; gap: var(--esp-2); height: var(--bureau-bt); padding: 0 var(--esp-3); border-radius: var(--r-3); background: var(--accent); color: var(--accent-contraste); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.btn-capturer kbd { background: color-mix(in srgb, var(--accent-contraste) 22%, transparent); color: var(--accent-contraste); }
@media (max-width: 899px) { .btn-capturer span, .btn-capturer kbd { display: none; } .btn-capturer { width: var(--bureau-bt); padding: 0; justify-content: center; } .bureau-cherche { flex: none; width: var(--bureau-bt); padding: 0; justify-content: center; } .bureau-cherche span, .bureau-cherche kbd { display: none; } }
.parties { display: flex; align-items: flex-end; gap: var(--esp-1); padding: 0 var(--esp-4); min-height: 64px; overflow: hidden; position: relative; }
.pt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 56px; padding: var(--esp-1) var(--esp-2); border-radius: var(--r-4) var(--r-4) 0 0; font-size: 12.5px; color: var(--texte-doux); }
.pt:hover { color: var(--texte); }
.pt .pi { width: 34px; height: 34px; border-radius: var(--r-4); }
.pt .nb-pi { top: -4px; right: -8px; }
.pt.actif { color: var(--texte); font-weight: 600; background: var(--carte); box-shadow: 0 -1px 0 var(--ligne), -1px 0 0 var(--ligne), 1px 0 0 var(--ligne); }
.pt.actif .pi { background: var(--t, var(--accent)); color: #fff; }
.parties.sans-noms .pt-nom { display: none; }
.parties.sans-noms .pt { min-width: 48px; }
.pt[hidden] { display: none; }
.menu-parties { position: fixed; }

/* Planning en bas (A31) */
.planning-bas { display: none; }
body.mode-bureau .planning-bas { display: block; flex: none; border-top: 1px solid var(--ligne); background: color-mix(in srgb, var(--texte) 3%, var(--fond)); }
.pb-tete { display: flex; align-items: center; gap: var(--esp-3); padding: var(--esp-1) var(--esp-6) var(--esp-1) var(--esp-3); min-height: 46px; }
.pb-basculer { display: inline-flex; align-items: center; gap: var(--esp-2); height: var(--bureau-bt); padding: 0 var(--esp-2); border-radius: var(--r-3); font-weight: 600; font-size: 14.5px; }
.pb-basculer .ic { color: var(--texte-doux); }
.pb-jour { font-size: 13px; font-weight: 600; padding: var(--esp-1) var(--esp-2); border-radius: var(--r-3); background: var(--carte); box-shadow: 0 0 0 1px var(--ligne); }
.pb-phrase { flex: 1; min-width: 0; margin: 0; font-size: 14px; color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-phrase strong { color: var(--texte); font-weight: 600; }
.pb-ouvrir, .pb-ajouter { display: inline-flex; align-items: center; gap: var(--esp-1); font-size: 14px; font-weight: 600; color: var(--accent-texte); min-height: var(--bureau-bt); flex: none; padding: 0 var(--esp-2); }
.pb-ouvrir kbd { margin-left: var(--esp-2); }
.pb-corps { padding: 0 var(--esp-6) var(--esp-4); }
.pb-regle { position: relative; height: 18px; margin: 0 6px; }
.pb-heure { position: absolute; top: 0; translate: -50% 0; font-size: 11.5px; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.pb-cadre { position: relative; margin: 0 6px; height: calc(var(--rangs, 1) * 46px + 6px); min-height: 52px; }
.pb-repere { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--ligne) 80%, transparent); pointer-events: none; }
.pb-piste { position: absolute; inset: 0; }
/* Jamais hors de la frise, à toute heure : le début recule si la place manque (28 px au moins), la fin est coupée à 100 %. */
.pb-el { position: absolute; left: min(var(--g, 0%), calc(100% - 28px)); width: max(28px, calc(min(var(--d, 100%), 100%) - var(--g, 0%) - 4px)); max-width: calc(100% - min(var(--g, 0%), calc(100% - 28px))); top: calc(3px + var(--rang, 0) * 46px); height: 42px; min-width: 28px; padding: var(--esp-1) var(--esp-2); border-radius: var(--r-4); text-align: left; display: grid; align-content: center; overflow: hidden; font-size: 13px; line-height: 1.25;
  background: color-mix(in srgb, var(--el, var(--accent)) 18%, var(--carte)); color: var(--texte); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--el, var(--accent)) 30%, transparent); transition: transform 140ms var(--ease-out); }
.pb-el:active { transform: scale(.97); }
.pb-el.tache { background: var(--carte); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--el, var(--accent)) 40%, var(--ligne)); }
.pb-el.passe { opacity: .55; }
.pb-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pb-h { font-size: 11.5px; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.pb-maintenant { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--erreur); border-radius: var(--r-1); pointer-events: none; }
.pb-vide { margin: var(--esp-2) 0 0; font-size: 14px; color: var(--texte-doux); }
.planning-bas.replie .pb-tete { min-height: 44px; }
@media (max-width: 1179px) { .pb-jour { display: none; } }

/* ---------- Réglages (js/ecrans/reglages.js) ---------- */
.titre-section { font-family: "Gilda Display", serif; font-weight: 400; font-size: 30px; line-height: 1.15; margin: var(--esp-2) 0 var(--esp-4); }
.petit-titre { font-size: 16px; font-weight: 600; margin: var(--esp-5) 0 var(--esp-2); }
.r-carte { background: var(--carte); border-radius: var(--r-5); box-shadow: 0 0 0 1px var(--ligne); padding: 0 var(--esp-4); }
.r-ligne { display: flex; align-items: center; gap: var(--esp-3); width: 100%; min-height: 60px; padding: var(--esp-3) 0; text-align: left; }
.r-corps { flex: 1; min-width: 0; }
.r-corps small { display: block; font-size: 13px; line-height: 1.35; color: var(--texte-doux); margin-top: 2px; }
.interrupteur { position: relative; flex: none; width: 51px; height: var(--cible); }  /* la zone à toucher fait 44 pt ; le dessin, 51 × 31 */
.interrupteur::before { content: ""; position: absolute; left: 0; top: 50%; width: 51px; height: 31px; translate: 0 -50%; border-radius: 16px; background: color-mix(in srgb, var(--texte) 18%, transparent); transition: background 200ms ease-out; }
.interrupteur::after { content: ""; position: absolute; top: 50%; left: 2px; width: 27px; height: 27px; translate: 0 -50%; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(36, 21, 43, .25); transition: transform 200ms var(--ease-out); }
.interrupteur.on::before { background: var(--accent); }
.interrupteur.on::after { transform: translateX(20px); }
.apercu-legende { margin: var(--esp-4) var(--esp-2) var(--esp-2); }
.barre.apercu { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; touch-action: auto; box-shadow: 0 0 0 1px var(--ligne); }
.barre.apercu .onglet { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .interrupteur::before, .interrupteur::after { transition: none; } }

/* ---------- Premier lancement (js/ecrans/premier*.js ; maquette validée maquettes/app-premier-lancement/, X24) ----------
   Téléphone : un écran plein, le bouton principal en bas. Ordinateur : la colonne du parcours au centre et, à droite, « à savoir ». */
.pl { --pl-ligne-forte: color-mix(in srgb, var(--texte) 18%, var(--ligne)); --pl-choisie: color-mix(in srgb, var(--pastel) 45%, var(--carte)); --pl-colonne: 500px; --pl-cote: 380px; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--fond); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pl { --pl-choisie: #33224A; } }
:root[data-theme="dark"] .pl { --pl-choisie: #33224A; }
.contenu:has(> .pl) { padding: 0; max-width: none; }
.pl-parcours { display: flex; justify-content: center; min-width: 0; }
.pl-colonne { width: 100%; max-width: var(--pl-colonne); display: flex; flex-direction: column; min-height: 100dvh; padding: calc(var(--esp-2) + var(--haut-sur)) 0 0; }
.pl-haut { height: var(--cible); display: flex; align-items: center; gap: var(--esp-2); flex: none; margin: 0 calc(var(--esp-2) * -1); }
.pl-retour { width: var(--cible); height: var(--cible); display: grid; place-items: center; color: var(--accent-texte); border-radius: var(--r-4); }
.pl-etape { margin-left: auto; margin-right: var(--esp-2); font-size: 14px; color: var(--texte-doux); }
.pl-contenu { flex: 1; display: flex; flex-direction: column; gap: var(--esp-5); padding: var(--esp-2) 0; }
.pl-contenu.centre { justify-content: center; align-items: center; text-align: center; }
.pl-bas { padding: var(--esp-3) 0 calc(var(--esp-5) + var(--bas-sur)); display: grid; gap: var(--esp-3); flex: none; }
.pl h1 { font-family: "Gilda Display", serif; font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0; }
.pl .doux { color: var(--texte-doux); margin: 0; }
.pl-logo { width: 112px; height: auto; display: block; }
.pl-mot { font: 400 28px/1 "Gilda Display", serif; letter-spacing: .05em; margin-top: var(--esp-3); }
.pl-bienvenue-colonne h1 { font-size: 36px; margin-top: var(--esp-6); }
.pl-accroche { margin: var(--esp-3) 0 0; max-width: 32ch; color: var(--texte-doux); text-wrap: pretty; }
.pl-manuscrit { font-family: "Ms Madi", cursive; font-size: 40px; color: var(--texte-doux); margin: var(--esp-3) 0 0; }
/* Ce que l'app fait en plus du site (règle 4.2 d'Apple) : quatre lignes courtes, deux par deux. */
.pl-plus { list-style: none; margin: var(--esp-5) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--esp-2) var(--esp-4); text-align: left; max-width: 360px; }
.pl-plus li { display: flex; align-items: flex-start; gap: var(--esp-2); font-size: 13.5px; line-height: 1.3; color: var(--texte-doux); }
.pl-plus .ic { color: var(--accent-texte); flex: none; margin-top: 1px; }
.pl-pile { display: grid; gap: var(--esp-3); }
.pl-separateur { display: flex; align-items: center; gap: var(--esp-3); color: var(--texte-doux); font-size: 14px; }
.pl-separateur::before, .pl-separateur::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }
/* La place des boutons de connexion (Apple natif, Google, Face ID) : le lot 6 les y pose (js/connexion-boutons.js). Vide, elle ne prend rien. */
.place-connexion { display: grid; gap: var(--esp-3); }
.place-connexion:empty { display: none; }
.pl-champ { display: grid; gap: var(--esp-2); }
.pl-etiquette { font-weight: 600; font-size: 15px; margin: 0; }
.pl-facultatif { font-weight: 400; color: var(--texte-doux); }
.pl-saisie, .pl-heure { min-height: var(--cible-confort); width: 100%; border-radius: var(--r-champ); border: 1.5px solid var(--pl-ligne-forte); background: var(--carte); padding: 0 var(--esp-4); font: inherit; font-size: 17px; color: inherit; }
.pl-saisie:focus, .pl-heure:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pl-heure { width: auto; min-height: var(--cible); padding: 0 var(--esp-2); border: 0; background: none; font-weight: 600; color: var(--accent-texte); font-variant-numeric: tabular-nums; }
.pl-aide { font-size: 14px; color: var(--texte-doux); margin: 0; }
.pl-aide.centre { text-align: center; }
.pl-message { font-size: 14.5px; color: var(--erreur); margin: 0; }
.pl-message:empty { display: none; }
.pl-petit { font-size: 14px; line-height: 1.45; margin: 0; }
.pl-lien { color: var(--accent-texte); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; min-height: var(--cible); }
.pl-lien:disabled { color: var(--texte-doux); text-decoration: none; font-weight: 400; }
.pl-conditions { font-size: 13px; color: var(--texte-doux); text-align: center; line-height: 1.5; margin: 0; }
.pl-conditions .lien-texte { display: inline-block; padding: var(--esp-3) 0; margin: calc(var(--esp-3) * -1) 0; font-size: inherit; color: inherit; text-decoration: underline; }
.pl-titre-groupe { font-size: 15px; font-weight: 600; color: var(--texte-doux); margin: var(--esp-1) var(--esp-1) 0; }
.pl-lien-sortant { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-texte); font-weight: 600; font-size: 15px; min-height: var(--cible); align-self: flex-start; text-decoration: underline; text-underline-offset: 3px; }
/* Code à six chiffres : un seul champ (le clavier propose le code reçu), dessiné en six cases. */
.pl-code-zone { position: relative; display: block; cursor: text; }
.pl-code-saisie { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; caret-color: transparent; }
.pl-code { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--esp-2); pointer-events: none; }
.pl-code span { height: 60px; border-radius: var(--r-4); border: 1.5px solid var(--pl-ligne-forte); background: var(--carte); display: grid; place-items: center; font: 600 26px/1 "Aileron", sans-serif; font-variant-numeric: tabular-nums; }
.pl-code span.actif { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pl-code-zone[aria-busy="true"] .pl-code { opacity: .55; }
/* Lignes de choix */
.pl-choix { display: grid; background: var(--carte); border-radius: var(--r-carte); box-shadow: var(--ombre); overflow: hidden; }
.pl-choix > * + * { border-top: 1px solid var(--ligne); }
.pl-ligne { display: flex; align-items: center; gap: var(--esp-3); padding: var(--esp-3) var(--esp-4); text-align: left; width: 100%; min-height: 64px; color: inherit; }
.pl-pastille-ic { width: var(--cible); height: var(--cible); border-radius: var(--r-4); display: grid; place-items: center; background: var(--voile); color: var(--accent-texte); flex: none; }
.pl-corps { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pl-nom { font-weight: 600; font-size: 17px; }
.pl-desc { font-size: 14.5px; color: var(--texte-doux); line-height: 1.4; }
.pl-chevron { color: var(--texte-doux); }
.pl-ligne.choisie { background: var(--pl-choisie); }
.pl-ligne.choisie .pl-pastille-ic { background: var(--accent); color: var(--accent-contraste); }
.pl-ligne.bientot .pl-nom, .pl-ligne.bientot .pl-desc, .pl-ligne.bientot .pl-pastille-ic { opacity: .55; }
.pl-bientot { flex: none; font-size: 13px; font-weight: 600; padding: var(--esp-1) var(--esp-3); border-radius: var(--r-rond); background: var(--voile); color: var(--accent-texte); }
.pl-valeur { display: inline-flex; align-items: center; gap: var(--esp-1); font-size: 13.5px; font-weight: 600; color: var(--texte-doux); }
.pl-m { width: 12px; height: 12px; border-radius: 4px; background: var(--m); flex: none; }
/* Puces */
.pl-puces { display: flex; flex-wrap: wrap; gap: var(--esp-2); }
.pl-puce { min-height: var(--cible); padding: 0 var(--esp-4); border-radius: var(--r-rond); display: inline-flex; align-items: center; gap: var(--esp-2); font-size: 15px; font-weight: 600; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--pl-ligne-forte); color: var(--texte); }
.pl-puce.choisie { background: var(--voile); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-texte); }
.pl-puce.inactive { color: var(--texte-doux); background: transparent; box-shadow: inset 0 0 0 1.5px var(--ligne); font-weight: 400; }
.pl-matiere { width: 10px; height: 10px; border-radius: 3px; background: var(--m); flex: none; }
.pl-couleur { width: var(--cible); padding: 0; justify-content: center; }
.pl-couleur .pl-matiere { width: 22px; height: 22px; border-radius: 7px; }
.pl-ajout-matiere { display: flex; gap: var(--esp-2); margin-top: var(--esp-2); }
.pl-ajout-matiere .btn { width: auto; flex: none; }
.pl-saisie-matiere { min-height: var(--cible); }
/* Segments (disposition de l'accueil) */
.pl-segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: var(--esp-1); border-radius: var(--r-5); background: color-mix(in srgb, var(--texte) 4%, var(--fond)); box-shadow: inset 0 0 0 1px var(--ligne); }
.pl-segments button { min-height: var(--cible); border-radius: var(--r-4); font-size: 15px; font-weight: 600; color: var(--texte-doux); line-height: 1.2; padding: var(--esp-1); text-align: center; }
.pl-segments button[aria-checked="true"] { background: var(--carte); color: var(--texte); box-shadow: var(--ombre); }
.pl-pret { display: flex; flex-direction: column; align-items: center; gap: var(--esp-3); text-align: center; }
.pl-pret h1 { font-size: 40px; margin-top: var(--esp-3); }
.pl-encart { border-radius: var(--r-carte); background: var(--pl-choisie); padding: var(--esp-4) var(--esp-5); display: grid; gap: 6px; }
.pl-encart p { margin: 0; }
.pl-encart-titre { font-weight: 600; }
.pl-code-confirm { font: 600 34px/1 "Aileron", sans-serif; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--accent-texte); }
.pl-cote { display: none; }
/* Ordinateur : la colonne du parcours et le côté */
@media (min-width: 1024px), (min-width: 640px) and (hover: hover) and (pointer: fine) {
  .pl.avec-cote { grid-template-columns: minmax(0, 1fr) var(--pl-cote); }
  .pl-ordi .pl-colonne { padding: 56px var(--esp-6) var(--esp-6); }
  .pl-ordi h1 { font-size: 40px; }
  .pl-ordi .pl-bas { padding-bottom: 0; }
  .pl-ordi .pl-bas .btn { width: auto; min-width: 220px; justify-self: start; }
  .pl-ordi .pl-bienvenue-colonne { max-width: 560px; }
  .pl-ordi .pl-bienvenue-colonne .pl-bas { display: flex; flex-wrap: wrap; align-items: center; }
  /* Maquette validée (app-premier-lancement) : sur ordinateur, tout le bloc d'accueil est aligné à gauche, et le lien
     « Voir un exemple » commence au bord des boutons (sans le retrait de 20 px du bouton plein), tout en gardant 44 px de haut. */
  .pl-ordi .pl-bienvenue-colonne .pl-contenu.centre { align-items: flex-start; text-align: left; }
  .pl-ordi .pl-bienvenue-colonne .pl-bas .btn-texte { min-width: 0; flex: none; padding: 0; margin-right: 100%; justify-content: flex-start; text-align: left; } /* margin-right: 100% renvoie le lien à la ligne sans étirer sa zone cliquable */
  .pl-cote { display: flex; border-left: 1px solid var(--ligne); background: color-mix(in srgb, var(--texte) 3%, var(--fond)); padding: 56px var(--esp-8); flex-direction: column; gap: var(--esp-5); }
  .pl-cote h2 { font: 400 24px/1.2 "Gilda Display", serif; margin: 0; }
  .pl-point { display: grid; grid-template-columns: 28px 1fr; gap: var(--esp-3); align-items: start; }
  .pl-point .ic { width: 20px; height: 20px; color: var(--accent-texte); margin-top: 2px; }
  .pl-point p { font-size: 15px; line-height: 1.5; margin: 0; }
  .pl-point b { display: block; font-weight: 600; font-size: 15.5px; }
  .pl-arbre { font-size: 14.5px; display: grid; gap: 6px; padding: var(--esp-4); border-radius: var(--r-5); background: var(--carte); box-shadow: var(--ombre); }
  .pl-arbre div { display: flex; align-items: center; gap: var(--esp-2); }
  .pl-arbre .n1 { padding-left: var(--esp-5); }
}
@media (max-width: 1099px) { .pl-cote { display: none !important; } .pl.avec-cote { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) {
  .pl-contenu { animation: pl-entree 220ms var(--ease-out) both; }
  @keyframes pl-entree { from { opacity: 0; transform: translateY(8px); } }
}
@media (max-width: 639px) { .pl-colonne { padding-inline: var(--marge); } }

/* Chargement dans un écran ou une liste (js/nav-icones.js, chargement()) : le cercle se trace, puis le logo tourne avec élan (R19). */
.chargement-mini { display: flex; justify-content: center; padding: var(--esp-6) 0; }
.chargement-mini .trace { width: 36px; }
.chargement-mini .trace.anime { animation: tracer 1100ms var(--ease-in-out) forwards, tourne-logo 1400ms cubic-bezier(.65, 0, .35, 1) 1100ms infinite; }
@media (prefers-reduced-motion: reduce) { .chargement-mini .trace.anime { animation: none; --trace: 360deg; } }

/* La teinte d'une section (js/nav-donnees.js, teinteDe) colore son icône dans le menu ☰ et dans l'arborescence d'ordinateur. */
.ic.teinte { color: var(--t, var(--accent-texte)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic.teinte { color: color-mix(in srgb, var(--t, var(--accent-texte)) 45%, #fff); } }
:root[data-theme="dark"] .ic.teinte { color: color-mix(in srgb, var(--t, var(--accent-texte)) 45%, #fff); }
/* La croix de la feuille (44 px, à 14 px du bord) ne passe plus sur le titre ni sur la phrase qui le suit. */
.feuille > h2, .feuille > .petit { padding-right: calc(var(--cible) + var(--esp-2)); }

/* ---------- Mise à jour du site qui attend (lot 8e) : un point d'or de 10 pt (la taille d'un point de notification d'Apple), jamais un nombre. --or-texte tient 3:1 sur fond clair comme sur fond sombre ; le nom est dit à VoiceOver (role="img"). ---------- */
.point-maj { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: var(--r-rond); background: var(--or-texte); }
.tiroir-ligne .point-maj, .col-ligne .point-maj, .btn-reglages-espace .point-maj { margin-inline-start: var(--esp-1); }
.ligne .point-maj { margin-inline-start: var(--esp-2); align-self: center; }
.rail-espace .point-maj.sur-rail { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--fond); }

/* ---------- Cibles de toucher de 44 pt (lot 9d) : le bouton fait --cible, le dessin garde sa taille ----------
 * Une bordure transparente de part et d'autre (background-clip: padding-box) agrandit la zone sans grossir ce qu'on voit.
 * Téléphone et appareils tactiles seulement : à la souris sur ordinateur, les tailles d'origine restent. */
@media (max-width: 699px), (pointer: coarse) {
  .puce { position: relative; height: var(--cible); border-block: 4px solid transparent; background-clip: padding-box; box-shadow: none; }
  .puce::after { content: ""; position: absolute; inset: 0; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--ligne); pointer-events: none; }
  .puce[aria-selected="true"]::after, .puce[aria-pressed="true"]::after { box-shadow: none; }
  .puce.fantome { height: 36px; border-block: 0; }
  .puce-moi-seul { height: var(--cible); border-block: 6px solid transparent; background-clip: padding-box; border-radius: 18px; }
  .btn-ligne { min-height: var(--cible); border-block: 4px solid transparent; background-clip: padding-box; border-radius: 14px; }
  .segmente { padding-block: 0; }
  .segmente button { min-height: 46px; border-block: 4px solid transparent; background-clip: padding-box; border-radius: 15px; }
  .ag-actions .btn { min-height: var(--cible); }
}
