/* Poupi Pilote — charte Poupi (#042F73 marine, lavandes), lisible d'un coup d'œil, mobile d'abord. */
:root {
  --fond: #F5F6FB;
  --surface: #FFFFFF;
  --surface-2: #F0F2F9;
  --bord: #E1E5F0;
  --texte: #1B1F3B;
  --texte-2: #5B6283;
  --texte-3: #8A90AC;
  --marine: #042F73;
  --marine-doux: #E7ECF7;
  --lavande: #A17FC1;
  --lavande-claire: #DDCCED;
  --ok: #17915F;
  --ok-fond: #E3F5EC;
  --attention: #C77700;
  --attention-fond: #FFF2DC;
  --critique: #D12F45;
  --critique-fond: #FDE6E9;
  --info: #5468A3;
  --info-fond: #E8ECF8;
  --ombre: 0 1px 2px rgba(4, 47, 115, .06), 0 4px 16px rgba(4, 47, 115, .05);
  --rayon: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0C1020;
    --surface: #151A30;
    --surface-2: #1C2240;
    --bord: #2A3156;
    --texte: #EDEFFA;
    --texte-2: #A9AFCF;
    --texte-3: #7A80A3;
    --marine: #9DB4F0;
    --marine-doux: #1F2A52;
    --ok: #3DCB8E;
    --ok-fond: #12301F;
    --attention: #F2A93B;
    --attention-fond: #3A2A0E;
    --critique: #FF6B7E;
    --critique-fond: #3E1820;
    --info: #9DB0E6;
    --info-fond: #1E2647;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .logo { font-family: Fredoka, Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: .01em; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1rem; margin: 0; }
a { color: var(--marine); }
button { font: inherit; cursor: pointer; }
.muet { color: var(--texte-2); }
.petit { font-size: .82rem; }
.chiffre { font-variant-numeric: tabular-nums; }

/* ---------- Connexion ---------- */
.connexion { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, #042F73 0%, #4A4462 60%, #A17FC1 130%); }
.carte-connexion { width: min(420px, 100%); background: var(--surface); border-radius: 20px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); display: grid; gap: 10px; }
.carte-connexion .sous { margin: 0 0 12px; color: var(--texte-2); }
.carte-connexion label { font-weight: 600; font-size: .9rem; }
.carte-connexion input { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); }
.carte-connexion input:focus { outline: 3px solid var(--lavande-claire); border-color: var(--lavande); }
.carte-connexion button { margin-top: 6px; padding: 13px; border: 0; border-radius: 12px; background: #042F73; color: #fff; font-weight: 600; }
.carte-connexion .message { min-height: 1.5em; margin: 4px 0 0; color: var(--texte-2); font-size: .9rem; }

/* ---------- Structure ---------- */
.appli { min-height: 100dvh; display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "barre barre" "menu page"; }
.barre { grid-area: barre; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--bord); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; color: var(--texte); text-decoration: none; }
.logo b { color: var(--lavande); font-weight: 600; }
.logo-icone { width: 30px; height: 30px; border-radius: 9px; background: #042F73 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 18h5l3-7 4 12 3-7h5' fill='none' stroke='%23DDCCED' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100%; flex: none; }
.etat-global { flex: 1; display: flex; justify-content: center; }
.direct { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-size: .82rem; white-space: nowrap; }
.direct .point { width: 8px; height: 8px; border-radius: 50%; background: var(--texte-3); }
.direct.actif .point { background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: battement 2s infinite; }
@keyframes battement { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.menu { grid-area: menu; position: sticky; top: 61px; align-self: start; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; height: calc(100dvh - 61px); }
.menu a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--texte-2); text-decoration: none; font-weight: 500; }
.menu a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu a:hover { background: var(--surface-2); color: var(--texte); }
.menu a.actif { background: var(--marine-doux); color: var(--marine); font-weight: 600; }
.page { grid-area: page; padding: 28px 32px 64px; max-width: 1280px; width: 100%; outline: none; }

@media (max-width: 860px) {
  .appli { grid-template-columns: 1fr; grid-template-areas: "barre" "page"; }
  .barre { padding: 10px 16px; gap: 10px; }
  .logo { font-size: 1.1rem; }
  .etat-global { justify-content: flex-end; }
  .direct #direct-texte { display: none; }
  .menu { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; z-index: 20; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--bord); }
  .menu a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: .68rem; flex: 1; text-align: center; }
  .menu a.actif { background: none; }
  .page { padding: 18px 16px 100px; }
}

