/* ═══ 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 cran du sommaire, la carte et la
   pastille. Trois façons de teinter le même état finiraient par diverger.
   ══════════════════════════════════════════════════════════════════════════════ */

.gid { display: flex; flex-direction: column; }

/* ── En-tête ───────────────────────────────────────────────────────────────── */
.gid-tete {
    display: flex; align-items: flex-end; gap: 16px; row-gap: 12px; flex-wrap: wrap;
    margin-bottom: 16px; padding: 22px 16px 14px; background: var(--et-surface);
}
.gid-tete h1 {
    margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.02em; color: var(--et-ink);
}
.gid-tete-ico {
    flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px;
    background: var(--et-blue); color: var(--et-sur-marine); font-size: 20px;
}

/* ── Situation courante ────────────────────────────────────────────────────── */
.gid-situation {
    display: flex; align-items: center; gap: 16px; row-gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 20px;
    background: var(--et-tint); border: 1px solid var(--et-info-bord);
}
.gid-fait { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gid-fait-large { flex: 1 1 320px; }
.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-statut {
    display: inline-flex; align-items: center; padding: 1px 10px;
    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-ok); }
.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-faint); }

.gid-acte {
    box-sizing: border-box; display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 13px; background: var(--et-action); border: 1px solid var(--et-action);
    font-size: 14px; font-weight: 600; color: var(--et-sur-aplat); text-decoration: none;
}
.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; }

/* ── Blocs (Je veux… / sommaire) ───────────────────────────────────────────── */
.gid-bloc {
    margin-bottom: 22px; padding: 14px 16px;
    background: var(--et-surface); border: 1px solid var(--et-hairline);
}
.gid-bloc > h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--et-ink); }
/* « Je veux… » n'a PAS d'encadré : c'est une grille de cartes, le fond ferait boîte
   dans boîte. Seul le sommaire porte le cadre. */
.gid-bloc:not(.gid-sommaire) { padding: 0; background: none; border: 0; }

/* ── Je veux… ──────────────────────────────────────────────────────────────── */
.gid-intentions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 10px;
}
.gid-carte-int {
    padding: 11px 13px; background: var(--et-surface); border: 1px solid var(--et-hairline);
}
.gid-carte-int h3 {
    margin: 0; font-size: var(--et-fs-tete); font-weight: 700; color: var(--et-ink);
    text-wrap: pretty;
}
/* UNE COLONNE, pleine largeur : une rangée qui se coupe selon la longueur du libellé
   fait lire un lien comme la suite du précédent. */
.gid-actions { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 9px; }

