/* ═══ GUIDE DU PROCESSUS ═══════════════════════════════════════════════════════
   Toutes les valeurs viennent des variables du thème EasyTime (--et-*). Aucune
   couleur en dur : le guide se lit en clair comme en sombre sans seconde feuille.

   Règle tenue partout ici : UN ÉTAT = UNE CLASSE (.est-fait / .est-geste /
   .est-attention / .est-avenir), portée par le segment d'avancement, la marque de
   légende, le cran du stepper, la pastille et le badge de rang. Trois façons de
   teinter le même état finiraient par diverger — la section « Les quatre tons »
   est le seul endroit où un état reçoit une couleur.

   Refonte 2026-09-27 : stepper par phase + panneau de détail unique + « Je veux… »
   en colonne latérale (maquette canvas « Guide des processus — EasyTime »).

   2026-11-29 : la feuille habille le GABARIT GuideProcessusVue, que partagent le guide
   d'EasyTime (/app/guide) et celui d'EasyDesk (/app/support/guide) — un seul rendu, deux
   descripteurs. Un lien inerte passe de --et-inerte à --et-muted : il se lit en AA.
   ══════════════════════════════════════════════════════════════════════════════ */

.gid { display: flex; flex-direction: column; gap: 20px; }

/* ── En-tête : titre + avancement ─────────────────────────────────────────── */
.gid-tete {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; row-gap: 12px; flex-wrap: wrap;
}
/* Le fil d'Ariane passe sur sa propre ligne, au-dessus du titre et de l'avancement. */
.gid-tete > .ecran-fil { flex-basis: 100%; }
.gid-tete h1 {
    margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--et-ink);
}
.gid-avancement { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 260px; }
.gid-avancement-val { font-size: 13px; color: var(--et-ink); }
.gid-avancement-val strong { font-family: var(--et-font-mono); font-size: 14px; }
.gid-segments { display: flex; gap: 3px; width: 100%; }
.gid-segment { flex: 1 1 0; height: 6px; }

/* ── Situation courante ────────────────────────────────────────────────────── */
.gid-situation {
    display: grid; grid-template-columns: minmax(200px, auto) minmax(0, 1fr) auto;
    align-items: center; gap: 24px; padding: 18px 24px;
    background: var(--et-surface); border: 1px solid var(--et-hairline);
}
.gid-fait { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gid-fait-periode { padding-right: 24px; border-right: 1px solid var(--et-hairline); }
.gid-fait-cle {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--et-muted);
}
.gid-fait-val {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 14px; color: var(--et-ink); text-wrap: pretty;
}
.gid-fait-fort { font-size: 18px; font-weight: 600; }
.gid-geste { font-size: 18px; font-weight: 600; line-height: 1.35; flex-wrap: nowrap; align-items: baseline; }
.gid-fait-sous { font-size: 12px; color: var(--et-muted); text-wrap: pretty; }

.gid-statut {
    display: inline-flex; align-items: center; padding: var(--et-badge-py) var(--et-badge-px);
    border-radius: var(--et-r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.gid-statut.est-ouverte   { background: var(--et-info-bg);   color: var(--et-form-blue-encre); }
.gid-statut.est-generee   { background: var(--et-succes-bg);  color: var(--et-succes-ink); }
.gid-statut.est-cloturee  { background: var(--et-surface-3);  color: var(--et-muted); }
.gid-statut.est-archivee  { background: var(--et-surface-3);  color: var(--et-muted); }

/* L'UNIQUE bouton d'engagement de l'écran : il mène au geste suivant. */
.gid-acte {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; background: var(--et-action); border: 1px solid var(--et-action);
    font-size: 14px; font-weight: 600; color: var(--et-sur-aplat); text-decoration: none; white-space: nowrap;
}
.gid-acte:hover { background: var(--et-action-d); border-color: var(--et-action-d); color: var(--et-sur-aplat); }
.gid-acte:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: 2px; }

/* ── Corps : détail de l'étape + « Je veux… » ──────────────────────────────
   Le stepper est AU-DESSUS, pleine largeur : à côté d'une colonne de 320 px, les
   sept crans de la phase B tombaient sous 90 px et « transmettre » débordait. */
.gid-corps {
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start;
}
.gid-corps > * { min-width: 0; }

.gid-bloc { background: var(--et-surface); border: 1px solid var(--et-hairline); }
.gid-bloc-tete {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 20px; border-bottom: 1px solid var(--et-hairline);
}
.gid-bloc-tete h2 { margin: 0; flex: 1 1 auto; font-size: var(--et-fs-tete); font-weight: 700; color: var(--et-ink); }

.gid-legende { display: flex; gap: var(--et-legende-gap); flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.gid-legende li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--et-ink); }
.gid-legende-mark { width: 10px; height: 10px; }

