/*
 * Deploy — interface. Sobre, dense, monochrome : une seule couleur d'accent, des statuts qui
 * se lisent sans couleur (point + libellé), clair et sombre. Geist, vendorisée : pas de requête
 * vers un tiers (la politique de sécurité de la page l'interdit d'ailleurs).
 */
@font-face {
  font-family: 'Geist'; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('/vendor/polices/Geist-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono'; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('/vendor/polices/GeistMono-Variable.woff2') format('woff2');
}

:root {
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --rayon: 6px;
  --rayon-lg: 10px;
  --largeur: 1200px;
  --haut-barre: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: dark;
  --fond: #000;
  --fond-2: #0a0a0a;
  --surface: #0a0a0a;
  --surface-2: #111;
  --survol: #161616;
  --bordure: #242424;
  --bordure-2: #383838;
  --texte: #ededed;
  --texte-2: #a1a1a1;
  --texte-3: #7a7a7a;
  --lien: #52a8ff;
  --ok: #3fb26a;
  --ok-texte: #5fd38a;
  --ok-fond: rgba(63, 178, 106, .12);
  --err: #e5484d;
  --err-texte: #ff6c70;
  --err-fond: rgba(229, 72, 77, .12);
  --alerte: #f5a524;
  --alerte-texte: #ffc15a;
  --alerte-fond: rgba(245, 165, 36, .12);
  --info: #3b9eff;
  --info-fond: rgba(59, 158, 255, .12);
  --neutre: #6b6b6b;
  --bouton-fond: #ededed;
  --bouton-texte: #0a0a0a;
  --bouton-survol: #fff;
  --focus: rgba(82, 168, 255, .55);
  --ombre-menu: 0 8px 30px rgba(0, 0, 0, .6), 0 0 0 1px #2a2a2a;
  --journal-fond: #050505;
}

:root[data-theme='light'] {
  color-scheme: light;
  --fond: #fff;
  --fond-2: #fafafa;
  --surface: #fff;
  --surface-2: #fafafa;
  --survol: #f5f5f5;
  --bordure: #e6e6e6;
  --bordure-2: #cfcfcf;
  --texte: #171717;
  --texte-2: #5f5f5f;
  --texte-3: #858585;
  --lien: #0068d6;
  --ok: #1f9d55;
  --ok-texte: #11793e;
  --ok-fond: rgba(31, 157, 85, .10);
  --err: #d93036;
  --err-texte: #c4262c;
  --err-fond: rgba(217, 48, 54, .08);
  --alerte: #c77a00;
  --alerte-texte: #8f5a00;
  --alerte-fond: rgba(245, 165, 36, .14);
  --info: #0070f3;
  --info-fond: rgba(0, 112, 243, .08);
  --neutre: #a0a0a0;
  --bouton-fond: #171717;
  --bouton-texte: #fff;
  --bouton-survol: #000;
  --focus: rgba(0, 104, 214, .45);
  --ombre-menu: 0 8px 30px rgba(0, 0, 0, .12), 0 0 0 1px #e6e6e6;
  --journal-fond: #fafafa;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--fond); color: var(--texte);
  font: 14px/1.5 var(--sans); font-feature-settings: 'tnum' 1, 'cv11' 1;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .92em; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--info-fond); }
.sr-seulement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muet { color: var(--texte-2); }
.tres-muet { color: var(--texte-3); }
.mono { font-family: var(--mono); }
.tronque { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ------------------------------------------------------------------ la barre -- */
.barre { border-bottom: 1px solid var(--bordure); background: var(--fond); position: sticky; top: 0; z-index: 20; }
.barre-haut {
  max-width: var(--largeur); margin: 0 auto; height: var(--haut-barre);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
.logo { display: inline-flex; align-items: center; color: var(--texte); border-radius: 6px; }
.logo svg { width: 26px; height: 26px; }
.fil { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-weight: 500; overflow: hidden; white-space: nowrap; }
.fil > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fil > .sep { flex: none; }
.fil .sep { color: var(--bordure-2); font-weight: 300; font-size: 22px; line-height: 1; transform: rotate(14deg); user-select: none; }
.fil a, .fil span.nom { padding: 4px 6px; border-radius: 6px; }
.fil a:hover { background: var(--survol); }
.fil .instance { display: inline-flex; align-items: center; gap: 8px; }
.fil .courant { color: var(--texte); }
.fil .discret { color: var(--texte-2); font-weight: 400; }
.barre-actions { display: flex; align-items: center; gap: 4px; }
.onglets { max-width: var(--largeur); margin: 0 auto; padding: 0 18px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.onglets a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 8px 12px; margin: 0 4px;
  color: var(--texte-2); font-size: 14px; white-space: nowrap; border-radius: 6px 6px 0 0;
}
.onglets a:hover { color: var(--texte); }
.onglets a[aria-current='page'] { color: var(--texte); }
.onglets a[aria-current='page']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--texte); }
.compteur-onglet {
  min-width: 18px; padding: 0 5px; height: 18px; display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--alerte-fond); color: var(--alerte-texte); font-size: 11px; font-weight: 600;
}

