:root {
  --cnrs-bleu:        #00284b;
  --cnrs-bleu-hover:  #003f78;
  --cnrs-jaune:       #f5a800;
  --cnrs-jaune-hover: #d48e00;
}

/* ── Navbar ──────────────────────────────────────────── */
.navbar.bg-dark {
  background-color: var(--cnrs-bleu) !important;
}

/* ── Boutons primaires ───────────────────────────────── */
.btn-primary {
  background-color: var(--cnrs-bleu);
  border-color:     var(--cnrs-bleu);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--cnrs-bleu-hover);
  border-color:     var(--cnrs-bleu-hover);
}
.btn-outline-primary {
  color:        var(--cnrs-bleu);
  border-color: var(--cnrs-bleu);
}
.btn-outline-primary:hover {
  background-color: var(--cnrs-bleu);
  border-color:     var(--cnrs-bleu);
}

/* ── Barre de progression ────────────────────────────── */
.progress-bar {
  background-color: var(--cnrs-bleu) !important;
}

/* ── Badges ──────────────────────────────────────────── */
.badge.bg-primary {
  background-color: var(--cnrs-bleu) !important;
}

/* ── Liens ───────────────────────────────────────────── */
a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item) {
  color: var(--cnrs-bleu);
}
a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):hover {
  color: var(--cnrs-bleu-hover);
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  border-top: 3px solid var(--cnrs-jaune);
}

/* ── Accents jaune sur le questionnaire ──────────────── */
.questionnaire-header {
  border-left: 4px solid var(--cnrs-jaune);
  padding-left: 0.75rem;
}

/* ═══════════════════════════════════════════════════════
   Parcours directeur (questionnaire) — composants communs
   ═══════════════════════════════════════════════════════ */
:root {
  --q-fond:    #f2f5f9;
  --q-surface: #ffffff;
  --q-encre:   #0f1f33;
  --q-discret: #566679;
  --q-trait:   #dce3ec;
  --q-doux:    #eaf0f8;
  --q-ok:      #17794a;
  --q-ok-doux: #e4f4ec;
  --q-erreur:  #b3261e;
  --q-erreur-doux: #fdeceb;
  --q-ombre:   0 1px 2px rgba(15,31,51,.05), 0 6px 20px rgba(15,31,51,.05);
  --q-police:  "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body:has(.q-page) main.bg-light { background: var(--q-fond) !important; }
.q-page { max-width: 1120px; margin: 0 auto; font-family: var(--q-police); color: var(--q-encre); }
.q-page :focus-visible { outline: 3px solid var(--cnrs-jaune); outline-offset: 2px; border-radius: 6px; }

/* ── En-tête de plateforme ───────────────────────────── */
.q-retour { font-size: .85rem; color: var(--q-discret) !important; text-decoration: none; }
.q-retour:hover { color: var(--q-encre) !important; }
.q-entete h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.01em; margin: .3rem 0 .15rem; color: var(--cnrs-bleu); text-wrap: balance; }
.q-sous-titre { color: var(--q-discret); margin: 0; }

/* ── Étapes (pastilles) ──────────────────────────────── */
.q-steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; overflow-x: auto; }
.q-steps li { flex: 1 1 0; min-width: 8.5rem; }
.q-steps .q-step {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 999px;
  background: var(--q-surface); border: 1px solid var(--q-trait); font-size: .85rem; font-weight: 600; color: var(--q-discret); white-space: nowrap; cursor: default;
}
.q-steps .q-n {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; background: var(--q-doux); color: var(--q-discret); flex: none;
}
.q-steps li.fait .q-step { color: var(--q-encre); }
.q-steps li.fait .q-n { background: var(--q-ok-doux); color: var(--q-ok); }
.q-steps li.courante .q-step { background: var(--cnrs-bleu); border-color: var(--cnrs-bleu); color: #fff !important; }
.q-steps li.courante .q-n { background: var(--cnrs-jaune); color: var(--cnrs-bleu); }

/* ── Mise en page : sommaire + sections ──────────────── */
.q-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .q-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.q-toc { position: sticky; top: 1rem; }
.q-toc h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--q-discret); margin: 0 0 .6rem; font-weight: 700; }
.q-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.q-toc a {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--q-discret) !important;
}
.q-toc a:hover { background: var(--q-doux); color: var(--q-encre) !important; }
.q-toc a.on { background: var(--q-doux); color: var(--cnrs-bleu) !important; }
.q-dot { width: .65rem; height: .65rem; border-radius: 50%; border: 2px solid var(--q-trait); flex: none; }
.q-dot.ok { background: var(--q-ok); border-color: var(--q-ok); }
.q-reste { margin-top: 1rem; padding: .75rem .85rem; border-radius: 10px; background: var(--q-doux); font-size: .85rem; color: var(--q-discret); }
.q-reste b { color: var(--q-encre); font-size: 1.15rem; display: block; }
@media (max-width: 860px) {
  .q-toc { position: static; }
  .q-toc ol { display: flex; gap: .4rem; overflow-x: auto; }
  .q-toc a { white-space: nowrap; border: 1px solid var(--q-trait); background: var(--q-surface); }
  .q-reste { display: none; }
}