/* ── Stepper : une rangée par phase ───────────────────────────────────────── */
.gid-phase {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 20px 16px; border-bottom: 1px solid var(--et-rang);
}
.gid-phase:last-child { border-bottom: 0; }
.gid-phase-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gid-phase-tete h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--et-ink); }
.gid-phase-bilan { font-size: 12px; color: var(--et-muted); }
.gid-lettre {
    flex: none; display: grid; place-items: center; width: 24px; height: 24px;
    background: var(--et-table-head); color: var(--et-sur-ardoise-plein);
    font-family: var(--et-font-mono); font-size: 12px; font-weight: 700;
}

/* Autant de colonnes que d'étapes, sans que la page ait à les compter. */
.gid-crans { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.gid-cran {
    display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 108px;
    padding: 0 10px 10px; background: var(--et-surface); border: 1px solid var(--et-hairline);
    border-top-width: 0; font-family: inherit; text-align: left; color: var(--et-ink); cursor: pointer;
}
/* La barre d'état en tête du cran : une marque, pas une encre. */
.gid-cran::before { content: ""; display: block; height: 4px; margin: 0 -11px; }
.gid-cran:hover { border-color: var(--et-form-blue); }
.gid-cran:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: 2px; }
.gid-cran.est-choisi {
    background: var(--et-tint); border-color: var(--et-form-blue);
    box-shadow: inset 0 -2px 0 var(--et-form-blue);
}
.gid-cran-ligne { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gid-cran-rang { font-family: var(--et-font-mono); font-size: 12px; font-weight: 600; color: var(--et-muted); }
.gid-cran-ico { font-size: 14px; }
.gid-cran-titre {
    flex: 1 1 auto; font-size: 13px; font-weight: 600; line-height: 1.3; text-wrap: pretty;
}

.gid-pastille {
    flex: none; align-self: flex-start; display: inline-flex; align-items: center; padding: var(--et-badge-py) var(--et-badge-px);
    border-radius: var(--et-r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.gid-rang-badge {
    flex: none; padding: 2px 8px; border: 1px solid;
    font-family: var(--et-font-mono); font-size: 13px; font-weight: 600;
}

/* ── Les quatre tons ──────────────────────────────────────────────────────── */
/* Marques (segment, légende, barre du cran, bord du badge) : la couleur d'état,
   ambre excepté — il prend son rang « mark », seul à passer 3:1. */
.gid-segment.est-fait,      .gid-legende-mark.est-fait,      .gid-cran.est-fait::before      { background: var(--et-succes); }
.gid-segment.est-geste,     .gid-legende-mark.est-geste,     .gid-cran.est-geste::before     { background: var(--et-form-blue); }
.gid-segment.est-attention, .gid-legende-mark.est-attention, .gid-cran.est-attention::before { background: var(--et-avertissement-mark); }
.gid-segment.est-avenir,    .gid-legende-mark.est-avenir,    .gid-cran.est-avenir::before    { background: var(--et-filet-fort); }

/* Encres (pastille, badge, icône) : jamais la couleur d'état, toujours son rang -ink. */
.gid-pastille.est-fait,      .gid-rang-badge.est-fait      { background: var(--et-succes-bg);        color: var(--et-succes-ink); }
.gid-pastille.est-geste,     .gid-rang-badge.est-geste     { background: var(--et-info-bg);          color: var(--et-form-blue-d); }
.gid-pastille.est-attention, .gid-rang-badge.est-attention { background: var(--et-avertissement-bg); color: var(--et-avertissement-ink); }
.gid-pastille.est-avenir,    .gid-rang-badge.est-avenir    { background: var(--et-surface-3);        color: var(--et-muted); }
.gid-rang-badge.est-fait      { border-color: var(--et-succes-bord); }
.gid-rang-badge.est-geste     { border-color: var(--et-info-bord); }
.gid-rang-badge.est-attention { border-color: var(--et-avertissement-bord); }
.gid-rang-badge.est-avenir    { border-color: var(--et-filet-fort); }
.gid-cran.est-fait      .gid-cran-ico { color: var(--et-succes-ink); }
.gid-cran.est-geste     .gid-cran-ico { color: var(--et-form-blue-d); }
.gid-cran.est-attention .gid-cran-ico { color: var(--et-avertissement-ink); }
.gid-cran.est-avenir    .gid-cran-ico { color: var(--et-muted); }

/* ── Panneau de détail ────────────────────────────────────────────────────── */
.gid-detail-tete {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px 20px; border-bottom: 1px solid var(--et-hairline);
}
.gid-detail-tete h2 { margin: 0; flex: 1 1 200px; font-size: 18px; font-weight: 700; color: var(--et-ink); }
.gid-detail-ico { font-size: 18px; color: var(--et-form-blue-encre); }
.gid-compteur {
    font-family: var(--et-font-mono); font-size: 13px; font-weight: 600; color: var(--et-ink);
    font-variant-numeric: tabular-nums;
}
.gid-detail-corps {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 16px 20px 20px;
}
.gid-detail-corps.est-seul { grid-template-columns: minmax(0, 1fr); }
.gid-sur-titre {
    display: block; padding-bottom: 6px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--et-muted);
}
.gid-liens { display: flex; flex-direction: column; }

/* ── Liens : une rangée de 44 px, un filet au-dessus ──────────────────────── */
.gid-lien {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px;
    border-top: 1px solid var(--et-rang);
    font-size: 14px; font-weight: 600; color: var(--et-lien); text-decoration: none;
}
.gid-lien > span:first-child { flex: 1 1 auto; min-width: 0; }
.gid-lien:hover { background: var(--et-tint); color: var(--et-lien-survol); }
.gid-lien:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: -2px; }
.gid-lien.est-inerte { font-weight: 400; color: var(--et-muted); cursor: default; }
.gid-lien.est-inerte:hover { background: none; color: var(--et-muted); }
.gid-bientot {
    flex: none; padding: 1px 8px; border-radius: var(--et-r-pill);
    background: var(--et-surface-3); font-size: 12px; color: var(--et-muted);
}

.gid-mises-en-garde { display: flex; flex-direction: column; gap: 12px; }
.gid-avert {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
    background: var(--et-avertissement-bg); border: 1px solid var(--et-avertissement-bord);
}
.gid-avert > i { flex: none; margin-top: 1px; font-size: 18px; color: var(--et-avertissement-ink); }
.gid-avert .gid-sur-titre { padding-bottom: 4px; color: var(--et-avertissement-ink); }
.gid-avert p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--et-ink); text-wrap: pretty; }