.menu-zone { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px;
  background: var(--surface); border-radius: var(--rayon-lg); box-shadow: var(--ombre-menu); z-index: 30;
}
.menu .titre { padding: 8px 10px 6px; font-size: 12px; color: var(--texte-3); }
.menu button.choix {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left;
}
.menu button.choix:hover { background: var(--survol); }
.menu .coche { margin-left: auto; color: var(--texte-2); }
.menu hr { border: 0; border-top: 1px solid var(--bordure); margin: 6px -6px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--bordure);
  background: linear-gradient(135deg, var(--info), var(--ok)); color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; padding: 0;
}

/* ------------------------------------------------------------------- la page -- */
main { max-width: var(--largeur); margin: 0 auto; padding: 32px 24px 96px; }
.entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.entete h1 { font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -.03em; }
.entete .sous { margin-top: 4px; color: var(--texte-2); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.entete .sous a:hover { color: var(--texte); }
.entete .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section { margin-top: 40px; }
.section-titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-titre h2 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.02em; }
.lien-discret { color: var(--texte-2); display: inline-flex; align-items: center; gap: 4px; }
.lien-discret:hover { color: var(--texte); }

/* ------------------------------------------------------------------ boutons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); color: var(--texte);
  font-weight: 500; font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--survol); border-color: var(--bordure-2); }
.btn:active { transform: translateY(.5px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primaire { background: var(--bouton-fond); color: var(--bouton-texte); border-color: var(--bouton-fond); }
.btn-primaire:hover { background: var(--bouton-survol); border-color: var(--bouton-survol); }
.btn-fantome { background: transparent; border-color: transparent; color: var(--texte-2); }
.btn-fantome:hover { background: var(--survol); border-color: transparent; color: var(--texte); }
.btn-danger { color: var(--err-texte); }
.btn-lg { height: 40px; padding: 0 16px; border-radius: 8px; }
.btn-icone { width: 32px; padding: 0; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 13px; }
.btn.occupe { pointer-events: none; }
.btn.occupe > :not(.rond) { opacity: 0; position: absolute; }
.btn.occupe { position: relative; }

.champ {
  height: 32px; padding: 0 10px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--fond); color: var(--texte); min-width: 0;
}
.champ::placeholder { color: var(--texte-3); }
.champ:hover { border-color: var(--bordure-2); }
.champ:focus { outline: none; border-color: var(--texte-2); box-shadow: 0 0 0 3px var(--focus); }
select.champ { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--texte-2) 50%), linear-gradient(135deg, var(--texte-2) 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }
.recherche { position: relative; }
.recherche svg { position: absolute; left: 10px; top: 8px; width: 16px; height: 16px; color: var(--texte-3); }
.recherche .champ { padding-left: 32px; width: 260px; }

/* ------------------------------------------------------------------- statuts -- */
.statut { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.statut.err, .statut.err svg { color: var(--err-texte); }
.point { width: 8px; height: 8px; border-radius: 50%; background: var(--neutre); flex: none; }
.point.ok { background: var(--ok); }
.point.err { background: var(--err); }
.point.alerte { background: var(--alerte); }
.point.info { background: var(--info); }
.point.vivant { animation: pouls 1.6s ease-in-out infinite; }
@keyframes pouls { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--alerte) 50%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.rond {
  width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--bordure-2); border-top-color: var(--alerte);
  animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
.puce {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--bordure); color: var(--texte-2); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.puce.ok { background: var(--ok-fond); border-color: transparent; color: var(--ok-texte); }
.puce.err { background: var(--err-fond); border-color: transparent; color: var(--err-texte); }
.puce.alerte { background: var(--alerte-fond); border-color: transparent; color: var(--alerte-texte); }
.puce.info { background: var(--info-fond); border-color: transparent; color: var(--lien); }
.puce svg { width: 12px; height: 12px; }
.sha { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--bordure); color: var(--texte-2); }
a.sha:hover { color: var(--texte); border-color: var(--bordure-2); }