/* ---------- Pastilles d'état ---------- */
.pastille { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.pastille::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.n-ok { color: var(--ok); background: var(--ok-fond); }
.n-attention { color: var(--attention); background: var(--attention-fond); }
.n-critique { color: var(--critique); background: var(--critique-fond); }
.n-info { color: var(--info); background: var(--info-fond); }
.n-inconnu { color: var(--texte-3); background: var(--surface-2); }
.point-etat { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.point-etat.n-ok { background: var(--ok); } .point-etat.n-attention { background: var(--attention); } .point-etat.n-critique { background: var(--critique); } .point-etat.n-info { background: var(--info); } .point-etat.n-inconnu { background: var(--texte-3); }

/* ---------- Bandeau ---------- */
.bandeau { border-radius: var(--rayon); padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start; margin-bottom: 8px; }
.bandeau .grande-icone { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: currentColor; }
.bandeau .grande-icone svg { width: 26px; height: 26px; stroke: var(--surface); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bandeau h1 { color: var(--texte); }
.bandeau p { margin: 0; color: var(--texte-2); }
.problemes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.problemes li { display: flex; gap: 10px; align-items: baseline; color: var(--texte); }
.problemes li .point-etat { transform: translateY(1px); }
.problemes .detail { color: var(--texte-2); font-size: .85rem; display: block; }

/* ---------- Cartes ---------- */
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px 20px; box-shadow: var(--ombre); min-width: 0; }
.carte.lien { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.carte.lien:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(4, 47, 115, .1); }
.carte-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.carte-tete h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marque { font-size: .78rem; color: var(--texte-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sonde { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--bord); }
.sonde:first-of-type { border-top: 0; }
.sonde-nom { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.sonde-nom span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sonde-ms { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sonde .barres { grid-column: 1 / -1; }
.sonde-pied { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: .78rem; color: var(--texte-3); }
.barres { display: flex; gap: 2px; height: 26px; align-items: flex-end; }
.barres i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--ok); opacity: .85; }
.barres i.ko { background: var(--critique); height: 100% !important; opacity: 1; }
.barres i.lent { background: var(--attention); }
.barres i.vide { background: var(--surface-2); height: 100% !important; }

/* Jauges des serveurs */
.jauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.jauge .valeur { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.jauge .libelle { font-size: .78rem; color: var(--texte-3); font-weight: 500; }
.jauge .piste { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.jauge .piste i { display: block; height: 100%; border-radius: 3px; background: var(--marine); }
.jauge.n-attention .piste i { background: var(--attention); } .jauge.n-critique .piste i { background: var(--critique); }
.jauge.n-attention, .jauge.n-critique, .jauge.n-ok { background: none; }
.infos-serveur { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .82rem; color: var(--texte-2); }

/* Tableaux */
.tableau-conteneur { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 600; color: var(--texte-3); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--bord); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.d, th.d { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Incidents */
.incident { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--bord); }
.incident:first-child { border-top: 0; }
.incident .point-etat { margin-top: 7px; }
.incident .titre { font-weight: 600; }
.incident .detail { grid-column: 2 / -1; color: var(--texte-2); font-size: .86rem; white-space: pre-line; overflow-wrap: anywhere; }
.incident .quand { color: var(--texte-3); font-size: .82rem; text-align: right; white-space: nowrap; }
.incident textarea { grid-column: 2 / -1; font: inherit; font-size: .86rem; border: 1px dashed var(--bord); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); color: var(--texte); resize: vertical; min-height: 38px; }
.vide-etat { padding: 28px; text-align: center; color: var(--texte-2); }

/* Analyse */
.recos { display: grid; gap: 10px; counter-reset: reco; }
.reco { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.reco::before { counter-increment: reco; content: counter(reco); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--marine-doux); color: var(--marine); }
.reco.p1::before { background: var(--critique-fond); color: var(--critique); }
.reco .action { color: var(--texte-2); font-size: .88rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi .valeur { font-size: 1.8rem; font-weight: 700; font-family: Fredoka, Inter, sans-serif; font-variant-numeric: tabular-nums; }
.kpi .libelle { color: var(--texte-2); font-size: .85rem; }
.dispo-bonne { color: var(--ok); } .dispo-moyenne { color: var(--attention); } .dispo-mauvaise { color: var(--critique); }
.graphique { width: 100%; height: 140px; display: block; }
.graphique .axe { stroke: var(--bord); stroke-width: 1; }
.graphique .ligne { fill: none; stroke: var(--marine); stroke-width: 2; vector-effect: non-scaling-stroke; }
.graphique .aire { fill: color-mix(in srgb, var(--marine) 12%, transparent); stroke: none; }
.graphique text { fill: var(--texte-3); font-size: 10px; }
.onglets { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.onglets button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; color: var(--texte-2); font-weight: 500; }
.onglets button.actif { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }

/* Marketing */
.module { display: grid; gap: 8px; align-content: start; }
.module .icone-module { width: 40px; height: 40px; border-radius: 12px; background: var(--marine-doux); display: grid; place-items: center; }
.module .icone-module svg { width: 22px; height: 22px; fill: none; stroke: var(--marine); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.module p { margin: 0; color: var(--texte-2); font-size: .9rem; }
.module ul { margin: 0; padding-left: 18px; color: var(--texte-2); font-size: .86rem; }
.etiquette { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--texte-2); justify-self: start; }
.etiquette.prete { background: var(--ok-fond); color: var(--ok); }
.entete-page { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.entete-page p { margin: 0; color: var(--texte-2); }
.retour { display: inline-flex; gap: 6px; align-items: center; color: var(--texte-2); text-decoration: none; font-size: .9rem; margin-bottom: 10px; }
.chargement { padding: 60px; text-align: center; color: var(--texte-3); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Poupi Hub */
.module .carte-tete { margin: 0; }
.module ul.fait { list-style: none; padding: 0; color: var(--ok); font-weight: 500; }
.module ul.fait li::before { content: "✓ "; }
.module details summary { cursor: pointer; color: var(--texte-2); }
.connexions { display: flex; flex-wrap: wrap; gap: 8px; }
a.etiquette { text-decoration: none; color: var(--marine); background: var(--marine-doux); }

.puce { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; color: var(--texte); background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.puce::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.bandeau-demo { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--attention-fond); color: var(--attention); font-size: .86rem; font-weight: 500; }
.onglets { flex-wrap: wrap; margin-bottom: 18px; }
.filtres { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.filtres input, .filtres select, #form-note textarea { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); }
.filtres input { flex: 1 1 240px; }
.ligne-lien { cursor: pointer; } .ligne-lien:hover td { background: var(--surface-2); }
.fiche-tete { display: flex; gap: 18px; align-items: flex-start; }
.avatar { width: 64px; height: 64px; border-radius: 20px; background: var(--marine-doux); color: var(--marine); display: grid; place-items: center; font: 600 1.4rem Fredoka, sans-serif; text-transform: uppercase; flex: none; }
.coordonnees { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: .9rem; }
.action-reco { margin-top: 16px; padding: 14px 16px; border-radius: 14px; display: grid; gap: 2px; background: var(--info-fond); border-left: 4px solid var(--info); }
.action-reco.u-haute { background: var(--critique-fond); border-color: var(--critique); } .action-reco.u-moyenne { background: var(--attention-fond); border-color: var(--attention); }
.action-reco b { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-2); }
.fiche-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 0 24px; align-items: start; }
@media (max-width: 1100px) { .fiche-colonnes { grid-template-columns: minmax(0, 1fr); } }
.tunnel + .tunnel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--bord); }
.tunnel-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.etapes { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; overflow-x: auto; }
.etapes li { flex: 1 1 0; min-width: 96px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--texte-3); font-size: .8rem; font-weight: 600; display: grid; gap: 2px; border-top: 3px solid var(--bord); }
.etapes li.faite { color: var(--texte); border-top-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.etapes small { font-weight: 400; color: var(--texte-2); }
.axes { display: grid; gap: 6px; margin-top: 12px; }
.axe-score { display: grid; grid-template-columns: 110px 1fr 32px; gap: 10px; align-items: center; font-size: .84rem; text-transform: capitalize; }
.axe-score .piste { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; } .axe-score .piste i { display: block; height: 100%; background: var(--ok); } .axe-score .piste i.faible { background: var(--critique); }
.axe-score b { text-align: right; font-variant-numeric: tabular-nums; }
.oui { color: var(--ok); font-weight: 600; }
#form-note { display: grid; gap: 8px; } #form-note button { justify-self: end; padding: 8px 16px; border: 0; border-radius: 10px; background: #042F73; color: #fff; font-weight: 600; }
.note { padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--bord); white-space: pre-line; overflow-wrap: anywhere; }
.historique { max-height: 640px; overflow-y: auto; }
.evt { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 8px 0; font-size: .88rem; }
.evt-icone { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.entonnoir { display: grid; gap: 8px; margin-top: 8px; }
.etage { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 78px; gap: 10px; align-items: center; font-size: .86rem; }
.etage-barre { height: 18px; border-radius: 6px; background: var(--surface-2); overflow: hidden; } .etage-barre i { display: block; height: 100%; border-radius: 6px; }
.etage-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.baisse { color: var(--critique); font-weight: 600; }
.barres.jours { height: 110px; gap: 3px; } .barres.jours i { opacity: 1; border-radius: 3px 3px 0 0; }
.jour-titre { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--bord); font-weight: 600; font-size: .82rem; color: var(--texte-2); text-transform: capitalize; }
.jour-titre:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.evt.ligne-lien { border-radius: 10px; padding: 8px; margin: 0 -8px; } .evt.ligne-lien:hover { background: var(--surface-2); }
button.plus { display: block; margin: 12px auto 0; padding: 8px 18px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); font-weight: 600; }
.etage-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { min-width: 0; }
.etage { grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) 78px; }

/* Liste du jour et gestion */
.priorite, .tache { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid var(--bord); }
.tache { grid-template-columns: 1fr auto; } h3 + .priorite, h3 + .tache { border-top: 0; margin-top: 6px; }
.rang { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.appeler { white-space: nowrap; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 10px; background: var(--marine-doux); }
.consigne { margin-top: 4px; white-space: pre-line; color: var(--texte-2); max-width: 70ch; }
.tache-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tache-actions button, .gestion button, button.principal { font: inherit; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); font-weight: 600; }
button.principal, .tache-actions [data-fait] { background: #042F73; border-color: #042F73; color: #fff; }
button.discret { border-color: transparent; color: var(--texte-2); } button:disabled { opacity: .5; }
.gestion { display: grid; gap: 10px; } .gestion label { display: grid; gap: 4px; font-size: .86rem; font-weight: 600; } .gestion label.ligne { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.gestion select, .gestion input:not([type=checkbox]), .gestion textarea, .tache-actions select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); min-width: 0; width: 100%; }
.tache-actions select { width: auto; } .gestion .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .gestion hr { border: 0; border-top: 1px solid var(--bord); margin: 4px 0; width: 100%; }
.gestion .message { min-height: 0; margin: 0; font-size: .86rem; font-weight: 600; } .gestion summary { cursor: pointer; }
@media (max-width: 600px) { .priorite { grid-template-columns: auto 1fr; } .priorite .appeler { grid-column: 2; justify-self: start; } .tache { grid-template-columns: 1fr; } .tache-actions { justify-content: flex-start; } }

table.emails td:first-child { min-width: 240px; } table.emails tr.total td { background: var(--surface-2); border-bottom: 0; }

/* Disponibilités */
.semaine { display: grid; gap: 6px; }
.jour { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--bord); } .jour:first-child { border-top: 0; }
.plages { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.plage { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.plage input, .absence input, .absence select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); }
.jour button, .plage button { font: inherit; background: none; border: 0; color: var(--marine); font-weight: 600; padding: 4px 6px; cursor: pointer; } .plage button { color: var(--texte-3); }
.absence { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; } .absence label { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; } .absence input[type=number] { width: 76px; } .absence #ab-motif { flex: 1 1 180px; }
.personne label.ligne { display: flex; gap: 6px; align-items: center; }
@media (max-width: 600px) { .jour { grid-template-columns: 1fr auto; } .jour .plages { grid-column: 1 / -1; order: 3; } }

