/* ==========================================================================
   OPTISUIVI : système de design
   Une seule feuille de style pour tous les écrans. Les valeurs viennent des
   maquettes Ind. AX ; les règles d'accessibilité viennent du CDC (ENF-01,
   § 4.4). Toute nouvelle couleur ou taille passe par les variables ci-dessous.
   ========================================================================== */

:root {
  /* Neutres */
  --c-texte: #111827;
  --c-texte-2: #374151;
  --c-texte-doux: #6B7280;
  --c-bordure: #D1D5DB;
  --c-bordure-douce: #E5E7EB;
  --c-fond: #F6F7F9;
  --c-fond-carte: #FFFFFF;
  --c-fond-doux: #F9FAFB;

  /* En-tête */
  --c-entete: #111827;
  --c-entete-actif: #374151;
  --c-entete-texte: #D1D5DB;

  /* Actions et liens */
  --c-primaire: #1D4ED8;
  --c-primaire-fonce: #1E3A8A;
  --c-primaire-clair: #EFF6FF;
  --c-focus: #2563EB;

  /* États de message */
  --c-succes: #166534;
  --c-succes-fond: #DCFCE7;
  --c-alerte: #9A3412;
  --c-alerte-fond: #FFEDD5;
  --c-danger: #B91C1C;
  --c-danger-fond: #FEF2F2;
  --c-info: #1E3A8A;
  --c-info-fond: #EFF6FF;

  /* Types d'intervention (§ 4.4, réglables plus tard dans les paramètres) */
  --t-periodique: #2F5D8A;
  --t-annuelle: #3F7D56;
  --t-travaux: #9C5A25;
  --t-panne: #A23B3B;
  --t-distant: #6B5B95;
  --t-bureau: #6B7280;

  /* Typographie : quatre tailles seulement */
  --police: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-petit: 0.75rem;   /* 12 px : mentions, légendes */
  --fs-base: 0.8125rem;  /* 13 px : texte courant des écrans PC */
  --fs-champ: 1rem;      /* 16 px : champs de saisie (ENF-01) */
  --fs-titre: 1.375rem;  /* 22 px : titre de page */
  --fs-chiffre: 1.25rem; /* 20 px : chiffres clés */

  /* Espacements, arrondis, ombres */
  --e-1: 4px;
  --e-2: 8px;
  --e-3: 12px;
  --e-4: 16px;
  --e-5: 24px;
  --e-6: 32px;
  --r-petit: 6px;
  --r-moyen: 8px;
  --r-grand: 10px;
  --r-pilule: 999px;
  --ombre: 0 1px 2px rgba(17, 24, 39, 0.06);

  /* Zones tactiles (ENF-01) */
  --cible: 44px;
}

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

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

body {
  margin: 0;
  font-family: var(--police);
  font-size: var(--fs-base);
  line-height: 1.45;
  color: var(--c-texte);
  background: var(--c-fond);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-primaire); }
a:hover { color: var(--c-primaire-fonce); }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: var(--fs-titre); font-weight: 700; }
h2 { font-size: 1rem; font-weight: 700; }
h3 { font-size: var(--fs-base); font-weight: 600; }

.texte-doux { color: var(--c-texte-doux); }
.texte-petit { font-size: var(--fs-petit); }
.mono { font-family: var(--police-mono); }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Mise en page
   -------------------------------------------------------------------------- */
.entete {
  background: var(--c-entete);
  color: var(--c-entete-texte);
  display: flex;
  align-items: center;
  gap: var(--e-5);
  padding: 0 var(--e-5);
  min-height: 56px;
  flex-wrap: wrap;
}
.entete__logo { display: flex; align-items: center; min-height: var(--cible); }
.entete__logo img { height: 28px; width: auto; display: block; }
.entete__menu { display: flex; gap: var(--e-1); flex-wrap: wrap; flex: 1; }
.entete__menu a {
  color: var(--c-entete-texte);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0 var(--e-3);
  min-height: var(--cible);
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-petit);
}
.entete__menu a:hover { color: #FFFFFF; }
.entete__menu a[aria-current="page"] {
  background: var(--c-entete-actif);
  color: #FFFFFF;
  font-weight: 600;
}
.entete__compte { font-size: var(--fs-base); display: flex; align-items: center; gap: var(--e-2); }
.entete__compte a { color: #FFFFFF; min-height: var(--cible); display: inline-flex; align-items: center; }

.contenu {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--e-5);
  flex: 1;
}

.pied {
  padding: var(--e-4) var(--e-5);
  color: var(--c-texte-doux);
  font-size: var(--fs-petit);
}

.page-titre {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--e-4);
  flex-wrap: wrap;
  margin-bottom: var(--e-4);
}

