/* =============================================================================
 *  styles.css — CHARTE GRAPHIQUE CFTC SANOFI
 * =============================================================================
 *  Palette issue du logo CFTC SANOFI :
 *    Bleu primaire  #1E3A8A   (header, boutons, accents)
 *    Bleu moyen     #2563EB
 *    Bleu clair     #3B82F6
 *    Violet Sanofi  #6B46C1   (accents, liens)
 *    Noir / Blanc   #000 / #FFF
 *
 *  Principes UX (cahier des charges §11) :
 *    visuelle, interactive, non textuelle en première lecture,
 *    orientée progression, basée sur des tuiles et dashboards.
 * ========================================================================== */

/* ----------------------------------------------------------- tokens ------ */
:root {
  --bleu-primaire: #1e3a8a;
  --bleu-moyen: #2563eb;
  --bleu-clair: #3b82f6;
  --violet: #6b46c1;
  --noir: #0f172a;
  --gris-900: #111827;
  --gris-700: #374151;
  --gris-500: #6b7280;
  --gris-300: #d1d5db;
  --gris-200: #e5e7eb;
  --gris-100: #f3f4f6;
  --gris-50: #f9fafb;
  --blanc: #ffffff;

  --vert: #059669;
  --rouge: #dc2626;
  --ambre: #b45309;

  --ombre-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --ombre: 0 4px 12px rgba(15, 23, 42, 0.08);
  --ombre-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  --maxw: 1180px;
  --font:
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------ reset ------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font);
  color: var(--gris-900);
  background: var(--gris-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--bleu-moyen);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  line-height: 1.2;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
button {
  font-family: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ----------------------------------------------------------- layout ------ */
.conteneur {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
#vue {
  padding: 28px 20px 60px;
  min-height: calc(100vh - 220px);
}

/* -------------------------------------------------------- état de boot --- */
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bleu-primaire);
  color: #fff;
}
.boot__logo img {
  height: 80px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.boot__txt {
  color: rgba(255, 255, 255, 0.85);
}

/* ----------------------------------------------------------- bandeau ----- */
.bandeau {
  background: var(--bleu-primaire);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--ombre);
}
.bandeau__barre {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.bandeau__logo img {
  height: 46px;
}
.bandeau__user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bandeau__user-nom {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.bandeau__user a:hover {
  text-decoration: none;
}

/* menu principal */
.menu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.menu__lien {
  color: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.menu__lien:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.menu__lien--actif {
  color: #fff;
  border-bottom-color: var(--violet);
}

/* burger (mobile) */
.bandeau__burger {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}
.bandeau__burger span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ----------------------------------------------------------- footer ------ */
.footer {
  background: var(--noir);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}
.footer__version {
  color: rgba(255, 255, 255, 0.45);
}

/* --------------------------------------------------------- en-têtes ------ */
.page__entete {
  margin-bottom: 24px;
}
.page__titre {
  font-size: 1.7rem;
  color: var(--bleu-primaire);
}
.page__soustitre {
  color: var(--gris-700);
  margin-bottom: 0;
}

.ariane {
  font-size: 0.82rem;
  color: var(--gris-500);
  margin-bottom: 10px;
}
.ariane a {
  color: var(--bleu-moyen);
}
.ariane span {
  color: var(--gris-700);
}

/* ------------------------------------------------------------ blocs ------ */
.bloc {
  background: var(--blanc);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius);
  box-shadow: var(--ombre-sm);
  padding: 22px;
  margin-bottom: 22px;
}
.bloc__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bloc__entete h2 {
  font-size: 1.15rem;
  color: var(--gris-900);
  margin: 0;
}

/* ----------------------------------------------------------- boutons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.05s,
    box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn--primaire {
  background: var(--bleu-moyen);
  color: #fff;
}
.btn--primaire:hover {
  background: var(--bleu-primaire);
}
.btn--secondaire {
  background: var(--gris-100);
  color: var(--gris-900);
  border-color: var(--gris-200);
}
.btn--secondaire:hover {
  background: var(--gris-200);
}
.btn--violet {
  background: var(--violet);
  color: #fff;
}
.btn--danger {
  background: var(--rouge);
  color: #fff;
}
.btn--danger:hover {
  background: #b91c1c;
}
.btn--ghost {
  background: transparent;
  color: var(--gris-500);
}
.btn--bloc {
  width: 100%;
}
.btn--petit {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
}

.lien {
  background: transparent;
  border: 0;
  color: var(--bleu-moyen);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}
.lien:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------- barre progression */
.barre {
  position: relative;
  background: var(--gris-200);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.barre__remplissage {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--bleu-moyen), var(--bleu-clair));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.barre .pct {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gris-700);
  background: rgba(255, 255, 255, 0.8);
  padding: 0 6px;
  border-radius: 999px;
}

/* ------------------------------------------------------------- badges ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge__num {
  font-weight: 800;
}
.badge--neutre {
  background: var(--gris-200);
  color: var(--gris-700);
}

/* pastilles des 5 niveaux */
.pastilles {
  display: inline-flex;
  gap: 4px;
  margin-top: 4px;
}
.pastille {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gris-200);
  color: var(--gris-500);
  font-size: 0.6rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pastille--atteinte {
  color: #fff;
}

/* ----------------------------------------------------------- tuiles ------- */
.grille-tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.tuile {
  display: block;
  background: var(--blanc);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--ombre-sm);
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    border-color 0.12s;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.tuile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bleu-primaire), var(--violet));
}
.tuile:hover {
  transform: translateY(-3px);
  box-shadow: var(--ombre-lg);
  border-color: var(--bleu-clair);
  text-decoration: none;
}
.tuile__icone {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.tuile__nom {
  font-size: 1.02rem;
  color: var(--gris-900);
  margin-bottom: 4px;
}
.tuile__desc {
  color: var(--gris-500);
  font-size: 0.85rem;
  min-height: 2.6em;
}
.tuile__niveau {
  margin: 10px 0;
}
.tuile__meta {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--gris-500);
}

