/* ===========================================================
   Oremus — styles, thèmes et échelle typographique
   Priorité : basse vision. Contraste ≥ 7:1, interlignage large,
   ligne ~60 caractères, aucun élément décoratif en célébration.
   Polices embarquées localement (voir /assets/fonts).
   =========================================================== */

/* --- Polices basse vision (déposer les .woff2 dans /assets/fonts) --- */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: local("Atkinson Hyperlegible"),
       url("./fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: local("Atkinson Hyperlegible Bold"),
       url("./fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  --taille: 40px;            /* pilotée par le réglage (20 → 96) */
  --interligne: 1.55;
  --ligne-max: 68ch;
  --rayon: 14px;
  --police: "Atkinson Hyperlegible", "Verdana", "Segoe UI", system-ui, sans-serif;
  --brun-fait: #6B4E2E;      /* étape de messe terminée (fil liturgique) */
}

/* --- Thèmes (contraste vérifié ≥ 7:1 pour le texte principal) --- */
body[data-theme="creme"] {
  --fond: #f4ecd8;     /* crème, pas blanc pur */
  --fond-2: #eaddc0;
  --texte: #1a1206;    /* ratio ≈ 13:1 sur crème */
  --texte-doux: #4a3a1e;
  --accent: #7a5a2e;
  --surligne: #f6d98a; /* ligne courante */
  --bord: #c9b48a;
}
body[data-theme="sombre"] {
  --fond: #0e0e10;
  --fond-2: #1c1c20;
  --texte: #f2efe6;    /* ratio ≈ 16:1 sur presque-noir */
  --texte-doux: #c7c2b4;
  --accent: #d8b877;
  --surligne: #35341f;
  --bord: #3a3a40;
  --brun-fait: #b79a6a;      /* brun clair, lisible sur fond sombre */
}
body[data-theme="sepia"] {
  --fond: #e9dcc3;
  --fond-2: #ddcba6;
  --texte: #211705;    /* ratio ≈ 11:1 */
  --texte-doux: #4e3d1c;
  --accent: #6f5322;
  --surligne: #ecca7f;
  --bord: #c2a877;
}
body[data-theme="contraste"] {   /* jaune vif sur noir — basse vision sévère */
  --fond: #000000;
  --fond-2: #141200;
  --texte: #ffd400;    /* ratio ≈ 15:1 sur noir */
  --texte-doux: #d9b200;
  --accent: #ffd400;
  --surligne: #2b2800;
  --bord: #6b5a00;
}

/* --- Couleur liturgique : accent redondant, jamais seul signal --- */
body[data-couleur="vert"]  { --liturgie: #2e7d32; }
body[data-couleur="blanc"] { --liturgie: #b08947; }
body[data-couleur="rouge"] { --liturgie: #b3261e; }
body[data-couleur="violet"]{ --liturgie: #6a3d9a; }
body[data-couleur="rose"]  { --liturgie: #c2568c; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
/* Aucun grand conteneur ne doit dépasser la largeur visible (débordement horizontal). */
.vue, .entete, .navbar, .pied-fixe, .accueil-corps, .preparation-corps, .reglages-corps, .plus-corps, .doc-corps, .liste-celebrations, .carte-celeb { max-width: 100%; min-width: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  line-height: var(--interligne);
  -webkit-text-size-adjust: none;
  overscroll-behavior: none;   /* neutralise le tirer-pour-rafraîchir */
  touch-action: manipulation;  /* neutralise le zoom double-appui */
}

/* Une seule vue visible à la fois */
.vue { display: none; min-height: 100%; }
.vue:not([hidden]) { display: block; }
body[data-vue="celebration"] .vue-celebration { display: block; }

/* --- En-têtes et boutons génériques --- */
.entete {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px; background: var(--fond-2);
  border-bottom: 3px solid var(--bord); position: sticky; top: 0; z-index: 5;
}
.logo { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 34px; letter-spacing: .02em; }
.logo-mark { width: 46px; height: 46px; border-radius: 11px; flex: none; }
.logo .via { color: var(--texte); }
.logo .missa { color: var(--accent); font-weight: 700; }
.entete-titre { margin: 0; font-size: 26px; }
.section-titre { font-size: 22px; margin: 26px 18px 8px; color: var(--texte-doux); }

button { font-family: inherit; color: inherit; cursor: pointer; }
.btn-icone {
  min-width: 56px; min-height: 56px; font-size: 26px;
  background: transparent; border: 2px solid var(--bord); border-radius: var(--rayon);
}
.btn-retour {
  min-height: 56px; font-size: 20px; padding: 0 16px;
  background: transparent; border: 2px solid var(--bord); border-radius: var(--rayon);
}
.btn-large, .btn-fichier {
  display: block; width: calc(100% - 36px); margin: 14px 18px;
  min-height: 64px; font-size: 22px; padding: 14px 18px; text-align: center;
  background: var(--fond-2); color: var(--texte);
  border: 3px solid var(--bord); border-radius: var(--rayon);
}
/* Bouton d'action « or » : fond doré + texte foncé GRAS (jamais blanc sur jaune).
   Le doré est volontairement indépendant du thème (toujours clair), donc le texte
   foncé reste lisible en clair comme en sombre. */
.btn-valider { background: #e8bf6a; color: #241a08; border-color: #c99b3d; font-weight: 800; }

/* --- Bouton géant « Célébrer » --- */
.btn-geant {
  display: block; width: calc(100% - 36px); margin: 22px 18px;
  padding: 24px; text-align: left;
  background: var(--fond-2); border: 4px solid var(--liturgie, var(--accent));
  border-radius: 20px; color: var(--texte);
}
.btn-geant-sur { display: block; font-size: 20px; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .08em; }
.btn-geant-titre { display: block; font-size: 34px; font-weight: 700; margin-top: 6px; }
.btn-geant-date { display: block; font-size: 20px; color: var(--texte-doux); margin-top: 4px; }

/* --- Liste des célébrations --- */
.liste-celebrations { list-style: none; margin: 0; padding: 0 18px; }
.liste-celebrations li { list-style: none; }
.liste-celebrations .item-titre { font-weight: 700; }
.liste-celebrations button {
  min-height: 52px; min-width: 52px; padding: 8px 14px; font-size: 18px;
  background: transparent; border: 2px solid var(--bord); border-radius: 10px;
}
.avertissement {
  margin-top: 30px; padding: 18px; font-size: 16px; color: var(--texte-doux);
  border-top: 2px solid var(--bord); text-align: center;
}

/* Barre de navigation basse (fixe), masquée en célébration */
.navbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; height: 64px;
  display: flex; background: var(--fond-2); border-top: 3px solid var(--bord); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: none; color: var(--texte-doux); font-size: 13px; cursor: pointer; }
.nav-ico { font-size: 22px; line-height: 1; }
.nav-item.actif { color: var(--accent); font-weight: 700; }
body[data-vue="celebration"] .navbar { display: none; }

/* Pied de page FIXE (institutionnel) : juste au-dessus de la barre de nav.
   Conserve le copyright + la mention normative sur toute capture d'écran. */
.pied-fixe {
  position: fixed; left: 0; right: 0; bottom: 64px; z-index: 6;
  padding: 8px 16px; text-align: center; line-height: 1.35;
  background: var(--fond-2); border-top: 2px solid var(--bord);
}
.pied-copyright { display: block; font-size: 14px; font-weight: 700; color: var(--accent); }
.pied-normatif { display: block; font-size: 12.5px; color: var(--texte-doux); }
body[data-vue="celebration"] .pied-fixe { display: none; }
@media (max-width: 480px) { .pied-normatif { font-size: 11.5px; } }

/* Espace bas : contenu au-dessus du pied fixe + barre de nav */
.accueil-corps, .preparation-corps, .reglages-corps, .plus-corps, .doc-corps { padding-bottom: 132px; }

/* Menu Paramètres + pages documentaires (Aide, À propos) */
.plus-corps { padding-top: 10px; }
.doc-corps { padding: 8px 18px 132px; }
.doc-corps h2 { font-size: 21px; color: var(--accent); margin: 22px 0 6px; }
.doc-corps p { font-size: 18px; line-height: 1.5; margin: 6px 0; }
.apropos-infos { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 18px; margin: 10px 0; }
.apropos-infos dt { font-weight: 700; color: var(--texte-doux); }
.apropos-infos dd { margin: 0; }
.apropos-copyright { margin-top: 20px; font-weight: 700; color: var(--accent); }

/* Responsive ordinateur : contenu centré et plafonné */
@media (min-width: 760px) {
  .accueil-corps, .preparation-corps, .reglages-corps, .plus-corps, .doc-corps { max-width: 900px; margin-left: auto; margin-right: auto; width: 100%; }
}
.vide { margin: 24px 18px; font-size: 20px; color: var(--texte-doux); }

/* En-tête accueil : bandeau (badge + mot-symbole) à gauche, verset centré, statut à droite */
.entete-accueil { position: sticky; top: 0; justify-content: space-between; gap: 14px; padding: 9px 18px; }
.marque { display: flex; flex-direction: row; align-items: center; gap: 15px; min-width: 0; }
.marque-badge { height: 76px; width: auto; border-radius: 14px; flex: none;
  box-shadow: 0 1px 5px rgba(0,0,0,.2); }
.marque-nom-img { margin: 0; line-height: 0; }
.marque-ecriture { height: 58px; width: auto; display: block; }
@media (max-width: 720px) { .marque-badge { height: 64px; } .marque-ecriture { height: 48px; } }
@media (max-width: 420px) { .marque-badge { height: 56px; } .marque-ecriture { height: 40px; } }
/* Verset centré (H et V) dans le bandeau, indépendant des largeurs latérales */
.entete-verset { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: 46%; text-align: center; font-size: 19px; font-style: italic;
  color: var(--accent); line-height: 1.3; pointer-events: none; }
.entete-statut { font-size: 13px; font-weight: 700; letter-spacing: .2px; color: var(--texte-doux); white-space: nowrap; }
.entete-statut.hors-ligne { color: #2e7d32; }
@media (max-width: 820px) { .entete-verset { display: none; } .entete-statut { font-size: 12px; } }

/* Copyright en bas de la page d'accueil (défilant) */
.copyright-bloc { margin: 34px 18px 0; padding-top: 16px; border-top: 2px solid var(--bord);
  text-align: center; font-size: 14px; line-height: 1.5; color: var(--texte-doux); }
.copyright-bloc .copyright { font-weight: 700; color: var(--accent); }

/* --- Formulaires (préparation, réglages) --- */
.champ { margin: 20px 18px; border: none; padding: 0; }
.champ-libelle { display: block; font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.champ-controle {
  width: 100%; min-height: 60px; font-size: 22px; padding: 12px;
  background: var(--fond); color: var(--texte);
  border: 3px solid var(--bord); border-radius: var(--rayon); font-family: inherit;
}
.aide { font-size: 16px; color: var(--texte-doux); margin: 8px 0 0; }
.confirmation {
  margin: 18px; padding: 18px; font-size: 22px; font-weight: 700;
  background: var(--surligne); color: var(--texte);
  border: 3px solid var(--accent); border-radius: var(--rayon); text-align: center;
}
.copyright { font-weight: 700; color: var(--accent); }

/* --- Calendrier de préparation --- */
.calendrier { border: 2px solid var(--bord); border-radius: var(--rayon); padding: 12px; background: var(--fond-2); max-width: 520px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-titre { font-size: 21px; font-weight: 700; text-transform: capitalize; }
.cal-nav { min-width: 52px; min-height: 52px; font-size: 26px; border: 2px solid var(--bord); border-radius: 10px; background: var(--fond); color: var(--texte); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-jour-nom { text-align: center; font-size: 14px; color: var(--texte-doux); font-weight: 700; padding: 4px 0; }
.cal-cell { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; font-size: 19px; border-radius: 8px; border: 2px solid transparent; padding: 0; }
.cal-cell.indispo { color: var(--texte-doux); opacity: .4; }
/* Toute la case prend la couleur liturgique du jour */
.cal-cell.dispo { border-width: 3px; font-weight: 700; cursor: pointer; }
.cal-cell.dispo[data-couleur="vert"]   { background: #2e7d32; border-color: #1f5c23; color: #fff; }
.cal-cell.dispo[data-couleur="blanc"]  { background: #ffffff; border-color: #c9b78a; color: #2a2a2a; }
.cal-cell.dispo[data-couleur="rouge"]  { background: #b3261e; border-color: #7d1a15; color: #fff; }
.cal-cell.dispo[data-couleur="violet"] { background: #6a3d9a; border-color: #4a2a6e; color: #fff; }
.cal-cell.dispo[data-couleur="rose"]   { background: #c2568c; border-color: #8f3d66; color: #fff; }
.cal-cell.choisi { outline: 4px solid var(--accent); outline-offset: 2px; }
.cal-cell.aujourdhui { box-shadow: inset 0 0 0 2px rgba(0,0,0,.28); }
.cal-cell.aujourdhui[data-couleur="blanc"] { box-shadow: inset 0 0 0 2px rgba(0,0,0,.22); }
/* Couleur encore provisoire (saison) : légèrement estompée jusqu'à la réponse AELF */
.cal-cell.approx { opacity: .82; }
/* Fête / solennité : repère doré en coin (rien = jour ordinaire) */
/* Repères du calendrier — hiérarchie visuelle croissante :
   Mémoire = point doré (discret) ; Fête = losange doré ; Solennité = étoile dorée
   cerclée de brun (immédiatement identifiable, même à faible contraste). */
.cal-cell.cal-memoire::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #e8bf6a; box-shadow: 0 0 0 1px rgba(60,40,10,.55); }
.cal-cell.cal-fete::after { content: ""; position: absolute; top: 5px; right: 5px; width: 11px; height: 11px; background: #edc15f; transform: rotate(45deg); box-shadow: 0 0 0 1.5px rgba(58,38,12,.75); }
.cal-cell.cal-solennite::before { content: ""; position: absolute; top: 1px; right: 1px; width: 21px; height: 21px; border-radius: 50%; background: #f6ecd2; border: 2px solid #4a3313; }
.cal-cell.cal-solennite::after { content: ""; position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; background: #eeae09; z-index: 1;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 0.5px rgba(58,38,12,.9)); }
/* Sur petit écran (téléphone), les cases sont étroites : on réduit les repères
   pour qu'ils ne recouvrent pas le chiffre du jour (surtout l'étoile cerclée). */
@media (max-width: 480px) {
  .cal-cell { font-size: 16px; }                                    /* chiffre plus compact */
  .cal-cell.cal-memoire::after { width: 5px; height: 5px; top: 2px; right: 2px; }
  .cal-cell.cal-fete::after { width: 7px; height: 7px; top: 2px; right: 2px; }
  .cal-cell.cal-solennite::before { width: 13px; height: 13px; top: 1px; right: 1px; border-width: 1.5px; }
  .cal-cell.cal-solennite::after { width: 8px; height: 8px; top: 3.5px; right: 3.5px; }
}
@media (max-width: 360px) {
  .cal-cell { font-size: 15px; }
  .cal-cell.cal-solennite::before { width: 12px; height: 12px; }
  .cal-cell.cal-solennite::after { width: 7px; height: 7px; top: 3.5px; right: 3.5px; }
  .cal-cell.cal-fete::after { width: 6px; height: 6px; }
}
.cal-cell { position: relative; }

/* Légende du calendrier : chaque couleur liturgique présentée séparément, puis les repères. */
.cal-legende { display: flex; flex-direction: column; gap: 8px; margin: 10px 2px 0; font-size: 15px; font-weight: 600; color: var(--texte-doux); }
.cal-leg-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.cal-leg-titre { font-weight: 700; color: var(--texte); }
.cal-leg-item { display: inline-flex; align-items: center; gap: 7px; }
.cal-leg-couleur { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--bord); flex: none; }
.cal-leg-couleur[data-couleur="vert"]   { background: #2e7d32; border-color: #1f5c23; }
.cal-leg-couleur[data-couleur="blanc"]  { background: #ffffff; border-color: #c9b78a; }
.cal-leg-couleur[data-couleur="rouge"]  { background: #b3261e; border-color: #7d1a15; }
.cal-leg-couleur[data-couleur="violet"] { background: #6a3d9a; border-color: #4a2a6e; }
.cal-leg-marque { position: relative; width: 24px; height: 24px; border-radius: 6px; background: var(--fond-2); border: 1px solid var(--bord); flex: none; }
.cal-leg-mem::after { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #e8bf6a; box-shadow: 0 0 0 1px rgba(60,40,10,.55); transform: translate(-50%, -50%); }
.cal-leg-fete::after { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; background: #edc15f; box-shadow: 0 0 0 1.5px rgba(58,38,12,.75); transform: translate(-50%, -50%) rotate(45deg); }
.cal-leg-sol::before { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; border-radius: 50%; background: #f6ecd2; border: 2px solid #4a3313; transform: translate(-50%, -50%); }
.cal-leg-sol::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; background: #eeae09; z-index: 1;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transform: translate(-50%, -50%); filter: drop-shadow(0 0 0.5px rgba(58,38,12,.9)); }

/* En-tête calendrier : sélecteurs mois + année (navigation directe) */
.cal-titre-bloc { display: flex; gap: 8px; align-items: center; }
.cal-select { font-family: var(--police); font-size: 19px; font-weight: 700; padding: 8px 10px; border: 2px solid var(--bord); border-radius: 10px; background: var(--fond); color: var(--texte); min-height: 48px; }
.cal-select-mois { text-transform: capitalize; }

/* Insigne de couleur liturgique (petit carré) */
.pastille { display: inline-block; width: 20px; height: 20px; border-radius: 5px; border: 2px solid; vertical-align: -3px; margin-right: 10px; flex: none; }
.mode-titre { display: inline-flex; align-items: center; font-weight: 700; }

/* Badge couleur/temps sous la date (préparation) */
.prep-couleur { display: flex; align-items: center; margin: 0 18px 14px; font-size: clamp(17px, 1.5vw, 20px); font-weight: 700; }
.prep-couleur:empty { display: none; }
.prep-couleur .pastille { width: 22px; height: 22px; }

/* Menu déroulant Préface : affordance « cliquable » (chevron + couleur d'accent) */
.champ-select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: right 20px center, right 14px center; background-size: 7px 7px, 7px 7px; background-repeat: no-repeat; padding-right: 40px; border-color: var(--accent); cursor: pointer; }
.champ-astuce { font-weight: 600; font-size: 15px; color: var(--texte-doux); }
.prep-titre { font-size: 24px; font-weight: 700; margin: 22px 18px 6px; color: var(--accent); }

/* Note dépliable ⓘ */
.info { margin: 10px 0; border: 2px solid var(--bord); border-radius: var(--rayon); background: var(--fond); }
.info > summary { padding: 12px 14px; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--accent); }
.info-corps { padding: 0 14px 12px; font-size: 17px; line-height: 1.5; }
.info-corps p { margin: 8px 0; }

/* Pourquoi cette préface */
.preface-pourquoi { margin-top: 8px; padding: 10px 12px; background: var(--fond-2); border-left: 4px solid var(--accent); border-radius: 8px; font-size: 16px; }
.preface-pourquoi:empty { display: none; }

/* --- Préface : vitrine + panneau hiérarchisé (accordéon) --- */
.preface-vitrine {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: 12px 16px; text-align: left; cursor: pointer;
  background: var(--fond); color: var(--texte);
  border: 3px solid var(--accent); border-radius: var(--rayon); font-family: inherit;
}
.preface-vitrine-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.preface-vitrine-sur { font-size: 14px; font-weight: 700; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .04em; }
.preface-vitrine-titre { font-size: 22px; font-weight: 700; line-height: 1.2; }
.preface-vitrine-astuce { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 15px; font-weight: 600; color: var(--texte-doux); }
.preface-chevron { display: inline-block; font-size: 18px; transition: transform .18s; }
.preface-vitrine.est-ouvert .preface-chevron { transform: rotate(180deg); }

.preface-panneau { margin-top: 10px; border: 3px solid var(--bord); border-radius: var(--rayon); background: var(--fond); overflow: hidden; }
.preface-cat { border-top: 2px solid var(--bord); }
.preface-cat:first-child { border-top: none; }
.preface-cat-titre {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 12px 16px;
  font-size: 19px; font-weight: 700; cursor: pointer; list-style: none;
  background: var(--fond-2); color: var(--texte);
}
.preface-cat-titre::-webkit-details-marker { display: none; }
.preface-cat-titre::before { content: "▸"; font-size: 16px; color: var(--accent); transition: transform .18s; }
.preface-cat[open] > .preface-cat-titre::before { transform: rotate(90deg); }
.preface-cat-nom { flex: 1; }
.preface-cat-nb { font-size: 15px; font-weight: 700; color: var(--texte-doux); background: var(--fond); border: 2px solid var(--bord); border-radius: 999px; padding: 1px 10px; }
.preface-opt {
  display: block; width: 100%; min-height: 56px; text-align: left; padding: 12px 16px 12px 40px;
  font-size: 19px; font-family: inherit; cursor: pointer;
  background: var(--fond); color: var(--texte); border: none; border-top: 2px solid var(--bord);
}
.preface-opt.is-courant { background: var(--surligne); font-weight: 700; box-shadow: inset 5px 0 0 var(--accent); }
.preface-opt.is-courant::before { content: "✓ "; color: var(--accent); font-weight: 700; margin-left: -22px; }

/* Fenêtre modale (installation) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal-carte { background: var(--fond); color: var(--texte); border: 3px solid var(--bord); border-radius: 18px; max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 22px; }
.modal-titre { margin: 0 0 10px; font-size: 26px; color: var(--accent); }
.modal-carte p { font-size: 18px; line-height: 1.5; }
.install-cols { display: flex; flex-wrap: wrap; gap: 20px; margin: 12px 0; }
.install-col { flex: 1 1 280px; }
.install-col h3 { font-size: 19px; margin: 6px 0; }
.install-col ol { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.55; }

/* Cartes de célébration enrichies */
.carte-celeb { padding: 16px; margin-bottom: 12px; background: var(--fond-2); border: 2px solid var(--bord); border-left: 8px solid var(--accent); border-radius: var(--rayon); }
.carte-celeb[data-couleur="vert"]   { border-left-color: #2e7d32; }
.carte-celeb[data-couleur="blanc"]  { border-left-color: #b08947; }
.carte-celeb[data-couleur="rouge"]  { border-left-color: #b3261e; }
.carte-celeb[data-couleur="violet"] { border-left-color: #6a3d9a; }
.carte-celeb[data-couleur="rose"]   { border-left-color: #c2568c; }
.carte-etat { font-size: 15px; font-weight: 700; color: #2e7d32; text-transform: uppercase; letter-spacing: .04em; }
.carte-titre { font-size: 21px; font-weight: 700; margin: 2px 0; }
.carte-date { font-size: 17px; color: var(--texte-doux); }
.carte-meta { font-size: 15px; color: var(--texte-doux); margin-top: 8px; }
.carte-signature { font-size: 15px; font-style: italic; color: var(--texte-doux); margin-top: 6px; }
.carte-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.carte-actions button { min-height: 52px; padding: 8px 16px; font-size: 17px; border-radius: 10px; border: 2px solid var(--bord); background: var(--fond); color: var(--texte); }
.carte-actions .btn-celebrer { background: #2e7d32; color: #fff; border-color: #1f5c23; font-weight: 700; }
.carte-actions .btn-supprimer { color: #b3261e; border-color: #d59a96; }
/* Vérification finale : bleu (contrôle) — attire l'œil sans conflit de code couleur */
.carte-controle { width: 100%; margin-top: 12px; min-height: 52px; padding: 11px 14px;
  font-size: 17px; font-weight: 700; color: #fff;
  background: #1F4E79; border: 2px solid #163a5c; border-radius: 10px; }
.controle-titre, #controle-titre { color: #1F4E79; }

/* Complétude d'une célébration préparée */
.carte-completude { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.comp-barre { flex: 1; height: 10px; background: var(--bord); border-radius: 6px; overflow: hidden; }
.comp-barre > span { display: block; height: 100%; background: #1F4E79; border-radius: 6px; }
.carte-completude.ok .comp-barre > span { background: #2e7d32; }
.comp-txt { font-size: 14px; font-weight: 700; color: var(--texte-doux); white-space: nowrap; }
.carte-completude.ok .comp-txt { color: #2e7d32; }

/* Vérification finale (check-list) */
.controle-sous { margin: 0 0 12px; font-size: 17px; color: var(--texte-doux); }
.controle-liste { list-style: none; margin: 0; padding: 0; }
.ctrl-ligne { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bord); font-size: 19px; }
.ctrl-ico { flex: none; width: 26px; text-align: center; font-weight: 700; }
.ctrl-ok  .ctrl-ico { color: #2e7d32; }
.ctrl-warn .ctrl-ico { color: #b3261e; }
.ctrl-info .ctrl-ico { color: var(--texte-doux); }
.ctrl-warn .ctrl-txt { color: #b3261e; }
.controle-resume { margin: 16px 0 0; padding: 14px; font-size: 21px; font-weight: 700; text-align: center; border-radius: var(--rayon); }
.controle-resume.ok  { color: #1f5c23; background: rgba(46,125,50,.12); border: 2px solid #2e7d32; }
.controle-resume.warn { color: #8f1c16; background: rgba(179,38,30,.10); border: 2px solid #b3261e; }
.bascule { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 12px 0; }
.bascule input { width: 28px; height: 28px; }
.champ-inline { display: block; font-size: 18px; color: var(--texte-doux); margin-top: 12px; }
.presets, .themes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.themes .btn-theme { flex: 1 1 45%; }
.btn-preset { flex: 1; min-height: 60px; border: 3px solid var(--bord); border-radius: var(--rayon); background: var(--fond-2); }
.btn-preset:nth-child(1){ font-size: 20px; } .btn-preset:nth-child(2){ font-size: 30px; } .btn-preset:nth-child(3){ font-size: 42px; }
.btn-theme { flex: 1; min-height: 60px; font-size: 18px; border: 3px solid var(--bord); border-radius: var(--rayon); background: var(--fond-2); }
.btn-theme[aria-pressed="true"], .btn-preset[aria-pressed="true"] { border-color: var(--accent); border-width: 4px; }

/* ===========================================================
   ÉCRAN DE CÉLÉBRATION — le seul qui compte vraiment
   =========================================================== */
.vue-celebration { position: fixed; inset: 0; background: var(--fond); overflow: hidden; }
.fil {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; padding: 6vh 0 40vh;
  scroll-behavior: auto;
}
/* Largeur de lecture responsive & intelligente : le texte occupe l'essentiel
   de la largeur disponible, mais la longueur de ligne reste confortable —
   plus la police est grande, plus la ligne peut s'élargir. */
.bloc {
  max-width: min(96%, calc(var(--taille) * 32)); margin: 0 auto;
  padding: 3vh clamp(14px, 3vw, 40px);
  border-left: 6px solid transparent;
}
.bloc-titre {
  font-size: calc(var(--taille) * 0.6); font-weight: 700; color: var(--texte-doux);
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .4em;
}
.bloc-rubrique {
  font-size: calc(var(--taille) * 0.55); font-style: italic; color: var(--texte-doux);
  margin: 0 0 .5em; padding-left: .6em; border-left: 3px solid var(--bord);
}
.bloc-texte { font-size: var(--taille); line-height: var(--interligne); margin: 0; white-space: pre-wrap; }
.bloc[data-role="assemblee"] .bloc-texte, .bloc[data-role="tous"] .bloc-texte { color: var(--texte-doux); }

/* Bloc courant surligné (repère de lecture) */
.bloc.courant {
  background: var(--surligne);
  border-left-color: var(--liturgie, var(--accent));
  border-radius: 0 12px 12px 0;
}

/* Vue célébrant seul : masquer les parties de l'assemblée */
body[data-celebrant-seul="1"] .bloc[data-masquable="1"] { display: none; }

/* Mode focus : un seul bloc affiché à la fois (le bloc courant) */
body[data-focus="1"] .fil .bloc { display: none; }
body[data-focus="1"] .fil .bloc.courant { display: block; }

/* Zones tactiles : moitié G/D, bande centrale neutre ~10% */
.zone-tactile {
  position: fixed; top: 0; bottom: 0; width: 44%;
  background: transparent; border: none; padding: 0; z-index: 3;
  -webkit-tap-highlight-color: transparent;
}
.zone-gauche { left: 0; }
.zone-droite { right: 0; }

/* Repère de position (barre de progression discrète) */
.repere {
  position: fixed; left: 0; bottom: 0; height: 6px; width: 0%;
  background: var(--liturgie, var(--accent)); z-index: 4; transition: width .15s;
}

/* Rail de défilement (droite) : glisser le curseur pour avancer / reculer.
   Placé au-dessus de la zone tactile droite (z-index 6 > 3). */
.scrub { position: fixed; top: 0; right: 0; width: 26px; height: 100%; z-index: 6; touch-action: none; -webkit-tap-highlight-color: transparent; }
.scrub::before { content: ""; position: absolute; right: 11px; top: 8px; bottom: 8px; width: 3px; background: var(--bord); opacity: .55; border-radius: 3px; }
.scrub-progres { position: absolute; right: 11px; top: 8px; width: 3px; height: 0; background: var(--liturgie, var(--accent)); opacity: .55; border-radius: 3px; }
.scrub-thumb { position: absolute; right: 3px; top: 0; width: 20px; height: 48px; background: var(--liturgie, var(--accent)); border: 2px solid #fff; border-radius: 11px; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
body[data-vue="celebration"] .scrub { display: block; }

/* Sortie */
.btn-sortie {
  position: fixed; top: 10px; right: 10px; z-index: 6;
  width: 54px; height: 54px; font-size: 24px; opacity: .35;
  background: var(--fond-2); border: 2px solid var(--bord); border-radius: 50%;
}
.btn-sortie:active { opacity: 1; }

.alerte-veille {
  position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 8;
  max-width: min(560px, 92vw); padding: 9px 14px; font-size: 14.5px; line-height: 1.35;
  background: rgba(179,38,30,.94); color: #fff; border-radius: 12px;
  text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer;
}
.alerte-fermer { display: block; margin-top: 2px; font-size: 12.5px; opacity: .85; }

/* Interrupteur ON/OFF */
.bascule-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.bascule-switch em { font-style: italic; color: var(--texte-doux); }
.bascule-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bascule-switch .switch { flex: none; width: 64px; height: 36px; border-radius: 18px; background: #9a9a9a; position: relative; transition: background .15s; }
.bascule-switch .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: left .15s; }
.bascule-switch input:checked + .switch { background: #2e7d32; }
.bascule-switch input:checked + .switch::after { left: 31px; }
.bascule-switch input:focus-visible + .switch { outline: 3px solid var(--accent); outline-offset: 2px; }
.champ-inline { display: flex; align-items: center; gap: 10px; }
.vitesse-ico { font-size: 24px; }

/* Fil liturgique (rail latéral pendant la célébration).
   Progression du chemin de la messe :
     blanc  = étape à venir · vert = étape en cours · brun profond = étape terminée.
   Un fil vertical relie les 5 étapes et se colore au fur et à mesure. */
.fil-liturgique { position: fixed; left: 0; top: 0; bottom: 0; width: 92px; z-index: 5;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 8px 4px; background: var(--fond-2); border-right: 2px solid var(--bord); overflow-y: auto; }
/* Le fil réserve le rail (gauche) et le curseur de défilement (droite) ;
   le texte remplit tout l'espace entre les deux. */
.vue-celebration .fil { left: 92px; right: 26px; }
/* Le fil vertical (piste grise + progression brune remplie en JS) */
.fl-piste { position: absolute; left: 50%; top: 26px; bottom: 26px; width: 3px; transform: translateX(-50%);
  background: var(--bord); border-radius: 3px; }
.fl-progres { position: absolute; left: 50%; top: 26px; width: 3px; height: 0; transform: translateX(-50%);
  background: var(--brun-fait, #6B4E2E); border-radius: 3px; transition: height .25s ease; }
.fl-etape { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 8px 2px; cursor: pointer; color: var(--texte-doux); }
.fl-point { width: 16px; height: 16px; border-radius: 50%; background: var(--fond); border: 2px solid var(--bord); transition: background .2s, border-color .2s, box-shadow .2s; }
.fl-label { font-size: 12px; line-height: 1.1; text-align: center; }
/* Étape terminée : brun profond */
.fl-etape.faite .fl-point { background: var(--brun-fait, #6B4E2E); border-color: var(--brun-fait, #6B4E2E); }
.fl-etape.faite .fl-label { color: var(--brun-fait, #6B4E2E); }
/* Étape en cours : vert */
.fl-etape.actif .fl-point { background: #2e7d32; border-color: #1f5c23; box-shadow: 0 0 0 5px rgba(46,125,50,.28); }
.fl-etape.actif .fl-label { color: #2e7d32; font-weight: 700; }

/* Retour à l'accueil pendant la célébration (haut gauche, après le rail).
   Brun (actif) quand le défilement est en pause ou en mode manuel ;
   grisé et inactif pendant le défilement automatique. */
.btn-retour-celeb { position: fixed; top: 10px; left: 100px; z-index: 8;
  min-height: 44px; padding: 8px 15px; font-size: 16px; font-weight: 700;
  color: var(--brun-fait, #6B4E2E); background: var(--fond-2);
  border: 2px solid var(--bord); border-radius: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.btn-retour-celeb.desactive { opacity: .4; color: var(--texte-doux); pointer-events: none; box-shadow: none; }

/* Indicateur flottant de procession (remonté ~2 cm) + mention d'état à côté.
   Vert fixe = défile, rouge pulsé = en pause. */
.btn-procession { position: fixed; right: 18px; bottom: 112px; z-index: 7;
  width: 72px; height: 72px; border-radius: 50%; font-size: 28px;
  background: #b3261e; color: #fff; border: 3px solid rgba(255,255,255,.85);
  animation: pulse-pause 1.05s ease-in-out infinite; }
.btn-procession.actif { background: #2e7d32; animation: none; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.etat-procession { position: fixed; right: 100px; bottom: 128px; z-index: 7;
  padding: 7px 13px; border-radius: 18px; font-size: 15px; font-weight: 700;
  background: var(--fond-2); color: var(--texte); border: 2px solid var(--bord); white-space: nowrap; }
.modal-actions-col { flex-direction: column; }
.modal-actions-col .btn-large { width: 100%; }
@keyframes pulse-pause {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(179,38,30,.55), 0 3px 10px rgba(0,0,0,.3); }
  50%      { transform: scale(1.07); box-shadow: 0 0 0 15px rgba(179,38,30,0), 0 3px 10px rgba(0,0,0,.3); }
}
@media (prefers-reduced-motion: reduce) { .btn-procession { animation: none; } }

/* En-tête de sous-page : deux retours [⌂ Accueil] [‹ Paramètres] à gauche */
.entete-sous { gap: 10px; }
.entete-retours { display: flex; gap: 8px; flex: none; }
.entete-sous .btn-retour { min-height: 48px; font-size: 17px; padding: 0 12px; }
.entete-sous .entete-titre { margin-left: auto; }
@media (max-width: 480px) {
  .entete-sous .btn-retour { font-size: 15px; padding: 0 9px; }
  .entete-sous .entete-titre { font-size: 21px; }
}

/* Hub Paramètres : blocs Profil / Application / Navigation */
.hub-bloc { margin: 14px 18px; padding: 14px 16px; background: var(--fond-2);
  border: 2px solid var(--bord); border-radius: var(--rayon); }
.hub-bloc .btn-large, .hub-bloc .btn-fichier { width: 100%; margin: 10px 0 0; }
.hub-titre { margin: 0 0 6px; font-size: 18px; color: var(--accent); }
.hub-nom { margin: 0; font-size: 22px; font-weight: 700; }
.hub-etat { margin: 0 0 4px; font-size: 17px; color: var(--texte-doux); }
.hub-etat.ok { color: #2e7d32; font-weight: 700; }
.hub-lien { margin: 10px 0 0; font-size: 16px; color: var(--texte-doux); word-break: break-all; }
.reglages-profil { margin: 0 0 6px; font-size: 22px; font-weight: 700; }

/* Homélie (préparation) */
#champ-homelie { margin-top: 12px; min-height: 140px; line-height: 1.45; resize: vertical; }

/* Actions groupées dans les modales (Profil, Confirmation) */
.modal-actions { display: flex; gap: 12px; margin-top: 18px; }
.modal-actions .btn-large { margin: 0; flex: 1; }
.modal .champ-controle { margin: 6px 0 12px; }
.modal .champ-libelle { margin-top: 6px; }
.btn-danger { background: #b3261e; color: #fff; border-color: #b3261e; font-weight: 700; }
.profil-erreur { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #b3261e; }

/* Signature discrète en fin de déroulé (célébration) */
.fil-signature { margin: 8vh auto 40vh; max-width: min(96%, calc(var(--taille) * 32)); padding: 0 clamp(14px, 3vw, 40px);
  font-size: calc(var(--taille) * 0.5); font-style: italic; color: var(--texte-doux); text-align: center; }

/* Homélie : aperçu du document importé + rendu média pendant la messe */
.homelie-apercu { margin: 8px 0; padding: 8px; background: var(--fond-2); border: 2px solid var(--bord); border-radius: 10px; font-size: 15px; color: var(--texte-doux); }
.bloc-media { display: block; max-width: 100%; margin: 12px auto; border-radius: 8px; }
.bloc-media-pdf { display: block; width: 100%; height: 70vh; margin: 12px 0; border: none; background: #fff; }

/* Vérification finale : bouton Célébrer en vert (cohérent avec les cartes) */
#btn-controle-celebrer { background: #2e7d32; color: #fff; border-color: #1f5c23; }

/* Carte « Soutenir ViaMissa » (À propos) */
.soutenir-carte { margin: 22px 0; padding: 16px 18px; background: var(--fond-2); border: 2px solid var(--bord); border-left: 6px solid var(--accent); border-radius: var(--rayon); }
.soutenir-carte h2 { margin-top: 0; }
.soutenir-carte .btn-large { width: 100%; margin: 12px 0 0; }

/* ---------- Réglage de taille flottant (partout, à tout moment) ---------- */
.btn-taille { position: fixed; right: 16px; bottom: 124px; z-index: 9;
  width: 58px; height: 58px; border-radius: 50%; font-size: 22px; font-weight: 700;
  background: var(--fond-2); color: var(--accent); border: 2px solid var(--bord);
  box-shadow: 0 2px 6px rgba(0,0,0,.25); line-height: 1; }
.btn-taille .fleche { font-size: 14px; vertical-align: super; }
/* En célébration : au-dessus du bouton Lecture/Pause (remonté), pas de navbar */
body[data-vue="celebration"] .btn-taille { bottom: 200px; right: 22px; }
.panneau-taille { position: fixed; right: 16px; bottom: 190px; z-index: 9;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px; background: var(--fond-2); border: 2px solid var(--bord);
  border-radius: 20px; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
body[data-vue="celebration"] .panneau-taille { bottom: 266px; right: 22px; }
.taille-btn { width: 52px; height: 52px; border-radius: 12px; font-size: 22px; font-weight: 700;
  background: var(--fond); color: var(--texte); border: 2px solid var(--bord); }
.taille-curseur { writing-mode: vertical-lr; direction: rtl; width: 40px; height: 180px; accent-color: var(--accent); }
.taille-val { font-size: 15px; font-weight: 700; color: var(--texte-doux); }

/* ==========================================================================
   RÈGLE D'ACCESSIBILITÉ (v25) : les textes importants utilisent la couleur du
   thème (var(--texte)) et sont GRAS ; les couleurs (bleu/vert/jaune/rouge) ne
   servent qu'aux fonds, bordures, icônes et états — jamais à colorer un texte.
   Seule exception validée : le bouton Célébrer (vert + texte blanc gras).
   ========================================================================== */

/* Titres & libellés : couleur du thème, gras, plus grands */
.section-titre { color: var(--texte); font-weight: 800; font-size: 24px; }
.hub-titre { color: var(--texte); font-weight: 800; font-size: clamp(23px, 2.2vw, 27px); }
.doc-corps h2 { color: var(--texte); font-weight: 800; }
.prep-titre { color: var(--texte); font-weight: 800; }
.info > summary { color: var(--texte); font-weight: 800; }
.modal-titre { color: var(--texte); font-weight: 800; }
.hub-nom, .reglages-profil { color: var(--texte); font-size: clamp(22px, 1.8vw, 25px); }
.hub-etat, .hub-etat.ok { color: var(--texte); font-weight: 700; font-size: clamp(19px, 1.5vw, 21px); }

/* Boutons plus lisibles (gras) */
.btn-large { font-weight: 600; }
.modal-actions .btn-large { font-weight: 700; }

/* Bouton « Vérification finale » (carte) : plus de blanc — bordure bleue + texte du thème */
.carte-controle { background: var(--fond-2); color: var(--texte); border: 3px solid #1F4E79;
  font-weight: 800; font-size: clamp(19px, 1.7vw, 22px); }

/* Fenêtre de vérification : titre, jour/date, check-list — couleur du thème, gras, plus grands */
.controle-titre, #controle-titre { color: var(--texte); font-weight: 800; font-size: clamp(25px, 2.4vw, 29px); }
.controle-sous { color: var(--texte); font-weight: 800; font-size: clamp(20px, 1.8vw, 24px); }
.ctrl-ligne { color: var(--texte); font-weight: 700; font-size: clamp(18px, 1.6vw, 21px); }
.ctrl-warn .ctrl-txt { color: var(--texte); }
/* Élément incomplet : bloc encadré de rouge + pictogramme (le rouge n'écrit pas le texte) */
.ctrl-ligne.ctrl-warn { border: 2px solid #b3261e; border-radius: 8px; margin: 8px 0; padding: 10px 12px; background: rgba(179,38,30,.08); }
/* Résumé « prêt » : bloc neutre + coche (plus de vert, pour ne pas confondre avec Célébrer) */
.controle-resume { color: var(--texte); font-weight: 800; font-size: clamp(22px, 2vw, 25px); }
.controle-resume.ok  { color: var(--texte); background: var(--fond-2); border: 2px solid var(--texte-doux); }
.controle-resume.warn { color: var(--texte); background: var(--surligne); border: 3px solid #b3261e; }

/* Cartes de célébration : détails plus grands et lisibles */
.carte-etat { color: var(--texte); font-weight: 800; }
.carte-date, .carte-meta, .carte-signature { color: var(--texte); font-weight: 650; font-size: clamp(18px, 1.5vw, 21px); }
.comp-txt, .carte-completude.ok .comp-txt { color: var(--texte); }
/* Supprimer : bordure rouge conservée, texte du thème gras */
.carte-actions .btn-supprimer { color: var(--texte); border-color: #b3261e; font-weight: 800; }

/* Import AELF : point de départ évident (plus grand, gras, pulsation brève à l'ouverture) */
#btn-import-aelf { font-size: clamp(20px, 1.8vw, 23px); font-weight: 800; border-width: 3px; }
/* Pulsation (bordure + ombre uniquement) tant que les lectures ne sont pas importées. */
#btn-import-aelf.is-pending { animation: pulse-aelf 1.8s ease-in-out infinite; border-color: var(--accent); }
@keyframes pulse-aelf {
  0%,100% { transform: scale(1);     box-shadow: 0 0 0 0 rgba(200,150,60,.45); }
  50%     { transform: scale(1.012); box-shadow: 0 0 0 10px rgba(200,150,60,0); }
}
#import-aelf-etat { color: var(--texte); font-weight: 700; font-size: clamp(18px, 1.5vw, 20px); }

/* Haut de la préparation : jour liturgique (grand, gras) + date civile, visibles sous l'en-tête */
.prep-titre { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; line-height: 1.25; margin: 18px 18px 4px; scroll-margin-top: 92px; }
.prep-date { font-size: clamp(18px, 1.5vw, 21px); font-weight: 700; color: var(--texte); margin: 0 18px 14px; }

/* Repères liturgiques : nettement plus grands, gras, couleur du thème (état = forme du point) */
.fil-liturgique { width: 112px; }
.vue-celebration .fil { left: 112px; }
.btn-retour-celeb { left: 120px; }
.fl-label { color: var(--texte); font-weight: 750; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.2; }
.fl-etape.faite .fl-label, .fl-etape.actif .fl-label { color: var(--texte); }
.fl-etape.faite .fl-point { position: relative; }
.fl-etape.faite .fl-point::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }

/* Bouton de taille (droite) : plus grand, couleur du thème */
.btn-taille { width: 60px; height: 60px; font-size: 30px; font-weight: 800; color: var(--texte); }
.btn-taille .fleche { font-size: 16px; }
.taille-btn { color: var(--texte); }

/* Lecture automatique dans la boîte « Retour » */
.sortie-auto { margin: 14px 0; padding: 12px 14px; background: var(--fond-2); border: 2px solid var(--bord); border-radius: 12px; }
.sortie-auto .bascule-switch { margin: 0; font-size: 19px; font-weight: 700; color: var(--texte); }
#auto-etat { font-style: normal; font-weight: 800; color: var(--texte); }
.sortie-vitesse { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sortie-vitesse-lbl { font-weight: 700; color: var(--texte); }
.vit-btn { flex: 1; min-width: 74px; min-height: 46px; font-weight: 700; color: var(--texte);
  background: var(--fond); border: 2px solid var(--bord); border-radius: 10px; }
.vit-btn[aria-pressed="true"] { border-color: var(--accent); border-width: 3px; background: var(--surligne); }
.btn-continuer { color: var(--texte); font-weight: 800; border: 3px solid var(--texte-doux); }

/* Boutons du choix de mode au lancement */
.btn-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  color: var(--texte); font-weight: 800; }
.btn-mode .mode-sous { font-weight: 600; font-size: 15px; color: var(--texte-doux); }
.btn-mode[aria-pressed="true"] { border-color: var(--accent); border-width: 3px; }

/* Assistant (préparer n'importe quelle date via le moteur) */
.assistant-bloc { background: var(--surligne); border: 2px solid var(--accent); border-radius: var(--rayon); padding: 14px 16px; }
.assistant-bloc .champ-libelle { color: var(--texte); }
.assistant-bloc .calendrier { margin: 10px 0 0; max-width: none; background: var(--fond); }
.assistant-bloc #assistant-etat:empty { display: none; }
.assistant-bloc #assistant-etat { margin-top: 8px; font-weight: 600; }

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Impression : document de secours en gros caractères --- */
@media print {
  .entete, .zone-tactile, .repere, .btn-sortie, .alerte-veille,
  .btn-geant, .btn-large, .avertissement, #vue-accueil, #vue-preparation, #vue-reglages { display: none !important; }
  body, .vue-celebration, .fil { position: static; inset: auto; overflow: visible; background: #fff; color: #000; }
  .bloc { max-width: 100%; page-break-inside: avoid; border-left: none; background: #fff !important; }
  .bloc-texte { font-size: 22pt; }
  .bloc-titre { font-size: 14pt; }
}

/* --- Message furtif (mise à jour, confirmations) --- */
.toast-furtif {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 14px);
  z-index: 50; max-width: 90vw;
  padding: 12px 22px; border-radius: 999px;
  background: var(--fond-2); color: var(--texte);
  border: 2px solid var(--accent); box-shadow: 0 6px 22px rgba(0,0,0,.28);
  font-size: 17px; font-weight: 700; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.toast-furtif.visible { opacity: 1; transform: translate(-50%, 0); }
