/* ==========================================================================
   DEG — Demande d'Éléments Graphiques
   Feuille de style unique
   ========================================================================== */

:root {
  --marine: #12314f;
  --marine-clair: #1d4b78;
  --marine-fonce: #0b2136;
  --ambre: #e08a3c;
  --ambre-clair: #f3a961;
  --ambre-pale: #fdf1e3;

  --fond: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --bordure: #dde4ed;
  --bordure-forte: #c3cedd;

  --texte: #14202e;
  --texte-doux: #5a6b80;
  --texte-faible: #8798ac;

  --vert: #1f8a5f;
  --vert-fond: #e6f5ee;
  --rouge: #c8362f;
  --rouge-fond: #fbeae9;
  --orange: #cc7a12;
  --orange-fond: #fdf3e2;
  --bleu: #1f6fb2;
  --bleu-fond: #e8f1fa;
  --violet: #6b4fbb;
  --violet-fond: #efeafb;
  --cyan: #0e7490;
  --cyan-fond: #e2f2f7;
  --gris: #6b7a8d;
  --gris-fond: #eef1f5;

  --rayon: 10px;
  --rayon-sm: 6px;
  --rayon-lg: 16px;
  --ombre-1: 0 1px 2px rgba(16, 33, 54, .06), 0 1px 3px rgba(16, 33, 54, .05);
  --ombre-2: 0 4px 12px rgba(16, 33, 54, .08), 0 1px 3px rgba(16, 33, 54, .04);
  --ombre-3: 0 18px 45px rgba(11, 33, 54, .18);

  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --entete-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0e161f;
    --surface: #16212d;
    --surface-2: #1b2734;
    --surface-3: #22303f;
    --bordure: #2a3948;
    --bordure-forte: #3a4c5e;

    --texte: #e8eef5;
    --texte-doux: #a2b2c4;
    --texte-faible: #7c8ea3;

    --marine: #1d4b78;
    --marine-clair: #2c669c;
    --marine-fonce: #132c46;

    --vert-fond: #133326;
    --rouge-fond: #38191a;
    --orange-fond: #362713;
    --bleu-fond: #12283c;
    --violet-fond: #241f3d;
    --cyan: #38bdf8;
    --cyan-fond: #102b36;
    --gris-fond: #222e3b;
    --ambre-pale: #332413;

    --ombre-1: 0 1px 2px rgba(0, 0, 0, .3);
    --ombre-2: 0 4px 14px rgba(0, 0, 0, .35);
    --ombre-3: 0 18px 45px rgba(0, 0, 0, .5);
  }
}

/* ---------- Base ---------- */

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

/* `hidden` doit l'emporter sur les display: flex/grid des composants. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.55;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.barre-reseau {
  position: fixed;
  inset: 0 100% auto 0;
  height: 3px;
  z-index: 300;
  opacity: 0;
  background: linear-gradient(90deg, var(--ambre), var(--ambre-clair), var(--marine-clair));
  transition: opacity .16s;
}
.barre-reseau.active {
  opacity: 1;
  animation: progression-reseau 1.15s ease-in-out infinite;
}
@keyframes progression-reseau {
  0% { left: 0; right: 78%; }
  50% { left: 24%; right: 20%; }
  100% { left: 82%; right: 0; }
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; }
a { color: var(--marine-clair); }

.vue { flex: 1; width: 100%; }

.conteneur { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.conteneur-large { max-width: 1500px; margin: 0 auto; padding: 22px 22px 60px; }
.conteneur-etroit { max-width: 720px; margin: 0 auto; padding: 32px 22px 60px; }

.muet { color: var(--texte-doux); }
.faible { color: var(--texte-faible); }
.petit { font-size: .85rem; }
.mono { font-family: var(--police-mono); }
.gras { font-weight: 650; }
.centre { text-align: center; }
.nowrap { white-space: nowrap; }
.pleine-largeur { width: 100%; }

/* ---------- En-tête ---------- */

.entete {
  height: var(--entete-h);
  flex: 0 0 auto;
  background: var(--marine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--ombre-2);
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--rayon-sm);
  font-family: inherit;
  text-align: left;
}
.logo:hover { background: rgba(255, 255, 255, .1); }
.logo-marque { font-weight: 800; font-size: 1.15rem; letter-spacing: .14em; color: var(--ambre-clair); }
.logo-sous { font-size: .68rem; letter-spacing: .04em; color: rgba(255, 255, 255, .72); text-transform: uppercase; }

