/* =============================================================================
   Régie — feuille de style de l'application

   Direction artistique : celle du logo TIT'G, en version sobre. Fond
   anthracite, texte blanc, et un seul bleu d'accent en aplat (l'azur du
   logo), réservé à l'action principale, au repère de navigation et au temps
   de prestation dans le déroulé ; tout le reste se tient en gris.
   Le dégradé bleu → cyan n'apparaît que dans le logo lui-même : aucun élément
   de l'interface ne le reprend.
   Une seule famille de caractères, Archivo, dont la largeur variable rappelle
   le mot-symbole : large et grasse pour les titres et les horaires, normale
   pour le texte.

   Toutes les couleurs sont des variables définies en section 2 : c'est le seul
   endroit à modifier pour ajuster la charte.

   Sommaire
     1. Police            5. Boutons et étiquettes     9. Fiche et cartes
     2. Jetons            6. Messages                 10. Matériel, rendez-vous
     3. Base              7. Formulaires              11. Réglages
     4. Structure         8. Listes et déroulé        12. Pages simples
   ========================================================================== */

/* 1. Police ---------------------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.de2f1fe81758.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* 2. Jetons ---------------------------------------------------------------- */
:root {
  /* Couleurs relevées sur le logo : son fond, et deux tons de son dégradé.
     L'azur est LA couleur d'accent ; le bleu profond ne sert qu'à l'étiquette
     « Devis envoyé ». */
  --fond: #1e1e20;
  --bleu: #015ac3;
  --azur: #09b5e7;
  --sur-azur: #04141d; /* texte posé sur un aplat azur */

  /* Gris de l'interface, déclinés autour du fond du logo. */
  --rail-fond: #18181a;
  --surface: #26262a;
  --surface-2: #303036;
  --champ: #19191b;
  --encre: #f4f5f7;
  --encre-2: #a6a9b3;
  --trait: #37373d;
  --trait-fort: #74747f;
  --accent: #3fd8f7; /* azur éclairci : liens, survol du bouton principal */
  --neutre: #8b8e99;

  /* Couleurs de sens (états, alertes). */
  --ok: #4ade80;
  --info: #5cc8ff;
  --attente: #fbbf24;
  --danger: #ff7b72;
  --ok-fond: #12301d;
  --info-fond: #0f2b3d;
  --attente-fond: #3a2a08;
  --danger-fond: #3d1512;

  --r-etiquette: 3px;
  --r-controle: 8px;
  --r-carte: 14px;

  --rail: 15rem;
  --barre-basse: 4rem;

  --police: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.5;
  font-stretch: 100%;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: #fff;
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.35rem + 2vw, 2.5rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.3125rem;
  margin-bottom: 1rem;
}

p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 2px solid var(--azur);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--azur);
  color: var(--sur-azur);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.icone {
  flex: none;
  width: 1.25em;
  height: 1.25em;
}

.invisible {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.evitement {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--azur);
  color: var(--sur-azur);
  font-weight: 700;
  border-radius: var(--r-controle);
}

.evitement:focus {
  top: 0.75rem;
}

.vide {
  color: var(--encre-2);
  margin: 0;
  padding: 0.25rem 0;
}

.chapeau {
  color: var(--encre-2);
  font-size: 1.0625rem;
  margin-top: -0.75rem;
}

/* 4. Structure ------------------------------------------------------------- */
.coque {
  min-height: 100vh;
  min-height: 100dvh;
}

.rail {
  background: var(--rail-fond);
  color: var(--encre);
}

/* Le logo, tel quel : il n'est ni recomposé ni recoloré. */
.rail__marque {
  display: block;
  line-height: 0;
}

.rail__marque img {
  display: block;
  height: auto;
  max-width: 100%;
}

.rail__nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--encre-2);
  text-decoration: none;
  font-weight: 600;
}

.rail__nav a:hover {
  color: var(--encre);
}

.rail__nav a[aria-current="page"] {
  color: #fff;
}