/* --------------------------------------------------------- outils -------- */
.grille-outils {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.outil {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--gris-100);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: inherit;
  transition:
    background 0.12s,
    transform 0.12s;
}
.outil:hover {
  background: #eef2ff;
  transform: translateY(-2px);
  text-decoration: none;
}
.outil__icone {
  font-size: 1.4rem;
}
.outil__nom {
  font-weight: 700;
  color: var(--bleu-primaire);
}
.outil__desc {
  font-size: 0.8rem;
  color: var(--gris-500);
}

/* ----------------------------------------------- bandeau bienvenue -------- */
.bandeau-bienvenue {
  background: linear-gradient(
    120deg,
    var(--bleu-primaire),
    var(--bleu-moyen) 60%,
    var(--violet)
  );
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--ombre);
}
.bandeau-bienvenue .page__titre {
  color: #fff;
  margin: 0;
}
.bandeau-bienvenue .page__soustitre {
  color: rgba(255, 255, 255, 0.9);
}
.bandeau-bienvenue__global {
  display: flex;
  align-items: center;
  gap: 18px;
}
.global-pct {
  text-align: center;
}
.global-pct__val {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.global-pct__lbl {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}
.bandeau-bienvenue .btn--secondaire {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------- synthèse ------ */
.synthese-domaine {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
}
.synthese-domaine__icone {
  font-size: 2.4rem;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: var(--ombre-sm);
}
.synthese-domaine__corps {
  flex: 1;
}
.synthese-domaine__indics {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}
.indic {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.indic__val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--bleu-primaire);
}
.indic__lbl {
  font-size: 0.76rem;
  color: var(--gris-500);
}
.indic--lg .indic__val {
  font-size: 2rem;
}

/* ----------------------------------------------- liste sous-thèmes ------ */
.liste-sous-themes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ligne-sous-theme {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--blanc);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: inherit;
  transition:
    border-color 0.12s,
    transform 0.12s,
    box-shadow 0.12s;
}
a.ligne-sous-theme:hover {
  border-color: var(--bleu-clair);
  transform: translateX(2px);
  box-shadow: var(--ombre-sm);
  text-decoration: none;
}
.ligne-sous-theme__icone {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.ligne-sous-theme__corps {
  flex: 1;
  min-width: 0;
}
.ligne-sous-theme__nom {
  font-weight: 700;
  color: var(--gris-900);
}
.ligne-sous-theme__desc {
  font-size: 0.82rem;
  color: var(--gris-500);
}
.ligne-sous-theme__raison {
  font-size: 0.78rem;
  color: var(--ambre);
  margin-top: 4px;
}
.ligne-sous-theme__etat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.est-verrouille {
  opacity: 0.65;
  cursor: not-allowed;
}
.verrou {
  font-size: 0.9rem;
}

/* ----------------------------------------------- échelle des niveaux ----- */
.echelle {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.echelle__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}
.echelle__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}
.echelle__label {
  font-weight: 700;
  color: var(--gris-900);
}
.echelle__desc {
  font-size: 0.82rem;
  color: var(--gris-500);
}

