/* ==========================================================================
   Clean Altitude – feuille de style principale
   Palette : bleu ardoise profond, blanc neige, touches de vert mélèze.
   Les couleurs de marque (--marque, --accent) sont surchargées par /theme.css
   d'après les paramètres de l'entreprise.
   ========================================================================== */

@font-face { font-family: "Atkinson Next"; src: url("../polices/AtkinsonHyperlegibleNext-Regular.16653d2ae0a9.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../polices/AtkinsonHyperlegibleNext-Italic.907276a139c7.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../polices/AtkinsonHyperlegibleNext-Medium.a1e1fdfc8ad3.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../polices/AtkinsonHyperlegibleNext-SemiBold.1e7630a8f870.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../polices/AtkinsonHyperlegibleNext-Bold.219587669913.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --marque: #12355b;          /* bleu ardoise profond */
  --marque-texte: #ffffff;
  --accent: #2f7d5b;          /* vert mélèze */
  --accent-texte: #ffffff;
  --marque-sombre: color-mix(in srgb, var(--marque) 78%, #000);
  --marque-pale: color-mix(in srgb, var(--marque) 8%, #fff);
  --accent-pale: color-mix(in srgb, var(--accent) 12%, #fff);
  /* Texte sur les teintes pâles (recalculé dans theme.css selon les couleurs choisies) */
  --marque-encre: var(--marque);
  --accent-encre: #2b7354;

  --fond: #f5f7f6;            /* blanc neige, légèrement froid */
  --surface: #ffffff;
  --encre: #16222e;
  --encre-douce: #4f5f6e;
  --ligne: #dbe2e6;
  --ligne-forte: #b9c4cb;

  --attention: #8a4d00;       /* ambre, texte sur fond clair */
  --attention-fond: #fff3dc;
  --danger: #b42318;
  --danger-fond: #fdecea;
  --succes: var(--accent);
  --succes-fond: var(--accent-pale);

  --rayon-petit: 6px;
  --rayon: 10px;
  --ombre: 0 1px 2px rgba(18, 53, 91, 0.06), 0 2px 8px rgba(18, 53, 91, 0.05);

  --police: "Atkinson Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-xs: 0.8125rem;   /* 13 px */
  --t-s: 0.9375rem;    /* 15 px */
  --t-m: 1rem;         /* 16 px */
  --t-l: 1.25rem;      /* 20 px */
  --t-xl: 1.5625rem;   /* 25 px */
  --t-xxl: 1.953rem;   /* 31 px */

  --largeur-rail: 248px;
  --hauteur-nav-bas: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: var(--t-m);
  line-height: 1.5;
  color: var(--encre);
  background: var(--fond);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: var(--t-xl); }
h2 { font-size: var(--t-l); }
h3 { font-size: var(--t-m); }
p { margin: 0 0 0.75em; }
a { color: var(--marque); text-underline-offset: 2px; }
a:hover { color: var(--marque-sombre); }
small, .petit { font-size: var(--t-xs); }
.discret { color: var(--encre-douce); }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre-ligne { white-space: pre-line; }
.nowrap { white-space: nowrap; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, #fff); outline-offset: 2px; border-radius: 4px; }

.icone { width: 1.2em; height: 1.2em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; }

.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 100; }
.lien-evitement:focus { left: 0.5rem; top: 0.5rem; }

/* --- Bandeau démonstration ---------------------------------------------- */
.bandeau-demo {
  background: repeating-linear-gradient(-45deg, #fff3dc, #fff3dc 12px, #ffe9bf 12px, #ffe9bf 24px);
  color: var(--attention);
  text-align: center;
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-bottom: 1px solid #f0d9a8;
}

/* --- Mise en page générale ------------------------------------------------ */
.appli { min-height: 100vh; }

.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--largeur-rail);
  background: var(--marque); color: var(--marque-texte);
  display: flex; flex-direction: column; padding: 1rem 0.75rem; z-index: 20;
}
.rail__marque { display: flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0.5rem 1.25rem; color: inherit; text-decoration: none; font-weight: 600; font-size: var(--t-m); }
.rail__marque img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,0.12); padding: 3px; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail__lien {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; border-radius: var(--rayon-petit);
  color: inherit; text-decoration: none; opacity: 0.86; font-weight: 500;
}
.rail__lien:hover { background: rgba(255,255,255,0.08); color: inherit; opacity: 1; }
.rail__lien[aria-current="page"] { background: rgba(255,255,255,0.14); opacity: 1; box-shadow: inset 3px 0 0 var(--accent); }
.rail__groupe { margin-top: 1.25rem; padding: 0 0.75rem 0.35rem; font-size: var(--t-xs); opacity: 0.65; }
.rail__pied { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 0.75rem; }
.rail__personne { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.5rem; color: inherit; text-decoration: none; border-radius: var(--rayon-petit); }
.rail__personne:hover { background: rgba(255,255,255,0.08); color: inherit; }
.rail__personne small { display: block; opacity: 0.75; }
.pastille {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-texte); font-weight: 600; font-size: var(--t-xs);
}

.contenu { margin-left: var(--largeur-rail); padding: 1.5rem 2rem 3rem; max-width: calc(1240px + var(--largeur-rail)); }

.barre-haut, .nav-bas { display: none; }

@media (max-width: 900px) {
  .rail { display: none; }
  .contenu { margin-left: 0; padding: 1rem 1rem calc(var(--hauteur-nav-bas) + 1.5rem); }
  .barre-haut {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    background: var(--marque); color: var(--marque-texte); padding: 0.6rem 1rem; position: sticky; top: 0; z-index: 20;
  }
  .barre-haut a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
  .barre-haut img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,0.12); padding: 2px; }
  .nav-bas {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; inset: auto 0 0 0; height: calc(var(--hauteur-nav-bas) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--ligne); z-index: 20;
  }
  .nav-bas a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--encre-douce); text-decoration: none; font-size: var(--t-xs); font-weight: 500; min-height: 48px;
  }
  .nav-bas a .icone { width: 26px; height: 26px; }
  .nav-bas a[aria-current="page"] { color: var(--marque); font-weight: 600; }
  .nav-bas a[aria-current="page"] .icone { stroke-width: 2.4; }
}