.entete-droite { display: flex; align-items: center; gap: 10px; }

.pilule {
  font-size: .74rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  white-space: nowrap;
  font-weight: 550;
}
.pilule-stockage { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8); font-weight: 450; }
.pilule-stockage.alerte { background: rgba(224, 138, 60, .3); color: #ffe0c2; }

@media (max-width: 760px) {
  .entete { padding: 0 12px; gap: 8px; }
  .logo-sous { display: none; }
  .pilule-stockage { display: none; }
  .pilule-role { font-size: .7rem; padding: 3px 8px; }
}

.pied {
  flex: 0 0 auto;
  padding: 14px 22px;
  text-align: center;
  font-size: .78rem;
  color: var(--texte-faible);
  border-top: 1px solid var(--bordure);
  background: var(--surface);
}

/* ---------- Boutons ---------- */

.btn {
  font-family: inherit;
  font-size: .9rem;
  font-weight: 560;
  padding: 9px 16px;
  border-radius: var(--rayon-sm);
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--texte);
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .06s, box-shadow .14s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  white-space: nowrap;
}
.btn:hover { background: var(--bordure); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 2px solid var(--marine-clair); outline-offset: 2px; }

.btn-primaire { background: var(--marine); color: #fff; }
.btn-primaire:hover { background: var(--marine-clair); }

.btn-accent { background: var(--ambre); color: #3a2107; }
.btn-accent:hover { background: var(--ambre-clair); }

.btn-contour { background: transparent; border-color: var(--bordure-forte); color: var(--texte); }
.btn-contour:hover { background: var(--surface-3); }

.btn-fantome { background: rgba(255, 255, 255, .12); color: #fff; font-size: .82rem; padding: 7px 13px; }
.btn-fantome:hover { background: rgba(255, 255, 255, .22); }

.btn-danger { background: var(--rouge-fond); color: var(--rouge); border-color: transparent; }
.btn-danger:hover { background: var(--rouge); color: #fff; }

.btn-petit { font-size: .8rem; padding: 6px 11px; }
.btn-mini { font-size: .74rem; padding: 4px 9px; border-radius: 5px; }
.btn-grand { font-size: 1rem; padding: 12px 22px; }

.btn-icone {
  padding: 6px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--texte-doux);
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.btn-icone:hover { background: var(--surface-3); color: var(--texte); }
.btn-icone.danger:hover { background: var(--rouge-fond); color: var(--rouge); }

.barre-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.barre-actions.fin { justify-content: flex-end; }
.espace { flex: 1; }

/* ---------- Cartes ---------- */

.carte {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-1);
}
.carte-corps { padding: 20px 22px; }
.carte-entete {
  padding: 15px 22px;
  border-bottom: 1px solid var(--bordure);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.carte-entete h2, .carte-entete h3 { margin: 0; }
.carte-pied { padding: 14px 22px; border-top: 1px solid var(--bordure); background: var(--surface-2); border-radius: 0 0 var(--rayon) var(--rayon); }

.grille { display: grid; gap: 18px; }
.grille-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grille-3, .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grille-2, .grille-3, .grille-4 { grid-template-columns: 1fr; } }

/* ---------- Accueil ---------- */

.accueil {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 22px;
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(29, 75, 120, .16), transparent 62%),
    radial-gradient(720px 420px at 88% 108%, rgba(224, 138, 60, .14), transparent 60%),
    var(--fond);
}

.accueil-marque { text-align: center; margin-bottom: 38px; }
.accueil-sigle {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--marine);
  margin: 0 0 4px;
}
@media (prefers-color-scheme: dark) { .accueil-sigle { color: #cfe1f2; } }
.accueil-titre { font-size: 1.1rem; color: var(--texte-doux); margin: 0; font-weight: 500; }
.accueil-filet { width: 68px; height: 3px; background: var(--ambre); border-radius: 2px; margin: 16px auto 0; }

/* Zone principale : l'entrée du demandeur, seule et mise en avant. */
.accueil-principal { width: 100%; max-width: 520px; }

/* Zone réservée : infographie et administration, regroupées et en retrait. */
.accueil-reserve { width: 100%; max-width: 520px; margin-top: 34px; }

.accueil-separateur {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--texte-faible);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 650;
}
.accueil-separateur::before, .accueil-separateur::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bordure);
}