/* -------------------------------------------------------------------- cartes -- */
.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-lg); }
.carte-corps { padding: 20px; }
.carte-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--bordure); }
.carte-entete h2, .carte-entete h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.carte-pied { padding: 12px 20px; border-top: 1px solid var(--bordure); background: var(--surface-2); border-radius: 0 0 var(--rayon-lg) var(--rayon-lg); color: var(--texte-2); font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.alerte-bloc {
  display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--rayon-lg); border: 1px solid var(--bordure); background: var(--surface); margin-bottom: 12px; align-items: flex-start;
}
.alerte-bloc svg { width: 18px; height: 18px; margin-top: 2px; }
.alerte-bloc.err { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: var(--err-fond); }
.alerte-bloc.err svg { color: var(--err-texte); }
.alerte-bloc.alerte { border-color: color-mix(in srgb, var(--alerte) 40%, transparent); background: var(--alerte-fond); }
.alerte-bloc.alerte svg { color: var(--alerte-texte); }
.alerte-bloc .titre { font-weight: 600; }
.alerte-bloc code { background: color-mix(in srgb, var(--texte) 8%, transparent); padding: 1px 5px; border-radius: 4px; }

/* ----------------------------------------------------------- cartes de projet -- */
.grille-projets { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.projet {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px;
  transition: border-color .15s, background .15s;
}
.projet:hover { border-color: var(--bordure-2); background: var(--fond-2); }
.projet-tete { display: flex; align-items: flex-start; gap: 12px; }
.projet-icone {
  width: 36px; height: 36px; border-radius: 8px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px; text-transform: uppercase;
  background: var(--surface-2); border: 1px solid var(--bordure); color: var(--texte);
}
.projet-nom { font-size: 16px; font-weight: 600; letter-spacing: -.02em; line-height: 20px; }
.projet-nom a::after { content: ''; position: absolute; inset: 0; border-radius: var(--rayon-lg); }
.projet-depot { display: flex; align-items: center; gap: 6px; color: var(--texte-2); font-size: 13px; margin-top: 2px; }
.projet-depot svg { width: 14px; height: 14px; }
.projet-liens { position: relative; z-index: 1; margin-left: auto; display: flex; gap: 2px; }
.projet-etat { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.projet-commit { display: flex; flex-direction: column; gap: 4px; min-height: 40px; }
.projet-commit .message { color: var(--texte); line-height: 20px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.projet-commit .meta { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-size: 13px; min-width: 0; }
.projet-commit .meta svg { width: 14px; height: 14px; }
.projet-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--bordure); }
.projet-pied .btn { position: relative; z-index: 1; }
.projet-stats { color: var(--texte-2); font-size: 13px; }
.projet-stats b { color: var(--texte); font-weight: 600; }
.progression { height: 3px; border-radius: 2px; background: var(--bordure); overflow: hidden; }
.progression > i { display: block; height: 100%; background: var(--alerte); border-radius: 2px; transition: width .5s var(--ease); }
.projet-avertissement { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--alerte-texte); }
.projet-avertissement svg { width: 14px; height: 14px; }
.projet-vide { align-items: center; justify-content: center; text-align: center; border-style: dashed; min-height: 220px; color: var(--texte-2); }
.projet-vide h3 { color: var(--texte); font-size: 15px; font-weight: 600; }
.commande { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 8px 8px 12px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--fond); font-family: var(--mono); font-size: 12.5px; text-align: left; }
.commande code { overflow-x: auto; white-space: nowrap; scrollbar-width: none; flex: 1; font-size: inherit; }