/* ---------------------------------------------------- sous-thème page ----- */
.sous-theme-entete {
  background: var(--blanc);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: var(--ombre-sm);
}
.sous-theme-entete__etat {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.liste-niveaux {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.niveau-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gris-50);
  border: 1px solid var(--gris-200);
}
.niveau-item.est-atteint {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.niveau-item.est-encours {
  background: #eff6ff;
  border-color: var(--bleu-clair);
}
.niveau-item__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}
.niveau-item__corps {
  flex: 1;
}
.niveau-item__label {
  font-weight: 700;
}
.niveau-item__desc {
  font-size: 0.82rem;
  color: var(--gris-500);
}

.puce {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.puce--ok {
  background: #d1fae5;
  color: var(--vert);
}
.puce--encours {
  background: #dbeafe;
  color: var(--bleu-primaire);
}
.puce--idle {
  background: var(--gris-200);
  color: var(--gris-500);
}
.puce--ko {
  background: #fee2e2;
  color: var(--rouge);
}

/* zone action valider niveau */
.zone-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--gris-100);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.zone-action--verrou {
  background: #fef3c7;
}
.zone-action--termine {
  background: #d1fae5;
}
.zone-action__icone {
  font-size: 1.6rem;
}
.zone-action strong {
  display: block;
  margin-bottom: 2px;
}
.zone-action p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gris-700);
}

/* ----------------------------------------------------------- placeholder -- */
.placeholder {
  text-align: center;
  background: var(--gris-50);
  border: 2px dashed var(--gris-300);
  border-radius: var(--radius);
  padding: 28px 20px;
}
.placeholder__icone {
  font-size: 2rem;
  margin-bottom: 6px;
}
.placeholder h3 {
  color: var(--gris-700);
}
.placeholder p {
  color: var(--gris-500);
  max-width: 540px;
  margin: 0 auto;
}

/* --------------------------------------------------------- transverses ---- */
.liste-transverse {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.carte-transverse {
  background: var(--gris-50);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.carte-transverse h3 {
  color: var(--bleu-primaire);
  font-size: 1rem;
}
.carte-transverse__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.carte-transverse--compact h3 {
  font-size: 0.95rem;
}
.accordeon summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
}
.accordeon[open] summary {
  color: var(--bleu-primaire);
}
.accordeon__corps {
  padding: 6px 0 12px;
  color: var(--gris-700);
}

/* --------------------------------------------------------- parcours ------ */
.parcours-global {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.parcours-ligne {
  margin-bottom: 18px;
}
.parcours-ligne__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.parcours-ligne__icone {
  font-size: 1.2rem;
}
.parcours-ligne__nom {
  font-weight: 600;
}
.parcours-ligne__st {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.pastille-mini {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gris-200);
}
.pastille-mini--pleine {
  background: var(--bleu-moyen);
}

/* --------------------------------------------------------- auth ---------- */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bleu-primaire), var(--violet));
  padding: 20px;
}
.auth__carte {
  background: var(--blanc);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--ombre-lg);
}
.auth__logo {
  text-align: center;
  margin-bottom: 16px;
}
.auth__logo img {
  height: 60px;
  margin: 0 auto;
}
.auth__titre {
  text-align: center;
  color: var(--bleu-primaire);
}
.auth__soustitre {
  text-align: center;
  color: var(--gris-500);
  margin-bottom: 22px;
}
.auth__alt {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--gris-500);
}
.auth__sep {
  margin: 0 8px;
}