.accueil-cartes-reserve {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 560px) { .accueil-cartes-reserve { grid-template-columns: 1fr; } }

/* Grande carte horizontale : icône à gauche, texte à droite. */
.carte-entree.principale {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 20px;
  padding: 26px 26px;
}
.carte-entree.principale .entree-icone { margin-bottom: 0; flex: 0 0 auto; }
.carte-entree.principale .entree-corps { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 460px) {
  .carte-entree.principale { flex-direction: column; text-align: center; }
  .carte-entree.principale .entree-icone { margin-bottom: 10px; }
}

/* Cartes compactes de la zone réservée. */
.carte-entree.compacte {
  padding: 18px 16px 16px;
  border-radius: var(--rayon);
  background: var(--surface-2);
}
.carte-entree.compacte .entree-icone { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 10px; }
.carte-entree.compacte .entree-icone svg { width: 21px; height: 21px; }
.carte-entree.compacte .entree-titre { font-size: .98rem; }
.carte-entree.compacte:hover { transform: translateY(-2px); }

.carte-entree {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-lg);
  padding: 30px 24px 26px;
  text-align: center;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
  box-shadow: var(--ombre-1);
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.carte-entree:hover { transform: translateY(-4px); box-shadow: var(--ombre-2); border-color: var(--marine-clair); }
.carte-entree:focus-visible { outline: 2px solid var(--marine-clair); outline-offset: 3px; }

.entree-icone {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 14px;
  background: var(--bleu-fond);
  color: var(--marine-clair);
}
.entree-icone svg { width: 30px; height: 30px; }
.carte-entree.infographie .entree-icone { background: var(--violet-fond); color: var(--violet); }
.carte-entree.admin .entree-icone { background: var(--ambre-pale); color: var(--orange); }

.entree-titre { font-size: 1.15rem; font-weight: 650; }
.entree-desc { font-size: .85rem; color: var(--texte-doux); margin: 4px 0 10px; }
.entree-cadenas { font-size: .72rem; color: var(--texte-faible); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Formulaires ---------- */

.champ { margin-bottom: 16px; }
.champ:last-child { margin-bottom: 0; }

.etiquette {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--texte-doux);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.etiquette .req { color: var(--rouge); margin-left: 2px; }
.aide { font-size: .78rem; color: var(--texte-faible); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: .92rem;
  color: var(--texte);
  background: var(--surface);
  border: 1px solid var(--bordure-forte);
  border-radius: var(--rayon-sm);
  padding: 9px 11px;
  transition: border-color .14s, box-shadow .14s;
  -webkit-appearance: none;
  appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235a6b80' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px;
  padding-right: 32px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--marine-clair);
  box-shadow: 0 0 0 3px rgba(29, 75, 120, .16);
}
input.erreur, select.erreur, textarea.erreur { border-color: var(--rouge); box-shadow: 0 0 0 3px rgba(200, 54, 47, .13); }
input::placeholder, textarea::placeholder { color: var(--texte-faible); }
input[type="date"] { min-height: 38px; }

.msg-erreur { color: var(--rouge); font-size: .78rem; margin-top: 5px; display: block; }

.compteur-car { text-align: right; font-size: .74rem; color: var(--texte-faible); margin-top: 4px; }
.compteur-car.limite { color: var(--rouge); }

fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }

/* Radios / cases en boutons */
.groupe-choix { display: flex; gap: 9px; flex-wrap: wrap; }
.choix {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--bordure-forte);
  border-radius: var(--rayon-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: .88rem;
  transition: all .14s;
  user-select: none;
}
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix:hover { border-color: var(--marine-clair); }
.choix:has(input:checked) {
  border-color: var(--marine);
  background: var(--bleu-fond);
  color: var(--marine-clair);
  font-weight: 600;
}
.choix:has(input:focus-visible) { outline: 2px solid var(--marine-clair); outline-offset: 2px; }
.choix-puce { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--bordure-forte); flex: 0 0 auto; }
.choix:has(input:checked) .choix-puce { border-color: var(--marine); border-width: 4px; }
.choix.case .choix-puce { border-radius: 4px; }
.choix.case:has(input:checked) .choix-puce {
  border-width: 1.5px;
  background: var(--marine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' stroke='white' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
  border-color: var(--marine);
}

.ligne-case { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: .9rem; }
.ligne-case input { margin-top: 3px; flex: 0 0 auto; }

/* Fichiers */
.depot {
  border: 1.5px dashed var(--bordure-forte);
  border-radius: var(--rayon);
  padding: 22px 18px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .14s, background .14s;
}
.depot:hover, .depot.survol { border-color: var(--marine-clair); background: var(--bleu-fond); }
.depot-titre { font-weight: 600; font-size: .9rem; }
.depot-aide { font-size: .78rem; color: var(--texte-faible); margin-top: 3px; }
.depot input[type="file"] { display: none; }

.liste-fichiers { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.fichier {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-sm);
  background: var(--surface);
  font-size: .86rem;
}
.fichier-icone {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 6px;
  display: grid; place-items: center;
  background: var(--surface-3);
  color: var(--texte-doux);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
}
.fichier-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichier-taille { color: var(--texte-faible); font-size: .78rem; flex: 0 0 auto; }

/* Couleurs */
.liste-couleurs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.puce-couleur { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px 5px 5px; border: 1px solid var(--bordure); border-radius: 999px; background: var(--surface); font-size: .82rem; margin: 0 4px 4px 0; }
.puce-couleur .pastille { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); flex: 0 0 auto; }
input[type="color"] { width: 44px; height: 38px; padding: 3px; border: 1px solid var(--bordure-forte); border-radius: var(--rayon-sm); background: var(--surface); cursor: pointer; }

/* ---------- Assistant (wizard) ---------- */

.assistant-entete { margin-bottom: 22px; }

.etapes { display: flex; align-items: flex-start; gap: 0; margin: 22px 0 26px; }
.etape { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; text-align: center; }
.etape::before, .etape::after {
  content: "";
  position: absolute;
  top: 15px;
  height: 2px;
  background: var(--bordure);
  width: 50%;
}
.etape::before { left: 0; }
.etape::after { right: 0; }
.etape:first-child::before, .etape:last-child::after { display: none; }
.etape.faite::before, .etape.faite::after, .etape.active::before { background: var(--marine); }

.etape-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 2px solid var(--bordure);
  color: var(--texte-faible);
  font-weight: 700;
  font-size: .82rem;
  z-index: 1;
  transition: all .18s;
}
.etape.active .etape-num { border-color: var(--marine); background: var(--marine); color: #fff; box-shadow: 0 0 0 4px rgba(29, 75, 120, .14); }
.etape.faite .etape-num { border-color: var(--marine); background: var(--marine); color: #fff; }
.etape-nom { font-size: .74rem; color: var(--texte-faible); max-width: 120px; line-height: 1.3; }
.etape.active .etape-nom { color: var(--marine-clair); font-weight: 650; }
.etape.faite .etape-nom { color: var(--texte-doux); }
@media (max-width: 700px) { .etape-nom { display: none; } }

.bloc-etape { animation: apparait .22s ease; }
@keyframes apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-form { margin-bottom: 26px; }
.section-form:last-child { margin-bottom: 0; }
.section-titre {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texte-faible);
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--bordure);
}

/* Déclinaisons */
.decl-carte {
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 14px 16px;
  background: var(--surface-2);
  margin-bottom: 12px;
}
.decl-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.decl-nom { font-weight: 650; font-size: .95rem; }
.decl-grille { display: grid; grid-template-columns: 1fr 200px; gap: 14px; }
@media (max-width: 700px) { .decl-grille { grid-template-columns: 1fr; } }

/* ---------- Récapitulatif ---------- */