.frise { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.frise i { flex: 1; min-width: 4px; max-width: 12px; height: 100%; border-radius: 2px; background: var(--bordure); opacity: .9; }
.frise i.ok { background: var(--ok); }
.frise i.err { background: var(--err); }
.frise i.alerte { background: var(--alerte); }
.frise i.info { background: var(--info); }
.frise i.gris { background: var(--neutre); opacity: .5; height: 40%; }
.frise i.rien { background: var(--bordure); height: 40%; opacity: .6; }

/* -------------------------------------------------------- liste de déploiements -- */
.liste { overflow: hidden; }
.liste-ligne {
  display: grid; grid-template-columns: minmax(120px, 150px) minmax(110px, 160px) minmax(0, 1fr) minmax(120px, 190px) 70px 110px 16px;
  align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--bordure); position: relative; color: inherit;
}
.liste-ligne:first-child { border-top: 0; }
a.liste-ligne:hover { background: var(--fond-2); }
.liste-entete { padding-top: 10px; padding-bottom: 10px; font-size: 12px; color: var(--texte-3); background: var(--surface-2); border-top: 0; text-transform: none; letter-spacing: 0; }
.liste-ligne .quoi { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.liste-ligne .quoi .message { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-ligne .quoi .meta { color: var(--texte-2); font-size: 13px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.liste-ligne .quoi .meta svg { width: 13px; height: 13px; }
.liste-ligne .projet-col { font-weight: 500; min-width: 0; }
.liste-ligne .projet-col small { display: block; color: var(--texte-3); font-weight: 400; font-size: 12px; }
.liste-ligne .duree, .liste-ligne .quand { color: var(--texte-2); font-size: 13px; text-align: right; white-space: nowrap; }
.liste-ligne .origine { color: var(--texte-2); font-size: 13px; min-width: 0; }
.liste-ligne .chevron { color: var(--texte-3); width: 14px; height: 14px; }
.liste-ligne.nouvelle { animation: apparait 1.4s var(--ease); }
@keyframes apparait { from { background: var(--info-fond); } to { background: transparent; } }
.vide { padding: 48px 24px; text-align: center; color: var(--texte-2); }
.vide strong { display: block; color: var(--texte); font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.pagination { display: flex; justify-content: center; padding: 16px; border-top: 1px solid var(--bordure); }
.filtres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ----------------------------------------------------------- tuiles de chiffres -- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tuile { padding: 16px 20px; }
.tuile .libelle { font-size: 13px; color: var(--texte-2); }
.tuile .valeur { margin-top: 6px; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 8px; }
.tuile .valeur small { font-size: 13px; font-weight: 400; color: var(--texte-3); letter-spacing: 0; }

.faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px 24px; padding: 20px; }
.fait { min-width: 0; }
.fait .libelle { font-size: 12.5px; color: var(--texte-3); margin-bottom: 4px; }
.fait .valeur { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.fait .valeur a:hover { text-decoration: underline; }

/* -------------------------------------------------------------------- étapes -- */
.etapes { list-style: none; margin: 0; padding: 8px 0; }
.etape { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 12px; padding: 8px 20px; align-items: start; }
.etape:not(:last-child)::before { content: ''; position: absolute; left: 29px; top: 30px; bottom: -10px; width: 1px; background: var(--bordure); }
.etape-icone { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; background: var(--fond); }
.etape-icone svg { width: 20px; height: 20px; }
.etape-icone .vide-rond { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--texte-3); }
.etape-icone .saute-rond { width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed var(--texte-3); }
.etape-nom { font-weight: 500; }
.etape-detail { grid-column: 2 / span 2; color: var(--texte-3); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.etape-detail code { color: var(--texte-2); }
.etape-duree { color: var(--texte-2); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.etape.saute .etape-nom { color: var(--texte-3); font-weight: 400; }
.etape.attente .etape-nom { color: var(--texte-3); font-weight: 400; }
.etape.echec .etape-nom { color: var(--err-texte); }
.etape.en_cours .etape-nom { color: var(--texte); }
.ico-ok { color: var(--ok); }
.ico-err { color: var(--err); }

.pipeline { padding: 4px 0; }
.pipeline-ligne { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 20px; align-items: start; }
.pipeline-ligne + .pipeline-ligne { border-top: 1px solid var(--bordure); }
.pipeline-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--bordure); font-size: 12px; color: var(--texte-2); }
.pipeline-nom { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pipeline-cmd { margin-top: 6px; padding: 6px 10px; border-radius: var(--rayon); background: var(--fond); border: 1px solid var(--bordure); font-family: var(--mono); font-size: 12.5px; color: var(--texte-2); overflow-x: auto; white-space: pre; scrollbar-width: thin; }
.pipeline-quand { margin-top: 6px; color: var(--texte-3); font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ----------------------------------------------------------- page déploiement -- */
.deploiement-grille { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.colonne { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.commits { list-style: none; margin: 0; padding: 4px 0; }
.commits li { display: flex; gap: 10px; align-items: baseline; padding: 8px 20px; }
.commits li + li { border-top: 1px solid var(--bordure); }
.commits .message { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.commits .auteur { color: var(--texte-3); font-size: 12.5px; white-space: nowrap; }

.journal { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.journal-barre { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--bordure); }
.journal-barre h2 { font-size: 15px; font-weight: 600; margin-right: auto; display: flex; align-items: center; gap: 10px; }
.journal-corps {
  height: min(68vh, 760px); min-height: 320px; overflow: auto; background: var(--journal-fond); padding: 12px 0;
  font: 12.5px/20px var(--mono); color: var(--texte-2); tab-size: 4;
}
.journal-corps.coupe .l { white-space: pre; }
.l { display: block; padding: 0 20px 0 66px; text-indent: -66px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 20px; }
.l::before { content: attr(data-n); display: inline-block; width: 52px; margin-right: 14px; text-indent: 0; text-align: right; color: var(--texte-3); opacity: .6; user-select: none; }
.l:hover { background: color-mix(in srgb, var(--texte) 5%, transparent); }
.l.station { color: var(--texte); font-weight: 600; margin-top: 8px; }
.l.cmd { color: var(--lien); }
.l.erreur { color: var(--err-texte); background: var(--err-fond); }
.l.fin { color: var(--texte); font-weight: 600; margin-top: 8px; }
.l.fin.ok { color: var(--ok-texte); }
.l.info { color: var(--texte-3); }
.journal-note { padding: 6px 20px; color: var(--texte-3); font-style: italic; }
.curseur { display: inline-block; width: 7px; height: 14px; vertical-align: text-bottom; background: var(--texte-2); animation: clignote 1s steps(1) infinite; margin-left: 2px; }
@keyframes clignote { 50% { opacity: 0; } }
.suivre-actif { color: var(--texte); background: var(--survol); }

/* --------------------------------------------------------------------- système -- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 400; font-size: 12px; color: var(--texte-3); padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--bordure); }
.table td { padding: 11px 20px; border-top: 1px solid var(--bordure); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.defilement { overflow-x: auto; }
.deux-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.canal { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.canal + .canal { border-top: 1px solid var(--bordure); }
.canal .infos { flex: 1; min-width: 0; }
.canal .nom { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.canal .detail { color: var(--texte-2); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.url-copiable { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--fond); font-family: var(--mono); font-size: 13px; min-width: 0; }
.url-copiable span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ dialogue, toasts -- */
dialog {
  padding: 0; border: 0; border-radius: 12px; background: var(--surface); color: var(--texte); box-shadow: var(--ombre-menu); width: min(440px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }
.dialogue-corps { padding: 24px 24px 20px; }
.dialogue-corps h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.dialogue-corps p { color: var(--texte-2); }
.dialogue-pied { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--bordure); background: var(--surface-2); border-radius: 0 0 12px 12px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--rayon-lg); background: var(--surface); box-shadow: var(--ombre-menu);
  pointer-events: auto; max-width: min(420px, calc(100vw - 40px)); animation: monte .25s var(--ease);
}
.toast svg { width: 16px; height: 16px; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--err); }
@keyframes monte { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ connexion -- */
.page-connexion { display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--info) 14%, transparent), transparent 70%), var(--fond); }
.connexion { width: min(400px, 100%); }
.connexion .logo svg { width: 40px; height: 40px; }
.connexion-entete { text-align: center; margin-bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.connexion-entete h1 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.connexion-entete p { color: var(--texte-2); margin-top: 6px; }
.connexion form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.formulaire-champ { display: flex; flex-direction: column; gap: 6px; }
.formulaire-champ label { font-size: 13px; font-weight: 500; }
.formulaire-champ .champ { height: 40px; width: 100%; font-size: 14px; border-radius: 8px; }
.avec-bouton { position: relative; }
.avec-bouton .champ { padding-right: 70px; }
.avec-bouton button { position: absolute; right: 4px; top: 4px; height: 32px; padding: 0 10px; border: 0; background: none; color: var(--texte-2); cursor: pointer; border-radius: 6px; font-size: 13px; }
.avec-bouton button:hover { color: var(--texte); background: var(--survol); }
.message-erreur { min-height: 20px; color: var(--err-texte); font-size: 13px; margin-top: -6px; }
.connexion .pied { text-align: center; margin-top: 20px; color: var(--texte-3); font-size: 13px; }
.connexion.refuse { animation: secousse .4s; }
@keyframes secousse { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* --------------------------------------------------------------- adaptation -- */
@media (max-width: 1000px) {
  .liste-ligne { grid-template-columns: minmax(110px, 130px) minmax(0, 1fr) 90px 14px; }
  .liste-ligne .projet-col { grid-column: 2; grid-row: 1; }
  .liste-ligne .quoi { grid-column: 2; grid-row: 2; }
  .liste-ligne > :first-child { grid-row: 1 / span 2; }
  .liste-ligne .origine, .liste-ligne .duree { display: none; }
  .liste-ligne .quand { grid-column: 3; grid-row: 1 / span 2; }
  .liste-ligne .chevron { grid-column: 4; grid-row: 1 / span 2; }
  .liste-entete { display: none; }
  .deploiement-grille { grid-template-columns: minmax(0, 1fr); }
  .deux-colonnes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  main { padding: 24px 16px 80px; }
  .barre-haut { padding: 0 16px; }
  .entete h1 { font-size: 24px; line-height: 30px; }
  .grille-projets { grid-template-columns: minmax(0, 1fr); }
  .recherche .champ { width: 100%; }
  .recherche { flex: 1; }
  /* Sur un petit écran, le fil ne garde que la page courante. */
  .fil > :not(:last-child) { display: none; }
  .journal-corps { height: 60vh; }
  .l { padding-left: 48px; text-indent: -48px; }
  .l::before { width: 38px; margin-right: 10px; }
  .liste-ligne { padding: 12px 16px; gap: 10px 12px; grid-template-columns: minmax(0, 1fr) auto 12px; }
  .liste-ligne > :first-child { grid-column: 1; grid-row: 1; }
  .liste-ligne .projet-col { grid-column: 1; grid-row: 2; }
  .liste-ligne .quoi { grid-column: 1 / span 3; grid-row: 3; }
  .liste-ligne .quand { grid-column: 2; grid-row: 1; }
  .liste-ligne .chevron { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rond { animation: tourne 1.6s linear infinite !important; }
}

/* ---------------------------------------------------------------- les serveurs -- */
.serveur-tete { display: flex; align-items: center; gap: 14px; padding: 18px 20px; flex-wrap: wrap; }
.serveur-icone { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--bordure); flex: none; }
.serveur-titre { min-width: 0; flex: 1 1 220px; }
.serveur-titre h2 { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.serveur-puces { display: flex; gap: 6px; flex-wrap: wrap; }
.serveur-projets { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 18px; align-items: center; }
.serveur .carte-corps { padding-top: 0; padding-bottom: 12px; }
.puce.lien { cursor: pointer; }
.puce.lien:hover { border-color: var(--bordure-2); color: var(--texte); }
.serveur-resultat { border-top: 1px solid var(--bordure); }
.serveur-cle { border-top: 1px solid var(--bordure); padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.serveur-cle .controle-nom { display: flex; align-items: center; gap: 6px; }
.cle-aide { font-size: 13px; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--lien); cursor: pointer; font: inherit; }
.lien-bouton:hover { text-decoration: underline; }
.serveur-vide { display: flex; flex-direction: column; gap: 12px; }
.serveur-vide h2 { font-size: 16px; font-weight: 600; }

.controles { list-style: none; margin: 0; padding: 6px 0; }
.controle { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 9px 20px; align-items: start; }
.controle > svg { margin-top: 2px; }
.controle-nom { font-weight: 500; }
.controle-detail { color: var(--texte-2); font-size: 13px; overflow-wrap: anywhere; }
.controle-conseil { color: var(--texte-3); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.controle.ko .controle-detail { color: var(--err-texte); }
.ico-avert { color: var(--alerte); }
.ico-info { color: var(--info); }

.confiance { margin: 4px 20px 16px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-fond); border-radius: var(--rayon-lg); display: flex; flex-direction: column; gap: 8px; }
.confiance p { font-size: 13px; }
.empreinte { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.empreinte code { overflow-wrap: anywhere; font-size: 12.5px; }
.empreinte .btn { margin-left: auto; }

/* ------------------------------------------------------------ flux : synchronisation -- */
.projet-flux { margin-top: 8px; }
.projet-flux .puce { height: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.flux-puce { display: inline-flex; vertical-align: middle; }
.flux-titre { margin-left: 14px; }
.flux-titre .puce { height: 24px; font-size: 12.5px; vertical-align: middle; }

/* ---------------------------------------------- réglages du projet : les interrupteurs -- */
.interrupteur {
  position: relative; flex: none; width: 36px; height: 20px; margin-top: 1px; padding: 0; border-radius: 999px;
  border: 1px solid var(--bordure-2); background: var(--surface-2); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.interrupteur::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--texte-2); transition: transform .18s var(--ease), background .15s;
}
.interrupteur[aria-checked='true'] { background: var(--bouton-fond); border-color: var(--bouton-fond); }
.interrupteur[aria-checked='true']::after { transform: translateX(16px); background: var(--bouton-texte); }
.interrupteur:hover:not(:disabled) { border-color: var(--texte-3); }
.interrupteur[aria-checked='true']:hover:not(:disabled) { border-color: var(--bouton-fond); background: var(--bouton-survol); }
.interrupteur:focus-visible { border-radius: 999px; outline-offset: 3px; }
.interrupteur:disabled { opacity: .45; cursor: not-allowed; }
.interrupteur.occupe { cursor: progress; }

.reglages-notif { margin-bottom: 16px; }
.titre-icone { display: inline-flex; align-items: center; gap: 8px; }
.reglages-note { padding: 12px 20px; border-bottom: 1px solid var(--bordure); color: var(--texte-2); font-size: 13px; background: var(--alerte-fond); }
.reglages-note code { background: color-mix(in srgb, var(--texte) 8%, transparent); padding: 1px 5px; border-radius: 4px; }
.reglages-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reglage { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; cursor: pointer; transition: background .12s; }
.reglage + .reglage { border-left: 1px solid var(--bordure); }
.reglage:last-child { border-radius: 0 0 var(--rayon-lg) 0; }
.reglage:first-child { border-radius: 0 0 0 var(--rayon-lg); }
.reglage:hover:not(.desactive) { background: var(--fond-2); }
.reglage.desactive { cursor: default; }
.reglage-texte { min-width: 0; }
.reglage-titre { font-weight: 500; line-height: 22px; }
.reglage-desc { margin-top: 2px; color: var(--texte-2); font-size: 13px; }
@media (max-width: 1000px) {
  .reglages-grille { grid-template-columns: minmax(0, 1fr); }
  .reglage + .reglage { border-left: 0; border-top: 1px solid var(--bordure); }
  .reglage:first-child { border-radius: 0; }
  .reglage:last-child { border-radius: 0 0 var(--rayon-lg) var(--rayon-lg); }
}

/* ------------------------------------------------- accueil : auteur du commit, cartes alignées -- */
.auteur { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--texte-2); }
.auteur svg { width: 13px; height: 13px; flex: none; }
.auteur .tronque { min-width: 0; }
.projet-commit .message { -webkit-line-clamp: 2; }
.projet-pied { margin-top: auto; }