.q-sec { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 16px; box-shadow: var(--q-ombre); margin-bottom: 1.25rem; overflow: hidden; scroll-margin-top: 1rem; }
.q-sec-head { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--q-trait); }
.q-sec-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--cnrs-bleu); }
.q-sec-head p { margin: .2rem 0 0; color: var(--q-discret); font-size: .9rem; }
.q-sec-body { padding: .5rem 1.5rem 1rem; }

/* ── Questions ───────────────────────────────────────── */
.q-q { padding: 1.1rem 0; border-bottom: 1px solid var(--q-trait); }
.q-q:last-child { border-bottom: 0; }
.q-t { display: block; font-weight: 700; font-size: 1rem; line-height: 1.4; margin: 0; padding: 0; text-wrap: pretty; color: var(--q-encre); float: none; width: 100%; }
.q-requis { color: var(--q-erreur); margin-left: .15rem; }
.q-aide { color: var(--q-discret); font-size: .85rem; margin: .2rem 0 0; line-height: 1.4; }
.q-dep { margin: .9rem 0 0 .35rem; padding: .9rem 1rem 1rem 1.1rem; border-left: 3px solid var(--q-trait); background: var(--q-doux); border-radius: 0 12px 12px 0; }
.q-dep .q-t { font-size: .95rem; }
.q-dep + .q-dep { margin-top: .7rem; }
.q-tag {
  display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--q-discret); background: var(--q-surface); border: 1px solid var(--q-trait);
  padding: .1rem .5rem; border-radius: 999px; margin-bottom: .45rem;
}
.q-item.q-erreur > .q-t, .q-item.q-erreur > legend { color: var(--q-erreur); }
.q-message-erreur { color: var(--q-erreur); font-size: .86rem; margin-top: .5rem; font-weight: 600; }
.q-item fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.q-champ { margin-top: .7rem; }
.q-champ .form-control { max-width: 520px; border-radius: 10px; padding: .6rem .8rem; border-color: var(--q-trait); }
.q-champ textarea.form-control { max-width: 100%; min-height: 5.5rem; }
.q-champ .form-control:focus { border-color: var(--cnrs-bleu); box-shadow: 0 0 0 .2rem rgba(245,168,0,.35); }
.q-champ input[type="number"] { max-width: 240px; text-align: right; font-variant-numeric: tabular-nums; }

/* Oui / Non */
.q-yn { display: inline-flex; margin-top: .7rem; border: 1px solid var(--q-trait); border-radius: 999px; padding: .2rem; background: var(--q-surface); }
.q-yn label { position: relative; cursor: pointer; margin: 0; }
.q-yn input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.q-yn span { display: block; min-width: 5.2rem; text-align: center; padding: .45rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--q-discret); transition: background .15s, color .15s; }
.q-yn label:hover span { color: var(--q-encre); }
.q-yn input:checked + span { background: var(--cnrs-bleu); color: #fff; }
.q-yn input:focus-visible + span { outline: 3px solid var(--cnrs-jaune); outline-offset: 2px; }

/* Financement */
.q-fin { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; margin-top: .9rem; }
.q-fin .q-opt { display: block; margin: 0; border: 1px solid var(--q-trait); border-radius: 12px; padding: .8rem .9rem; background: var(--q-surface); cursor: pointer; transition: border-color .15s, background .15s; }
.q-fin .q-opt:hover { border-color: var(--cnrs-bleu); }
.q-fin .q-opt.on { border-color: var(--cnrs-bleu); background: var(--q-doux); }
.q-fin .q-opt-ligne { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.q-fin input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--cnrs-bleu); flex: none; margin: 0; }
.q-fin .form-control { margin-top: .6rem; font-size: .88rem; border-radius: 10px; opacity: .6; }
.q-fin .q-opt.on .form-control { opacity: 1; }

