/* ============================================================================
   SIGNALEMENT EXAMENS NATIONAUX — DESIGN SYSTEM PARTAGÉ (theme.css)
   Plateforme gouvernementale · République de Madagascar
   MEN · METFP · MESUPRES
   ----------------------------------------------------------------------------
   Design system maison enrichi (extension de la charte existante).
   Conçu pour être découpable en composants Twig lors de l'intégration Symfony.
   Accessibilité : WCAG 2.1 AA (contrastes, focus visibles, cibles tactiles,
   préférences de mouvement réduit).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. JETONS DE DESIGN (design tokens)
   ------------------------------------------------------------------------- */
:root {
  /* Couleurs institutionnelles (drapeau + charte gouvernementale malgache) */
  --green: #0B5A2E;          /* vert institutionnel principal */
  --green-600: #0F6E39;
  --green-700: #08462350;
  --green-050: #E9F3EE;
  --red: #D62027;            /* rouge du drapeau */
  --red-050: #FDECEC;
  --blue: #1D4E89;           /* bleu administratif */
  --blue-050: #EAF1F9;
  --white: #FFFFFF;

  /* Échelle de statut (code couleur VERT / JAUNE / ORANGE / ROUGE) */
  --vert: #16A34A;
  --jaune: #EAB308;
  --orange: #F97316;
  --rouge: #DC2626;

  /* Neutres */
  --bg: #EEF2F0;
  --surface: #FFFFFF;
  --surface-2: #F6F8F7;
  --border: #DCE4DF;
  --border-strong: #C2CFC8;
  --text: #14211B;
  --muted: #5B6B63;
  --soft: #84948B;

  /* Rayons, ombres, transitions */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 8px 30px rgba(20, 33, 27, .08);
  --shadow-sm: 0 1px 3px rgba(20, 33, 27, .06);
  --shadow-lg: 0 18px 50px rgba(20, 33, 27, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Typographie */
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------------------------
   2. RÉINITIALISATION & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0;
  letter-spacing: -.02em;
  line-height: 1.2;
}

a { color: var(--green); text-underline-offset: 2px; }

img { max-width: 100%; display: block; }

/* Conteneurs */
.wrap { max-width: 820px; margin-inline: auto; padding: 0 clamp(.9rem, 3vw, 1.5rem) 3rem; }
.wrap--wide { max-width: 1320px; }

/* Accessibilité : lien d'évitement + texte réservé aux lecteurs d'écran */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--green); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Focus visible homogène et bien contrasté (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------------
   3. EN-TÊTE INSTITUTIONNEL
   ------------------------------------------------------------------------- */
.gov-header {
  background: linear-gradient(135deg, var(--green), var(--green-600));
  color: #fff;
  position: sticky; top: 0; z-index: 30;
  box-shadow: var(--shadow-sm);
}
.gov-header__bar {
  max-width: 1320px; margin-inline: auto;
  padding: .9rem clamp(.9rem, 3vw, 1.5rem);
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.gov-brand { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.gov-emblem {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  display: grid; place-items: center; font-size: 1.25rem;
}
.gov-brand__txt h1, .gov-brand__txt .h1 {
  font-size: 1.05rem; font-weight: 800; line-height: 1.15; margin: 0;
}
.gov-brand__txt p { margin: .12rem 0 0; font-size: .72rem; color: rgba(255, 255, 255, .85); }

.badge-live {
  display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 600;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .25);
  padding: .35rem .75rem; border-radius: 999px; white-space: nowrap;
}
.badge-live .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .35); animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

/* Barre de progression (formulaires) */
.progress-track {
  height: 5px; background: rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden;
  max-width: 1320px; margin: .35rem auto 0;
}
.progress-bar {
  height: 100%; width: 0; background: #fff; border-radius: 999px;
  transition: width .4s var(--ease);
}

/* ---------------------------------------------------------------------------
   4. CARTES / SECTIONS
   ------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-top: 1.15rem; overflow: hidden;
}
.card__head {
  display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem;
  user-select: none; transition: background .2s; background: none; border: 0; width: 100%;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.card__head[aria-expanded] { cursor: pointer; }
.card__head:hover { background: var(--surface-2); }
.card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; font-family: var(--font-head);
  font-weight: 700; font-size: .92rem; color: #fff; flex-shrink: 0;
}
.card__title { font-size: 1rem; font-weight: 700; flex: 1; margin: 0; }
.card__hint { font-size: .74rem; color: var(--muted); font-weight: 500; }
.card__chev { color: var(--soft); transition: transform .3s var(--ease); font-size: .85rem; }
.card.is-collapsed .card__chev { transform: rotate(-90deg); }
.card__body { padding: 0 1.15rem 1.25rem; }
.card.is-collapsed .card__body { display: none; }

/* Carte statistique (dashboard) */
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat__icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.15rem; color: #fff; margin-bottom: .7rem;
}
.stat__value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat__label { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.stat__delta { font-size: .74rem; font-weight: 600; margin-top: .5rem; display: inline-flex; gap: .3rem; align-items: center; }
.stat__delta.up { color: var(--vert); }
.stat__delta.down { color: var(--rouge); }

/* ---------------------------------------------------------------------------
   5. CHAMPS DE FORMULAIRE
   ------------------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
.grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }

label, .label {
  font-size: .8rem; font-weight: 600; color: var(--muted); display: block;
}
label .req, .req { color: var(--red); font-weight: 700; }
.field__help { font-size: .74rem; color: var(--soft); }

input, select, textarea {
  width: 100%; padding: .72rem .8rem; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: .93rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--soft); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 90, 46, .18);
}
textarea { resize: vertical; min-height: 84px; }
.readonly, input[readonly] { background: var(--surface-2); color: var(--muted); font-weight: 600; }

/* Champ à icône (recherche, téléphone…) */
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
.input-icon > input { padding-left: 2.3rem; }

/* États de validation */
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea,
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--red); background: #fff;
}
.field.is-invalid input:focus, input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(214, 32, 39, .18);
}
.field.is-valid input, .field.is-valid select {
  border-color: var(--vert);
}
.error-msg {
  display: none; align-items: center; gap: .35rem;
  color: var(--red); font-size: .76rem; font-weight: 600; margin-top: .1rem;
}
.field.is-invalid .error-msg { display: flex; }