.rail__nav a[aria-current="page"] .icone {
  color: var(--accent);
}

/* Repère de la page courante : un trait azur. */
.rail__nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  background: var(--azur);
  border-radius: 2px;
}

.rail__session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rail__compte {
  color: var(--encre-2);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail__sortie {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: var(--r-controle);
  background: none;
  color: var(--encre-2);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.rail__sortie:hover {
  color: var(--encre);
  background: var(--surface);
}

.contenu {
  padding: 1.25rem 1rem calc(var(--barre-basse) + 2rem);
  max-width: 72rem;
}

.contenu:focus {
  outline: none;
}

/* Téléphone : logo en haut, navigation en barre basse (à portée de pouce). */
@media (max-width: 55.99rem) {
  .rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    padding-top: calc(0.5rem + env(safe-area-inset-top));
    border-bottom: 1px solid var(--trait);
  }

  .rail__marque img {
    width: auto;
    height: 2.75rem;
  }

  .rail__nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--rail-fond);
    border-top: 1px solid var(--trait);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .rail__nav a {
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-height: var(--barre-basse);
    font-size: 0.6875rem;
  }

  .rail__nav a[aria-current="page"]::before {
    top: -1px;
    left: 18%;
    right: 18%;
    height: 3px;
  }

  .rail__nav .icone {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* En haut de l'écran, seule la déconnexion reste : chaque page porte déjà
     son bouton d'ajout. */
  .rail .rail__action,
  .rail .rail__compte,
  .rail .rail__sortie span {
    display: none;
  }
}

/* Ordinateur : panneau latéral fixe. */
@media (min-width: 56rem) {
  .coque {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem 1.25rem;
    border-right: 1px solid var(--trait);
  }

  .rail__marque {
    padding: 0 0.25rem;
    margin-bottom: 2rem;
  }

  .rail__marque img {
    width: 100%;
  }

  .rail__nav {
    display: grid;
    gap: 0.15rem;
  }

  .rail__nav a {
    min-height: 2.75rem;
    padding: 0 0.75rem 0 1rem;
    border-radius: var(--r-controle);
  }

  .rail__nav a:hover {
    background: var(--surface);
  }

  .rail__nav a[aria-current="page"] {
    background: var(--surface);
  }

  .rail__nav a[aria-current="page"]::before {
    left: 0;
    top: 0.55rem;
    bottom: 0.55rem;
    width: 4px;
  }

  .rail__pied {
    margin-top: auto;
    display: grid;
    gap: 1rem;
  }

  .rail__action {
    justify-content: center;
    padding-inline: 0.5rem;
    font-size: 0.9375rem;
    white-space: nowrap;
  }

  .rail__session {
    padding-left: 0.75rem;
    border-top: 1px solid var(--trait);
    padding-top: 0.75rem;
  }

  .contenu {
    padding: 2.5rem 2.5rem 4rem;
  }
}

.page-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.page-entete h1 {
  margin: 0;
}

.page-entete__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-entete h2 {
  margin: 0;
}

.fil {
  margin-bottom: 1rem;
}

.fil a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  color: var(--encre-2);
  text-decoration: none;
  font-weight: 600;
}

.fil a:hover {
  color: var(--encre);
}