.fil-ariane { font-size: var(--fs-base); color: var(--c-texte-2); margin-bottom: var(--e-1); }

/* Grille : colonne principale + colonne latérale, empilées sous 1024 px */
.grille { display: grid; gap: var(--e-4); grid-template-columns: minmax(0, 1fr); }
/* Pile verticale de cartes ; minmax(0, 1fr) empêche un tableau large d'élargir la page */
.pile { display: grid; gap: var(--e-4); grid-template-columns: minmax(0, 1fr); align-content: start; }
@media (min-width: 1024px) {
  .grille--laterale { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
}
.tuiles {
  display: grid;
  gap: var(--e-3);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* --------------------------------------------------------------------------
   Cartes et chiffres clés
   -------------------------------------------------------------------------- */
.carte {
  background: var(--c-fond-carte);
  border: 1px solid var(--c-bordure-douce);
  border-radius: var(--r-grand);
  padding: var(--e-4);
  box-shadow: var(--ombre);
}
.carte__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
  flex-wrap: wrap;
  margin-bottom: var(--e-3);
}

.chiffre {
  background: var(--c-fond-carte);
  border: 1px solid var(--c-bordure-douce);
  border-radius: var(--r-moyen);
  padding: var(--e-3);
}
.chiffre__libelle { font-size: var(--fs-petit); color: var(--c-texte-2); }
.chiffre__valeur { font-size: var(--fs-chiffre); font-weight: 700; margin: 2px 0; }
.chiffre__detail { font-size: var(--fs-petit); color: var(--c-texte-doux); }

/* --------------------------------------------------------------------------
   Boutons (44 px de haut au minimum, ENF-01)
   -------------------------------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: var(--cible);
  padding: 0 var(--e-4);
  border: 1px solid var(--c-bordure);
  border-radius: var(--r-petit);
  background: var(--c-fond-carte);
  color: var(--c-texte);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.bouton:hover { background: var(--c-fond-doux); color: var(--c-texte); }
.bouton--primaire { background: var(--c-primaire); border-color: var(--c-primaire); color: #FFFFFF; }
.bouton--primaire:hover { background: var(--c-primaire-fonce); border-color: var(--c-primaire-fonce); color: #FFFFFF; }
.bouton--valider { background: var(--c-succes); border-color: var(--c-succes); color: #FFFFFF; }
.bouton--valider:hover { background: #14532D; color: #FFFFFF; }
.bouton--danger { color: var(--c-danger); border-color: #FCA5A5; }
.bouton--danger:hover { background: var(--c-danger-fond); color: var(--c-danger); }
.bouton:disabled, .bouton[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.boutons { display: flex; gap: var(--e-2); flex-wrap: wrap; align-items: center; }

/* Sélecteur segmenté (Semaine / Mois / Année) */
.segments {
  display: inline-flex;
  border: 1px solid var(--c-bordure);
  border-radius: var(--r-petit);
  overflow: hidden;
  background: var(--c-fond-carte);
}
.segments a, .segments button {
  min-height: var(--cible);
  padding: 0 var(--e-4);
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  font: inherit;
  color: var(--c-texte);
  text-decoration: none;
  cursor: pointer;
}
.segments [aria-current="true"], .segments [aria-pressed="true"] {
  background: var(--c-texte);
  color: #FFFFFF;
  font-weight: 600;
}

/* Filtres en pilules */
.filtres { display: flex; gap: var(--e-2); flex-wrap: wrap; }
.filtre {
  min-height: var(--cible);
  padding: 0 var(--e-3);
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-bordure);
  border-radius: var(--r-pilule);
  background: var(--c-fond-carte);
  color: var(--c-texte);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.filtre[aria-pressed="true"] { background: var(--c-texte); border-color: var(--c-texte); color: #FFFFFF; }

/* --------------------------------------------------------------------------
   Formulaires (texte des champs à 16 px, ENF-01)
   -------------------------------------------------------------------------- */
.champ { display: flex; flex-direction: column; gap: var(--e-1); margin-bottom: var(--e-3); }
.champ label, .champ__libelle { font-weight: 600; font-size: var(--fs-base); }
.champ__aide { font-size: var(--fs-petit); color: var(--c-texte-doux); }
.champ__erreur { font-size: var(--fs-petit); color: var(--c-danger); font-weight: 600; }

input[type="text"], input[type="email"], input[type="search"], input[type="number"],
input[type="date"], input[type="time"], input[type="tel"], input[type="password"],
select, textarea {
  font: inherit;
  font-size: var(--fs-champ);
  color: var(--c-texte);
  min-height: var(--cible);
  padding: var(--e-2) var(--e-3);
  border: 1px solid var(--c-bordure);
  border-radius: var(--r-petit);
  background: var(--c-fond-carte);
  width: 100%;
}
textarea { min-height: 88px; resize: vertical; }
.champ--erreur input, .champ--erreur select, .champ--erreur textarea { border-color: var(--c-danger); }

/* Case à cocher : la zone cliquable couvre le libellé, 44 px de haut */
.case {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: var(--cible);
  cursor: pointer;
  font-size: var(--fs-base);
}
.case input { width: 20px; height: 20px; margin: 0; accent-color: var(--c-primaire); }

/* --------------------------------------------------------------------------
   Tableaux
   -------------------------------------------------------------------------- */
.tableau-conteneur { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.tableau th {
  text-align: left;
  font-weight: 500;
  color: var(--c-texte-doux);
  padding: var(--e-2);
  border-bottom: 1px solid var(--c-bordure-douce);
  white-space: nowrap;
}
.tableau td { padding: var(--e-2); border-bottom: 1px solid var(--c-bordure-douce); vertical-align: middle; }
.tableau tbody tr:hover { background: var(--c-fond-doux); }

/* --------------------------------------------------------------------------
   Étiquettes de statut (le texte porte toujours le sens, pas la seule couleur)
   -------------------------------------------------------------------------- */
.etiquette {
  display: inline-flex;
  align-items: center;
  gap: var(--e-1);
  padding: 2px var(--e-2);
  border-radius: var(--r-pilule);
  font-size: var(--fs-petit);
  font-weight: 600;
  background: var(--c-bordure-douce);
  color: var(--c-texte-2);
  white-space: nowrap;
}
.etiquette--succes { background: var(--c-succes-fond); color: var(--c-succes); }
.etiquette--alerte { background: var(--c-alerte-fond); color: var(--c-alerte); }
.etiquette--danger { background: var(--c-danger-fond); color: var(--c-danger); }
.etiquette--info { background: var(--c-info-fond); color: var(--c-info); }

/* --------------------------------------------------------------------------
   Messages et bandeaux
   -------------------------------------------------------------------------- */
.message {
  display: flex;
  gap: var(--e-3);
  align-items: flex-start;
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-moyen);
  border: 1px solid;
  margin-bottom: var(--e-4);
}
.message__icone { flex: none; font-weight: 700; }
.message--info { background: var(--c-info-fond); border-color: #BFDBFE; color: var(--c-info); }
.message--succes { background: var(--c-succes-fond); border-color: #86EFAC; color: var(--c-succes); }
.message--alerte { background: #FFFBEB; border-color: #FCD34D; color: var(--c-alerte); }
.message--danger { background: var(--c-danger-fond); border: 2px solid var(--c-danger); color: var(--c-danger); }

/* --------------------------------------------------------------------------
   Types d'intervention : lettre de type et pastille du planning (§ 4.4)
   La couleur porte le TYPE ; l'aspect (contour, fond, icône) porte l'ÉTAT.
   -------------------------------------------------------------------------- */
.type-periodique { --t: var(--t-periodique); }
.type-annuelle { --t: var(--t-annuelle); }
.type-travaux { --t: var(--t-travaux); }
.type-panne { --t: var(--t-panne); }
.type-distant { --t: var(--t-distant); }
.type-bureau { --t: var(--t-bureau); }

.lettre-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--t, var(--t-bureau));
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.pastille {
  position: relative;
  display: block;
  padding: var(--e-2);
  padding-right: 26px;
  border-radius: var(--r-petit);
  font-size: var(--fs-petit);
  color: var(--c-texte-2);
  /* Publié (état par défaut) : fond clair, contour plein */
  background: color-mix(in srgb, var(--t, var(--t-bureau)) 10%, #FFFFFF);
  border: 1px solid color-mix(in srgb, var(--t, var(--t-bureau)) 55%, #FFFFFF);
}
.pastille__titre { display: flex; align-items: center; gap: 6px; font-size: var(--fs-base); font-weight: 600; color: var(--c-texte); }
.pastille__icone { position: absolute; top: var(--e-2); right: var(--e-2); font-size: 13px; line-height: 1; }

/* Brouillon : contour pointillé, fond blanc */
.pastille--brouillon { background: #FFFFFF; border: 1px dashed var(--t); }
/* Réalisé : fond plein, coche */
.pastille--realise { background: color-mix(in srgb, var(--t) 28%, #FFFFFF); border: 1px solid var(--t); }
/* Heures saisies, formulaire attendu : fond plein, sablier orange */
.pastille--attendu { background: color-mix(in srgb, var(--t) 28%, #FFFFFF); border: 1px solid var(--t); }
.pastille--attendu .pastille__icone { color: #C2410C; }
/* En retard : bordure rouge épaisse, icône d'alerte */
.pastille--retard { border: 3px solid var(--c-danger); padding: calc(var(--e-2) - 2px); padding-right: 24px; }
.pastille--retard .pastille__icone { color: var(--c-danger); }

/* Absence, congé : hachuré gris */
.pastille--absence {
  border: 1px solid var(--c-bordure);
  background: repeating-linear-gradient(135deg, #FFFFFF 0 6px, #EEF0F3 6px 12px);
}
.pastille--absence-demandee { border: 2px dashed #C2410C; }

/* Légende du planning */
.legende { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-4); font-size: var(--fs-base); color: var(--c-texte-2); }
.legende__element { display: inline-flex; align-items: center; gap: 6px; }

/* --------------------------------------------------------------------------
   Petits écrans (360 px et plus, ENF-01)
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .entete { padding: var(--e-2) var(--e-4); gap: var(--e-2); }
  .entete__menu { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .entete__compte { margin-left: auto; }
  .contenu { padding: var(--e-4); }
  .page-titre .bouton { width: 100%; }
}

/* --------------------------------------------------------------------------
   C1 : page de connexion (maquette Login, Ind. AX)
   -------------------------------------------------------------------------- */
.connexion {
  max-width: 420px;
  margin: 0 auto;
  padding-block: var(--e-5, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e-4, 16px);
}
.connexion__logo { width: min(290px, 80%); height: auto; }
.connexion__carte { width: 100%; border-top: 4px solid var(--c-primaire); }
.connexion__carte h1 { font-size: var(--fs-titre); margin: 0 0 var(--e-3); }
.connexion__carte .message { margin-bottom: var(--e-3); }
.connexion__microsoft { width: 20px; height: 20px; flex: none; background: #FFFFFF; padding: 2px; border-radius: 2px; }
.connexion__dev { margin-top: var(--e-4, 16px); padding-top: var(--e-3); border-top: 1px dashed var(--c-bordure); display: grid; gap: var(--e-2); }
.connexion__dev h2 { font-size: var(--fs-base); margin: 0; }
.connexion__dev p { margin: 0; }
.connexion__pied { text-align: center; font-size: var(--fs-petit); }
.bouton--large { width: 100%; justify-content: center; gap: var(--e-2); }
.entete__compte form { margin: 0; }
.entete__deconnexion {
  background: none; border: 0; color: #FFFFFF; font: inherit; cursor: pointer;
  min-height: var(--cible); padding: 0 var(--e-1);
}
.entete__deconnexion:hover { text-decoration: underline; }

/* Bandeau du compte bris de glace (décision JM du 02/12/2026) : toujours visible */
.bandeau-bris-de-glace {
  background: var(--c-alerte-fond);
  color: var(--c-alerte);
  border-bottom: 2px solid var(--c-alerte);
  padding: var(--e-2) var(--e-5);
  font-size: var(--fs-base);
  display: flex; flex-wrap: wrap; gap: var(--e-2); align-items: center;
}
.bandeau-bris-de-glace a { color: var(--c-alerte); font-weight: 600; min-height: var(--cible); display: inline-flex; align-items: center; }
.bandeau-usurpation {
  background: var(--c-danger-fond);
  color: var(--c-danger);
  border-bottom: 2px solid var(--c-danger);
  padding: var(--e-2) var(--e-5);
  font-size: var(--fs-base);
  display: flex; flex-wrap: wrap; gap: var(--e-3); align-items: center; justify-content: space-between;
}
.bandeau-usurpation form { margin: 0; }

/* --------------------------------------------------------------------------
   Référentiel : clients (S3, T6) et sites (S2, T5), maquettes Ind. AX
   -------------------------------------------------------------------------- */
.texte-danger { color: var(--c-danger); font-weight: 600; }
.texte-normal { font-weight: 400; font-size: var(--fs-base); }
.texte-2 { color: var(--c-texte-2); }
.texte-multiligne { white-space: pre-line; }
.messages { display: grid; gap: var(--e-2); margin-bottom: var(--e-4); }
.messages .message { margin: 0; }
.entete__a-venir {
  color: #6B7280; font-size: 0.875rem; padding: 0 var(--e-3);
  min-height: var(--cible); display: inline-flex; align-items: center; cursor: default;
}

/* Liste à gauche, fiche à droite ; empilées sous 1024 px */
@media (min-width: 1024px) {
  .grille--liste { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .grille--deux { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.grille--deux { display: grid; gap: var(--e-4); }
.liste-laterale__elements { list-style: none; margin: 0 0 var(--e-3); padding: 0; display: grid; gap: 2px; }
.liste-laterale__elements a {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--e-2) var(--e-3); min-height: var(--cible);
  border: 1px solid transparent; border-radius: var(--r-moyen);
  color: var(--c-texte); text-decoration: none;
}
.liste-laterale__elements a:hover { background: var(--c-fond-doux); }
.liste-laterale__elements a[aria-current="page"] { background: var(--c-primaire-clair); border-color: var(--c-primaire); }
.liste-laterale__elements span { font-size: var(--fs-petit); }

/* Formulaires en grille : 4 colonnes au large, 1 au téléphone */
.formulaire-grille { display: grid; gap: 0 var(--e-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: var(--e-3); }
.formulaire-grille--deux { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.formulaire-grille textarea, .formulaire-grille fieldset { grid-column: 1 / -1; }
.formulaire-grille .champ:has(textarea), .formulaire-grille .champ:has(.case) { grid-column: 1 / -1; }
.formulaire-etroit { max-width: 640px; margin-bottom: var(--e-4); }
fieldset.champ { border: 0; padding: 0; margin: 0 0 var(--e-3); }
.champ--recherche { max-width: 480px; }

/* Dépliant (ajout d'un contact, rattachement, renouvellement) : sans JavaScript */
.depliant { margin-top: var(--e-3); }
.depliant > summary { list-style: none; width: fit-content; }
.depliant > summary::-webkit-details-marker { display: none; }
.depliant[open] > summary { margin-bottom: var(--e-3); }
.depliant > form { border-top: 1px solid var(--c-bordure-douce); padding-top: var(--e-3); }

.liste-sites { list-style: none; margin: 0 0 var(--e-3); padding: 0; display: grid; gap: var(--e-2); }
.liste-sites li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); flex-wrap: wrap;
  border: 1px solid var(--c-bordure-douce); border-radius: var(--r-moyen); padding: var(--e-2) var(--e-3); min-height: var(--cible);
}
.liste-sites a { color: var(--c-texte); text-decoration: none; }

/* T6 : clients côté technicien */
.colonne-centree { max-width: 860px; margin: 0 auto; }
.colonne-centree > .message { margin-bottom: var(--e-4); }
.liste-contacts { list-style: none; margin: var(--e-2) 0 0; padding: 0; }
.liste-contacts li {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto; gap: var(--e-3); align-items: center;
  padding: var(--e-2) 0; border-top: 1px solid var(--c-bordure-douce);
}
@media (max-width: 720px) {
  .liste-contacts li { grid-template-columns: minmax(0, 1fr); gap: var(--e-1); }
}

/* Fiche site */
.fiche { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--e-1) var(--e-3); margin: 0 0 var(--e-3); }
.fiche dt { color: var(--c-texte-doux); }
.fiche dd { margin: 0; }
@media (max-width: 720px) {
  .fiche { grid-template-columns: minmax(0, 1fr); }
  .fiche dd { margin-bottom: var(--e-2); }
}
.codes-acces { background: #FFF7ED; border: 1px solid #FDBA74; border-radius: var(--r-moyen); padding: var(--e-3); }
.codes-acces__ligne { display: flex; align-items: center; gap: var(--e-3); flex-wrap: wrap; }
.codes-acces__ligne strong { color: var(--c-alerte); }
.codes-acces__ligne form { margin: 0 0 0 auto; }
.codes-acces p { margin: var(--e-2) 0 0; }
.selecteur-site select { width: auto; min-width: 200px; }
.page-titre .selecteur-site { flex-wrap: nowrap; }
.page-titre .selecteur-site .bouton { width: auto; }

/* « À faire » (EF-14, EF-15) */
.texte-alerte { color: var(--c-alerte); font-weight: 600; }
.boutons--espaces { justify-content: space-between; }
.a-faire { list-style: none; margin: var(--e-3) 0 0; padding: 0; display: grid; gap: var(--e-2); }
.a-faire__element { border: 1px solid var(--c-bordure-douce); border-radius: var(--r-moyen); padding: var(--e-3); }
.a-faire__element--ouverte { border-color: #FDBA74; }
.a-faire__element p { margin: var(--e-2) 0; }
.a-faire__entete { display: flex; gap: var(--e-2); align-items: center; flex-wrap: wrap; }
.a-faire__element .boutons form { margin: 0; }
.a-faire__historique summary { cursor: pointer; color: var(--c-primaire); font-weight: 600; min-height: var(--cible); display: flex; align-items: center; }
.a-faire__historique ol { margin: 0 0 var(--e-2); padding-left: var(--e-4); }

/* Documents du site (EF-13) */
.texte-succes { color: var(--c-succes); font-weight: 600; }
.documents { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-2); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.document { border: 1px solid var(--c-bordure-douce); border-radius: var(--r-moyen); padding: var(--e-3); display: flex; flex-direction: column; gap: 2px; }
.document__entete { font-size: var(--fs-petit); }
.document__titre { font-weight: 600; color: var(--c-texte); text-decoration: none; min-height: 28px; }
.document__titre:hover { text-decoration: underline; }
.document__supprimer summary { cursor: pointer; color: var(--c-danger); min-height: var(--cible); display: flex; align-items: center; width: fit-content; }
.envois { list-style: none; margin: var(--e-3) 0 0; padding: 0; display: grid; gap: var(--e-2); }
.envoi { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: var(--e-2); align-items: center; font-size: var(--fs-base); }
.envoi__nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envoi progress { width: 100%; }

/* Environnement de test : toujours signalé (décision JM du 03/12/2026) */
.bandeau-test {
  background: repeating-linear-gradient(135deg, #FEF3C7 0 12px, #FDE68A 12px 24px);
  color: #78350F; border-bottom: 2px solid #D97706;
  padding: var(--e-2) var(--e-5); font-size: var(--fs-base); text-align: center;
}
.document__versions summary { cursor: pointer; color: var(--c-primaire); min-height: var(--cible); display: flex; align-items: center; width: fit-content; }
.document__versions ul { margin: 0; padding-left: var(--e-4); }
.en-ligne { display: inline; margin: 0; }
.lien-danger { background: none; border: 0; padding: 0 var(--e-1); color: var(--c-danger); font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