/* --- En-tête de page --------------------------------------------------- */
.entete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.25rem; }
.entete-page h1 { margin: 0; }
.entete-page__sous-titre { color: var(--encre-douce); margin: 0.2rem 0 0; }
.entete-page__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fil { font-size: var(--t-s); margin-bottom: 0.35rem; }
.fil a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2rem; }

/* --- Boutons ------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 44px; padding: 0.55rem 1rem; border-radius: var(--rayon-petit);
  border: 1px solid var(--ligne-forte); background: var(--surface); color: var(--encre);
  font: inherit; font-weight: 600; font-size: var(--t-s); text-decoration: none; cursor: pointer; line-height: 1.2;
}
.bouton:hover { border-color: var(--marque); color: var(--marque); }
.bouton--principal { background: var(--marque); border-color: var(--marque); color: var(--marque-texte); }
.bouton--principal:hover { background: var(--marque-sombre); border-color: var(--marque-sombre); color: var(--marque-texte); }
.bouton--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton--accent:hover { filter: brightness(0.92); color: var(--accent-texte); border-color: var(--accent); }
.bouton--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, #fff); }
.bouton--danger:hover { background: var(--danger-fond); color: var(--danger); border-color: var(--danger); }
.bouton--discret { border-color: transparent; background: transparent; color: var(--marque); padding-inline: 0.6rem; }
.bouton--discret:hover { background: var(--marque-pale); border-color: transparent; }
.bouton--grand { min-height: 56px; font-size: var(--t-m); padding: 0.75rem 1.25rem; border-radius: var(--rayon); }
.bouton--plein { width: 100%; }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.bouton-lien { background: none; border: 0; padding: 0; color: var(--marque); font: inherit; text-decoration: underline; cursor: pointer; }

/* --- Formulaires --------------------------------------------------------- */
.formulaire { max-width: 760px; }
.formulaire--large { max-width: 980px; }
.champ { margin-bottom: 1.1rem; }
.champ > label, .champ__libelle { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: var(--t-s); }
.champ__facultatif { font-weight: 400; color: var(--encre-douce); }
.champ__aide { color: var(--encre-douce); font-size: var(--t-xs); margin-top: 0.3rem; }
.champ__erreur { color: var(--danger); font-size: var(--t-s); margin-top: 0.3rem; display: flex; gap: 0.35rem; align-items: flex-start; font-weight: 500; }
.champ--erreur .saisie { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.saisie {
  width: 100%; min-height: 46px; padding: 0.6rem 0.75rem; font: inherit; color: var(--encre);
  background: var(--surface); border: 1px solid var(--ligne-forte); border-radius: var(--rayon-petit);
}
textarea.saisie { min-height: 90px; resize: vertical; }
.saisie:focus { outline: none; border-color: var(--marque); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marque) 22%, transparent); }
input[type="color"].saisie { padding: 0.25rem; width: 88px; height: 46px; }
input[type="file"].saisie { padding: 0.5rem; }
.saisie-compacte { min-height: 40px; padding: 0.4rem 0.6rem; font-size: var(--t-s); width: auto; }
.case { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: none; }
.champ--case { display: flex; gap: 0.6rem; align-items: flex-start; }
.champ--case label { font-weight: 500; margin: 0; }
.champ-groupe { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
.choix-multiples { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.35rem 1rem; }
.choix-multiples label, .choix-radio label { display: flex; align-items: center; gap: 0.55rem; min-height: 40px; font-weight: 500; cursor: pointer; }
.choix-multiples input, .choix-radio input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.choix-radio { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.choix-radio > div, .choix-multiples > div { display: contents; }
fieldset { border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1rem 1.25rem 0.25rem; margin: 0 0 1.25rem; background: var(--surface); }
legend { font-weight: 600; padding: 0 0.4rem; font-size: var(--t-m); }
.actions-formulaire { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.25rem; }
.actions-formulaire--separe { justify-content: space-between; }
.erreurs-generales { margin-bottom: 1rem; }

/* --- Messages ------------------------------------------------------------ */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.5rem; }
.alerte {
  display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.75rem 1rem; border-radius: var(--rayon-petit);
  border: 1px solid var(--ligne); background: var(--surface); font-size: var(--t-s);
}
.alerte .icone { margin-top: 0.1em; }
.alerte p:last-child { margin-bottom: 0; }
.alerte--succes { background: var(--succes-fond); border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.alerte--succes .icone { color: var(--accent); }
.alerte--info { background: var(--marque-pale); border-color: color-mix(in srgb, var(--marque) 20%, #fff); }
.alerte--info .icone { color: var(--marque); }
.alerte--attention { background: var(--attention-fond); border-color: #efd29b; color: #4d2c00; }
.alerte--attention .icone { color: var(--attention); }
.alerte--erreur { background: var(--danger-fond); border-color: #f2b8b2; color: #6b130c; }
.alerte--erreur .icone { color: var(--danger); }

/* --- Panneaux et listes ------------------------------------------------------- */
.panneau { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.panneau__titre { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.panneau__titre h2 { margin: 0; font-size: var(--t-l); }
.panneau--sans-marge { padding: 0; }
.panneau--sans-marge > .panneau__titre { padding: 1rem 1.25rem 0; }
.grille-fiche { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .grille-fiche { grid-template-columns: 1fr; } }

.lignes { list-style: none; margin: 0; padding: 0; }
.lignes > li { border-top: 1px solid var(--ligne); }
.lignes > li:first-child { border-top: 0; }
.ligne { display: flex; gap: 1rem; align-items: center; padding: 0.85rem 1.25rem; color: inherit; text-decoration: none; }
a.ligne:hover { background: var(--marque-pale); color: inherit; }
.ligne__principal { flex: 1; min-width: 0; }
.ligne__titre { font-weight: 600; display: block; }
.ligne__detail { color: var(--encre-douce); font-size: var(--t-s); display: block; }
.ligne__fin { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }

.infos { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0; }
.infos dt { color: var(--encre-douce); font-size: var(--t-s); }
.infos dd { margin: 0; }
@media (max-width: 600px) { .infos { grid-template-columns: 1fr; gap: 0.1rem; } .infos dd { margin-bottom: 0.6rem; } }

.etiquette {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: var(--t-xs); font-weight: 600; background: var(--marque-pale); color: var(--marque-encre); white-space: nowrap;
}
.etiquette--neutre { background: #eef1f3; color: var(--encre-douce); }
.etiquette--attention { background: var(--attention-fond); color: var(--attention); }
.etiquette--danger { background: var(--danger-fond); color: var(--danger); }
.etiquette--succes { background: var(--succes-fond); color: var(--accent-encre); }

/* Statuts : icône + libellé, couleur en complément seulement */
.statut { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--t-xs); font-weight: 600; padding: 0.18rem 0.55rem 0.18rem 0.45rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.statut--planifiee { background: var(--marque-pale); color: var(--marque-encre); }
.statut--en_cours { background: #e6f0fb; color: #0f4c8a; border-color: #b9d3ef; }
.statut--terminee, .statut--controlee { background: var(--succes-fond); color: var(--accent-encre); }
.statut--partielle { background: var(--attention-fond); color: var(--attention); }
.statut--bloquee { background: var(--danger-fond); color: var(--danger); }
.statut--annulee { background: #eef1f3; color: var(--encre-douce); text-decoration: line-through; }

/* --- Filtres et tableaux -------------------------------------------------------- */
.filtres { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.filtres .saisie { width: auto; }
.filtres__recherche { flex: 1 1 240px; position: relative; }
.filtres__recherche .saisie { width: 100%; padding-left: 2.3rem; }
.filtres__recherche .icone { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--encre-douce); }
.filtres__case { display: inline-flex; gap: 0.4rem; align-items: center; font-size: var(--t-s); font-weight: 500; }

.onglets { display: inline-flex; border: 1px solid var(--ligne-forte); border-radius: var(--rayon-petit); overflow: hidden; background: var(--surface); }
.onglets a { padding: 0.45rem 0.9rem; text-decoration: none; color: var(--encre); font-size: var(--t-s); font-weight: 600; border-left: 1px solid var(--ligne-forte); }
.onglets a:first-child { border-left: 0; }
.onglets a[aria-current="true"] { background: var(--marque); color: var(--marque-texte); }

.navigation-date { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.navigation-date__titre { font-size: var(--t-l); font-weight: 600; margin: 0 0.5rem; }

.tableau { width: 100%; border-collapse: collapse; background: var(--surface); }
.tableau th, .tableau td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau th { font-size: var(--t-xs); color: var(--encre-douce); font-weight: 600; background: #f9fbfa; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau__lien { font-weight: 600; text-decoration: none; }
.tableau-cadre { position: relative; border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; overflow-x: auto; background: var(--surface); }
@media (max-width: 700px) {
  .tableau--empilable thead { display: none; }
  .tableau--empilable tr { display: block; border-bottom: 1px solid var(--ligne); padding: 0.5rem 0; }
  .tableau--empilable td { display: flex; gap: 0.75rem; border: 0; padding: 0.25rem 0.9rem; }
  .tableau--empilable td::before { content: attr(data-libelle); min-width: 7.5rem; color: var(--encre-douce); font-size: var(--t-xs); padding-top: 0.15rem; }
}

/* --- Créneaux d'intervention (listes encadrement) ---------------------------------------- */
.jour { margin-bottom: 1.5rem; }
.jour__titre { display: flex; align-items: baseline; gap: 0.75rem; font-size: var(--t-m); margin: 0 0 0.5rem; }
.creneau { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 1rem; padding: 0.8rem 1.25rem; align-items: start; color: inherit; text-decoration: none; }
a.creneau:hover { background: var(--marque-pale); color: inherit; }
.creneau__heure { font-weight: 600; font-size: var(--t-m); }
.creneau__heure small { display: block; font-weight: 400; color: var(--encre-douce); }
.creneau__equipe { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.creneau--annulee { opacity: 0.65; }
.creneau__alertes { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-end; }
@media (max-width: 640px) {
  .creneau { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .creneau__alertes { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
}

.compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.compteur { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 0.85rem 1rem; text-decoration: none; color: inherit; display: block; }
.compteur__valeur { font-size: var(--t-xl); font-weight: 700; display: block; line-height: 1.1; }
.compteur__libelle { color: var(--encre-douce); font-size: var(--t-s); display: flex; align-items: center; gap: 0.35rem; }
a.compteur:hover { border-color: var(--marque); }
.compteur--alerte .compteur__valeur { color: var(--attention); }

/* --- États vides ------------------------------------------------------------- */
.vide { text-align: center; padding: 2.25rem 1.25rem; color: var(--encre-douce); }
.vide .icone { width: 40px; height: 40px; color: var(--ligne-forte); margin-bottom: 0.5rem; }
.vide__titre { color: var(--encre); font-weight: 600; font-size: var(--t-m); margin-bottom: 0.25rem; }
.vide .bouton { margin-top: 0.75rem; }

/* --- Informations sensibles --------------------------------------------------------- */
.acces { border: 1px dashed var(--ligne-forte); border-radius: var(--rayon); padding: 0.9rem 1rem; background: #fbfcfc; }
.acces__entete { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; margin-bottom: 0.35rem; }
.acces__valeur { font-size: var(--t-l); font-weight: 600; letter-spacing: 0.02em; white-space: pre-line; background: var(--surface); border: 1px solid var(--ligne); padding: 0.6rem 0.8rem; border-radius: var(--rayon-petit); margin: 0.35rem 0 0.75rem; }

/* --- Journal / historique -------------------------------------------------------------- */
.historique { list-style: none; padding: 0; margin: 0; font-size: var(--t-s); }
.historique li { padding: 0.6rem 0; border-top: 1px solid var(--ligne); }
.historique li:first-child { border-top: 0; }
.historique__quand { color: var(--encre-douce); font-size: var(--t-xs); }
.historique__diff { margin: 0.3rem 0 0; padding-left: 1rem; color: var(--encre-douce); }
.historique__diff li { border: 0; padding: 0.1rem 0; }
.historique__diff del { color: var(--danger); text-decoration-thickness: 1px; }
.historique__diff ins { color: var(--accent-encre); text-decoration: none; font-weight: 600; }

.pagination { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin-top: 1rem; }

/* --- Ma journée (salariés) : la tournée ------------------------------------------------ */
.journee-entete {
  position: relative; background: var(--marque); color: var(--marque-texte);
  margin: -1rem -1rem 1.25rem; padding: 1.1rem 1rem 3.25rem; overflow: hidden;
}
.journee-entete h1 { font-size: var(--t-xl); margin: 0.1rem 0 0; }
.journee-entete p { margin: 0; opacity: 0.85; }
.journee-entete .navigation-date a { color: var(--marque-texte); border-color: rgba(255,255,255,0.35); background: transparent; }
.journee-entete .navigation-date a:hover { background: rgba(255,255,255,0.1); }
.journee-entete__crete { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 44px; display: block; }
.journee-entete__crete path { fill: var(--fond); }
.journee-entete__resume { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: var(--t-s); }
.journee-entete__resume span { display: inline-flex; align-items: center; gap: 0.35rem; }
@media (min-width: 901px) { .journee-entete { margin: -1.5rem -2rem 1.5rem; padding: 1.5rem 2rem 3.5rem; border-radius: 0 0 var(--rayon) var(--rayon); } }

.tournee { list-style: none; margin: 0; padding: 0; position: relative; max-width: 720px; }
.etape { position: relative; padding-left: 2.6rem; padding-bottom: 1.25rem; }
.etape::before {
  /* tracé du sentier entre deux étapes */
  content: ""; position: absolute; left: 0.95rem; top: 1.6rem; bottom: -0.2rem;
  border-left: 3px dashed color-mix(in srgb, var(--marque) 30%, #fff);
}
.etape:last-child::before { display: none; }
.etape__balise {
  position: absolute; left: 0.2rem; top: 0.35rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--marque); display: grid; place-items: center; color: var(--marque);
}
.etape__balise .icone { width: 0.95rem; height: 0.95rem; stroke-width: 3; }
.etape--terminee .etape__balise, .etape--controlee .etape__balise { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.etape--en_cours .etape__balise { background: var(--marque); color: var(--marque-texte); }
.etape--annulee .etape__balise { border-color: var(--ligne-forte); color: var(--encre-douce); }
.etape--bloquee .etape__balise { border-color: var(--danger); color: var(--danger); }
.etape__carte {
  display: block; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 0.9rem 1rem; color: inherit; text-decoration: none; box-shadow: var(--ombre);
}
a.etape__carte:hover { border-color: var(--marque); color: inherit; }
.etape__heure { font-size: var(--t-l); font-weight: 700; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.etape__heure small { font-size: var(--t-s); font-weight: 500; color: var(--encre-douce); }
.etape__lieu { font-size: var(--t-m); font-weight: 600; margin: 0.2rem 0 0.1rem; }
.etape__adresse { color: var(--encre-douce); font-size: var(--t-s); display: flex; gap: 0.35rem; align-items: flex-start; }
.etape__pied { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; margin-top: 0.6rem; font-size: var(--t-s); color: var(--encre-douce); }
.etape__pied span { display: inline-flex; align-items: center; gap: 0.3rem; }
.etape--annulee .etape__carte { opacity: 0.7; }

/* Détail d'une intervention côté salarié */
.detail-mobile { max-width: 720px; }
.detail-mobile__horaire { font-size: var(--t-xxl); font-weight: 700; line-height: 1.1; }
.actions-terrain { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 1rem 0 1.25rem; }
.actions-terrain .bouton { min-height: 56px; }
.liste-taches { list-style: none; padding: 0; margin: 0; }
.liste-taches li { display: flex; gap: 0.65rem; padding: 0.6rem 0; border-top: 1px solid var(--ligne); align-items: flex-start; }
.liste-taches li:first-child { border-top: 0; }
.liste-taches__etat { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 5px; border: 2px solid var(--ligne-forte); display: grid; place-items: center; margin-top: 0.05rem; }
.liste-taches__etat--faite { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.liste-taches__etat--non_realisee { border-color: var(--danger); color: var(--danger); }
.liste-taches__etat .icone { width: 0.95rem; height: 0.95rem; stroke-width: 3; }

/* --- Pages publiques (connexion) ------------------------------------------------------------ */
.page-publique { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: var(--fond); }
.page-publique__haut { background: var(--marque); color: var(--marque-texte); position: relative; padding: 2.5rem 1.25rem 4.5rem; text-align: center; overflow: hidden; }
.page-publique__haut img { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: rgba(255,255,255,0.12); padding: 6px; }
.page-publique__haut h1 { margin: 0.75rem 0 0; font-size: var(--t-xl); }
.page-publique__haut .journee-entete__crete { height: 60px; }
.page-publique__corps { padding: 0 1rem 3rem; }
.carte-publique { max-width: 440px; margin: -2rem auto 0; position: relative; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.5rem; box-shadow: var(--ombre); }
.carte-publique h2 { font-size: var(--t-l); }
.lien-secondaire { display: block; text-align: center; margin-top: 0.75rem; padding: 0.5rem 0; font-size: var(--t-s); }

/* --- Divers --------------------------------------------------------------------- */
.copie { display: flex; gap: 0.5rem; align-items: stretch; }
.copie .saisie { font-size: var(--t-s); }
.pile > * + * { margin-top: 0.75rem; }
.separateur { border: 0; border-top: 1px solid var(--ligne); margin: 1.25rem 0; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.vignette { border: 1px solid var(--ligne); border-radius: var(--rayon-petit); overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; font-size: var(--t-xs); }
.vignette img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #eef1f3; }
.vignette span { display: block; padding: 0.4rem 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puces-equipe { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.indicateur-chargement { display: none; }
.htmx-request .indicateur-chargement, .htmx-request.indicateur-chargement { display: inline-flex; }
.conflit-comparaison { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .conflit-comparaison { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .rail, .barre-haut, .nav-bas, .entete-page__actions, .bandeau-demo { display: none !important; }
  .contenu { margin: 0; padding: 0; }
}
.rail__bouton { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.contact-terrain + .contact-terrain { border-top: 1px solid var(--ligne); margin-top: 0.75rem; padding-top: 0.75rem; }
[hidden] { display: none !important; }

/* ==========================================================================
   Étape 2 : planning, contrats, espace salarié
   ========================================================================== */
.texte-danger { color: var(--danger); }
.texte-attention { color: var(--attention); }
.texte-succes { color: var(--accent); }
.marge-haut { margin-top: 1rem; }
.compteur-nav { margin-left: auto; background: var(--accent); color: var(--accent-texte); border-radius: 999px; font-size: var(--t-xs); padding: 0 0.45rem; font-weight: 700; }
.bandeau-changements { text-decoration: none; margin-bottom: 1rem; }
.bandeau-changements:hover { filter: brightness(0.98); }
.page-planning .contenu { max-width: none; }

/* Puces d'intervention (planning) */
.puce {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden;
  background: var(--surface); color: var(--encre); text-decoration: none;
  border: 1px solid var(--ligne-forte); border-left: 4px solid var(--marque); border-radius: var(--rayon-petit);
  padding: 0.2rem 0.4rem; font-size: var(--t-xs); line-height: 1.3; cursor: pointer;
}
.puce[draggable="true"] { cursor: grab; }
.puce:hover { border-color: var(--marque); color: var(--encre); box-shadow: var(--ombre); }
.puce__ligne { display: flex; align-items: center; gap: 0.25rem; }
.puce__heure { font-weight: 700; }
.puce__lieu { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.puce__equipe { color: var(--encre-douce); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.puce__statut { font-size: 0.7rem; color: var(--encre-douce); }
.puce__brouillon { font-size: 0.7rem; color: var(--encre-douce); font-style: italic; }
.puce__alerte { width: 1em; height: 1em; }
.puce--brouillon { border-style: dashed; border-left-style: solid; background: #fbfcfc; }
.puce--en_cours { border-left-color: #0f4c8a; }
.puce--terminee, .puce--controlee { border-left-color: var(--accent); }
.puce--partielle { border-left-color: var(--attention); }
.puce--bloquee { border-left-color: var(--danger); }
.puce--annulee { border-left-color: var(--ligne-forte); opacity: 0.6; text-decoration: line-through; }
.puce--attention .puce__alerte { color: var(--attention); }
.puce--bloquant { box-shadow: 0 0 0 2px var(--danger); }
.puce--bloquant .puce__alerte { color: var(--danger); }
.puce--glissee { opacity: 0.35; }
.puce--exemple { display: inline-flex; padding: 0 0.4rem; }
.zone-depot--survol { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-pale) !important; }

.legende { margin-bottom: 1rem; font-size: var(--t-s); }
.legende summary { cursor: pointer; color: var(--marque); font-weight: 600; }
.legende ul { margin: 0.5rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.planning-message { margin-bottom: 1rem; }
.planning-message:empty { display: none; }
.ligne-alerte { color: var(--attention); display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; font-weight: 600; margin-right: .35rem; cursor: help; }
.absence-etiquette { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 600; color: var(--encre-douce); }
.planning { overflow-x: auto; border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--surface); }

/* Vue jour : une ligne par personne, des créneaux de 15 minutes */
.vue-jour { min-width: 960px; }
.vue-jour__ligne { display: grid; grid-template-columns: 190px minmax(0, 1fr); border-top: 1px solid var(--ligne); }
.vue-jour__ligne:first-child { border-top: 0; }
.vue-jour__ligne--a-affecter { background: #fbf8f1; }
.vue-jour__nom { padding: 0.5rem 0.75rem; font-size: var(--t-s); font-weight: 600; border-right: 1px solid var(--ligne); display: flex; align-items: flex-start; gap: 0.35rem; flex-wrap: wrap; }
.vue-jour__nom a { color: var(--encre); text-decoration: none; }
.vue-jour__piste { display: grid; grid-auto-rows: minmax(44px, auto); gap: 3px 2px; padding: 4px 0; position: relative; min-height: 52px; }
.vue-jour__entete { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.vue-jour__entete .vue-jour__piste { min-height: 0; padding: 0; grid-auto-rows: auto; }
.vue-jour__heure { font-size: var(--t-xs); color: var(--encre-douce); border-left: 1px solid var(--ligne); padding: 0.3rem 0.3rem; }
.vue-jour__fond { position: absolute; inset: 0; display: grid; pointer-events: none; }
.vue-jour__fond .absence { grid-row: 1; }
.absence {
  background: repeating-linear-gradient(-45deg, #eef1f3, #eef1f3 6px, #e2e7ea 6px, #e2e7ea 12px);
  color: var(--encre-douce); font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.4rem; border-radius: 4px;
  display: flex; align-items: flex-start;
}

/* Vue semaine */
.vue-semaine { min-width: 1040px; }
.vue-semaine__ligne { display: grid; grid-template-columns: 190px repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ligne); }
.vue-semaine__ligne:first-child { border-top: 0; }
.vue-semaine__entete { position: sticky; top: 0; background: var(--surface); z-index: 2; font-size: var(--t-s); font-weight: 600; }
.vue-semaine__entete > div { padding: 0.5rem; }
.vue-semaine__jour a { color: var(--encre); text-decoration: none; }
.vue-semaine__jour--aujourdhui { background: var(--marque-pale); }
.vue-semaine__jour--aujourdhui a { color: var(--marque); }
.vue-semaine__ligne--a-affecter { background: #fbf8f1; }
.vue-semaine__nom { padding: 0.5rem 0.75rem; font-size: var(--t-s); font-weight: 600; border-right: 1px solid var(--ligne); }
.vue-semaine__nom a { color: var(--encre); text-decoration: none; }
.vue-semaine__cellule { border-left: 1px solid var(--ligne); padding: 4px; min-height: 64px; display: flex; flex-direction: column; gap: 3px; }
.vue-semaine__cellule--absent { background: repeating-linear-gradient(-45deg, #f5f7f6, #f5f7f6 6px, #eaeef0 6px, #eaeef0 12px); }

/* Vue mois */
.vue-mois { min-width: 900px; }
.vue-mois__semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ligne); }
.vue-mois__entete { font-size: var(--t-s); font-weight: 600; border-top: 0; }
.vue-mois__entete > div { padding: 0.5rem; }
.vue-mois__jour { border-left: 1px solid var(--ligne); padding: 4px; min-height: 120px; display: flex; flex-direction: column; gap: 3px; }
.vue-mois__jour:first-child { border-left: 0; }
.vue-mois__jour--hors-mois { background: #f8f9f9; }
.vue-mois__jour--hors-mois .vue-mois__numero { color: var(--encre-douce); }
.vue-mois__jour--aujourdhui .vue-mois__numero { background: var(--marque); color: var(--marque-texte); border-radius: 999px; padding: 0 0.45rem; }
.vue-mois__numero { font-weight: 700; text-decoration: none; color: var(--encre); align-self: flex-start; }
.vue-mois__plus { font-size: var(--t-xs); }

/* Réorganisation */
.reorg { padding-bottom: 1rem; }
.choix-remplacant { display: grid; gap: 0.4rem; }
.choix-remplacant__option { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--ligne); border-radius: var(--rayon-petit); padding: 0.55rem 0.75rem; cursor: pointer; background: var(--surface); }
.choix-remplacant__option input { width: 20px; height: 20px; margin-top: 0.15rem; accent-color: var(--accent); flex: none; }
.choix-remplacant__option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-pale); }
.choix-remplacant__option--indispo { background: #fafafa; }

/* Espace salarié */
.actions-terrain--principales { grid-template-columns: 1fr; }
@media (min-width: 560px) { .actions-terrain--principales { grid-template-columns: repeat(3, 1fr); } }
.tache { flex-wrap: wrap; }
.tache form { flex: 1; min-width: 0; }
.tache__case { display: flex; gap: 0.65rem; align-items: flex-start; width: 100%; background: none; border: 0; padding: 0.15rem 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.tache__libelle { display: flex; flex-direction: column; }
.tache--faite .tache__libelle { color: var(--encre-douce); }
.tache__motif { font-size: var(--t-xs); color: var(--danger); }
.tache__non-faite { width: 100%; padding-left: 2.15rem; font-size: var(--t-s); }
.tache__non-faite summary { color: var(--encre-douce); cursor: pointer; padding: 0.2rem 0; }
.tache__non-faite form { margin-top: 0.4rem; }
.changement .ligne__principal { display: flex; flex-direction: column; gap: 0.15rem; }

/* Compétences d'une personne */
.ligne-competence { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .75rem 0; border-bottom: 1px solid var(--ligne); }
.ligne-competence:last-child { border-bottom: 0; }
.ligne-competence__case { display: flex; align-items: flex-start; gap: .6rem; min-width: 14rem; flex: 1; }
.ligne-competence__case input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--marque); }
.ligne-competence__date { display: flex; flex-direction: column; gap: .2rem; }

/* --- Étape 3 : notifications, incidents, réorganisation, véhicules, rapports ------------------ */
.etiquette--info { background: var(--marque-pale); color: var(--marque); }
.etiquette--accent { background: var(--accent); color: var(--accent-texte); }

.barre-haut__actions { display: flex; align-items: center; gap: 0.6rem; }
.cloche { position: relative; display: inline-grid !important; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.cloche .icone { width: 24px; height: 24px; }
.cloche__compte {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--accent-texte); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--marque);
}
.ligne--nouvelle { background: color-mix(in srgb, var(--accent-pale) 70%, var(--surface)); }

/* Fil de suivi d'un incident */
.fil-suivi { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.fil-suivi__element { border-left: 3px solid var(--ligne-forte); padding: 0.35rem 0 0.35rem 0.85rem; }
.fil-suivi__element p { margin: 0.25rem 0 0; }
.fil-suivi__element--action { border-left-color: var(--accent); }
.fil-suivi__element--statut, .fil-suivi__element--attribution { border-left-color: var(--marque); }
.fil-suivi__element--moi { border-left-color: var(--accent); background: var(--accent-pale); border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0; }
.fil-suivi__auteur { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: var(--t-s); font-weight: 600; }
.fil-suivi__auteur .icone { width: 16px; height: 16px; color: var(--encre-douce); }
.actions-guidees { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Réorganisation */
.decalage__champs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.decalage__champs .champ { margin: 0; min-width: 11rem; }
.reorg__champs { display: grid; grid-template-columns: minmax(14rem, 2fr) minmax(8rem, 1fr) minmax(12rem, 1.5fr); gap: 0.75rem; align-items: start; }
.reorg__champs .champ { margin: 0; }
@media (max-width: 760px) { .reorg__champs { grid-template-columns: 1fr; } }
.reorg--fige { opacity: 0.75; }
.saisie--modifiee { border-color: var(--attention); box-shadow: 0 0 0 1px var(--attention); }
.apercu-ligne--inchangee { opacity: 0.7; }
.liste-alertes { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.3rem; font-size: var(--t-s); }
.liste-alertes .icone { width: 16px; height: 16px; vertical-align: -3px; }
.vue-jour__action { display: inline-flex; color: var(--encre-douce); margin-left: 0.25rem; vertical-align: middle; }
.vue-jour__action:hover { color: var(--marque); }
.vue-jour__action .icone { width: 16px; height: 16px; }

/* Rapports */
.formulaire-filtres { margin-bottom: 1.25rem; }
.filtres-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; align-items: end; }
.filtres-grille .champ-groupe { grid-column: span 2; }
@media (max-width: 600px) { .filtres-grille .champ-groupe { grid-column: auto; } }
.exports { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tableau .nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau tfoot th, .tableau tfoot td { font-weight: 700; background: #f9fbfa; border-top: 2px solid var(--ligne-forte); }
.tableau--compact th, .tableau--compact td { padding: 0.4rem 0.6rem; }
.liste-simple { margin: 0.5rem 0 0; padding-left: 1.1rem; }
@media (max-width: 760px) { .tableau--empilable td.nombre { justify-content: flex-start; } }
.actions-salarie { margin-top: 1.25rem; }
.tableau--rapport th, .tableau--rapport td { padding: 0.55rem 0.65rem; }
.tableau--rapport td:first-child, .tableau--rapport th:first-child { min-width: 10rem; }
.tableau--rapport .bouton { white-space: nowrap; }
.tableau--rapport th.nombre { white-space: normal; min-width: 4.5rem; }

/* --- Étape 4 : mode réseau faible ------------------------------------------------------- */
.appli--hors-ligne .contenu { margin: 0 auto; max-width: 760px; padding: 1rem 1rem calc(var(--hauteur-nav-bas) + 1.5rem); }
.appli--hors-ligne .barre-haut {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--marque); color: var(--marque-texte); padding: 0.6rem 1rem; position: sticky; top: 0; z-index: 20;
}
.appli--hors-ligne .barre-haut a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.appli--hors-ligne .barre-haut img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,0.12); padding: 2px; }
.appli--hors-ligne .nav-bas {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  position: fixed; inset: auto 0 0 0; height: calc(var(--hauteur-nav-bas) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--ligne); z-index: 20;
}
.appli--hors-ligne .nav-bas a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--encre-douce); text-decoration: none; font-size: var(--t-xs); font-weight: 500; min-height: 48px;
}
.appli--hors-ligne .nav-bas a .icone { width: 26px; height: 26px; }
.appli--hors-ligne .nav-bas a[aria-current="page"] { color: var(--marque); font-weight: 600; }
.appli--hors-ligne .journee-entete { margin: -1rem -1rem 1.25rem; padding: 1.1rem 1rem 3.25rem; border-radius: 0; }
.pastille-reseau { font-size: var(--t-xs); font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 999px; background: rgba(255,255,255,0.16); }
.bandeau-hors-ligne { margin-bottom: 1rem; }
#etat-hors-ligne .alerte { margin-bottom: 1rem; }
#etat-hors-ligne .alerte p { margin: 0 0 0.35rem; }
.etiquette--attente { margin-left: 0.35rem; vertical-align: middle; }
.tache--en-attente { box-shadow: inset 3px 0 0 var(--attention); padding-left: 0.5rem; }
.actions-ligne { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0 0; }
.choix { display: flex; align-items: center; gap: 0.55rem; min-height: 44px; font-weight: 500; cursor: pointer; }
.choix input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.choix-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 1rem; }
.choix-liste--ligne { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.choix-tache { padding: 0.6rem 1rem 0.9rem; margin-bottom: 0.75rem; }
.choix-tache legend { font-size: 1rem; }
.ligne--changement { display: flex; align-items: center; gap: 0.75rem; }
.ligne--changement form { margin-left: auto; }
.cartes-declarations { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.carte-declaration { margin: 0; }
.carte-declaration__entete { display: flex; justify-content: space-between; gap: 0.75rem 1rem; align-items: flex-start; flex-wrap: wrap; }
.carte-declaration__titre { font-weight: 600; margin: 0 0 0.15rem; }
.infos--compactes { margin: 0.5rem 0; font-size: var(--t-s); }
.envois { list-style: none; margin: 0; padding: 0; }
.envoi { padding: 0.85rem 1.25rem; border-top: 1px solid var(--ligne); }
.envoi:first-child { border-top: 0; }
.envoi p { margin: 0 0 0.2rem; }
.envoi__titre { font-weight: 600; }
.envoi__detail { color: var(--encre-douce); font-size: var(--t-s); }
.envoi__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; }
.envoi--conflit, .envoi--refusee { box-shadow: inset 3px 0 0 var(--danger); }
.envoi--en_attente { box-shadow: inset 3px 0 0 var(--attention); }

/* --- Étape 4 : procédures et parcours d'accueil ------------------------------------------ */
.procedure { line-height: 1.6; }
.procedure > :first-child { margin-top: 0; }
.procedure h2, .etape-accueil h3 { font-size: var(--t-m); margin: 1.25rem 0 0.4rem; }
.procedure ul, .procedure ol { padding-left: 1.4rem; margin: 0 0 0.9rem; }
.procedure li { margin: 0.2rem 0; }
.procedure ol li::marker { font-weight: 700; color: var(--marque); }
.procedure__important { background: var(--attention-fond); border-left: 4px solid var(--attention); padding: 0.6rem 0.8rem; border-radius: var(--rayon-petit); font-weight: 600; color: #4d2c00; }
.procedure a { overflow-wrap: anywhere; }
.aide-format { margin: -0.4rem 0 1.1rem; font-size: var(--t-s); }
.aide-format pre { background: #f6f8f9; border: 1px solid var(--ligne); border-radius: var(--rayon-petit); padding: 0.75rem; white-space: pre-wrap; }
.lien-procedure { border-bottom: 1px dashed var(--ligne); margin-bottom: 0.75rem; }
.progression { margin: 0 0 1.25rem; }
.progression__barre { height: 10px; background: var(--ligne); border-radius: 999px; overflow: hidden; }
.progression__rempli { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.progression--0 { width: 0; } .progression--1 { width: 10%; } .progression--2 { width: 20%; } .progression--3 { width: 30%; }
.progression--4 { width: 40%; } .progression--5 { width: 50%; } .progression--6 { width: 60%; } .progression--7 { width: 70%; }
.progression--8 { width: 80%; } .progression--9 { width: 90%; } .progression--10 { width: 100%; }
.etapes-accueil { list-style: none; padding: 0; margin: 0; }
.etape-accueil h2 { display: flex; align-items: center; gap: 0.6rem; font-size: var(--t-m); }
.etape-accueil__numero { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--marque-pale); color: var(--marque); font-weight: 700; }
.etape-accueil--faite .etape-accueil__numero { background: var(--accent); color: var(--accent-texte); }
.etape-accueil--faite { opacity: 0.88; }
.procedures-intervention .ligne__detail { white-space: normal; }
.procedure-hors-ligne { border-top: 1px solid var(--ligne); padding: 0.6rem 0; }
.procedure-hors-ligne summary { font-weight: 600; cursor: pointer; min-height: 32px; }
a.alerte { margin-bottom: 0.75rem; }

/* --- Étape 4 : assistant (IA facultative) ------------------------------------------------- */
.etiquette--info { background: var(--marque-pale); color: var(--marque); }
.reponse-assistant { border-left: 4px solid var(--marque); }
.reponse-assistant__texte { line-height: 1.6; margin: 0.6rem 0 1rem; }
.propositions { list-style: none; margin: 0 0 1rem; padding: 0; }
.proposition { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 0; border-top: 1px solid var(--ligne); }
.proposition:first-child { border-top: 0; }
.proposition__choix input { width: 22px; height: 22px; accent-color: var(--accent); margin-top: 0.15rem; }
.proposition__titre { font-weight: 600; margin: 0 0 0.2rem; }
.proposition p { margin: 0 0 0.25rem; }
.panneau-assistant { border-left: 4px solid var(--marque); }
.panneau-assistant ul { margin: 0.2rem 0 0.6rem; padding-left: 1.2rem; }
.reponse-assistant .etiquette { white-space: normal; }
.panneau .alerte + .alerte, .panneau .alerte + .propositions { margin-top: 0.6rem; }