.recap-bloc { margin-bottom: 22px; }
.recap-titre {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--marine-clair); font-weight: 700; margin-bottom: 10px;
}
.recap-liste { display: grid; grid-template-columns: 190px 1fr; gap: 8px 18px; font-size: .89rem; }
@media (max-width: 620px) { .recap-liste { grid-template-columns: 1fr; gap: 2px 0; } .recap-liste dt { margin-top: 8px; } }
.recap-liste dt { color: var(--texte-doux); }
.recap-liste dd { margin: 0; word-break: break-word; }
.recap-liste dd.vide { color: var(--texte-faible); font-style: italic; }

/* ---------- Onglets ---------- */

.onglets {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--bordure);
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  padding: 11px 17px;
  background: none;
  border: 0;
  border-bottom: 2.5px solid transparent;
  color: var(--texte-doux);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.onglet:hover { color: var(--texte); }
.onglet.actif { color: var(--marine-clair); border-bottom-color: var(--marine); font-weight: 650; }
.onglet .compte {
  background: var(--surface-3);
  color: var(--texte-doux);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: .72rem;
  font-weight: 650;
}
.onglet.actif .compte { background: var(--marine); color: #fff; }

/* ---------- Tableaux ---------- */

.enveloppe-tableau { overflow-x: auto; border-radius: var(--rayon); border: 1px solid var(--bordure); background: var(--surface); }
table.tableau { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.tableau th {
  text-align: left;
  padding: 11px 13px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--bordure);
  font-weight: 650;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--texte-doux);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.tableau th.triable { cursor: pointer; user-select: none; }
table.tableau th.triable:hover { color: var(--texte); }
table.tableau th .fleche { opacity: .45; font-size: .7rem; margin-left: 3px; }
table.tableau th.tri-actif { color: var(--marine-clair); }
table.tableau th.tri-actif .fleche { opacity: 1; }
table.tableau td { padding: 11px 13px; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
table.tableau tbody tr:last-child td { border-bottom: 0; }
table.tableau tbody tr.cliquable { cursor: pointer; }
table.tableau tbody tr.cliquable:hover { background: var(--surface-2); }
table.tableau tbody tr.retard td:first-child { box-shadow: inset 3px 0 0 var(--rouge); }

.cellule-id { font-family: var(--police-mono); font-size: .78rem; font-weight: 600; color: var(--marine-clair); white-space: nowrap; }
.cellule-titre { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cellule-sous { font-size: .78rem; color: var(--texte-faible); }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.5;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge.sans-point::before { display: none; }
.badge-bleu { background: var(--bleu-fond); color: var(--bleu); }
.badge-violet { background: var(--violet-fond); color: var(--violet); }
.badge-cyan { background: var(--cyan-fond); color: var(--cyan); }
.badge-orange { background: var(--orange-fond); color: var(--orange); }
.badge-vert { background: var(--vert-fond); color: var(--vert); }
.badge-rouge { background: var(--rouge-fond); color: var(--rouge); }
.badge-gris { background: var(--gris-fond); color: var(--gris); }

.etiq {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--texte-doux);
  font-size: .75rem;
  font-weight: 550;
  margin: 0 3px 3px 0;
}
.etiq-langue { background: var(--bleu-fond); color: var(--bleu); }

/* ---------- Barre de filtres ---------- */

.filtres {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  margin-bottom: 16px;
}
.filtre { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.filtre .etiquette { margin: 0; font-size: .72rem; }
.filtre select, .filtre input { padding: 7px 10px; font-size: .85rem; }
.filtre-recherche { flex: 1; min-width: 210px; }

/* ---------- Statistiques ---------- */

.tuile {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 17px 18px;
  box-shadow: var(--ombre-1);
  position: relative;
  overflow: hidden;
}
.tuile::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--marine); }
.tuile.vert::after { background: var(--vert); }
.tuile.orange::after { background: var(--orange); }
.tuile.rouge::after { background: var(--rouge); }
.tuile.violet::after { background: var(--violet); }
.tuile-libelle { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-faible); font-weight: 650; }
.tuile-valeur { font-size: 1.9rem; font-weight: 720; line-height: 1.15; margin-top: 5px; letter-spacing: -.02em; }
.tuile-valeur.tuile-texte { font-size: 1.22rem; letter-spacing: 0; margin-top: 8px; }
.tuile-note { font-size: .78rem; color: var(--texte-doux); margin-top: 3px; }