.colonnes {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.colonnes__cote {
  display: grid;
  gap: 2.5rem;
  align-content: start;
}

@media (min-width: 62rem) {
  .colonnes {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

/* 5. Boutons et étiquettes ------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--trait-fort);
  border-radius: var(--r-controle);
  background: transparent;
  color: var(--encre);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.bouton:hover {
  border-color: var(--encre);
  background: var(--surface-2);
}

/* Action principale : aplat azur, une seule fois par écran si possible. */
.bouton--principal {
  border-color: var(--azur);
  background: var(--azur);
  color: var(--sur-azur);
  font-weight: 700;
}

.bouton--principal:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.bouton--discret {
  background: none;
  border-color: transparent;
  color: var(--encre-2);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.bouton--discret:hover {
  color: var(--encre);
  background: none;
  border-color: transparent;
}

.bouton--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #2a0906;
}

.bouton--danger:hover {
  background: var(--danger);
  border-color: #fff;
}

.bouton--mini {
  min-height: 2.25rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.875rem;
}

.bouton--large {
  width: 100%;
}

.bouton-icone {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--r-controle);
  background: none;
  color: var(--encre-2);
  cursor: pointer;
}

.bouton-icone:hover {
  background: var(--surface-2);
  color: var(--encre);
}

/* Étiquette de statut. « Devis envoyé » prend le bleu du logo ; « Confirmée »
   garde un vert, que tout le monde lit comme « c'est bon ». */
.etiquette {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-etiquette);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.25;
  white-space: nowrap;
  color: #fff;
  background: #55555d;
}

.etiquette--option {
  background: none;
  color: var(--encre-2);
  outline: 1.5px dashed var(--trait-fort);
  outline-offset: -1.5px;
}

.etiquette--devis_envoye {
  background: var(--bleu);
}

.etiquette--confirmee {
  background: var(--ok);
  color: #06220f;
}

.etiquette--realisee {
  background: #55555d;
}

.etiquette--annulee {
  background: none;
  color: var(--danger);
  outline: 1.5px solid currentColor;
  outline-offset: -1.5px;
  text-decoration: line-through;
}

/* Pastille de couleur du type de prestation (couleur posée par app.js). */
.pastille {
  display: inline-block;
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.45rem;
  border-radius: 2px;
  background: var(--couleur, var(--trait-fort));
  vertical-align: baseline;
}

.pastille--grande {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  border-radius: 3px;
}

/* 6. Messages -------------------------------------------------------------- */
.messages {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.message {
  margin: 0;
  max-width: none;
  padding: 0.75rem 1rem;
  border-radius: var(--r-controle);
  border-left: 5px solid var(--info);
  background: var(--info-fond);
  font-weight: 500;
}

.message--success {
  border-color: var(--ok);
  background: var(--ok-fond);
}

.message--warning {
  border-color: var(--attente);
  background: var(--attente-fond);
}

.message--error {
  border-color: var(--danger);
  background: var(--danger-fond);
}

.message ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* 7. Formulaires ----------------------------------------------------------- */
.formulaire {
  display: grid;
  gap: 1.5rem;
  max-width: 52rem;
}

.formulaire--carte {
  margin-top: 1.25rem;
  gap: 1rem;
}

.bloc {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  background: var(--surface);
  min-width: 0;
}

.bloc > legend {
  padding: 0 0.5rem;
  margin-left: -0.5rem;
  color: #fff;
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.125rem;
}

.bloc__aide {
  color: var(--encre-2);
  font-size: 0.9375rem;
  margin: 0.75rem 0 0;
}

.bloc > .bloc__aide:first-of-type {
  margin: 0 0 1rem;
}

.grille {
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grille--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grille__large {
    grid-column: 1 / -1;
  }
}

.champ {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.champ__libelle {
  font-weight: 650;
  font-size: 0.9375rem;
  padding: 0;
}

.champ__facultatif {
  font-weight: 400;
  color: var(--encre-2);
  font-size: 0.8125rem;
}

.champ__aide,
.champ__lien {
  margin: 0;
  color: var(--encre-2);
  font-size: 0.875rem;
}

.champ__lien {
  margin-top: 0.4rem;
}

.champ__erreur {
  margin: 0;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9375rem;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--trait-fort);
  border-radius: var(--r-controle);
  background: var(--champ);
  color: var(--encre);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input[type="color"] {
  width: 4.5rem;
  height: 2.75rem;
  padding: 0.2rem;
  border: 1.5px solid var(--trait-fort);
  border-radius: var(--r-controle);
  background: var(--champ);
}

input::placeholder,
textarea::placeholder {
  color: var(--encre-2);
  opacity: 0.85;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--azur);
}

.champ--erreur input,
.champ--erreur select,
.champ--erreur textarea {
  border-color: var(--danger);
}

.case,
.choix__option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.6rem 0;
  cursor: pointer;
}

.case input,
.choix__option input,
.materiel__case input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.1rem 0 0;
  accent-color: var(--azur);
}