/* ── Pièces jointes ──────────────────────────────────── */
.q-drop { display: block; margin: .7rem 0 0; border: 2px dashed var(--q-trait); border-radius: 12px; padding: 1.1rem; text-align: center; background: var(--q-surface); cursor: pointer; transition: border-color .15s, background .15s; }
.q-drop:hover, .q-drop.survol { border-color: var(--cnrs-bleu); background: var(--q-doux); }
.q-drop strong { display: block; font-size: .95rem; color: var(--q-encre); }
.q-drop small { color: var(--q-discret); font-size: .82rem; }
.q-drop svg { width: 26px; height: 26px; color: var(--q-discret); margin-bottom: .2rem; }
.q-files { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.q-files.d-none { display: none; }
.q-file { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border: 1px solid var(--q-trait); border-radius: 10px; background: var(--q-surface); }
.q-file-ico { width: 2.2rem; height: 2rem; border-radius: 8px; background: var(--q-doux); color: var(--cnrs-bleu); display: grid; place-items: center; font-size: .62rem; font-weight: 800; flex: none; text-transform: uppercase; }
.q-file-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.q-file .fichier-supprimer { border: 0; background: none; color: var(--q-erreur); font-weight: 700; font-size: .82rem; cursor: pointer; padding: .3rem .5rem; border-radius: 6px; }
.q-file .fichier-supprimer:hover { background: var(--q-erreur-doux); }
.fichiers-statut { min-height: 1.2rem; }

/* ── Barre d'actions fixe ────────────────────────────── */
.q-actions-espace { height: 5.5rem; }
.q-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--q-trait); box-shadow: 0 -6px 20px rgba(15,31,51,.08); }
.q-actions-inner { max-width: 1120px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; gap: .8rem; font-family: var(--q-police); }
.q-actions-inner .q-msg { margin-left: auto; font-size: .85rem; color: var(--q-discret); }
.q-actions-inner .q-msg b { color: var(--q-encre); }
.q-actions-inner .btn { border-radius: 10px; font-weight: 700; padding: .65rem 1.1rem; }
@media (max-width: 560px) { .q-actions-inner .q-msg { display: none; } .q-actions-inner .btn-primary, .q-actions-inner .btn-success { margin-left: auto; } }

.q-alerte { background: var(--q-erreur-doux); border: 1px solid #f2b8b5; color: var(--q-erreur); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1.25rem; font-weight: 600; }

/* ── Tableau de bord ─────────────────────────────────── */
.q-unite { margin-bottom: 2rem; }
.q-unite-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.q-unite-titre { font-size: 1.2rem; font-weight: 800; color: var(--cnrs-bleu); margin: 0; }
.q-unite-sous { color: var(--q-discret); font-size: .9rem; }
.q-bandeau { border: 1px solid var(--q-trait); border-radius: 12px; background: var(--q-surface); padding: .7rem 1rem; margin-bottom: 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; font-size: .9rem; }
.q-bandeau.ok { background: var(--q-ok-doux); border-color: #b9dfc9; color: var(--q-ok); font-weight: 600; }
.q-pf { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; box-shadow: var(--q-ombre); padding: 1rem 1.25rem; margin-bottom: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.q-pf-corps { flex: 1 1 16rem; min-width: 0; }
.q-pf-nom { font-weight: 700; font-size: 1.02rem; }
.q-pf-acro { color: var(--q-discret); font-weight: 400; }
.q-statut { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 700; margin-top: .25rem; }
.q-statut::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--cnrs-jaune); }
.q-statut.ok { color: var(--q-ok); }
.q-statut.ok::before { background: var(--q-ok); }
.q-statut.a-faire { color: #8a5a00; }
.q-vide { color: var(--q-discret); padding: 1rem 0; }
.q-pf .btn, .q-unite .btn, .q-bandeau .btn { border-radius: 10px; font-weight: 700; }

/* ── Compléments : grille de champs, domaines, vue d'ensemble, pages annexes ── */
.q-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
@media (max-width: 640px) { .q-grille { grid-template-columns: minmax(0, 1fr); } }
.q-grille .q-item { padding: .6rem 0 .4rem; }
.q-grille .q-champ .form-control { max-width: none; }
.q-sous-titre-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--q-discret); font-weight: 700; margin: 1.1rem 0 .1rem; }