/* ── Liens ─────────────────────────────────────────────────────────────────── */
.gid-lien {
    display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
    background: var(--et-surface-2); border: 1px solid var(--et-hairline);
    font-size: 13px; white-space: nowrap; color: var(--et-lien);
    text-decoration: underline; text-underline-offset: 2px;
}
.gid-lien:hover {
    border-color: var(--et-form-blue); 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 {
    color: var(--et-inerte); text-decoration: none; cursor: default;
}
.gid-lien.est-inerte:hover { border-color: var(--et-hairline); background: var(--et-surface-2); }

/* ── Sommaire ──────────────────────────────────────────────────────────────── */
.gid-som-phase { margin-bottom: 10px; }
.gid-som-tete { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.gid-som-titre { font-size: 13px; font-weight: 700; color: var(--et-ink); }
.gid-lettre {
    flex: none; font-family: var(--et-font-mono); font-size: 12px; font-weight: 700;
    letter-spacing: .14em; color: var(--et-table-head-encre);
}
.gid-lettre-plein {
    display: grid; place-items: center; width: 28px; height: 28px; letter-spacing: 0;
    background: var(--et-table-head); color: var(--et-sur-ardoise-plein);
    font-size: 14px;
}
.gid-crans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px; }
.gid-cran {
    display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 7px 10px;
    border: 1px solid var(--et-hairline); font-family: inherit; font-size: 13px;
    text-align: left; cursor: pointer;
}
.gid-cran.est-ouvert { border-color: var(--et-form-blue); }
.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-rang {
    flex: none; padding-top: 1px; font-family: var(--et-font-mono); font-size: 12px; font-weight: 700;
}
.gid-cran-titre { flex: 1; min-width: 0; line-height: 1.35; color: var(--et-ink); text-wrap: pretty; }
.gid-cran > i { flex: none; margin-top: 1px; font-size: 13px; }

/* ── Les quatre tons ──────────────────────────────────────────────────────── */
.gid-cran.est-fait       { background: var(--et-succes-bg); }
.gid-cran.est-geste,
.gid-cran.est-attention  { background: var(--et-avertissement-bg); }
.gid-cran.est-avenir     { background: var(--et-surface-3); }
.gid-cran.est-fait      .gid-cran-rang, .gid-cran.est-fait > i      { color: var(--et-ok); }
.gid-cran.est-geste     .gid-cran-rang, .gid-cran.est-geste > i,
.gid-cran.est-attention .gid-cran-rang, .gid-cran.est-attention > i { color: var(--et-avertissement-ink); }
.gid-cran.est-avenir    .gid-cran-rang, .gid-cran.est-avenir > i    { color: var(--et-faint); }

.gid-pastille.est-fait       { background: var(--et-succes-bg);        color: var(--et-ok); }
.gid-pastille.est-geste,
.gid-pastille.est-attention  { background: var(--et-avertissement-bg); color: var(--et-avertissement-ink); }
.gid-pastille.est-avenir     { background: var(--et-surface-3);        color: var(--et-faint); }

/* ── Phases et cartes d'étape ─────────────────────────────────────────────── */
.gid-phase { margin-bottom: 26px; }
.gid-phase-tete { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.gid-phase-tete h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--et-ink); }
.gid-etapes { display: flex; flex-direction: column; gap: 8px; }

.gid-carte { background: var(--et-surface); border: 1px solid var(--et-hairline); }
.gid-carte.est-ouverte { border-color: var(--et-form-blue-l); }
.gid-carte-tete {
    display: flex; align-items: center; gap: 10px; row-gap: 6px; flex-wrap: wrap;
    width: 100%; padding: 10px 13px; background: transparent; border: 0;
    font-family: inherit; text-align: left; cursor: pointer;
}
.gid-carte-tete:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: -2px; }
.gid-rang {
    flex: none; width: 30px; height: 30px; display: grid; place-items: center;
    background: var(--et-surface); border: 1px solid var(--et-filet-fort);
    font-family: var(--et-font-mono); font-size: 12px; font-weight: 700; color: var(--et-form-blue-d);
}
.gid-carte.est-ouverte .gid-rang { border-color: var(--et-form-blue); }
.gid-carte-ico { flex: none; font-size: 16px; color: var(--et-form-blue-encre); }
.gid-carte-titre {
    flex: 1 1 220px; min-width: 0; font-size: var(--et-fs-tete); font-weight: 700;
    color: var(--et-ink); text-wrap: pretty;
}
.gid-pastille {
    flex: none; display: inline-flex; align-items: center; padding: 1px 10px;
    border-radius: var(--et-r-pill); font-size: 12px; font-weight: 600;
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
.gid-carte-etat { flex: none; font-size: 12px; color: var(--et-faint); }
.gid-chevron { flex: none; font-size: 13px; color: var(--et-muted); }

.gid-carte-corps { padding: 0 13px 12px; border-top: 1px solid var(--et-rang); }
.gid-liens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.gid-avert {
    display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 8px 10px;
    background: var(--et-avertissement-bg); border-left: 3px solid var(--et-avertissement);
    font-size: 13px; line-height: 1.5; color: var(--et-avertissement-ink); text-wrap: pretty;
}
.gid-avert > i { flex: none; margin-top: 2px; }

.gid-reprise {
    display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px;
    border: 1px dashed var(--et-form-blue-l);
    font-size: 13px; font-weight: 600; color: var(--et-form-blue-d);
}

/* ── Étroit ───────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* Le bandeau de situation passe en colonne : l'acte sous les faits, pleine
       largeur — au-dessous de 640 px il se tassait à 34 px de large. */
    .gid-situation { flex-direction: column; align-items: stretch; }
    .gid-acte { justify-content: center; }
    .gid-crans { grid-template-columns: 1fr; }
}