.choix {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.formulaire__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.contact-ligne {
  padding: 1rem 0;
  border-top: 1px solid var(--trait);
}

.contact-ligne:first-of-type {
  border-top: 0;
}

.zone-danger {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--trait);
  max-width: 52rem;
  color: var(--encre-2);
}

.confirmation {
  max-width: 40rem;
}

/* Filtres et recherche */
.filtres {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.onglets {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--trait);
}

.onglets a {
  padding: 0.6rem 0.9rem;
  margin-bottom: -2px;
  border-bottom: 3px solid transparent;
  color: var(--encre-2);
  text-decoration: none;
  font-weight: 650;
}

.onglets a:hover {
  color: var(--encre);
}

.onglets a[aria-current="true"] {
  color: #fff;
  border-bottom-color: var(--azur);
}

.filtres__form {
  display: grid;
  gap: 0.5rem;
}

.filtres__form--seul {
  margin-bottom: 1.5rem;
  max-width: 40rem;
}

@media (min-width: 40rem) {
  .filtres__form {
    grid-template-columns: 14rem minmax(0, 1fr) auto;
  }

  .filtres__form--seul {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* 8. Listes et déroulé ----------------------------------------------------- */
.lignes {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  background: var(--surface);
  overflow: hidden;
}

.ligne + .ligne {
  border-top: 1px solid var(--trait);
}

.ligne__lien,
.ligne--action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
}

.ligne__lien--client,
.ligne--action {
  grid-template-columns: minmax(0, 1fr);
}

.ligne__lien:hover {
  background: var(--surface-2);
}

.ligne__lien:focus-visible {
  outline-offset: -3px;
}

.ligne__corps {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.ligne__titre {
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.ligne__detail {
  color: var(--encre-2);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ligne__etat {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ligne__lien--client .ligne__etat {
  grid-column: 1;
}

.ligne__materiel {
  color: var(--encre-2);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ligne--annulee .ligne__titre,
.ligne--annulee .date-bloc {
  color: var(--encre-2);
  text-decoration: line-through;
}

@media (min-width: 40rem) {
  .ligne__lien {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .ligne__lien--client,
  .ligne--action {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ligne__etat,
  .ligne__lien--client .ligne__etat {
    grid-column: auto;
    justify-content: flex-end;
  }
}

/* Bloc date : jour de la semaine, numéro, mois. */
.date-bloc {
  display: grid;
  justify-items: center;
  width: 3.25rem;
  line-height: 1;
  text-align: center;
}

.date-bloc__semaine,
.date-bloc__mois {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--encre-2);
}

.date-bloc__annee {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
}

.date-bloc__jour {
  color: #fff;
  font-stretch: 108%;
  font-weight: 800;
  font-size: 1.625rem;
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0;
}

/* Déroulé : les horaires sur un rail. Le tronçon Début → Fin, épais et azur,
   est le temps de prestation ; les tronçons fins sont la manutention. */
.deroule {
  --epaisseur: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.deroule__etape {
  position: relative;
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.75rem;
  padding: 0 0 1.1rem 1.75rem;
}

.deroule__etape:last-child {
  padding-bottom: 0;
}

.deroule__point {
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--encre-2);
  z-index: 1;
}

.deroule__etape--debut .deroule__point,
.deroule__etape--fin .deroule__point {
  border-color: var(--azur);
}

.deroule__etape::before {
  content: "";
  position: absolute;
  left: calc(0.45rem - var(--epaisseur) / 2);
  top: 0.9rem;
  bottom: -0.5rem;
  width: var(--epaisseur);
  background: var(--trait-fort);
}

.deroule__etape:last-child::before {
  display: none;
}

.deroule__etape--debut {
  --epaisseur: 6px;
}

.deroule__etape--debut::before {
  background: var(--azur);
}

.deroule__heure {
  color: #fff;
  font-stretch: 108%;
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.deroule__libelle {
  font-weight: 600;
  color: var(--encre-2);
}

.deroule__jour {
  grid-column: 2;
  font-size: 0.875rem;
  color: var(--encre-2);
}

/* À partir d'une tablette, le rail passe à l'horizontale. */
@media (min-width: 36rem) {
  .deroule {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }

  .deroule__etape {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: 1.7rem 0.75rem 0 0;
  }

  .deroule__point {
    top: 0;
  }

  .deroule__etape::before {
    left: 0.45rem;
    right: -0.45rem;
    top: calc(0.45rem - var(--epaisseur) / 2);
    bottom: auto;
    width: auto;
    height: var(--epaisseur);
  }

  .deroule__heure {
    font-size: clamp(1.375rem, 0.9rem + 1.7vw, 2.125rem);
  }

  .deroule__jour {
    grid-column: 1;
  }
}

/* Affiche : la prochaine prestation, en tête de l'accueil et des fiches.
   Même construction que le logo : un grand nom blanc, une ligne bleue espacée. */
.affiche {
  padding: 1.5rem 1.25rem;
  border-radius: var(--r-carte);
  background: var(--surface);
  border: 1px solid var(--trait);
}

.affiche__quand {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.affiche__quand strong {
  color: #fff;
  font-weight: 700;
}

.affiche__titre {
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.25rem);
  font-stretch: 118%;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

.affiche__titre a {
  color: inherit;
  text-decoration: none;
}

.affiche__titre a:hover {
  text-decoration: underline;
  text-decoration-color: var(--azur);
  text-decoration-thickness: 0.06em;
}

.affiche__infos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.75rem;
  max-width: none;
  color: var(--encre-2);
  font-weight: 500;
}

.affiche__infos > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.affiche__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

@media (min-width: 56rem) {
  .affiche {
    padding: 2rem 2.25rem 2.25rem;
  }
}

/* Points à traiter et rendez-vous de l'accueil */
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--trait);
}

.points li {
  border-bottom: 1px solid var(--trait);
}

.points a {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0 0.7rem 0.9rem;
  border-left: 4px solid var(--attente);
  color: inherit;
  text-decoration: none;
}

.points--rdv a {
  border-left-color: var(--trait-fort);
}

.points a:hover .points__texte {
  text-decoration: underline;
}

.points__texte {
  color: #fff;
  font-weight: 650;
}

.points__sujet {
  color: var(--encre-2);
  font-size: 0.9375rem;
}

.depart {
  max-width: 38rem;
  padding: 2rem 0;
}

.depart__actions {
  margin-top: 1.5rem;
}

/* 9. Fiche et cartes ------------------------------------------------------- */
.fiche-entete {
  margin-bottom: 1.25rem;
}

.fiche-entete .affiche__infos {
  margin-bottom: 1rem;
}

.fiche-entete__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fiche-entete + .fiche {
  margin-top: 2rem;
}

.fiche-entete--annulee .affiche__titre {
  text-decoration: line-through;
  text-decoration-thickness: 0.05em;
  color: var(--encre-2);
}

/* Sélecteur de statut : un geste pour faire avancer la prestation. */
.statuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.statuts__choix {
  min-height: 2.5rem;
  padding: 0.3rem 0.8rem;
  border: 1.5px solid var(--trait-fort);
  border-radius: var(--r-etiquette);
  background: none;
  color: var(--encre-2);
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}

.statuts__choix:hover {
  border-color: var(--encre);
  color: var(--encre);
}

.statuts__choix[aria-pressed="true"] {
  color: #fff;
  border-color: transparent;
  background: #55555d;
}

.statuts__choix--devis_envoye[aria-pressed="true"] {
  background: var(--bleu);
}

.statuts__choix--confirmee[aria-pressed="true"] {
  background: var(--ok);
  color: #06220f;
}

.statuts__choix--annulee[aria-pressed="true"] {
  background: var(--danger);
  color: #2a0906;
}

.fiche {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.fiche__principal,
.fiche__cote {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

@media (min-width: 68rem) {
  .fiche {
    grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 1fr);
    gap: 2rem;
  }
}

.fiche__supprimer {
  margin: 0;
  font-size: 0.9375rem;
}

.fiche__supprimer a {
  color: var(--encre-2);
}

.carte {
  padding: 1.25rem;
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  background: var(--surface);
  min-width: 0;
}

.carte + .carte {
  margin-top: 0;
}

.contenu > .carte {
  margin-bottom: 1.5rem;
  max-width: 56rem;
}

.carte__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.carte__entete h2 {
  margin: 0;
}

.carte__outils {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.carte__note {
  color: var(--encre-2);
  font-size: 0.9375rem;
  margin: 0.75rem 0 0;
}

.carte > h2 + .carte__note {
  margin: -0.5rem 0 1rem;
}

.carte__pied {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-top: 0.5rem;
}

.texte p:last-child {
  margin-bottom: 0;
}

.adresse {
  display: grid;
  gap: 0.15rem;
  font-style: normal;
  margin-bottom: 1rem;
}

.adresse strong {
  color: #fff;
}

.pile {
  display: grid;
  gap: 0.5rem;
}

.chemin {
  color: var(--encre-2);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.coordonnees {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.coordonnees a,
.coordonnees span {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.5rem 0;
  overflow-wrap: anywhere;
}

.coordonnees .icone {
  margin-top: 0.1rem;
  color: var(--encre-2);
}

.contact {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--trait);
}

.carte > h2 + .contact {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.contact__nom {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.contact__nom span {
  font-weight: 400;
  color: var(--encre-2);
  margin-left: 0.25rem;
}

.contact__nom a {
  color: inherit;
}

/* 10. Matériel, rendez-vous, documents ------------------------------------ */
.avancement {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--encre-2);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

progress {
  appearance: none;
  -webkit-appearance: none;
  width: 6rem;
  height: 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  background: var(--trait);
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--trait);
}

progress::-webkit-progress-value {
  background: var(--azur);
}

progress::-moz-progress-bar {
  background: var(--azur);
}

.materiel {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  border-top: 1px solid var(--trait);
}

.materiel__element {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--trait);
}

.materiel__bascule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.materiel__case {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-height: 3rem;
  padding: 0.8rem 0;
  cursor: pointer;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.materiel__case input {
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0;
}

.materiel__case input:checked + span {
  color: var(--encre-2);
  text-decoration: line-through;
}

.materiel__ajout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.rdvs,
.documents {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--trait);
}

.rdv,
.document {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--trait);
}

.rdv__quand {
  display: grid;
  gap: 0.1rem;
}

.rdv__quand strong {
  color: #fff;
}

.rdv__quand span {
  color: var(--encre-2);
  font-variant-numeric: tabular-nums;
}

.rdv__notes {
  margin: 0.4rem 0 0;
  font-size: 0.9375rem;
}

.rdv--passe .rdv__quand strong {
  color: var(--encre-2);
}

.rdv__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.document__corps {
  display: grid;
  gap: 0.25rem;
  justify-items: start;
  min-width: 0;
}

.document__corps strong {
  color: #fff;
}

.document__etat {
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-etiquette);
  font-weight: 700;
  font-size: 0.8125rem;
  background: var(--attente-fond);
  color: var(--attente);
}

.document__etat--ok {
  background: var(--ok-fond);
  color: var(--ok);
}

.document__etat--neutre {
  background: var(--surface-2);
  color: var(--encre-2);
}

.document__cote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.document__montant {
  color: #fff;
  font-stretch: 108%;
  font-weight: 800;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.document__actions {
  display: flex;
}

.echeances {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--encre-2);
}

.echeances li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.1rem 0;
}

.echeance--payee {
  color: var(--ok);
}

@media (min-width: 40rem) {
  .rdv,
  .document {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .document__cote {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }
}

/* 11. Réglages ------------------------------------------------------------- */
.sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: -0.5rem 0 1.75rem;
}

.sommaire a {
  padding: 0.5rem 0;
  font-weight: 600;
}

.types,
.etats {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--trait);
}

.types li,
.etats li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--trait);
}

.types__nom {
  color: #fff;
  font-weight: 700;
}

.types__etat {
  font-weight: 400;
  color: var(--encre-2);
}

.types__materiel {
  grid-column: 2;
  color: var(--encre-2);
  font-size: 0.9375rem;
}

.types li .bouton {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.type--inactif .pastille {
  opacity: 0.35;
}

.etats {
  margin-top: 1.25rem;
}

.etats__nom {
  color: #fff;
  font-weight: 650;
}

.etats__detail {
  display: block;
  font-weight: 400;
  color: var(--encre-2);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.etat {
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-etiquette);
  font-weight: 700;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.etat--ok {
  background: var(--ok-fond);
  color: var(--ok);
}

.etat--absent {
  background: var(--surface-2);
  color: var(--encre-2);
}

.copie {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.copie input {
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  .copie {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

.note-repliee {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--trait);
}

.note-repliee summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 2rem;
}

.note-repliee p {
  margin: 0.5rem 0 0;
  color: var(--encre-2);
}

.definitions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1rem;
  margin: 0 0 1.25rem;
  padding: 1rem;
  border-radius: var(--r-controle);
  background: var(--surface);
}

.definitions dt {
  color: var(--encre-2);
}

.definitions dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* 12. Pages simples (connexion, erreurs) ----------------------------------- */
.page-simple {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.simple {
  width: 100%;
  max-width: 28rem;
}

.simple:focus {
  outline: none;
}

.simple__marque {
  margin: 0 0 2.5rem;
  line-height: 0;
}

.simple__marque img {
  display: block;
  width: min(100%, 20rem);
  height: auto;
}

.simple h1 {
  font-size: clamp(1.75rem, 1.4rem + 2vw, 2.375rem);
  margin-bottom: 1rem;
}

.simple p {
  color: var(--encre-2);
}

.simple__actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-simple .message {
  color: var(--encre);
}

/* Téléphone : actions en pleine largeur, faciles à toucher. Placé en fin de
   fichier pour l'emporter sur les règles générales des composants. */
@media (max-width: 39.99rem) {
  .affiche__actions .bouton {
    flex: 1 1 12rem;
  }

  .rdv__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .rdv__actions > form,
  .rdv__actions > form .bouton,
  .rdv__actions > .bouton {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bouton,
  .ligne__lien,
  .rail__nav a,
  .statuts__choix {
    transition:
      background-color 0.12s ease,
      border-color 0.12s ease,
      color 0.12s ease;
  }
}

/* Impression (feuille de route à emporter) : on repasse en clair pour ne pas
   vider les cartouches, en redéfinissant simplement les variables. */
@media print {
  :root {
    --fond: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --champ: #fff;
    --encre: #000;
    --encre-2: #444;
    --trait: #bbb;
    --trait-fort: #888;
    --accent: #015ac3;
    color-scheme: light;
  }

  h1,
  h2,
  h3,
  .ligne__titre,
  .deroule__heure,
  .date-bloc__jour,
  .affiche__quand strong,
  .contact__nom,
  .rdv__quand strong,
  .adresse strong,
  .document__corps strong,
  .document__montant {
    color: #000;
  }

  .rail,
  .fil,
  .statuts,
  .fiche-entete__actions,
  .materiel__ajout,
  .carte__pied,
  .bouton,
  .bouton-icone {
    display: none !important;
  }
}