.q-groupe { padding: 1rem 0; border-bottom: 1px solid var(--q-trait); }
.q-groupe:last-child { border-bottom: 0; }
.q-groupe h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cnrs-bleu); font-weight: 800; margin: 0 0 .6rem; }
.q-puces { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.q-puce { position: relative; display: flex; align-items: center; gap: .6rem; margin: 0; padding: .6rem .8rem; border: 1px solid var(--q-trait); border-radius: 10px; background: var(--q-surface); cursor: pointer; font-weight: 600; font-size: .9rem; line-height: 1.3; transition: border-color .15s, background .15s; }
.q-puce:hover { border-color: var(--cnrs-bleu); }
.q-puce input { width: 1.1rem; height: 1.1rem; accent-color: var(--cnrs-bleu); flex: none; margin: 0; }
.q-puce:has(input:checked) { border-color: var(--cnrs-bleu); background: var(--q-doux); color: var(--cnrs-bleu); }
.q-puce:has(input:focus-visible) { outline: 3px solid var(--cnrs-jaune); outline-offset: 2px; }
.q-autre { margin-top: .6rem; }
.q-autre .form-control { max-width: 520px; border-radius: 10px; }

/* Vue d'ensemble d'une plateforme */
.q-progres { height: 8px; border-radius: 4px; background: var(--q-trait); overflow: hidden; max-width: 420px; margin-top: .6rem; }
.q-progres i { display: block; height: 100%; background: var(--q-ok); border-radius: 4px; }
.q-etape-carte { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.1rem; background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; box-shadow: var(--q-ombre); padding: 1rem 1.25rem; margin-bottom: .75rem; }
.q-etape-num { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--q-doux); color: var(--q-discret); flex: none; }
.q-etape-carte.fait .q-etape-num { background: var(--q-ok-doux); color: var(--q-ok); }
.q-etape-texte { flex: 1 1 14rem; min-width: 0; }
.q-etape-texte b { display: block; font-size: 1.02rem; }
.q-etape-texte span { color: var(--q-discret); font-size: .88rem; }
.q-etape-carte .btn { border-radius: 10px; font-weight: 700; }

/* Pages annexes (création, suppression, campagne fermée) */
.q-petite { max-width: 640px; margin: 0 auto; }
.q-panneau { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 16px; box-shadow: var(--q-ombre); padding: 1.5rem; }
.q-panneau .btn { border-radius: 10px; font-weight: 700; padding: .65rem 1.1rem; }
.q-panneau.danger { border-color: #f2b8b5; }
.q-panneau.danger h2 { color: var(--q-erreur); }
.q-panneau h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .75rem; }
.q-centre { text-align: center; padding: 3rem 1.5rem; }
.q-centre h1 { font-size: 1.6rem; font-weight: 800; color: var(--cnrs-bleu); }
.q-centre p { color: var(--q-discret); }
.q-centre .q-icone { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--q-doux); color: var(--cnrs-bleu); display: grid; place-items: center; margin: 0 auto 1rem; }
.q-centre .q-icone svg { width: 1.7rem; height: 1.7rem; }