.graphe-barres { display: flex; flex-direction: column; gap: 11px; }
.barre-ligne { display: grid; grid-template-columns: 150px 1fr 46px; gap: 12px; align-items: center; font-size: .85rem; }
@media (max-width: 620px) { .barre-ligne { grid-template-columns: 110px 1fr 40px; gap: 8px; font-size: .8rem; } }
.barre-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texte-doux); }
.barre-piste { display: block; height: 9px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.barre-remplie { display: block; height: 100%; min-width: 3px; background: var(--marine-clair); border-radius: 5px; transition: width .5s cubic-bezier(.3, 1, .4, 1); }
.barre-remplie.ambre { background: var(--ambre); }
.barre-remplie.vert { background: var(--vert); }
.barre-remplie.violet { background: var(--violet); }
.barre-valeur { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.histo { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.histo-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.histo-barre { width: 100%; max-width: 46px; background: var(--marine-clair); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; transition: height .5s cubic-bezier(.3, 1, .4, 1); }
.histo-barre span { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-size: .74rem; font-weight: 650; color: var(--texte-doux); }
.histo-nom { font-size: .72rem; color: var(--texte-faible); white-space: nowrap; }

/* ---------- Planning ---------- */

.cal-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-mois { font-size: 1.1rem; font-weight: 650; text-transform: capitalize; }

.calendrier { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--bordure); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; }
.cal-jour-nom { background: var(--surface-2); padding: 8px 6px; text-align: center; font-size: .73rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-faible); }
.cal-case { background: var(--surface); min-height: 96px; min-width: 0; padding: 6px 7px; display: flex; flex-direction: column; gap: 4px; }
.cal-case.hors { background: var(--surface-2); opacity: .55; }
.cal-case.aujourdhui { background: var(--bleu-fond); }
.cal-num { font-size: .78rem; font-weight: 650; color: var(--texte-doux); }
.cal-case.aujourdhui .cal-num { color: var(--marine-clair); }
.cal-evt {
  font-size: .7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bleu-fond);
  color: var(--bleu);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 2.5px solid currentColor;
  font-weight: 560;
}
.cal-evt:hover { filter: brightness(.94); }
.cal-evt.deadline { background: var(--rouge-fond); color: var(--rouge); }
.cal-evt.livree { background: var(--vert-fond); color: var(--vert); }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--texte-doux); margin-top: 12px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.file-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--bordure);
  cursor: pointer;
}
.file-item:last-child { border-bottom: 0; }
.file-item:hover { background: var(--surface-2); }
.file-rang {
  width: 27px; height: 27px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--texte-doux);
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 700;
}
.file-item:nth-child(-n+3) .file-rang { background: var(--marine); color: #fff; }
.file-corps { flex: 1; min-width: 0; }
.file-titre { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: .78rem; color: var(--texte-faible); }

/* ---------- Fiche demande ---------- */

.fiche-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.fiche-id { font-family: var(--police-mono); font-size: .82rem; color: var(--texte-faible); font-weight: 600; letter-spacing: .04em; }
.fiche-titre { font-size: 1.45rem; margin: 3px 0 7px; }
.fiche-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .84rem; color: var(--texte-doux); }

.colonnes-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .colonnes-fiche { grid-template-columns: 1fr; } }

.journal { list-style: none; margin: 0; padding: 0; }
.journal li { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--bordure); font-size: .85rem; }
.journal li:last-child { border-bottom: 0; }
.journal-point { width: 8px; height: 8px; border-radius: 50%; background: var(--marine-clair); margin-top: 7px; flex: 0 0 auto; }
.journal-date { color: var(--texte-faible); font-size: .77rem; }

.commentaire {
  padding: 11px 13px;
  border-radius: var(--rayon-sm);
  background: var(--surface-2);
  border: 1px solid var(--bordure);
  margin-bottom: 9px;
  font-size: .88rem;
}
.commentaire-entete { display: flex; justify-content: space-between; gap: 10px; font-size: .77rem; color: var(--texte-faible); margin-bottom: 5px; }
.commentaire-auteur { font-weight: 650; color: var(--texte-doux); }
.commentaire-texte { white-space: pre-wrap; }

/* ---------- Listes admin ---------- */