/* formulaire */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form__rangee {
  display: flex;
  gap: 12px;
}
.form__rangee .form__champ {
  flex: 1;
}
.form__champ {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}
.form__champ span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gris-700);
}
.form__champ input,
.form__champ select {
  padding: 10px 12px;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--blanc);
  color: var(--gris-900);
}
.form__champ input:focus,
.form__champ select:focus {
  border-color: var(--bleu-clair);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.muted {
  color: var(--gris-500);
  font-size: 0.8rem;
}
.code {
  display: inline-block;
  background: var(--gris-100);
  border: 1px dashed var(--gris-300);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bleu-primaire);
}

/* --------------------------------------------------------- profil -------- */
.profil {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .profil {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}
.fiche {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
}
.fiche dt {
  color: var(--gris-500);
  font-size: 0.82rem;
}
.fiche dd {
  margin: 0;
  font-weight: 500;
}
.profil__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ----------------------------------------------------------- admin -------- */
.grille-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.kpi {
  background: var(--gris-50);
  border: 1px solid var(--gris-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.kpi__val {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--bleu-primaire);
}
.kpi__lbl {
  font-size: 0.78rem;
  color: var(--gris-500);
}
.kpi--accent {
  background: linear-gradient(135deg, var(--bleu-primaire), var(--violet));
}
.kpi--accent .kpi__val {
  color: #fff;
}
.kpi--accent .kpi__lbl {
  color: rgba(255, 255, 255, 0.85);
}

.admin-domaine {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.admin-domaine__icone {
  font-size: 1.1rem;
}
.admin-domaine__nom {
  min-width: 200px;
  flex: 1;
  font-weight: 500;
}
.admin-domaine .barre {
  flex: 2;
  min-width: 120px;
}

/* tableau */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gris-200);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 760px;
}
.table thead th {
  background: var(--gris-100);
  text-align: left;
  padding: 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gris-700);
}
.table tbody td {
  padding: 12px;
  border-top: 1px solid var(--gris-200);
}
.table tbody tr:hover {
  background: var(--gris-50);
}
.actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------ toasts / modales -- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gris-900);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--ombre-lg);
  max-width: 360px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.25s,
    transform 0.25s;
  font-size: 0.9rem;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--succes {
  background: var(--vert);
}
.toast--erreur {
  background: var(--rouge);
}
.toast--avertissement {
  background: var(--ambre);
}
.toast__icone {
  font-size: 1.1rem;
}

.modale__overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.modale__overlay--visible {
  opacity: 1;
}
.modale {
  background: var(--blanc);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--ombre-lg);
}
.modale__titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gris-200);
  font-size: 1.05rem;
  color: var(--bleu-primaire);
}
.modale__fermer {
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gris-500);
  padding: 0 4px;
}
.modale__corps {
  padding: 20px;
}
.modale__actions {
  padding: 14px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--gris-200);
}