fieldset { border: none; padding: 0; margin: 0 0 .3rem; min-width: 0; }
fieldset legend { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: .4rem; }
.subgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem .9rem; margin-top: .2rem; }

/* ---------------------------------------------------------------------------
   6. CHOIX (radios / cases stylisées en pastilles)
   ------------------------------------------------------------------------- */
.choices { display: flex; flex-wrap: wrap; gap: .45rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .9rem; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: .84rem; font-weight: 500; cursor: pointer;
  transition: all .2s var(--ease); background: var(--surface);
  min-height: 40px;
}
.choice span:hover { border-color: var(--green); }
.choice input:checked + span { background: var(--green); color: #fff; border-color: var(--green); }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.choice.yes input:checked + span { background: var(--vert); border-color: var(--vert); }
.choice.no input:checked + span { background: var(--red); border-color: var(--red); }

/* Grande grille de type de signalement (cartes cliquables avec icône) */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem;
  padding: 1rem .6rem; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; text-align: center; cursor: pointer; background: var(--surface);
  transition: all .2s var(--ease); min-height: 88px; color: var(--text);
}
.type-opt span i { font-size: 1.4rem; color: var(--green); transition: color .2s; }
.type-opt span:hover { border-color: var(--green); background: var(--green-050); }
.type-opt input:checked + span { border-color: var(--green); background: var(--green-050); box-shadow: 0 0 0 3px rgba(11, 90, 46, .12); }
.type-opt input:checked + span i { color: var(--green-600); }
.type-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Sélecteur de code statut (VERT / JAUNE / ORANGE / ROUGE) */
.status-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-top: .3rem; }
.status-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.status-opt span {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .8rem .4rem; border-radius: 12px; border: 2px solid transparent; cursor: pointer;
  font-weight: 700; font-size: .82rem; color: #fff; text-align: center;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.status-opt span small { font-weight: 500; font-size: .64rem; opacity: .92; }
.status-opt.vert span { background: var(--vert); }
.status-opt.jaune span { background: var(--jaune); color: #1F2937; }
.status-opt.orange span { background: var(--orange); }
.status-opt.rouge span { background: var(--rouge); }
.status-opt input:checked + span { transform: scale(1.05); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); border-color: rgba(0, 0, 0, .25); }
.status-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Encart d'alerte statut critique */
.status-hint {
  margin-top: .8rem; padding: .8rem .9rem; border-radius: 10px; background: var(--red-050);
  border: 1px solid #FECACA; color: #991B1B; font-size: .82rem; display: none; gap: .5rem; align-items: flex-start;
}
.status-hint.show { display: flex; }
.status-hint i { margin-top: .1rem; }

/* Suggestion automatique */
.suggest { margin-top: .7rem; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; }

/* ---------------------------------------------------------------------------
   7. ZONE DE DÉPÔT DE FICHIERS
   ------------------------------------------------------------------------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 1.4rem 1rem; text-align: center; cursor: pointer; background: var(--surface-2);
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--green); background: var(--green-050); }
.dropzone i { font-size: 1.7rem; color: var(--green); }
.dropzone p { margin: .5rem 0 .1rem; font-weight: 600; font-size: .9rem; }
.dropzone small { color: var(--soft); font-size: .76rem; }
.file-list { display: flex; flex-direction: column; gap: .45rem; margin-top: .7rem; }
.file-item {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: .82rem;
}
.file-item i.type { color: var(--blue); font-size: 1.05rem; }
.file-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .size { color: var(--soft); font-size: .74rem; }
.file-item button {
  border: 0; background: none; color: var(--red); cursor: pointer; font-size: 1rem; padding: .2rem; line-height: 1;
}

/* ---------------------------------------------------------------------------
   8. BOUTONS
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.2rem; border-radius: 12px; font-family: inherit; font-weight: 700; font-size: .92rem;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, border-color .2s;
  min-height: 46px;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(11, 90, 46, .26); }
.btn--primary:hover { background: var(--green-600); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--red); color: #fff; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--sm { padding: .5rem .85rem; min-height: 38px; font-size: .82rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Barre d'action collante en bas des formulaires */
.actions {
  position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--bg) 72%, transparent);
  padding: 1rem 0 .6rem; margin-top: 1.6rem;
  display: flex; gap: .7rem; flex-wrap: wrap;
}
.actions .btn { flex: 1; min-width: 150px; }