/* États d'avancement : incomplet = orange, complet = vert */
.q-steps li.partielle .q-step { color: var(--q-encre) !important; }
.q-steps li.partielle .q-n { background: #fff1cf; color: #8a5a00; }
.q-statut.attention { color: #8a5a00; }
.q-etape-carte.partielle .q-etape-num { background: #fff1cf; color: #8a5a00; }
.q-etape-carte.partielle { border-color: #f0d28a; }
.q-bandeau-reste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; background: #fff8e6; border: 1px solid #f0d28a; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; color: #6b4600; font-weight: 600; }
.q-bandeau-reste.ok { background: var(--q-ok-doux); border-color: #b9dfc9; color: var(--q-ok); }
.q-bandeau-reste .btn { border-radius: 10px; font-weight: 700; }

/* Date limite de la campagne */
.q-echeance { display: flex; align-items: center; gap: .8rem; background: var(--q-doux); border: 1px solid var(--q-trait); border-radius: 12px; padding: .75rem 1rem; margin: 1rem 0; color: var(--cnrs-bleu); }
.q-echeance svg { width: 1.6rem; height: 1.6rem; flex: none; }
.q-echeance b { display: block; font-size: .98rem; }
.q-echeance span { display: block; font-size: .85rem; color: var(--q-discret); }

/* Retour vers « Mes plateformes » : bien visible en haut des pages d'une plateforme */
.q-nav-haut { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.q-nav-haut .btn { border-radius: 10px; font-weight: 700; padding: .5rem 1rem; }
.q-grille > .q-pleine { grid-column: 1 / -1; }

/* Logos d'une plateforme (RENATECH, RENATECH+, CNRS) à droite de son nom */
.q-logos { display: inline-flex; align-items: center; gap: .6rem; vertical-align: middle; }
.q-logo { object-fit: contain; display: block; }
.q-logo-cnrs { height: 28px; width: auto; }
.q-logo-renatech { height: 28px; width: auto; }
.q-logo-renatech-plus { height: 28px; width: auto; }
.q-titre-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.q-titre-ligne h1 { margin: .3rem 0 .15rem; }
.q-pf-nom .q-logos { margin-left: .6rem; }
.q-pf-nom .q-logo { height: 22px; }

/* ═══════════════════════════════════════════════════════
   Pages de gestion (avancement de campagne) — même langage que le questionnaire
   ═══════════════════════════════════════════════════════ */
.q-page.g-large { max-width: 1320px; }
.g-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.25rem; }
.g-entete h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.01em; color: var(--cnrs-bleu); margin: 0 0 .35rem; }
.g-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.g-actions .btn, .g-actions .form-select { border-radius: 10px; font-weight: 700; }
.g-actions .form-select { font-weight: 600; width: auto; }
.g-pastille { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 700; padding: .25rem .75rem; border-radius: 999px; background: var(--q-doux); color: var(--cnrs-bleu); }
.g-pastille::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.g-pastille.ok { background: var(--q-ok-doux); color: var(--q-ok); }
.g-pastille.attente { background: #fff1cf; color: #8a5a00; }
.g-pastille.fini { background: #e8ecf1; color: var(--q-discret); }

/* Chiffres clés */
.g-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.g-kpi { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; box-shadow: var(--q-ombre); padding: 1rem 1.2rem; }
.g-kpi-titre { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--q-discret); font-weight: 700; }
.g-kpi-valeur { font-size: 1.9rem; font-weight: 800; line-height: 1.15; color: var(--q-encre); font-variant-numeric: tabular-nums; margin-top: .15rem; }
.g-kpi-valeur small { font-size: 1rem; color: var(--q-discret); font-weight: 700; }
.g-kpi-aide { font-size: .83rem; color: var(--q-discret); margin-top: .25rem; }
.g-barre { height: 8px; border-radius: 4px; background: var(--q-trait); overflow: hidden; margin-top: .6rem; }
.g-barre i { display: block; height: 100%; border-radius: 4px; background: var(--q-ok); min-width: 0; }
.g-barre.orange i { background: var(--cnrs-jaune); }

/* Paramètres repliés */
.g-parametres { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; margin-bottom: 1.25rem; }
.g-parametres > summary { cursor: pointer; padding: .85rem 1.2rem; font-weight: 700; color: var(--cnrs-bleu); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.g-parametres > summary::-webkit-details-marker { display: none; }
.g-parametres > summary::after { content: "Modifier ▾"; font-size: .82rem; font-weight: 700; color: var(--q-discret); }
.g-parametres[open] > summary::after { content: "Replier ▴"; }
.g-parametres .g-resume { font-weight: 500; color: var(--q-discret); font-size: .88rem; }
.g-parametres form { padding: 0 1.2rem 1.1rem; border-top: 1px solid var(--q-trait); padding-top: 1rem; }
.g-parametres .form-control { border-radius: 10px; }
.g-parametres .btn { border-radius: 10px; font-weight: 700; }

/* Recherche et filtres */
.g-barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .9rem; }
.g-recherche { flex: 1 1 240px; max-width: 380px; border-radius: 10px; border: 1px solid var(--q-trait); padding: .55rem .85rem; background: var(--q-surface); }
.g-recherche:focus { outline: 3px solid rgba(245,168,0,.4); border-color: var(--cnrs-bleu); }
.g-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.g-chip { border: 1px solid var(--q-trait); background: var(--q-surface); border-radius: 999px; padding: .35rem .85rem; font-size: .85rem; font-weight: 700; color: var(--q-discret); cursor: pointer; }
.g-chip:hover { border-color: var(--cnrs-bleu); color: var(--q-encre); }
.g-chip.actif { background: var(--cnrs-bleu); border-color: var(--cnrs-bleu); color: #fff; }
.g-chip .n { font-weight: 800; margin-left: .3rem; opacity: .75; }
.g-outils-droite { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.g-outils-droite .btn { border-radius: 10px; font-weight: 700; }

/* Tableau */
.g-tableau { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; box-shadow: var(--q-ombre); overflow-x: auto; }
.g-tableau table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.g-tableau th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--q-discret); font-weight: 800; padding: .8rem 1rem; border-bottom: 1px solid var(--q-trait); background: #f7f9fc; white-space: nowrap; }
.g-tableau td { padding: .85rem 1rem; border-bottom: 1px solid var(--q-trait); vertical-align: top; }
.g-tableau tbody tr:last-child td { border-bottom: 0; }
.g-tableau tbody tr:hover td { background: #fafcff; }
.g-nom { font-weight: 700; color: var(--q-encre); }
.g-nom img { vertical-align: -4px; margin-right: .4rem; }
.g-unite { margin-bottom: .2rem; line-height: 1.35; }
.g-code { display: inline-block; font-size: .75rem; font-weight: 800; border: 1px solid var(--q-trait); border-radius: 6px; padding: 0 .4rem; margin-right: .35rem; color: var(--q-discret); background: #f7f9fc; }
.g-discret { color: var(--q-discret); }
.g-etat { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; background: #e8ecf1; color: var(--q-discret); white-space: nowrap; }
.g-etat.ok { background: var(--q-ok-doux); color: var(--q-ok); }
.g-etat.erreur { background: var(--q-erreur-doux); color: var(--q-erreur); }
.g-avancement { min-width: 150px; }
.g-avancement .g-compteur { font-weight: 800; font-variant-numeric: tabular-nums; }
.g-avancement .g-compteur small { font-weight: 600; color: var(--q-discret); }
.g-vide { text-align: center; color: var(--q-discret); padding: 2rem 1rem !important; }
.g-prolonger { margin-top: .4rem; }
.g-prolonger .btn { border-radius: 8px; font-weight: 700; }

/* Barre flottante d'actions en masse */
.g-flottante { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1.25rem; z-index: 1040; width: min(960px, calc(100% - 1.5rem)); background: var(--cnrs-bleu); color: #fff; border-radius: 16px; box-shadow: 0 12px 34px rgba(0,40,75,.35); padding: .8rem 1.1rem; }
.g-flottante[hidden] { display: none !important; }
.g-flottante .g-flottante-in { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.g-flottante .g-nb { font-weight: 800; }
.g-flottante label { font-size: .82rem; margin: 0; }
.g-flottante .form-control { border-radius: 10px; width: auto; }
.g-flottante .btn { border-radius: 10px; font-weight: 800; }

/* Liste DU / Structure : boutons d'action côte à côte en fin de ligne */
.g-actions-ligne { display: flex; gap: .4rem; white-space: nowrap; }
.g-actions-ligne .btn { border-radius: 8px; font-weight: 700; }

/* Journal des modifications : filtres, avant → après, pied de page */
.g-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: .9rem; }
.g-filtres .form-select { width: auto; max-width: 260px; border-radius: 10px; }
.g-case { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--q-discret); margin: 0; }
.g-diff { margin-top: .4rem; font-size: .85rem; border-collapse: collapse; }
.g-diff th { font-weight: 700; color: var(--q-discret); padding: .1rem .8rem .1rem 0; vertical-align: top; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .85rem; background: none; border: 0; }
.g-diff td { padding: .1rem .3rem; border: 0; vertical-align: top; word-break: break-word; }
.g-diff .avant { color: var(--q-erreur); text-decoration: line-through; text-decoration-thickness: 1px; }
.g-diff .apres { color: var(--q-ok); font-weight: 600; }
.g-diff .fleche { color: var(--q-discret); }
.g-tableau .g-diff tr:hover td { background: none; }
.g-details summary { cursor: pointer; font-size: .85rem; color: var(--q-discret); margin-top: .3rem; }
.g-pied-journal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; }
.g-pied-journal .btn { border-radius: 10px; font-weight: 700; }

/* Accueil : recherche mise en avant, une tuile par DAS ; page DAS : lignes cliquables */
.a-recherche { display: flex; gap: .6rem; margin-bottom: 1.25rem; max-width: 640px; }
.a-recherche .g-recherche { max-width: none; flex: 1; font-size: 1rem; }
.a-recherche .btn { border-radius: 10px; font-weight: 700; }
.a-titre-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--q-discret); font-weight: 800; margin: .5rem 0 .8rem; }
.a-das { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.a-tuile { display: flex; flex-direction: column; gap: .45rem; background: var(--q-surface); border: 1px solid var(--q-trait); border-left: 5px solid var(--cnrs-bleu); border-radius: 14px; box-shadow: var(--q-ombre); padding: 1rem 1.15rem; color: var(--q-encre); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.a-tuile:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.2rem rgba(0, 40, 75, .12); color: var(--q-encre); }
.a-tuile .g-barre { margin-top: .2rem; }
.a-code { align-self: flex-start; font-size: .85rem; padding: .1rem .5rem; }
.a-intitule { font-weight: 800; font-size: 1.02rem; line-height: 1.3; color: var(--cnrs-bleu); }
.a-personne { font-size: .88rem; }
.a-compteurs { display: flex; gap: 1rem; font-size: .9rem; margin-top: auto; }
.a-compteurs strong { font-size: 1.15rem; font-weight: 800; }
.a-logo { height: 18px; object-fit: contain; margin-left: .35rem; vertical-align: middle; }
.a-ligne-lien { cursor: pointer; }
.g-tableau .g-compteur { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Page unité : tuiles des plateformes (labellisées : liseré jaune CNRS) */
.u-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.u-logos { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.u-labellisee { border-left-color: var(--cnrs-jaune); }

/* Page plateforme : sommaire, sections, domaines retenus, périodes, fichiers */
.p-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .85rem; color: var(--cnrs-bleu); background: var(--q-doux); border-radius: 999px; padding: .2rem .8rem .2rem .3rem; }
.p-sommaire { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; position: sticky; top: 0; z-index: 5; background: var(--q-fond); padding: .5rem 0; }
.p-sommaire a { border: 1px solid var(--q-trait); background: var(--q-surface); border-radius: 999px; padding: .3rem .85rem; font-size: .85rem; font-weight: 700; color: var(--q-discret); text-decoration: none; }
.p-sommaire a:hover { border-color: var(--cnrs-bleu); color: var(--cnrs-bleu); }
.p-section { margin-bottom: 1.6rem; scroll-margin-top: 3.5rem; }
.p-section > h2 { font-size: 1.15rem; font-weight: 800; color: var(--cnrs-bleu); margin: 0 0 .7rem; padding-bottom: .4rem; border-bottom: 2px solid var(--q-trait); }
.p-valeur { font-weight: 600; word-break: break-word; }
.p-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.p-chip { background: var(--q-ok-doux); color: var(--q-ok); font-weight: 700; font-size: .88rem; border-radius: 999px; padding: .25rem .8rem; }
.p-details { margin-top: .7rem; }
.p-details summary { cursor: pointer; font-size: .88rem; color: var(--q-discret); font-weight: 600; }
.p-tous-domaines { list-style: none; padding: .5rem 0 0; margin: 0; columns: 2 320px; font-size: .9rem; }
.p-tous-domaines li { padding: .15rem 0; break-inside: avoid; }
.p-tous-domaines .g-etat { min-width: 2.6rem; justify-content: center; margin-right: .3rem; }
.p-periode + .p-periode { margin-top: .3rem; padding-top: .3rem; border-top: 1px dashed var(--q-trait); }
.p-periode .g-discret { display: block; }
.p-fichiers { list-style: none; padding: 0; margin: 0; }
.p-fichiers li { padding: .15rem 0; word-break: break-all; }

/* Bilan de campagne : chiffres clés, une carte par plateforme modifiée, avant → après */
.b-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.b-kpi-modifiee { border-top: 4px solid var(--cnrs-bleu); }
.b-kpi-nouvelle { border-top: 4px solid var(--q-ok); }
.b-kpi-desactivee { border-top: 4px solid var(--q-erreur); }
.b-carte { background: var(--q-surface); border: 1px solid var(--q-trait); border-left: 5px solid var(--cnrs-bleu); border-radius: 14px; box-shadow: var(--q-ombre); padding: .9rem 1.1rem; margin-bottom: .9rem; }
.b-carte.b-nouvelle { border-left-color: var(--q-ok); }
.b-carte.b-desactivee { border-left-color: var(--q-erreur); }
.b-carte[hidden] { display: none; }
.b-carte-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .6rem; }
.b-nom { font-weight: 800; font-size: 1.05rem; color: var(--q-encre); text-decoration: none; margin-right: .4rem; }
.b-nom:hover { color: var(--cnrs-bleu); text-decoration: underline; }
.b-alertes { display: flex; flex-wrap: wrap; gap: .35rem; }
.b-alerte { font-size: .78rem; font-weight: 800; padding: .15rem .65rem; border-radius: 999px; background: #fff1cf; color: #8a5a00; }
.b-alerte.nouvelle { background: var(--q-ok-doux); color: var(--q-ok); }
.b-alerte.desactivee { background: var(--q-erreur-doux); color: var(--q-erreur); }
.b-alerte.doux { background: var(--q-doux); color: var(--cnrs-bleu); }
.b-changements { width: 100%; border-collapse: collapse; font-size: .9rem; }
.b-changements th { width: 1%; white-space: nowrap; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--q-discret); font-weight: 800; padding: .3rem 1rem .3rem 0; vertical-align: top; }
.b-changements td { padding: .3rem .6rem .3rem 0; vertical-align: top; word-break: break-word; }
.b-changements tr + tr th:not(:empty) { border-top: 1px solid var(--q-trait); }
.b-changements tr:has(th:not(:empty)) td { border-top: 1px solid var(--q-trait); }
.b-changements tr:first-child td { border-top: 0; }
.b-champ { width: 22%; color: var(--q-discret); font-weight: 600; }
.b-avant { color: var(--q-erreur); text-decoration: line-through; text-decoration-thickness: 1px; }
.b-apres { color: var(--q-ok); font-weight: 700; }
.b-fleche { color: var(--q-discret); margin: 0 .25rem; }
.b-ajout, .b-retrait { display: inline-block; font-weight: 700; font-size: .85rem; border-radius: 6px; padding: .05rem .5rem; margin: 0 .35rem .3rem 0; }
.b-ajout { background: var(--q-ok-doux); color: var(--q-ok); }
.b-retrait { background: var(--q-erreur-doux); color: var(--q-erreur); text-decoration: line-through; text-decoration-thickness: 1px; }
.b-carte-pied { margin-top: .6rem; padding-top: .5rem; border-top: 1px dashed var(--q-trait); }
.b-repli { background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; padding: .8rem 1.1rem; margin-top: .9rem; }
.b-repli summary { cursor: pointer; font-weight: 800; color: var(--q-encre); }
.b-repli summary .n { font-weight: 800; color: var(--q-discret); margin-left: .3rem; }
.b-liste { list-style: none; padding: 0; margin: 0; columns: 2 320px; }
.b-liste li { padding: .2rem 0; break-inside: avoid; }

/* Fiche structure (gestion DU / RA) : une tuile par champ, façon chiffres clés */
.g-code-titre { font-size: .9rem; vertical-align: middle; margin-right: .6rem; padding: .1rem .5rem; }
.g-aide { font-size: .83rem; color: var(--q-discret); margin-bottom: .6rem; }
.g-aide-alerte { color: #8a5a00; background: #fff1cf; border-radius: 8px; padding: .4rem .7rem; }
.g-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; margin-bottom: .9rem; }
.g-tuiles-ra { padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 2px solid var(--q-trait); }
.g-tuiles-ra .g-tuile { border-left: 4px solid var(--cnrs-bleu); }
.g-tuile { display: flex; flex-direction: column; justify-content: space-between; gap: .45rem; background: var(--q-surface); border: 1px solid var(--q-trait); border-radius: 14px; box-shadow: var(--q-ombre); padding: .85rem 1rem; }
.g-tuile-large { grid-column: 1 / -1; }
.g-tuile-titre { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--q-discret); font-weight: 800; line-height: 1.3; margin: 0; }
.g-tuile .form-control, .g-tuile .form-select { border-radius: 10px; }
.g-ouinon { align-self: flex-start; }
.g-ouinon .btn { min-width: 3.4rem; font-weight: 700; }
.g-boutons { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.1rem; }
.g-boutons .btn { border-radius: 10px; font-weight: 800; }

/* Barre de menu : logo + titre en un seul lien, menus de gestion en jaune, compte dans un menu.
   Dépliée (≥ 1200 px) : menus à gauche, recherche puis compte à droite ; entre 1200 et 1400 px le
   titre et le nom d'utilisateur sont masqués pour que tout tienne sur une ligne.
   Repliée : une colonne, recherche en tête (ordre du HTML). */
.n-barre { border-bottom: 3px solid var(--cnrs-jaune); }
.n-marque { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; }
.n-barre .nav-link { font-weight: 600; white-space: nowrap; }
.n-barre .nav-link.n-gestion { color: var(--cnrs-jaune); font-weight: 700; }
.n-barre .nav-link.n-gestion:hover, .n-barre .nav-link.n-gestion.show { color: #ffd068; }
.n-barre .dropdown-menu { border-radius: 10px; border: 0; box-shadow: 0 .5rem 1.5rem rgba(0, 40, 75, .2); }
.n-avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--cnrs-jaune); color: var(--cnrs-bleu); font-weight: 800; font-size: .85rem; margin-right: .35rem; vertical-align: middle; }
.n-recherche .form-control { border-radius: 999px; border: 0; padding-left: .9rem; }
@media (min-width: 1200px) {
  .n-barre.navbar-expand-xl .navbar-collapse { gap: .75rem; }
  .n-barre .n-menus { order: 0; margin-right: auto; }
  .n-barre .n-recherche { order: 1; width: 220px; }
  .n-barre .n-compte { order: 2; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .n-barre.navbar-expand-xl .n-titre, .n-barre.navbar-expand-xl .n-utilisateur { display: none; }
}
@media (min-width: 992px) { .n-barre.navbar-expand-lg .n-compte { margin-left: auto; align-items: center; } }
@media (max-width: 1199.98px) {
  .n-barre.navbar-expand-xl .navbar-collapse.show { display: flex; flex-direction: column; padding-bottom: .5rem; }
  .n-barre.navbar-expand-xl .n-recherche { margin: .75rem 0 .25rem; }
  .n-barre.navbar-expand-xl .n-compte { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: .4rem; padding-top: .4rem; }
}
