/* =====================================================================
   EPBOMI-MCID Rapports — feuille de style
   Identité alignée sur le logo EPBOMI (bleu pétrole) :
   - pétrole profond : la structure (navigation, bandeau du mois)
   - lumière dorée : l'action principale et ce qui attend
   - vert : ce qui est transmis, payé, validé
   Titres : Bricolage Grotesque — texte : Figtree
   ===================================================================== */
:root {
  --nuit: #0a2f36;
  --nuit-2: #0f3f48;
  --nuit-3: #175661;
  --royal: #036570;
  --royal-2: #024e57;
  --royal-pale: #e1f1f2;
  --lumiere: #f5b335;
  --lumiere-2: #ffc95a;
  --lumiere-texte: #8a5a00;
  --lumiere-pale: #fff4dc;
  --delivre: #2a9d4b;
  --delivre-texte: #1d6e35;
  --delivre-pale: #e3f5e8;
  --alerte: #cf3f3f;
  --alerte-texte: #9f2525;
  --alerte-pale: #fdeaea;
  --fond: #f2f7f7;
  --surface: #ffffff;
  --encre: #10282c;
  --encre-2: #4d676b;
  --encre-3: #84999c;
  --trait: #dde9ea;
  --calcule: #eaf3f3;
  --ombre: 0 1px 2px rgba(10, 47, 54, .05), 0 10px 30px -18px rgba(10, 47, 54, .25);
  --r-xl: 26px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --titre: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --bs-body-font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--encre);
  --bs-body-bg: var(--fond);
  --bs-primary: #036570;
  --bs-primary-rgb: 3, 101, 112;
  --bs-link-color: #036570;
  --bs-link-color-rgb: 3, 101, 112;
  --bs-link-hover-color: #024e57;
  --bs-link-hover-color-rgb: 2, 78, 87;
  --bs-border-color: #dde9ea;
  --bs-secondary-color: #4d676b;
}
body { font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, .titre { font-family: var(--titre); font-weight: 700; letter-spacing: -0.02em; color: var(--nuit); }
h1 { font-size: 1.85rem; line-height: 1.15; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.08rem; }
h4 { font-size: 1rem; }
.chiffres, table, .num { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:not(.btn):not(.dropdown-item):not(.page-link) { text-decoration: none; font-weight: 600; }
a:not(.btn):not(.dropdown-item):not(.page-link):hover { text-decoration: underline; }
.text-secondary { color: var(--encre-2) !important; }
:focus-visible { outline: 3px solid #4fc3d1; outline-offset: 2px; }
::selection { background: var(--lumiere-2); color: var(--nuit); }

/* --- Boutons --------------------------------------------------------- */
.btn { border-radius: var(--r-md); font-weight: 700; letter-spacing: .005em; padding: .5rem 1rem; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn-sm { border-radius: var(--r-sm); padding: .32rem .75rem; font-size: .88rem; }
.btn-lg { padding: .85rem 1.5rem; border-radius: 14px; }
.btn-primary { --bs-btn-bg: var(--royal); --bs-btn-border-color: var(--royal); --bs-btn-hover-bg: var(--royal-2);
  --bs-btn-hover-border-color: var(--royal-2); --bs-btn-active-bg: #013d45; --bs-btn-active-border-color: #013d45;
  --bs-btn-disabled-bg: #8fbcc1; --bs-btn-disabled-border-color: #8fbcc1; box-shadow: 0 6px 16px -8px rgba(3, 101, 112, .7); }
.btn-outline-primary { --bs-btn-color: var(--royal); --bs-btn-border-color: #b9dadd; --bs-btn-bg: #fff; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--royal);
  --bs-btn-hover-border-color: var(--royal); --bs-btn-active-bg: var(--royal-2); --bs-btn-active-border-color: var(--royal-2); }
.btn-outline-secondary { --bs-btn-color: var(--encre-2); --bs-btn-border-color: var(--trait); --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--fond);
  --bs-btn-hover-color: var(--nuit); --bs-btn-hover-border-color: #c3d6d8; --bs-btn-active-bg: #e3eeef; --bs-btn-active-color: var(--nuit); }
.btn-outline-danger { --bs-btn-color: var(--alerte-texte); --bs-btn-border-color: #f1c4c4; --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--alerte); --bs-btn-hover-border-color: var(--alerte); }
.btn-success { --bs-btn-bg: var(--delivre); --bs-btn-border-color: var(--delivre); --bs-btn-hover-bg: var(--delivre-texte); --bs-btn-hover-border-color: var(--delivre-texte); }
.btn-danger { --bs-btn-bg: var(--alerte); --bs-btn-border-color: var(--alerte); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--trait); --bs-btn-hover-bg: var(--fond); --bs-btn-hover-border-color: #c3d6d8; }
.btn-ambre, .btn-lumiere { background: var(--lumiere); color: var(--nuit); border: 1px solid var(--lumiere); box-shadow: 0 8px 20px -10px rgba(245, 179, 53, .9); }
.btn-ambre:hover, .btn-lumiere:hover, .btn-ambre:focus-visible, .btn-lumiere:focus-visible { background: var(--lumiere-2); border-color: var(--lumiere-2); color: var(--nuit); }

/* --- Structure : barre latérale + contenu ---------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 272px; flex: 0 0 272px; color: #c3dde0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: radial-gradient(120% 50% at 0% 100%, rgba(245, 179, 53, .10), transparent 60%), linear-gradient(180deg, var(--nuit) 0%, #072429 100%);
  scrollbar-width: thin; scrollbar-color: #175661 transparent; }
.sidebar .marque { display: flex; align-items: center; gap: .75rem; padding: 1.35rem 1.3rem 1.2rem; color: #fff; text-decoration: none; }
.sidebar .marque:hover { text-decoration: none; }
.tuile-logo { flex: 0 0 auto; width: 56px; height: 48px; border-radius: 14px; background: #fff; display: grid; place-items: center; padding: 6px 5px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08), 0 10px 22px -10px rgba(0, 0, 0, .6); }
.tuile-logo img { width: 100%; height: auto; display: block; }
.tuile-logo.grande { width: 92px; height: 82px; border-radius: 20px; padding: 9px 10px; }
.sidebar .marque strong { font-family: var(--titre); font-weight: 800; font-size: 1.08rem; line-height: 1.1; display: block; letter-spacing: -0.01em; }
.sidebar .marque small { color: #8fb8bd; font-size: .8rem; font-weight: 500; }
.menu { list-style: none; margin: 0; padding: .3rem .75rem 2rem; }
.menu .groupe { padding: 1.1rem .7rem .35rem; color: #6f9fa5; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.menu a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; color: #d3e8ea !important; font-weight: 500 !important; text-decoration: none !important; border-radius: 11px; position: relative; }
.menu a:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.menu a.actif { background: linear-gradient(90deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)); color: #fff !important; font-weight: 700 !important; }
.menu a.actif::before { content: ""; position: absolute; left: -.75rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--lumiere); box-shadow: 0 0 12px var(--lumiere); }
.menu a.actif .bi { color: var(--lumiere); opacity: 1; }
.menu .bi { font-size: 1.08rem; opacity: .8; width: 1.2rem; text-align: center; }
.menu .compteur { margin-left: auto; background: var(--lumiere); color: var(--nuit); border-radius: 99px; font-size: .72rem; padding: .05rem .5rem; font-weight: 800; }
.contenu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: rgba(242, 247, 247, .82); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(221, 233, 234, .9); padding: .7rem 1.8rem; display: flex; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 20; }
.topbar .perimetre { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--titre); font-weight: 700; font-size: .92rem;
  color: var(--nuit); background: linear-gradient(135deg, var(--lumiere-2), var(--lumiere)); box-shadow: 0 0 0 3px #fff, 0 4px 10px -4px rgba(10, 47, 54, .4); }
.topbar .qui { min-width: 0; line-height: 1.2; }
.topbar .qui strong { display: block; color: var(--nuit); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .qui span { display: block; color: var(--encre-2); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .btn-icone { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--trait); color: var(--nuit); position: relative; }
.topbar .btn-icone:hover { border-color: #c3d6d8; background: #fff; }
.topbar .btn-icone .bi { font-size: 1.1rem; }
.topbar .pastille-notif { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--lumiere);
  color: var(--nuit); font-size: .72rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--fond); }
.topbar .form-select { border-radius: 12px; max-width: 320px; }
main.page { padding: 1.8rem 1.8rem 4rem; max-width: 1440px; width: 100%; }
.entete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem; margin-bottom: 1.5rem; }
.entete-page h1 { margin-bottom: 0; }
.entete-page p { color: var(--encre-2); margin: .35rem 0 0; }

@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: -290px; z-index: 1050; transition: left .22s ease; }
  .sidebar.ouverte { left: 0; box-shadow: 0 0 0 100vmax rgba(4, 25, 29, .5); }
  main.page { padding: 1.1rem .95rem 5rem; }
  .topbar { padding: .55rem .95rem; }
  h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* --- Panneaux -------------------------------------------------------- */
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; margin-bottom: 1.4rem; box-shadow: var(--ombre); }
.panneau > h2, .panneau > h3 { margin-bottom: 1rem; }
.panneau-titre { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panneau-titre h2, .panneau-titre h3 { margin: 0; }
.panneau-titre > a:not(.btn) { font-size: .92rem; }
@media (max-width: 575.98px) { .panneau { padding: 1.1rem 1rem; border-radius: 16px; } }

/* --- Bandeau du mois : la nuit et la lumière -------------------------- */
.vedette { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); padding: 2rem 2.2rem; margin-bottom: 1.6rem; color: #dcf0f1;
  background: linear-gradient(135deg, #0d4a54 0%, var(--nuit) 55%, #06262b 100%);
  display: grid; grid-template-columns: 1fr auto; gap: 1.6rem 2.4rem; align-items: center; box-shadow: 0 24px 50px -28px rgba(10, 47, 54, .8); }
.vedette::before { content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; right: -170px; bottom: -380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 90, .55) 0%, rgba(245, 179, 53, .22) 32%, rgba(245, 179, 53, 0) 66%); animation: aube 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.vedette::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -120px; bottom: -330px; border-radius: 50%;
  border: 1px solid rgba(255, 214, 128, .25); box-shadow: 0 0 0 60px rgba(255, 214, 128, .035), 0 0 0 120px rgba(255, 214, 128, .025); }
@keyframes aube { from { transform: translateY(120px); opacity: 0; } to { transform: none; opacity: 1; } }
.vedette .entite { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: 99px; background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12); color: #e3f3f4; font-weight: 600; font-size: .88rem; margin: 0 0 1rem; }
.vedette .entite .bi { color: var(--lumiere); }
.vedette .surtitre { margin: 0; color: #9cc7cc; font-weight: 600; font-size: 1.02rem; }
.vedette .periode { font-family: var(--titre); font-weight: 800; font-size: clamp(2.3rem, 5.4vw, 4rem); letter-spacing: -0.035em; color: #fff; line-height: .98; margin: .15rem 0 1rem; }
.vedette .periode span { color: var(--lumiere); }
.vedette .etat { margin: 0 0 .25rem; color: #cfe6e8; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.vedette .etat .ref { color: #82b1b7; font-weight: 600; }
.vedette .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: 1.3rem; }
.vedette .btn-generer { background: var(--lumiere); color: var(--nuit); border: 0; font-size: 1.08rem; padding: .95rem 1.6rem; border-radius: 15px; font-weight: 800;
  box-shadow: 0 0 0 6px rgba(245, 179, 53, .16), 0 14px 30px -12px rgba(245, 179, 53, .9); display: inline-flex; align-items: center; gap: .55rem; }
.vedette .btn-generer:hover, .vedette .btn-generer:focus-visible { background: var(--lumiere-2); color: var(--nuit); box-shadow: 0 0 0 9px rgba(245, 179, 53, .2), 0 18px 34px -12px rgba(245, 179, 53, 1); }
.vedette .aide { color: #93bfc4; font-size: .9rem; }

/* Anneau de réception (Force, Région, Coordination) */
.anneau { position: relative; width: 172px; height: 172px; flex: 0 0 auto; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau .piste { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 12; }
.anneau .arc { fill: none; stroke: url(#grad-anneau); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .7, .2, 1); filter: drop-shadow(0 0 6px rgba(245, 179, 53, .55)); }
.anneau .centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.anneau .centre strong { font-family: var(--titre); font-size: 2.3rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.anneau .centre strong small { font-size: 1.1rem; color: #93bfc4; font-weight: 700; }
.anneau .centre span { font-size: .82rem; color: #9cc7cc; max-width: 9rem; margin-top: .2rem; }

/* Étapes du rapport (Troupe) */
.parcours { list-style: none; margin: 0; padding: 1.1rem 1.2rem; display: grid; gap: .15rem; min-width: 250px; border-radius: 20px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.parcours li { display: flex; align-items: center; gap: .75rem; padding: .42rem 0; color: #93bfc4; font-weight: 600; position: relative; }
.parcours li + li::before { content: ""; position: absolute; left: 13px; top: -10px; height: 14px; width: 2px; background: rgba(255, 255, 255, .14); }
.parcours .point { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; border: 2px solid rgba(255, 255, 255, .22); color: #c3dde0; flex: 0 0 auto; }
.parcours li.fait { color: #e3f3f4; }
.parcours li.fait .point { background: var(--delivre); border-color: var(--delivre); color: #fff; }
.parcours li.fait + li::before, .parcours li.fait + li.fait::before { background: var(--delivre); }
.parcours li.courant { color: #fff; }
.parcours li.courant .point { border-color: var(--lumiere); background: rgba(245, 179, 53, .18); color: var(--lumiere); box-shadow: 0 0 0 5px rgba(245, 179, 53, .14); }

.jauge { height: 10px; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; margin-top: .45rem; max-width: 440px; }
.jauge > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lumiere), var(--lumiere-2)); }
.jauge.claire { background: var(--calcule); max-width: none; }
.jauge.claire > span { background: linear-gradient(90deg, var(--delivre), #6cc58a); }
@media (max-width: 767.98px) {
  .vedette { grid-template-columns: 1fr; padding: 1.5rem 1.3rem; border-radius: 22px; }
  .vedette .actions form { flex: 1 1 100%; }
  .vedette .btn-generer { width: 100%; justify-content: center; }
  .vedette .cote-droit { display: flex; justify-content: center; }
  .anneau { width: 150px; height: 150px; }
  .parcours { min-width: 0; width: 100%; grid-template-columns: repeat(4, 1fr); gap: .3rem; padding: .9rem .6rem; }
  .parcours li { flex-direction: column; text-align: center; font-size: .76rem; gap: .35rem; padding: 0; }
  .parcours li + li::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vedette::before { animation: none; } .anneau .arc { transition: none; } }

/* --- Indicateurs : une seule bande, pas une grille de cartes ---------- */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 1px; margin-bottom: 1.4rem; background: var(--trait);
  border: 1px solid var(--trait); border-radius: var(--r-lg); box-shadow: var(--ombre); overflow: hidden; }
.indicateur { padding: 1.05rem 1.1rem 1.1rem; position: relative; background: var(--surface); }
.indicateur .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--royal-pale); color: var(--royal); font-size: 1rem; margin-bottom: .6rem; }
.indicateur .v { font-family: var(--titre); font-size: 1.9rem; font-weight: 700; color: var(--nuit); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.05; }
.indicateur .l { color: var(--encre-2); font-size: .88rem; font-weight: 500; margin-top: .2rem; }
.indicateur.ok .ic { background: var(--delivre-pale); color: var(--delivre-texte); }
.indicateur.attente .ic { background: var(--lumiere-pale); color: var(--lumiere-texte); }
.indicateur.attente .v { color: var(--lumiere-texte); }
.indicateur.alerte .ic { background: var(--alerte-pale); color: var(--alerte-texte); }
.indicateur.alerte .v { color: var(--alerte-texte); }
.indicateur.zero .v { color: var(--encre-3); }

/* --- Filtres en ligne ------------------------------------------------- */
.filtre-ligne { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filtre-ligne .titre-section { margin: 0 auto 0 0; align-self: center; font-size: 1.15rem; }
.filtre-ligne .form-label { margin-bottom: .2rem; }
@media (max-width: 575.98px) { .filtre-ligne .titre-section { flex: 1 1 100%; margin-bottom: .2rem; } .filtre-ligne > div:first-of-type { flex: 1 1 auto; } }

/* --- Tableaux -------------------------------------------------------- */
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--trait); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .6rem .65rem; }
.table > thead > tr > th { color: var(--encre-2); font-weight: 700; font-size: .84rem; background: transparent; border-bottom-width: 1px; white-space: nowrap; }
.table-sm > :not(caption) > * > * { padding: .5rem .55rem; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f4f9f9; }
.table-rapport { border: 1px solid var(--trait); font-size: .95rem; border-radius: var(--r-md); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.table-rapport thead th { background: #eef6f6; color: var(--nuit); font-weight: 700; font-size: .86rem; text-align: center; vertical-align: middle; border-color: var(--trait); }
.table-rapport td, .table-rapport th { border-color: var(--trait); vertical-align: middle; }
.table-rapport td.n, .table-rapport th.n { text-align: right; }
.table-rapport .calc, .table-rapport td.t { background: var(--calcule); font-weight: 700; color: var(--nuit); }
.table-rapport tfoot td, .table-rapport tfoot th { background: #deeced; font-weight: 800; color: var(--nuit); }
.table-rapport .groupe-enr { border-left: 2px solid #bcd4d6; }
.table-rapport input.form-control { min-width: 3.4rem; text-align: right; padding: .35rem .45rem; font-variant-numeric: tabular-nums; font-weight: 600; border-radius: 8px; }
.table-rapport input.form-control:disabled, .table-rapport input[readonly] { background: var(--calcule); border-style: dashed; color: var(--nuit); font-weight: 800; }
.legende-calc { display: inline-flex; align-items: center; gap: .4rem; color: var(--encre-2); font-size: .88rem; }
.legende-calc::before { content: ""; width: 14px; height: 14px; background: var(--calcule); border: 1px dashed #9fbcbf; border-radius: 4px; }

/* --- Formulaire de saisie -------------------------------------------- */
.etapes { display: flex; gap: .45rem; overflow-x: auto; padding: .5rem 0 .6rem; margin-bottom: 1rem; position: sticky; top: 58px; z-index: 10; background: var(--fond); scrollbar-width: none; }
.etapes::-webkit-scrollbar { display: none; }
.etapes a { flex: 0 0 auto; padding: .45rem .95rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--trait); color: var(--encre) !important; text-decoration: none !important; font-weight: 600; font-size: .92rem; }
.etapes a:hover { border-color: #bcd4d6; }
.etapes a.actif { background: var(--nuit); color: #fff !important; border-color: var(--nuit); box-shadow: 0 6px 14px -8px rgba(10, 47, 54, .8); }
.barre-actions { position: sticky; bottom: 0; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--trait); padding: .85rem 1.8rem; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; z-index: 15; margin: 0 -1.8rem -4rem;
  box-shadow: 0 -10px 30px -20px rgba(10, 47, 54, .35); }
@media (max-width: 991.98px) { .barre-actions { margin: 0 -.95rem -5rem; padding: .8rem .95rem; } .barre-actions .btn { flex: 1 1 auto; } }
.section-saisie { scroll-margin-top: 130px; }

/* --- Statuts : pastilles teintées ------------------------------------ */
.badge { font-weight: 700; font-size: .76rem; padding: .38em .7em; border-radius: 99px; letter-spacing: .01em; }
.badge.text-bg-success { background: var(--delivre-pale) !important; color: var(--delivre-texte) !important; }
.badge.text-bg-warning { background: var(--lumiere-pale) !important; color: var(--lumiere-texte) !important; }
.badge.text-bg-danger { background: var(--alerte-pale) !important; color: var(--alerte-texte) !important; }
.badge.text-bg-primary { background: var(--royal-pale) !important; color: var(--royal-2) !important; }
.badge.text-bg-info { background: #e3f2fb !important; color: #155a80 !important; }
.badge.text-bg-secondary { background: #e6efef !important; color: #42605f !important; }
.badge.text-bg-dark { background: var(--nuit) !important; color: #fff !important; }
.badge.text-bg-light { background: #fff !important; color: var(--encre-2) !important; border: 1px solid var(--trait) !important; }
.badge[class*="text-bg-"]::before { content: ""; display: inline-block; width: .45em; height: .45em; border-radius: 50%; background: currentColor; margin-right: .4em; vertical-align: .1em; opacity: .85; }
.vedette .badge.text-bg-secondary { background: rgba(255, 255, 255, .14) !important; color: #fff !important; }
.alert { border-radius: var(--r-md); border-width: 1px; }
.alert-bloquant { background: var(--alerte-pale); border-color: #f3c6c6; color: #6d1717; }
.alert-attente { background: var(--lumiere-pale); border-color: #f4d896; color: #5d3d00; }
.alert-ok { background: var(--delivre-pale); border-color: #bfe3ca; color: #0f4421; }
.alert-info { background: var(--royal-pale); border-color: #c3e2e4; color: #024650; }
.liste-suivi { list-style: none; padding: 0; margin: 0; }
.liste-suivi li { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .7rem .2rem; border-bottom: 1px solid var(--trait); }
.liste-suivi li:last-child { border-bottom: 0; }
.liste-suivi li > a { color: var(--nuit); }
.liste-suivi .ref { display: inline-block; margin-top: .1rem; }
.pastille { width: .62rem; height: .62rem; border-radius: 50%; display: inline-block; margin-right: .5rem; background: var(--lumiere); box-shadow: 0 0 0 3px var(--lumiere-pale); }
.pastille.ok { background: var(--delivre); box-shadow: 0 0 0 3px var(--delivre-pale); }

/* --- Connexion ------------------------------------------------------- */
.page-connexion { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--fond); }
.page-connexion .cote { position: relative; overflow: hidden; isolation: isolate; color: #cfe6e8; padding: 3rem 3.4rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: linear-gradient(160deg, #0d4a54 0%, var(--nuit) 50%, #06232a 100%); }
.page-connexion .cote::before { content: ""; position: absolute; z-index: -1; width: 1000px; height: 1000px; left: -260px; bottom: -600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 90, .75) 0%, rgba(245, 179, 53, .28) 28%, transparent 62%); animation: aube 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.page-connexion .cote::after { content: ""; position: absolute; z-index: -1; width: 760px; height: 760px; left: -130px; bottom: -560px; border-radius: 50%;
  border: 1px solid rgba(255, 214, 128, .22); box-shadow: 0 0 0 80px rgba(255, 214, 128, .03), 0 0 0 160px rgba(255, 214, 128, .02); }
.page-connexion .marque-cnx { display: flex; align-items: center; gap: .8rem; color: #fff; font-family: var(--titre); font-weight: 800; font-size: 1.15rem; }
.page-connexion .marque-cnx small { display: block; font-family: "Figtree", sans-serif; font-weight: 500; font-size: .82rem; color: #93bfc4; }
.page-connexion .cote h1 { color: #fff; font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; max-width: 14ch; line-height: 1; margin: 0 0 1.2rem; }
.page-connexion .cote h1 span { color: var(--lumiere); }
.page-connexion .cote p { max-width: 44ch; color: #a9d0d4; font-size: 1.05rem; }
.chaine { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.chaine li { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .85rem; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #e3f3f4; font-weight: 600; font-size: .9rem; }
.chaine li.fleche { padding: 0; background: none; border: 0; color: var(--lumiere); }
.page-connexion .formulaire { display: flex; align-items: center; justify-content: center; padding: 2.5rem 2rem; }
.carte-cnx { width: 100%; max-width: 410px; }
.carte-cnx h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: .3rem; }
.carte-cnx .intro { color: var(--encre-2); margin-bottom: 1.8rem; }
.carte-cnx .form-control-lg { border-radius: 14px; padding: .8rem 1rem; font-size: 1.05rem; background: #fff; }
.carte-cnx .btn-lg { padding: .95rem 1.2rem; font-size: 1.05rem; }
.carte-cnx .note { background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: .8rem 1rem; display: flex; gap: .7rem; color: var(--encre-2); font-size: .9rem; margin-top: 1.4rem; }
.carte-cnx .note .bi { color: var(--lumiere-texte); font-size: 1.1rem; }
@media (max-width: 767.98px) {
  .page-connexion { grid-template-columns: 1fr; }
  .page-connexion .cote { padding: 1.8rem 1.4rem 2.2rem; border-radius: 0 0 28px 28px; }
  .page-connexion .cote h1 { font-size: 2.2rem; }
  .page-connexion .cote .bas, .chaine { display: none; }
  .page-connexion .formulaire { padding: 1.8rem 1.2rem 2.5rem; }
}
@media (prefers-reduced-motion: reduce) { .page-connexion .cote::before { animation: none; } }

/* --- Formulaires ----------------------------------------------------- */
.form-label { font-weight: 700; color: var(--nuit); font-size: .92rem; }
.form-control, .form-select { border-color: #cbdcde; border-radius: 10px; }
.form-control-sm, .form-select-sm { border-radius: 9px; }
.form-control:focus, .form-select:focus { border-color: var(--royal); box-shadow: 0 0 0 .22rem rgba(3, 101, 112, .16); }
.form-check-input:checked { background-color: var(--royal); border-color: var(--royal); }
.form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(3, 101, 112, .16); }
.dropdown-menu { border-radius: 14px; border-color: var(--trait); box-shadow: 0 18px 40px -18px rgba(10, 47, 54, .4); padding: .4rem; }
.dropdown-item { border-radius: 9px; padding: .5rem .75rem; font-weight: 500; }
.dropdown-item:active { background: var(--royal); }
.nav-tabs { border-bottom-color: var(--trait); }
.nav-tabs .nav-link { font-weight: 600; color: var(--encre-2); border-radius: 10px 10px 0 0; }
.nav-tabs .nav-link.active { color: var(--nuit); border-color: var(--trait) var(--trait) #fff; }

/* --- Divers ---------------------------------------------------------- */
.vide { text-align: center; color: var(--encre-2); padding: 2.4rem 1rem; }
.vide::before { content: "\F4DC"; font-family: "bootstrap-icons"; display: block; font-size: 1.8rem; color: #b5cfd1; margin-bottom: .4rem; }
.fil { font-size: .88rem; color: var(--encre-2); margin-bottom: .35rem; }
.fil a { color: var(--encre-2); font-weight: 600; }
.commentaire { white-space: pre-line; }
.graphique { position: relative; height: 300px; }
.ref { font-weight: 600; color: var(--encre-3); font-size: .86rem; font-variant-numeric: tabular-nums; }
.pagination { --bs-pagination-active-bg: var(--royal); --bs-pagination-active-border-color: var(--royal); --bs-pagination-color: var(--royal); --bs-pagination-border-radius: 10px; }
.modal-content { border-radius: var(--r-lg); border: 0; }
.list-group-item { border-color: var(--trait); }
code { color: var(--royal-2); }

/* --- Impression ------------------------------------------------------ */
@media print {
  .sidebar, .topbar, .barre-actions, .no-print, .etapes { display: none !important; }
  body { background: #fff; }
  main.page { padding: 0; max-width: none; }
  .panneau { border: 0; padding: 0; break-inside: avoid; box-shadow: none; }
  .vedette { background: #fff !important; color: #000; box-shadow: none; }
  .vedette::before, .vedette::after { display: none; }
  .table-rapport { font-size: 9pt; }
  .table-rapport .calc, .table-rapport td.t { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* --- Saisie sur téléphone ------------------------------------------- */
@media (max-width: 575.98px) {
  .table-rapport { font-size: .9rem; }
  .table-rapport > :not(caption) > * > * { padding: .32rem .2rem; }
  .table-rapport input.form-control { min-width: 0; width: 100%; padding: .32rem .25rem; font-size: .95rem; }
  .table-rapport th.text-start { font-size: .85rem; }
  .barre-actions { flex-wrap: nowrap; padding: .6rem .7rem; }
  .barre-actions .btn { flex: 1 1 0; font-size: .96rem; padding: .7rem .4rem; }
  .indicateurs { grid-template-columns: repeat(2, 1fr); }
  .indicateur:last-child:nth-child(odd) { grid-column: span 2; }
  .indicateur { padding: .9rem 1rem; }
  .indicateur .v { font-size: 1.6rem; }
  .topbar .qui span { display: none; }
}