.jetons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.jeton {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--bordure);
  font-size: .85rem;
}
.jeton button {
  border: 0; background: none; cursor: pointer;
  color: var(--texte-faible);
  width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: .9rem; line-height: 1;
  padding: 0;
}
.jeton button:hover { background: var(--rouge-fond); color: var(--rouge); }

.ligne-ajout { display: flex; gap: 8px; }
.ligne-ajout input { flex: 1; }

.table-edition { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table-edition th { text-align: left; padding: 7px 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-faible); font-weight: 650; }
.table-edition td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--bordure); }
.table-edition input, .table-edition select { padding: 6px 9px; font-size: .85rem; }
.table-edition tr:last-child td { border-bottom: 0; }

/* ---------- États ---------- */

.vide {
  text-align: center;
  padding: 54px 22px;
  color: var(--texte-faible);
}
.vide-icone { font-size: 2.4rem; opacity: .35; margin-bottom: 10px; }
.vide-titre { font-weight: 650; color: var(--texte-doux); margin-bottom: 5px; font-size: 1rem; }

.chargement { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: var(--texte-doux); }
.rond {
  width: 22px; height: 22px;
  border: 2.5px solid var(--bordure-forte);
  border-top-color: var(--marine);
  border-radius: 50%;
  animation: tourne .7s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

.encart {
  padding: 13px 16px;
  border-radius: var(--rayon-sm);
  font-size: .87rem;
  border-left: 3px solid;
  margin-bottom: 16px;
}
.encart-info { background: var(--bleu-fond); border-color: var(--bleu); color: var(--texte); }
.encart-alerte { background: var(--orange-fond); border-color: var(--orange); color: var(--texte); }
.encart-danger { background: var(--rouge-fond); border-color: var(--rouge); color: var(--texte); }
.encart-succes { background: var(--vert-fond); border-color: var(--vert); color: var(--texte); }
.encart strong { display: block; margin-bottom: 3px; }

/* ---------- Confirmation de soumission ---------- */

.confirmation { text-align: center; padding: 48px 24px; }
.confirmation-coche {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--vert-fond);
  color: var(--vert);
  display: grid; place-items: center;
  margin: 0 auto 20px;
  animation: pop .4s cubic-bezier(.2, 1.4, .5, 1);
}
.confirmation-coche svg { width: 38px; height: 38px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirmation-numero {
  display: inline-block;
  font-family: var(--police-mono);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 10px 22px;
  border-radius: var(--rayon);
  background: var(--surface-3);
  color: var(--marine-clair);
  margin: 14px 0 20px;
}

/* ---------- Modale ---------- */

.calque-modale {
  position: fixed;
  inset: 0;
  background: rgba(11, 33, 54, .55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 100;
  animation: fondu .16s ease;
}
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

.modale {
  background: var(--surface);
  border-radius: var(--rayon-lg);
  box-shadow: var(--ombre-3);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  animation: monte .2s cubic-bezier(.2, .9, .4, 1);
}
.modale.large { max-width: 900px; }
@keyframes monte { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.modale-entete { padding: 20px 24px 0; }
.modale-titre { font-size: 1.15rem; margin: 0 0 4px; }
.modale-corps { padding: 16px 24px; }
.modale-pied { padding: 6px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Toasts ---------- */

.toasts {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(380px, calc(100vw - 44px));
}
.toast {
  background: var(--marine-fonce);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--rayon);
  box-shadow: var(--ombre-3);
  font-size: .88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: glisse .22s cubic-bezier(.2, .9, .4, 1);
  border-left: 3px solid var(--marine-clair);
}
@keyframes glisse { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.sortie { animation: sort .18s ease forwards; }
@keyframes sort { to { transform: translateX(26px); opacity: 0; } }
.toast.succes { border-left-color: #4ade80; }
.toast.erreur { border-left-color: #f87171; }
.toast.alerte { border-left-color: var(--ambre-clair); }
.toast-icone { flex: 0 0 auto; font-weight: 700; }

/* ---------- Impression ---------- */

@media print {
  .entete, .pied, .barre-reseau, .barre-actions, .onglets, .filtres, .toasts, .btn { display: none !important; }
  body { background: #fff; }
  .carte { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .colonnes-fiche { grid-template-columns: 1fr; }
}