/* ----------------------------------------------------------- responsive --- */
@media (max-width: 820px) {
  .page__titre {
    font-size: 1.4rem;
  }
  .bandeau__burger {
    display: flex;
  }
  .menu {
    display: none;
    flex-direction: column;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .menu--ouvert {
    display: flex;
  }
  .menu__lien {
    border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .menu__lien--actif {
    border-left-color: var(--violet);
    border-bottom: 0;
  }
  .bandeau__user-nom {
    display: none;
  }
  .synthese-domaine {
    flex-direction: column;
  }
  .synthese-domaine__indics {
    gap: 14px;
  }
  .fiche {
    grid-template-columns: 1fr;
  }
  .fiche dt {
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .form__rangee {
    flex-direction: column;
  }
  .bandeau-bienvenue {
    flex-direction: column;
    align-items: flex-start;
  }
  .global-pct__val {
    font-size: 1.6rem;
  }
}

/* Corrections V1.1 : lisibilité, clavier et petits écrans. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 300;
  background: white;
  color: #1e3a8a;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.progression {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.progression .barre {
  flex: 1;
  min-width: 20px;
}
.progression > .pct {
  position: static;
  transform: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-domaine .progression {
  flex: 2;
  min-width: 120px;
}
.grille-tuiles,
.liste-transverse {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}
.grille-outils {
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
}
.grille-kpis {
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
}
.form__champ,
.form__rangee,
.synthese-domaine__corps,
.niveau-item__corps {
  min-width: 0;
}
.form__champ input,
.form__champ select,
.form__champ textarea {
  width: 100%;
  min-width: 0;
}
.form__champ textarea {
  font: inherit;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
}
.form-error {
  color: #991b1b;
  background: #fee2e2;
  padding: 12px;
  border-radius: 8px;
  margin: 12px;
}
.form-error[hidden] {
  display: none;
}
.notice {
  padding: 12px 16px;
  background: #eff6ff;
  color: #1e3a8a;
  border-left: 4px solid #1d4ed8;
  border-radius: 6px;
}
.contenu-texte {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
  padding: 12px 0;
}
.puce--ok {
  color: #065f46;
}
.niveau-item__num {
  color: #374151;
}
.niveau-item.est-atteint .niveau-item__num {
  color: white;
}
.pastille {
  color: #374151;
}
.pastille--atteinte {
  color: white;
}
.pastille-mini {
  display: inline-block;
  min-width: 24px;
  min-height: 24px;
}
.parcours-ligne__st {
  flex-wrap: wrap;
}
.fiche dd,
.ariane,
.tuile__nom,
.ligne-sous-theme__nom {
  overflow-wrap: anywhere;
}
.auth-page {
  max-width: none !important;
  padding: 0 !important;
  min-height: 0 !important;
}
.auth {
  min-height: calc(100dvh - 64px);
}
.modale__titre h2 {
  font-size: 1.05rem;
  margin: 0;
}
.modale__actions {
  flex-wrap: wrap;
}
.editor-domain {
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}
.editor-domain li {
  margin: 8px 0;
}
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}
.form__champ input:focus,
.form__champ select:focus,
.form__champ textarea:focus {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
  box-shadow: none;
}
.toasts {
  max-width: calc(100vw - 32px);
  right: 16px;
}
@media (max-width: 600px) {
  .bloc,
  .sous-theme-entete,
  .synthese-domaine {
    padding: 16px;
  }
  .ligne-sous-theme {
    flex-wrap: wrap;
    padding: 12px;
  }
  .ligne-sous-theme__etat {
    width: 100%;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .niveau-item {
    flex-wrap: wrap;
  }
  .niveau-item__etat {
    margin-left: 42px;
  }
  .echelle__item {
    flex-wrap: wrap;
  }
  .echelle__desc {
    flex-basis: 100%;
    margin-left: 44px;
  }
  .form__rangee {
    flex-direction: column;
  }
  .auth__carte {
    padding: 20px;
  }
  .bandeau-bienvenue {
    padding: 20px;
  }
  .bandeau-bienvenue__global {
    flex-wrap: wrap;
  }
  .admin-domaine__nom {
    min-width: 0;
    flex-basis: 100%;
  }
  .btn {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