/* ---------------------------------------------------------------------------
   9. TABLEAU PROFESSIONNEL
   ------------------------------------------------------------------------- */
.table-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; }
.table-tools .grow { flex: 1; min-width: 200px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 820px; }
table.data thead th {
  background: var(--surface-2); color: var(--muted); text-align: left; font-weight: 700;
  padding: .8rem .9rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
table.data thead th.sortable { cursor: pointer; user-select: none; }
table.data thead th.sortable:hover { color: var(--text); }
table.data thead th .arrow { opacity: .35; font-size: .7rem; margin-left: .25rem; }
table.data thead th[aria-sort="ascending"] .arrow,
table.data thead th[aria-sort="descending"] .arrow { opacity: 1; color: var(--green); }
table.data tbody td { padding: .75rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--green-050); }
table.data tbody tr:last-child td { border-bottom: 0; }

/* Badges de statut / gravité / canal */
.tag { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.tag .dot-s { width: 8px; height: 8px; border-radius: 50%; }
.tag--vert { background: #DCFCE7; color: #166534; }
.tag--jaune { background: #FEF9C3; color: #854D0E; }
.tag--orange { background: #FFEDD5; color: #9A3412; }
.tag--rouge { background: #FEE2E2; color: #991B1B; }
.tag--neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag--blue { background: var(--blue-050); color: var(--blue); }

/* Pagination */
.pagination { display: flex; gap: .3rem; align-items: center; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .84rem; color: var(--text);
  transition: all .15s;
}
.pagination button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.pagination button.active { background: var(--green); color: #fff; border-color: var(--green); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------------------------------------------------------------------
   10. ONGLETS / NAVIGATION SECONDAIRE
   ------------------------------------------------------------------------- */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; overflow-x: auto; }
.tab-btn {
  border: 0; background: none; padding: .8rem 1rem; font: inherit; font-weight: 600; font-size: .9rem;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .5rem;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Panneau graphique */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.2rem; box-shadow: var(--shadow-sm); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.panel__title { font-size: .98rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.panel__title i { color: var(--green); }

/* Carte Leaflet */
#map { height: 460px; width: 100%; border-radius: var(--radius); z-index: 1; }
.map-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .8rem; font-size: .82rem; }
.map-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.map-legend .dot-s { width: 12px; height: 12px; border-radius: 50%; }

/* ---------------------------------------------------------------------------
   11. TOAST / MODALE
   ------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(2rem);
  background: var(--text); color: #fff; padding: .85rem 1.35rem; border-radius: 12px; font-size: .9rem;
  font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: all .35s var(--ease); z-index: 60; max-width: 90vw; display: flex; gap: .5rem; align-items: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 33, 27, .55); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 70;
}
.modal-backdrop.show { display: flex; animation: fadeIn .25s var(--ease); }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); max-width: 640px; width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal__title { font-size: 1.05rem; font-weight: 800; }
.modal__close { border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal__body { padding: 1.25rem; }

/* Écran de confirmation d'envoi (formulaires publics) */
.confirm-screen { text-align: center; padding: 2.5rem 1.2rem; }
.confirm-screen .check {
  width: 84px; height: 84px; border-radius: 50%; background: var(--green-050); color: var(--green);
  display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 1.2rem;
  animation: pop .5s var(--ease);
}
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.confirm-screen h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.confirm-screen .ref { display: inline-block; margin: .8rem 0; padding: .5rem 1rem; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; font-family: ui-monospace, monospace; font-weight: 700; font-size: 1.05rem; letter-spacing: .05em; }

/* ---------------------------------------------------------------------------
   12. DIVERS
   ------------------------------------------------------------------------- */
.section-title { display: flex; align-items: center; gap: .6rem; margin: 1.8rem 0 .6rem; font-size: 1.15rem; }
.section-title i { color: var(--green); }
.muted { color: var(--muted); }
.hr { height: 1px; background: var(--border); border: 0; margin: 1.2rem 0; }
.notice {
  display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-sm);
  background: var(--blue-050); border: 1px solid #CFE0F2; color: #14213B; font-size: .84rem;
}
.notice i { color: var(--blue); margin-top: .15rem; font-size: 1.05rem; }
.notice.warn { background: #FFF7ED; border-color: #FED7AA; color: #7C2D12; }
.notice.warn i { color: var(--orange); }

.gov-footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 2rem 1rem 2.5rem; }
.gov-footer strong { color: var(--text); }

/* Aperçu JSON (utilitaire de démonstration) */
.preview { margin-top: 1.2rem; background: #0D1512; border-radius: var(--radius); overflow: hidden; display: none; }
.preview.show { display: block; }
.preview__head { padding: .7rem 1rem; color: #9AE6B4; font-size: .78rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1E2E26; }
.preview pre { margin: 0; padding: 1rem; color: #D1FAE5; font-size: .72rem; line-height: 1.5; overflow-x: auto; font-family: ui-monospace, monospace; max-height: 300px; }
.copy-btn { background: #1E2E26; color: #9AE6B4; border: none; padding: .4rem .75rem; border-radius: 7px; cursor: pointer; font-size: .72rem; font-weight: 600; }

/* ---------------------------------------------------------------------------
   13. RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .grid, .grid--3, .grid--4, .subgrid { grid-template-columns: 1fr; }
  .status-picker { grid-template-columns: 1fr 1fr; }
  .gov-brand__txt h1, .gov-brand__txt .h1 { font-size: .95rem; }
  .actions .btn { min-width: 100%; }
}
@media (min-width: 641px) and (max-width: 980px) {
  .grid--4 { grid-template-columns: 1fr 1fr; }
}

/* Utilitaires de disposition responsive (grille simple type Bootstrap) */
.row { display: grid; gap: 1rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .cols-5 { grid-template-columns: repeat(3, 1fr); } .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .cols-2, .cols-3, .cols-4, .cols-5 { grid-template-columns: 1fr; } }

/* Préférence de mouvement réduit (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Impression (dashboard / fiches) */
@media print {
  .gov-header, .actions, .table-tools, .pagination, .no-print, .tabs { display: none !important; }
  body { background: #fff; }
  .card, .panel, .stat, .table-wrap { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