.gid-reprise {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px;
    background: var(--et-info-bg); border: 1px solid var(--et-info-bord);
    font-size: 14px; font-weight: 600; color: var(--et-form-blue-d);
}

/* ── Je veux… ──────────────────────────────────────────────────────────────── */
.gid-intention { border-bottom: 1px solid var(--et-rang); }
.gid-intention:last-child { border-bottom: 0; }
.gid-intention summary {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 20px;
    list-style: none; cursor: pointer;
    font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--et-ink);
}
.gid-intention summary::-webkit-details-marker { display: none; }
.gid-intention summary > span { flex: 1 1 auto; }
.gid-intention summary:hover { background: var(--et-tint); }
.gid-intention summary:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: -2px; }
.gid-chevron { flex: none; font-size: 14px; color: var(--et-muted); transition: transform .15s; }
.gid-intention[open] .gid-chevron { transform: rotate(180deg); }
.gid-intention-liens {
    margin: 0; padding: 0 20px 12px 20px; list-style: none; counter-reset: gid-int;
}
.gid-intention-liens li { counter-increment: gid-int; }
.gid-intention-liens .gid-lien { border-top: 0; font-size: 13px; }
/* Le NUMÉRO dit l'ordre du parcours : c'est la seule chose que la liste ajoute. */
.gid-intention-liens .gid-lien::before {
    content: counter(gid-int); flex: none; width: 14px;
    font-family: var(--et-font-mono); font-size: 12px; font-weight: 400; color: var(--et-muted);
}

/* ── Paliers ──────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    /* « Je veux… » passe sous le détail : à côté, les deux colonnes du détail
       (liens, mises en garde) n'auraient plus la largeur d'une phrase. */
    .gid-corps { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1024px) {
    /* Le stepper devient une liste : une étape par ligne, barre d'état à gauche. */
    .gid-crans { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 0; }
    .gid-cran {
        flex-direction: row; align-items: center; gap: 10px; min-height: 56px;
        padding: 8px 12px 8px 0; border-width: 0 0 1px 0; border-color: var(--et-rang);
    }
    .gid-cran::before { align-self: stretch; width: 4px; height: auto; margin: -8px 4px -8px 0; }
    .gid-cran.est-choisi { box-shadow: inset -2px 0 0 var(--et-form-blue); }
    .gid-cran-ligne { flex: none; width: 40px; }
    .gid-cran-ico { display: none; }
    .gid-pastille { align-self: center; }
    .gid-phase { padding: 12px 0 0; gap: 8px; }
    .gid-phase-tete { padding: 0 16px; }

    .gid-situation { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .gid-acte { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .gid-situation { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
    .gid-fait-periode { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--et-hairline); }
    .gid-detail-corps { grid-template-columns: minmax(0, 1fr); }
    .gid-avancement { width: 100%; align-items: stretch; }
}