/* Séquences */
.etape-seq { border-top: 1px solid var(--bord); padding: 12px 0; } .etape-seq.inactive > .apercu, .etape-seq.inactive > .objet { opacity: .5; }
.etape-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.etape-seq .objet { font-weight: 600; margin: 6px 0 2px 38px; } .etape-seq .apercu { margin-left: 38px; color: var(--texte-2); font-size: .88rem; white-space: pre-line; max-height: 4.6em; overflow: hidden; }
.resultats { margin: 8px 0 0 38px; display: grid; gap: 4px; } .res { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; } .res b { min-width: 150px; }
.variante { margin: 10px 0 0 38px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); } .variante .objet, .variante .apercu { margin-left: 0; }
.edition { margin: 10px 0 0 38px; display: grid; gap: 10px; } .edition label { display: grid; gap: 4px; font-size: .86rem; font-weight: 600; } .edition label.ligne { display: flex; font-weight: 500; }
.edition input:not([type=checkbox]), .edition textarea { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); width: 100%; }
.edition hr { border: 0; border-top: 1px solid var(--bord); width: 100%; margin: 2px 0; } .bloc-b { display: grid; gap: 10px; margin-top: 8px; }
.edition button, .variante button { font: inherit; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); font-weight: 600; cursor: pointer; }
.edition button.principal { background: #042F73; border-color: #042F73; color: #fff; } .edition button.discret, .etape-tete button.discret { border-color: transparent; color: var(--marine); background: none; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 600px) { .etape-seq .objet, .etape-seq .apercu, .resultats, .variante, .edition { margin-left: 0; } }

.compte-form { display: grid; gap: 12px; margin-top: 10px; } .compte-form label { display: grid; gap: 4px; font-size: .86rem; font-weight: 600; } .compte-form label.ligne { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.compte-form input:not([type=checkbox]), .compte-form select { font: inherit; padding: 9px 11px; border-radius: 10px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte); }
.compte-form .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .compte-form fieldset { border: 1px solid var(--bord); border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; } .compte-form legend { font-size: .82rem; font-weight: 600; padding: 0 6px; }
td button.discret { font: inherit; background: none; border: 0; color: var(--marine); font-weight: 600; cursor: pointer; padding: 2px 4px; }
@media (max-width: 600px) { .compte-form .deux { grid-template-columns: 1fr; } }

.choix-marque { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.choix-marque button { font: inherit; font-weight: 600; font-size: .88rem; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte-2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.choix-marque button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.choix-marque button.actif { border-color: var(--c); color: var(--texte); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }

/* Sécurité */
.pt { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--bord); align-items: start; } .pt:first-child, td .pt, .carte-tete + .pt { border-top: 0; }
.pt-etat { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
table.securite td { min-width: 170px; } table.securite td:first-child { min-width: 130px; } table.securite .pt { padding: 0 0 6px; }

/* Contenus et calendrier éditorial */
.cal-entete { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .cal-entete h3 { margin: 0; min-width: 150px; text-align: center; text-transform: capitalize; }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-case { min-height: 84px; padding: 6px; border-radius: 10px; background: var(--surface-2); min-width: 0; } .cal-case.vide { background: none; } .cal-case.auj { outline: 2px solid var(--marine); }
.cal-num { font-size: .74rem; color: var(--texte-3); font-weight: 600; margin-bottom: 4px; text-transform: capitalize; }
.contenu-pastille { display: block; width: 100%; text-align: left; font: inherit; font-size: .8rem; line-height: 1.25; padding: 4px 6px; margin-top: 4px; border: 0; border-left: 4px solid var(--c); border-radius: 6px; background: var(--surface); color: var(--texte); cursor: pointer; overflow-wrap: anywhere; }
.contenu-pastille span { display: block; color: var(--texte-3); font-size: .72rem; } .contenu-pastille.publie { opacity: .65; }
.contenu-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--bord); } .contenu-ligne > div { flex: 1 1 280px; min-width: 0; }
.lien-titre { font: inherit; font-weight: 600; color: var(--marine); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
pre.script { white-space: pre-wrap; font: inherit; line-height: 1.6; background: var(--surface-2); padding: 14px; border-radius: 10px; max-height: 420px; overflow: auto; margin: 8px 0 0; }
@media (max-width: 760px) { .cal-grille { grid-template-columns: 1fr; } .cal-case { min-height: 0; } .cal-case.vide, .cal-case.sans:not(.auj) { display: none; } }
.etape-c { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--texte-2); }
.etape-c.ok { background: var(--ok-fond); color: var(--ok); } .etape-c.attention { background: var(--attention-fond); color: var(--attention); } .etape-c.info { background: var(--info-fond); color: var(--info); }
