/* ================================================================
   ANRDI COPYRIGHT (c) 2026 — ALL RIGHTS RESERVED - AUTHOR: LYAM
================================================================ */

@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reference-tree {
  display: grid;
  gap: 16px;
}

.reference-tree-pole {
  border: 1px solid var(--border, #d9e2ec);
  border-left: 4px solid var(--blue, #0b5cab);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface, #fff);
}

.reference-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.reference-tree-header code,
.reference-function-list code {
  color: #64748b;
  font-size: 12px;
}

.reference-color {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  margin-right: 7px;
  vertical-align: 1px;
}

.reference-tree-categories {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-left: 18px;
}

.reference-tree-category {
  border: 1px solid #e5eaf0;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.reference-function-list {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.reference-function-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e5eaf0;
  padding-top: 7px;
}

@media (max-width: 1100px) {
  .three-columns,
  .four-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .three-columns,
  .four-columns {
    grid-template-columns: 1fr;
  }

  .reference-tree-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Générateur de courriers */
.document-generator {
  --generator-ink: #13233f;
  --generator-muted: #66758e;
  --generator-line: #dce3ee;
  --generator-soft: #f4f7fb;
  --generator-blue: #0b3b82;
  --generator-red: #d61f36;
  margin-bottom: 32px;
}

.generator-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 34px;
  margin-bottom: 22px;
  color: #fff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(135deg, #071c3d 0%, #0b3b82 70%, #1556aa 100%);
  box-shadow: 0 18px 46px rgba(7, 28, 61, .16);
}

.generator-hero::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -54px;
  bottom: -100px;
  border: 24px solid rgba(255,255,255,.07);
  border-radius: 50%;
}

.generator-hero-copy,
.generator-hero-actions { position: relative; z-index: 1; }
.generator-hero .eyebrow { color: #b8d5ff; margin-bottom: 7px; }
.generator-hero h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3vw, 2.55rem); }
.generator-hero p:not(.eyebrow) { max-width: 680px; margin: 9px 0 0; color: #dceaff; }
.generator-hero-actions { flex: 0 0 auto; }
.generator-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255,255,255,.08);
}
.generator-back-link:hover { color: #fff; background: rgba(255,255,255,.16); }

.generator-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.generator-progress li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--generator-muted);
  font-size: .84rem;
  font-weight: 600;
}
.generator-progress span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: var(--generator-blue);
  border: 1px solid #bed0e9;
  border-radius: 50%;
  background: #edf4ff;
}
.generator-progress li::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin-left: 4px;
  background: var(--generator-line);
}
.generator-progress li:last-child::after { display: none; }

.generator-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(720px, 1.5fr);
    gap: 22px;
    align-items: start;
  }
.generator-form-panel,
.generator-preview-panel {
  border: 1px solid var(--generator-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(22, 46, 82, .08);
}
.generator-form-panel { overflow: hidden; }
.generator-section { padding: 24px; border-bottom: 1px solid #e7ecf3; }
.generator-section:last-of-type { border-bottom: 0; }
.generator-section-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
}
.generator-step-number {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: #fff;
  border-radius: 11px;
  background: var(--generator-blue);
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(11, 59, 130, .2);
}
.generator-section-head h2 { margin: 0; color: var(--generator-ink); font-size: 1.07rem; }
.generator-section-head p { margin: 3px 0 0; color: var(--generator-muted); font-size: .84rem; line-height: 1.45; }
.generator-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.generator-field { min-width: 0; }
.generator-field-full { grid-column: 1 / -1; }
.generator-field label,
.generator-field .field-label {
  display: block;
  margin-bottom: 7px;
  color: #263b5d;
  font-size: .82rem;
  font-weight: 650;
}
.generator-field .field-optional { color: #8490a3; font-weight: 500; }
.generator-field input,
.generator-field select,
.generator-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--generator-ink);
  border: 1px solid #cbd5e3;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.generator-field textarea { min-height: 102px; resize: vertical; line-height: 1.5; }
.generator-field input:focus,
.generator-field select:focus,
.generator-field textarea:focus {
  outline: 0;
  border-color: #3978c8;
  box-shadow: 0 0 0 3px rgba(57, 120, 200, .14);
}
.generator-field-help {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 7px 0 0;
  color: var(--generator-muted);
  font-size: .75rem;
  line-height: 1.4;
}
.generator-field-help.is-invalid,
.generator-field-help.is-invalid .address-counter { color: #b42318; font-weight: 650; }
.address-counter { white-space: nowrap; }
.generator-search-wrap { position: relative; }
.generator-search-results,
.generator-autocomplete {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 230px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #d2dae7;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(22, 46, 82, .16);
}
.generator-search-result,
.generator-autocomplete li {
  display: block;
  width: 100%;
  padding: 10px 11px;
  color: var(--generator-ink);
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.generator-search-result:hover,
.generator-autocomplete li:hover { background: #f0f5fc; }
.generator-search-result span { display: block; margin-top: 2px; color: var(--generator-muted); font-size: .76rem; }
.generator-inline-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.generator-ai-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #5a36a5;
  border: 1px solid #d7c9f5;
  border-radius: 9px;
  background: #f8f5ff;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}
.generator-ai-button:hover { background: #f0eaff; }
.generator-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  color: var(--generator-ink);
  border: 1px solid #cbd8e8;
  border-radius: 11px;
  background: #f7faff;
  cursor: pointer;
}
.generator-choice-card input { flex: 0 0 auto; width: 17px; min-height: 17px; margin-top: 2px; }
.generator-choice-card strong { display: block; font-size: .84rem; }
.generator-choice-card small { display: block; margin-top: 3px; color: var(--generator-muted); line-height: 1.4; }
.generator-advanced { grid-column: 1 / -1; border-top: 1px solid #e4eaf2; padding-top: 4px; }
.generator-advanced summary {
  padding: 12px 0 8px;
  color: var(--generator-blue);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.generator-advanced .generator-fields { padding-top: 10px; }

.generator-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid #dfe6f0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.generator-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.generator-action:disabled { opacity: .58; cursor: wait; }
.generator-action-primary { color: #fff; background: var(--generator-blue); }
.generator-action-primary:hover { background: #062f6c; }
.generator-action-secondary { color: #2b4468; border-color: #c8d3e2; background: #fff; }
.generator-action-secondary:hover { background: #f4f7fb; }
.generator-action-send { grid-column: 1 / -1; color: #fff; background: #16734a; }
.generator-action-send:hover { background: #115d3b; }
.generator-form-status { grid-column: 1 / -1; display: none; margin: 0; font-size: .82rem; text-align: center; }
.generator-form-status.is-visible { display: block; }
.generator-form-status.is-success { color: #16734a; }
.generator-form-status.is-error { color: #b42318; }

.generator-preview-panel { position: sticky; top: 18px; overflow: hidden; }
.generator-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #dbe3ef;
  background: #fff;
}
.generator-preview-title { display: flex; align-items: center; gap: 9px; color: var(--generator-ink); font-weight: 700; }
.generator-live-status { display: inline-flex; align-items: center; gap: 7px; color: #63738b; font-size: .76rem; }
.generator-live-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1fa467; box-shadow: 0 0 0 3px rgba(31,164,103,.13); }
.generator-preview-stage { height: min(88vh, 1240px); min-height: 980px; padding: 18px; background: #e8edf4; }
.generator-preview-stage iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(27,43,67,.16); }

@media (max-width: 1180px) {
  .generator-workspace { grid-template-columns: minmax(300px, 360px) minmax(0, 1.35fr); }
}
@media (max-width: 980px) {
  .generator-workspace { grid-template-columns: 1fr; }
  .generator-preview-panel { position: static; }
  .generator-preview-stage { height: 1040px; min-height: 0; }
}
@media (max-width: 640px) {
  .generator-hero { align-items: flex-start; flex-direction: column; padding: 24px 22px; border-radius: 15px; }
  .generator-progress { grid-template-columns: 1fr; gap: 7px; }
  .generator-progress li::after { display: none; }
  .generator-section { padding: 20px 18px; }
  .generator-fields { grid-template-columns: 1fr; }
  .generator-field-full { grid-column: auto; }
  .generator-actions { padding: 15px 18px; grid-template-columns: 1fr; }
  .generator-action-send { grid-column: auto; }
  .generator-preview-stage { height: 820px; padding: 10px; }
}

@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/source-serif4-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/source-serif4-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/source-serif4-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/source-serif4-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Variables --- */
:root {
  --bleu:       #0066CC;
  --bleu-clair: #3385E0;
  --bleu-pale:  #E6F0FF;
  --cyan:       #00A8E8;
  --rouge:      #D32F2F;
  --rouge-fonce:#B71C1C;
  --blanc:      #ffffff;
  --gris-fonce: #212121;
  --gris-moyen: #616161;
  --gris-clair: #E0E0E0;
  --gris-bg:    #F5F5F5;
  --border:     #BDBDBD;

  --font-heading: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'Barlow', Arial, sans-serif;
  --font-serif:   'Source Serif 4', Georgia, serif;

  --radius:  3px;
  --shadow:  0 2px 12px rgba(0,0,20,.10);
  --shadow-lg: 0 6px 32px rgba(0,0,20,.14);
  --transition: .18s ease;
  --max-width: 1200px;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gris-fonce);
  background: var(--blanc);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--bleu); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--rouge); }
ul { list-style: none; }

/* --- Utilitaires --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-rouge { color: var(--rouge); }
.text-bleu  { color: var(--bleu); }


.topbar {
  background: var(--bleu);
  color: rgba(255,255,255,.85);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .33px;
  border-bottom: 3px solid var(--rouge);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-flag { display: flex; align-items: center; }
.topbar-text {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: .4px;
  color: #fff;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  flex: 1;
}

.topbar-brand img {
  display: block;
  width: auto;
  height: 34px;
}
.topbar-ref {
  display: none;
}
.topbar-lang { display: flex; align-items: center; gap: 6px; }
.topbar-lang a {
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 2px 4px;
  border-radius: 2px;
  transition: background var(--transition);
}
.topbar-lang a:hover,
.topbar-lang a.active { color: #fff; background: rgba(255,255,255,.18); }
.topbar-lang span { color: rgba(255,255,255,.3); font-size: 10px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--blanc);
  border-bottom: 4px solid var(--bleu);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,50,.10);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { opacity: .9; }
.logo-header-546 { flex-shrink: 0; }
.logo-header-546 img {
  width: 200px;
  height: auto;
}
.logo-text { display: flex; flex-direction: column; }
.logo-acronym {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--bleu);
  letter-spacing: 1.5px;
  line-height: 1;
}
.logo-fullname {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--gris-moyen);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: .2px;
  text-transform: uppercase;
}

/* Navigation */
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 2px;
}
.main-nav > ul > li {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}
.main-nav > ul > li > a {
  display: block;
  padding: 8px 13px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gris-fonce);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.main-nav > ul > li > .nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gris-fonce);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
  position: relative;
}
.main-nav > ul > li > a::after,
.main-nav > ul > li > .nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rouge), #ff7f7f);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .24s ease;
}
.main-nav > ul > li > .nav-dropdown-toggle:focus { outline: none; }
.main-nav > ul > li > .nav-dropdown-toggle:focus-visible {
  outline: 2px solid var(--bleu);
  outline-offset: 2px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a[aria-current="page"],
.main-nav > ul > li > .nav-dropdown-toggle:hover,
.main-nav > ul > li > .nav-dropdown-toggle[data-current="true"],
.main-nav > ul > li > .nav-dropdown-toggle[aria-expanded="true"] {
  background: var(--bleu-pale);
  color: var(--bleu);
}
.main-nav > ul > li > a:hover::after,
.main-nav > ul > li > a[aria-current="page"]::after,
.main-nav > ul > li > .nav-dropdown-toggle:hover::after,
.main-nav > ul > li > .nav-dropdown-toggle[data-current="true"]::after,
.main-nav > ul > li > .nav-dropdown-toggle[aria-expanded="true"]::after {
  transform: scaleX(1);
}

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: var(--blanc);
  border: 1px solid var(--border);
  border-top: 3px solid var(--bleu);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
  overflow: hidden;
}
.has-dropdown > .dropdown { display: block; }
.has-dropdown.is-open > .dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.dropdown li a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gris-fonce);
  border-bottom: 1px solid var(--gris-clair);
  transition: background var(--transition), color var(--transition), padding-left .18s ease;
  position: relative;
}
.dropdown li a::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--rouge);
  opacity: 0;
  transform: translateY(-50%) scale(.6);
  transition: opacity .18s ease, transform .18s ease;
}
.dropdown li a:hover,
.dropdown li a[aria-current="page"] {
  background: var(--bleu-pale);
  color: var(--bleu);
  padding-left: 24px;
}
.dropdown li a:hover::before,
.dropdown li a[aria-current="page"]::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.dropdown-separator { border-top: 2px solid var(--gris-clair); margin: 4px 0; }

/* Bouton connexion */
.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bleu);
  color: var(--blanc) !important;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.btn-header:hover { background: var(--bleu-clair); color: var(--blanc) !important; }

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gris-fonce);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-left: 4px solid currentColor;
}
.flash-success { background: #e8f5e9; color: #1b5e20; border-color: #2e7d32; }
.flash-error   { background: #ffebee; color: #b71c1c; border-color: var(--rouge); }
.flash-warning { background: #fff8e1; color: #6d4c00; border-color: #f57f17; }
.flash-info    { background: var(--bleu-pale); color: var(--bleu); border-color: var(--bleu); }
.flash-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: inherit; opacity: .6;
}
.flash-close:hover { opacity: 1; }

/* ============================================================
   HERO — Bandeau d'accueil
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--bleu) 0%, #001d5c 100%);
  color: var(--blanc);
  padding: 92px 24px 72px;
  min-height: 68vh;
  position: relative;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: brightness(1.08) saturate(1.08) contrast(1.04);
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rouge) 0%, #ff4444 100%);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--blanc);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
/* Motif géométrique en fond */
.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 1;
  background:
    linear-gradient(135deg, rgba(0, 25, 77, .42) 0%, rgba(0, 29, 92, .22) 45%, rgba(12, 35, 64, .46) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,.04) 0, rgba(255,255,255,.04) 1px,
      transparent 0, transparent 50%
    );
  background-size: auto, 20px 20px;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(225,0,15,.2);
  border: 1px solid rgba(225,0,15,.4);
  color: #ff8080;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 20px;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--rouge);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .5px;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  text-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}
.hero-typewriter {
  min-height: 2.5em;
}
.hero-typewriter--desc {
  min-height: 4.8em;
}
.hero-typewriter-caret::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 8px;
  vertical-align: -0.08em;
  background: rgba(255,255,255,.92);
  animation: hero-caret-blink .9s step-end infinite;
}
.hero h1::after {
  content: '';
  display: block;
  width: 132px;
  height: 4px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(127,168,255,.95) 45%, rgba(225,0,15,.88) 100%);
  box-shadow: 0 0 18px rgba(127,168,255,.32);
  transform-origin: left center;
  animation: hero-line-reveal 1.1s .35s ease both, hero-line-glow 4.2s 1.4s ease-in-out infinite;
}
.hero h1 em {
  font-style: normal;
  color: #7fa8ff;
  text-shadow: 0 0 18px rgba(127,168,255,.30);
  animation: hero-emphasis 5s ease-in-out infinite;
}
.hero-desc {
  font-size: 17px;
  opacity: .92;
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.7;
  text-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.hero-desc.hero-typewriter span {
  white-space: normal;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: hero-actions-float 6s ease-in-out infinite;
}

/* Emblème SVG côté droit du hero */
.hero-emblem {
  opacity: .12;
  flex-shrink: 0;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary   { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.btn-primary:hover { background: var(--bleu-clair); color: var(--blanc); border-color: var(--bleu-clair); }
.btn-danger    { background: var(--rouge); color: var(--blanc); border-color: var(--rouge); }
.btn-danger:hover { background: var(--rouge-fonce); color: var(--blanc); }
.btn-outline   { background: transparent; color: var(--blanc); border-color: rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: var(--blanc); color: var(--blanc); }
.btn-ghost     { background: transparent; color: var(--bleu); border-color: var(--bleu); }
.btn-ghost:hover { background: var(--bleu-pale); }
.btn-sm        { padding: 7px 16px; font-size: 13px; }
.btn-full      { width: 100%; justify-content: center; }
.btn:disabled,
.btn[aria-disabled="true"] {
  background: #b9c2cf !important;
  border-color: #b9c2cf !important;
  color: rgba(255,255,255,.92) !important;
  cursor: not-allowed;
  box-shadow: none;
  opacity: .72;
  pointer-events: none;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-header {
  padding: 20px 24px 0;
}
.card-body { padding: 20px 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gris-clair);
  background: var(--gris-bg);
}
.card-accent { border-top: 4px solid var(--bleu); }
.card-accent-rouge { border-top: 4px solid var(--rouge); }

/* ============================================================
   SECTIONS COMMUNES
   ============================================================ */
.section { padding: 64px 24px; }
.section-alt { background: var(--gris-bg); }
.section-dark { background: var(--bleu); color: var(--blanc); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: 10px;
  border-left: 3px solid var(--rouge);
  padding-left: 10px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--gris-fonce);
  margin-bottom: 12px;
}
.section-dark .section-title,
.section-dark .section-label { color: var(--blanc); border-color: rgba(255,255,255,.5); }
.section-subtitle {
  font-size: 16px;
  color: var(--gris-moyen);
  max-width: 640px;
  margin-bottom: 40px;
}

/* Grid générique */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* ============================================================
   CHIFFRES / STATS
   ============================================================ */
.stat-block {
  text-align: center;
  padding: 28px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 800;
  color: var(--blanc);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .75;
}

/* ============================================================
   ACTUALITÉS — cartes
   ============================================================ */
.news-card { display: flex; flex-direction: column; }
.news-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--gris-clair);
}
.news-category {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}
.cat-urgence   { background: #ffebee; color: var(--rouge); }
.cat-formation { background: var(--bleu-pale); color: var(--bleu); }
.cat-info      { background: #e8f5e9; color: #1b5e20; }
.cat-evenement { background: #fff8e1; color: #6d4c00; }

.news-date {
  font-size: 12px;
  color: var(--gris-moyen);
  margin-bottom: 6px;
}
.news-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--gris-fonce);
}
.news-excerpt { font-size: 14px; color: var(--gris-moyen); }
.news-content > * + * { margin-top: 1.15em; }
.news-content p { margin: 0; }
.news-content h2,
.news-content h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--bleu);
}
.news-content ul,
.news-content ol {
  padding-left: 1.3em;
  list-style-position: outside;
}
.news-content ul { list-style-type: disc; }
.news-content ol { list-style-type: decimal; }
.news-content li + li { margin-top: .35em; }
.news-content blockquote {
  margin: 1.4em 0;
  padding: 1em 1.2em;
  border-left: 4px solid var(--bleu);
  background: var(--gris-bg);
  color: var(--gris-moyen);
}
.news-content .btn {
  margin-top: .6em;
  margin-right: .5em;
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gris-fonce);
  margin-bottom: 6px;
  letter-spacing: .2px;
}
.form-label .required-star { color: var(--rouge); margin-left: 3px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--gris-fonce);
  background: var(--blanc);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-control[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #8c8c8c;
}
.form-control:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(0,49,137,.12);
}
.form-control.is-invalid { border-color: var(--rouge); }
.form-error {
  font-size: 12px;
  color: var(--rouge);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gris-moyen);
}
.password-field {
  position: relative;
}
.password-field .form-control {
  padding-right: 108px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--bleu);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
}
.password-toggle:hover,
.password-toggle:focus {
  color: var(--bleu-clair);
}
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c5c5c' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-divider { border: none; border-top: 1px solid var(--gris-clair); margin: 28px 0; }

/* OAuth buttons */
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--blanc);
  color: var(--gris-fonce);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn-oauth:hover { background: var(--gris-bg); box-shadow: var(--shadow); color: var(--gris-fonce); }
.btn-oauth svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-oauth.disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }

/* ============================================================
   PAGE TITRE BANNER
   ============================================================ */
.page-banner {
  background: linear-gradient(135deg, #001d5c 0%, var(--bleu) 100%);
  color: var(--blanc);
  padding: 44px 24px 36px;
  border-bottom: 4px solid var(--rouge);
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 0, transparent 20px);
}
.page-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-banner h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.page-banner p {
  font-size: 15px;
  opacity: .8;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: .65;
  margin-bottom: 10px;
}
.breadcrumb a { color: inherit; }
.breadcrumb span { opacity: .5; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead tr {
  background: var(--bleu);
  color: var(--blanc);
}
.data-table th {
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gris-clair);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--bleu-pale); }
.data-table tbody tr:nth-child(even) { background: var(--gris-bg); }
.data-table tbody tr:nth-child(even):hover { background: var(--bleu-pale); }

/* ============================================================
   BADGES RÔLES
   ============================================================ */
.badge-role {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.role-super_admin    { background: #1a0030; color: #e0aaff; }
.role-admin_regional { background: #003189; color: #a8c4ff; }
.role-chef_unite     { background: #003d1a; color: #9bffc6; }
.role-benevole       { background: #4a1000; color: #ffb899; }
.role-membre         { background: var(--gris-clair); color: var(--gris-fonce); }

/* Badge statut */
.badge-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
.status-active   { background: #e8f5e9; color: #1b5e20; }
.status-pending  { background: #fff8e1; color: #6d4c00; }
.status-inactive { background: #ffebee; color: #b71c1c; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.app-internal {
  height: 100vh;
  overflow: hidden;
}

.app-internal .topbar {
  height: 30px;
}

.app-internal .topbar-inner {
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  height: calc(100vh - 30px);
  overflow: hidden;
  background: var(--gris-bg);
}

.dashboard-sidebar {
  width: 272px;
  min-width: 272px;
  max-width: 272px;
  display: flex;
  flex-direction: column;
  background: #f7f9fc;
  color: #163a63;
  border-right: 1px solid #d9e3f0;
  overflow: hidden;
}

.sidebar-user {
  flex: 0 0 auto;
  padding: 22px 20px 18px;
  border-bottom: 1px solid #d9e3f0;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
}

.sidebar-user-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #0f4c81;
  border: 2px solid #d9e3f0;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--blanc);
}
.sidebar-user-name { font-weight: 700; font-size: 15px; }
.sidebar-user-role { font-size: 11px; opacity: .8; }
.sidebar-user img {
  display: block;
  width: min(182px, 100%);
  height: auto;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 0 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  color: #355476;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active { background: #eaf1f8; color: #0f4c81; }
.sidebar-nav a.active { border-left-color: #0f4c81; }
.sidebar-nav .sidebar-section-title {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6b84a1;
  padding: 18px 20px 8px;
}

.dashboard-main {
  min-width: 0;
  height: calc(100vh - 30px);
  padding: 28px 32px;
  background: var(--gris-bg);
  overflow-y: auto;
  overflow-x: hidden;
}

.page-content {
  max-width: 1520px;
}
.dashboard-heading {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--gris-fonce);
}
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.dashboard-card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.dashboard-card-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-bleu { background: var(--bleu-pale); color: var(--bleu); }
.icon-rouge { background: #ffebee; color: var(--rouge); }
.icon-vert  { background: #e8f5e9; color: #1b5e20; }
.icon-orange { background: #fff3e0; color: #e65100; }
.dashboard-card-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--gris-fonce);
}
.dashboard-card-label { font-size: 12px; color: var(--gris-moyen); margin-top: 2px; }

/* ============================================================
   ALERTE / URGENCE
   ============================================================ */
.alert-banner {
  background: var(--rouge);
  color: var(--blanc);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
}
.alert-banner svg { flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #001533; color: rgba(255,255,255,.8); margin-top: auto; }
.footer-top { padding: 60px 24px 40px; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--blanc);
  letter-spacing: 2px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  opacity: .7;
  margin-bottom: 12px;
}
.footer-lead {
  max-width: 34ch;
  color: rgba(255,255,255,.68);
}
.footer-brand address {
  font-style: normal;
  font-size: 13px;
  opacity: .6;
  line-height: 1.6;
}
.footer-address {
  margin: 0 0 18px;
}
.footer-contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #7fa8ff;
  border: 1px solid rgba(127,168,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}
.footer-email:hover {
  color: var(--blanc);
  border-color: rgba(127,168,255,.55);
  background: rgba(127,168,255,.12);
  transform: translateY(-1px);
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-socials a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--blanc);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.09);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.footer-socials a:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(127,168,255,.25), rgba(127,168,255,.12));
  border-color: rgba(127,168,255,.45);
}
.footer-heading {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blanc);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--blanc); }
.footer-legal-refs {
  margin-top: 16px;
  font-size: 12px;
  opacity: .5;
  line-height: 1.8;
}
.footer-meta-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
}
.footer-meta-card p {
  margin: 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 16px 24px;
}
.footer-bottom .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-template-columns: unset;
  gap: 16px;
}
.footer-bottom p { font-size: 12px; opacity: .5; }
.footer-bottom-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  opacity: .5;
}

/* ============================================================
   PARTENAIRES
   ============================================================ */
.partners-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(0,102,204,.08), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}
.partners-marquee {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(0, 49, 137, .10);
  background: rgba(255,255,255,.84);
  box-shadow: 0 18px 44px rgba(0, 34, 96, .08);
  padding: 20px 0;
}
.partners-marquee::before,
.partners-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.partners-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(248,251,255,1) 0%, rgba(248,251,255,0) 100%);
}
.partners-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(248,251,255,1) 0%, rgba(248,251,255,0) 100%);
}
.partners-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  padding: 4px 18px;
  animation: partners-scroll 26s linear infinite;
}
.partners-marquee:hover .partners-track {
  animation-play-state: paused;
}
.partner-logo-link {
  min-width: 180px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 10px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.partner-logo-link:hover {
  transform: translateY(-2px);
  opacity: .82;
}
.partner-logo {
  max-width: 190px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 34, 96, .10));
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; } /* Menu hamburger sur mobile */
  .app-internal { height: auto; overflow: auto; }
  .dashboard-layout,
  .dashboard-main { height: auto; }
  .dashboard-main { overflow: visible; padding: 22px 20px; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-emblem { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom .footer-inner { flex-direction: column; text-align: center; }
  .footer-contact-inline { flex-direction: column; align-items: flex-start; }
  .topbar-text { display: none; }

  .nav-toggle { display: flex; }
  .main-nav > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blanc);
    flex-direction: column;
    border-top: 3px solid var(--bleu);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    gap: 0;
  }
  .main-nav > ul.open { display: flex; }
  .main-nav > ul > li > a { border-radius: 0; padding: 12px 20px; }
  .dropdown { position: static; border: none; box-shadow: none; background: var(--gris-bg); }
  .has-dropdown > .dropdown { display: none; }
  .has-dropdown.is-open > .dropdown { display: block; }
  .logo-fullname { display: none; }
  .partner-logo-link {
    min-width: 140px;
    min-height: 64px;
    padding: 4px 8px;
  }
  .partners-marquee::before,
  .partners-marquee::after { width: 44px; }
}

/* =====================================================================
   ANRDI Portail 2.0 — couche d’interface interne
   Identité originale : encre marine, indigo d’action, corail de repère.
   Cette couche reste compatible avec les vues métier historiques.
   ===================================================================== */
:root {
  --portal-ink: #16243d;
  --portal-ink-soft: #51627d;
  --portal-indigo: #4c52c8;
  --portal-indigo-dark: #383d9f;
  --portal-indigo-soft: #eef0ff;
  --portal-coral: #ee765d;
  --portal-teal: #1b9a91;
  --portal-bg: #f5f7fb;
  --portal-surface: #ffffff;
  --portal-line: #e4e9f2;
  --portal-shadow: 0 16px 40px rgba(30, 45, 80, .08);
  --portal-radius: 16px;
  --portal-radius-sm: 10px;
}

body.app-internal {
  min-height: 100vh;
  margin: 0;
  background: var(--portal-bg);
  color: var(--portal-ink);
  font-family: "Barlow", system-ui, sans-serif;
}

body.app-internal .topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 72px;
  background: var(--portal-ink);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 8px 24px rgba(18, 36, 61, .14);
}

body.app-internal .topbar-inner.app-topbar {
  width: 100%;
  max-width: none;
  min-height: 72px;
  padding: 12px 28px;
  gap: 24px;
}

.app-topbar-brand {
  min-width: 235px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.app-topbar-brand strong {
  font-size: 18px;
  letter-spacing: .08em;
}

.app-topbar-brand span:not(.app-brand-mark) {
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
}

.app-brand-mark,
.sidebar-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--portal-coral), #f6b15c);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(238, 118, 93, .25);
}

.app-global-search {
  position: relative;
  flex: 1 1 520px;
  max-width: 640px;
  margin: 0 auto;
}

.app-global-search > i {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 1;
  color: #7b87a0;
  transform: translateY(-50%);
}

.app-global-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  outline: 0;
}

.app-global-search input::placeholder { color: rgba(255, 255, 255, .58); }
.app-global-search input:focus { border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 4px rgba(255, 255, 255, .1); }

.app-global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  z-index: 100;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--portal-shadow);
}

.app-global-search-results a,
.app-global-search-empty {
  display: block;
  padding: 12px 16px;
  color: var(--portal-ink);
  text-decoration: none;
}
.app-global-search-results a:hover { background: var(--portal-indigo-soft); }
.app-global-search-results small { display: block; margin-top: 2px; color: var(--portal-ink-soft); }

.app-topbar-actions { display: flex; align-items: center; gap: 10px; }
.app-topbar-action,
.notif-bell {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.app-topbar-action-primary { padding: 0 15px; background: var(--portal-coral); color: #fff; }
.app-topbar-action-primary:hover { background: #f38d74; color: #fff; }
.notif-bell { position: relative; padding: 0 11px; background: transparent; color: #fff; }
.notif-bell:hover { background: rgba(255, 255, 255, .1); }
.notif-count { top: -4px; right: -3px; background: var(--portal-coral); }

.dashboard-layout.portal-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.dashboard-sidebar.portal-sidebar {
  position: sticky;
  top: 72px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: auto;
  min-height: calc(100vh - 72px);
  padding: 20px 14px 16px;
  overflow-y: auto;
  background: var(--portal-surface);
  border-right: 1px solid var(--portal-line);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 3px 10px 22px;
  color: var(--portal-ink);
  text-decoration: none;
}
.sidebar-brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
.sidebar-brand strong { display: block; font-size: 17px; letter-spacing: .08em; }
.sidebar-brand small { display: block; margin-top: 2px; color: var(--portal-ink-soft); font-size: 11px; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 20px;
  padding: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: #fbfcff;
}
.sidebar-user-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: var(--portal-indigo-soft);
  color: var(--portal-indigo-dark);
  font-weight: 700;
}
.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-name { overflow: hidden; color: var(--portal-ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { margin-top: 2px; color: var(--portal-ink-soft); font-size: 12px; }
.sidebar-user-link { color: #8b96a9; }
.sidebar-user-link:hover { color: var(--portal-indigo); }
.sidebar-user-context {
  display: grid;
  gap: 2px;
  margin-top: 5px;
  color: var(--portal-ink-soft);
  font-size: 10px;
  line-height: 1.35;
}
.sidebar-user-context span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-context i {
  width: 12px;
  margin-right: 3px;
  text-align: center;
}

.portal-sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-section-title { margin: 8px 10px 8px; color: #8a95a8; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-affiliation { margin: 0 2px 12px; padding: 11px 12px; border: 1px solid #dfe5ef; border-radius: 11px; background: #f8faff; }
.sidebar-affiliation-title { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--portal-indigo-dark); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-affiliation-title i { color: var(--portal-indigo); }
.sidebar-affiliation-row { display: grid; gap: 1px; padding: 6px 0; border-top: 1px solid #e7ebf3; }
.sidebar-affiliation-row span { color: var(--portal-ink-soft); font-size: 10px; }
.sidebar-affiliation-row strong { overflow: hidden; color: var(--portal-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-affiliation-category { margin-top: 2px; }
.sidebar-affiliation-empty { color: var(--portal-ink-soft); font-size: 11px; }
.sidebar-affiliation-link { display: inline-block; margin-top: 8px; color: var(--portal-indigo); font-size: 11px; font-weight: 700; text-decoration: none; }
.sidebar-affiliation-link:hover { text-decoration: underline; }
.sidebar-nav-group { border-radius: 11px; }
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: #55657e;
  font-weight: 600;
  text-decoration: none;
}
.sidebar-nav-link i:first-child { width: 18px; color: #8290a6; text-align: center; }
.sidebar-nav-link:hover { background: #f5f6ff; color: var(--portal-indigo-dark); }
.sidebar-nav-link:hover i:first-child { color: var(--portal-indigo); }
.sidebar-nav-link.active { background: var(--portal-indigo-soft); color: var(--portal-indigo-dark); }
.sidebar-nav-link.active i:first-child { color: var(--portal-indigo); }
.sidebar-nav-chevron { margin-left: auto; font-size: 10px; transition: transform .2s ease; }
.sidebar-nav-group.is-open .sidebar-nav-chevron { transform: rotate(180deg); }
.sidebar-subnav { margin: 0 0 6px 41px; padding-left: 12px; border-left: 1px solid #dbe0f4; }
.sidebar-subnav a { display: block; padding: 7px 8px; color: #718097; font-size: 13px; text-decoration: none; border-radius: 7px; }
.sidebar-subnav a:hover,
.sidebar-subnav a.active { background: #f7f8ff; color: var(--portal-indigo-dark); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--portal-line); }
.sidebar-footer a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #718097; font-size: 13px; text-decoration: none; border-radius: 9px; }
.sidebar-footer a:hover { background: #f6f7fb; color: var(--portal-indigo-dark); }
.sidebar-footer .sidebar-logout { color: #b85f59; }

.dashboard-main { min-width: 0; padding: 0; background: var(--portal-bg); }
.page-content { width: min(1440px, 100%); margin: 0 auto; padding: 28px 34px 56px; }
.app-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.app-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: #8792a5; font-size: 12px; }
.app-breadcrumb a { color: var(--portal-indigo); text-decoration: none; }
.app-breadcrumb i { font-size: 9px; }
.app-page-header .section-title { margin: 0; color: var(--portal-ink); font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.app-page-header .section-subtitle { max-width: 680px; margin: 7px 0 0; color: var(--portal-ink-soft); font-size: 15px; }
.app-page-header-meta { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #dce7e6; border-radius: 99px; background: #f4fbfa; color: #287b73; font-size: 12px; font-weight: 600; white-space: nowrap; }
.app-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--portal-teal); box-shadow: 0 0 0 4px rgba(27, 154, 145, .12); }

.app-internal .portal-section,
.app-internal .panel,
.app-internal .ticket-card,
.app-internal .documents-group,
.app-internal .member-directory-card {
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow);
}
.app-internal .portal-section { padding: 24px; }
.app-internal .panel,
.app-internal .ticket-card { box-shadow: 0 8px 24px rgba(30, 45, 80, .05); }
.app-internal .panel-head { align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.app-internal .eyebrow { margin-bottom: 7px; color: var(--portal-indigo); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.app-internal .ticket-card-title,
.app-internal .panel-head h3 { color: var(--portal-ink); letter-spacing: -.02em; }
.app-internal .section-subtitle,
.app-internal .ticket-card p,
.app-internal .ticket-meta,
.app-internal .ticket-card-meta { color: var(--portal-ink-soft); }
.app-internal .ticket-card-title a,
.app-internal a { color: var(--portal-indigo-dark); }
.app-internal .ticket-card-title a:hover,
.app-internal a:hover { color: var(--portal-coral); }

.app-internal .btn,
.app-internal .primary-button,
.app-internal .ghost-button,
.app-internal button.primary-button {
  min-height: 40px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
}
.app-internal .btn-primary,
.app-internal .primary-button { background: var(--portal-indigo); border-color: var(--portal-indigo); color: #fff; }
.app-internal .btn-primary:hover,
.app-internal .primary-button:hover { background: var(--portal-indigo-dark); border-color: var(--portal-indigo-dark); color: #fff; }
.app-internal .btn-outline,
.app-internal .ghost-button { border-color: #d9deeb; background: #fff; color: var(--portal-indigo-dark); }
.app-internal .btn-outline:hover,
.app-internal .ghost-button:hover { border-color: #b9bff0; background: var(--portal-indigo-soft); }

.app-internal input,
.app-internal select,
.app-internal textarea {
  min-height: 42px;
  border: 1px solid #d8deea;
  border-radius: 9px;
  background: #fff;
  color: var(--portal-ink);
  font: inherit;
}
.app-internal input:focus,
.app-internal select:focus,
.app-internal textarea:focus { border-color: var(--portal-indigo); outline: 0; box-shadow: 0 0 0 4px rgba(76, 82, 200, .12); }
.app-internal label > span { color: var(--portal-ink); font-size: 13px; font-weight: 600; }

.app-internal .ticket-chip,
.app-internal .badge { border: 0; border-radius: 99px; font-size: 11px; font-weight: 700; }
.app-internal .ticket-chip.open { background: #e8f7f4; color: #247d73; }
.app-internal .ticket-chip.wait { background: #fff2dc; color: #9a651f; }
.app-internal .ticket-chip.done { background: #edf0f5; color: #69768b; }
.app-internal .ticket-chip.urgent { background: #fff0ee; color: #bf594b; }
.app-internal .table-wrap { border: 1px solid var(--portal-line); border-radius: 12px; }
.app-internal table th { background: #f8f9fc; color: #7b879d; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.app-internal table td { border-color: #edf0f5; color: #53627a; }
.app-internal table tbody tr:hover { background: #fafbff; }
.app-internal .empty-state { border: 1px dashed #cfd6e4; border-radius: 12px; background: #fbfcff; }
.module-switcher { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--portal-line); }
.module-switcher a,
.module-switcher-note { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 8px; color: #718097; font-size: 13px; font-weight: 600; text-decoration: none; }
.module-switcher a:hover { background: #f4f5ff; color: var(--portal-indigo-dark); }
.module-switcher a.active { background: var(--portal-indigo-soft); color: var(--portal-indigo-dark); }
.module-switcher-note { margin-left: auto; color: #7d889b; font-size: 12px; font-weight: 500; }
.directory-search-panel .section-subtitle { max-width: 60ch; margin-top: 8px; }
.directory-contact { display: block; margin-top: 4px; color: #738198; font-size: 12px; }

/* Accueil : lecture progressive et action principale. */
.dashboard-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dashboard-summary-card { position: relative; min-height: 112px; padding: 18px; overflow: hidden; border: 1px solid var(--portal-line); border-radius: var(--portal-radius); background: #fff; box-shadow: var(--portal-shadow); }
.dashboard-summary-card::after { position: absolute; right: -24px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%; background: var(--portal-indigo-soft); content: ''; }
.dashboard-summary-card > i { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 9px; border-radius: 9px; background: var(--portal-indigo-soft); color: var(--portal-indigo); }
.dashboard-summary-card span { display: block; color: var(--portal-ink-soft); font-size: 13px; }
.dashboard-summary-card strong { display: block; margin-top: 3px; color: var(--portal-ink); font-size: 27px; line-height: 1; }
.volunteer-hero { margin-bottom: 18px; border-radius: var(--portal-radius); background: linear-gradient(120deg, #222e59, #4c52c8); box-shadow: 0 18px 42px rgba(42, 50, 120, .2); }
.volunteer-hero-copy h2 { color: #fff; }
.volunteer-hero-copy p { color: rgba(255, 255, 255, .78); }
.volunteer-action-card { border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; }
.volunteer-action-card:hover { background: rgba(255,255,255,.19); color: #fff; transform: translateY(-2px); }
.volunteer-action-card.primary { background: var(--portal-coral); border-color: var(--portal-coral); }
.volunteer-workspace { margin-top: 0; }
.volunteer-tabs { padding: 4px; border-radius: 10px; background: #f1f3f8; }
.volunteer-tab { border-radius: 8px; color: #748198; }
.volunteer-tab.active { background: #fff; color: var(--portal-indigo-dark); box-shadow: 0 3px 10px rgba(30,45,80,.08); }

.app-internal .flash { border-radius: 12px; box-shadow: 0 8px 20px rgba(30,45,80,.05); }
.app-internal .notif-menu { top: 50px; right: 0; border: 1px solid var(--portal-line); border-radius: 14px; box-shadow: var(--portal-shadow); }

@media (max-width: 1100px) {
  .app-topbar-brand { min-width: auto; }
  .app-topbar-brand span:not(.app-brand-mark) { display: none; }
  .dashboard-layout.portal-shell { grid-template-columns: 1fr; }
  .dashboard-sidebar.portal-sidebar { position: fixed; top: 72px; bottom: 0; left: 0; width: 280px; min-height: auto; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 32px rgba(18,36,61,.16); }
  .dashboard-sidebar.portal-sidebar.is-open { transform: translateX(0); }
  .app-sidebar-scrim { position: fixed; top: 72px; right: 0; bottom: 0; left: 0; z-index: 25; background: rgba(18,36,61,.42); }
  .dashboard-main { width: 100%; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body.app-internal .topbar-inner.app-topbar { padding: 10px 14px; gap: 10px; }
  .app-global-search { order: 3; flex-basis: 100%; }
  body.app-internal .topbar { min-height: 126px; }
  body.app-internal .topbar-inner.app-topbar { flex-wrap: wrap; }
  .app-topbar-actions { margin-left: auto; }
  .app-topbar-action-primary { padding: 0 10px; font-size: 12px; }
  .dashboard-sidebar.portal-sidebar { top: 126px; }
  .app-sidebar-scrim { top: 126px; }
  .page-content { padding: 20px 14px 42px; }
  .app-page-header { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 18px; }
  .app-page-header-meta { align-self: flex-start; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-summary-card { min-height: 104px; padding: 14px; }
  .content-grid { grid-template-columns: 1fr; }
  .app-internal .portal-section { padding: 18px; }
  .panel-head { flex-direction: column; }
  .quick-actions { width: 100%; }
  .quick-actions .btn { flex: 1; }
  .table-wrap { overflow-x: auto; }
  .module-switcher-note { width: 100%; margin-left: 0; }
}

@media (max-width: 420px) {
  .dashboard-summary-card strong { font-size: 23px; }
  .dashboard-summary-card span { font-size: 12px; }
  .notif-bell { padding: 0 8px; }
}

/* Console opérateur téléphonique */
.call-console { display: flex; flex-direction: column; gap: 16px; }
.call-console-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-radius: 18px; background: linear-gradient(118deg, #192744 0%, #343f80 100%); color: #fff; box-shadow: 0 18px 38px rgba(28, 42, 83, .2); }
.call-console-hero .eyebrow { color: #f6a68f; }
.call-console-hero h2 { margin: 0; color: #fff; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.call-console-hero p:not(.eyebrow) { margin: 7px 0 0; color: rgba(255, 255, 255, .72); }
.operator-presence { display: flex; align-items: center; gap: 10px; }
.operator-presence label { color: rgba(255, 255, 255, .7); font-size: 12px; }
.operator-presence select { min-height: 38px; padding: 0 34px 0 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.12); color: #fff; }
.operator-presence select option { color: #16243d; }
.call-console-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.call-console-metrics > div { padding: 16px 18px; border: 1px solid var(--portal-line); border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(30,45,80,.05); }
.call-console-metrics span, .call-console-metrics small { display: block; color: var(--portal-ink-soft); }
.call-console-metrics span { font-size: 13px; font-weight: 600; }
.call-console-metrics strong { display: block; margin: 6px 0 1px; color: var(--portal-ink); font-size: 28px; line-height: 1; }
.call-console-metrics small { font-size: 11px; }
.call-console-grid { display: grid; grid-template-columns: minmax(270px, 34%) minmax(0, 1fr); gap: 16px; align-items: start; }
.call-queue, .call-workspace { min-width: 0; border: 1px solid var(--portal-line); border-radius: 16px; background: #fff; box-shadow: var(--portal-shadow); }
.call-queue { overflow: hidden; }
.call-queue-head, .call-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px; }
.call-queue-head h3, .call-workspace-head h3 { margin: 0; color: var(--portal-ink); font-size: 21px; letter-spacing: -.025em; }
.call-queue-search { position: relative; display: block; margin: 0 14px 12px; }
.call-queue-search i { position: absolute; top: 50%; left: 13px; color: #8a96aa; transform: translateY(-50%); }
.call-queue-search input { width: 100%; min-height: 40px; padding-left: 36px; background: #f8f9fc; }
.call-queue-list { display: flex; flex-direction: column; max-height: 660px; overflow-y: auto; border-top: 1px solid var(--portal-line); }
.call-queue-item { display: block; padding: 14px 16px; border-bottom: 1px solid #edf0f5; color: var(--portal-ink); text-decoration: none; transition: background .16s ease, border-color .16s ease; }
.call-queue-item:hover { background: #f8f9ff; color: var(--portal-ink); }
.call-queue-item.is-selected { border-left: 3px solid var(--portal-indigo); background: var(--portal-indigo-soft); }
.call-queue-item-top, .call-queue-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.call-queue-item-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-queue-item-top time { flex: 0 0 auto; color: var(--portal-ink-soft); font-size: 12px; }
.call-queue-item-meta { justify-content: flex-start; margin-top: 8px; color: var(--portal-ink-soft); font-size: 12px; }
.call-queue-item-context { display: block; margin-top: 8px; overflow: hidden; color: #8a96aa; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.call-workspace { overflow: hidden; }
.call-workspace-head { padding-bottom: 15px; }
.call-contact-line { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 7px; color: var(--portal-ink-soft); font-size: 13px; }
.call-workspace-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.btn-call { background: var(--portal-teal); border-color: var(--portal-teal); color: #fff; }
.btn-call:hover { background: #147d76; border-color: #147d76; color: #fff; }
.call-live-bar { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 20px; border-top: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: #f8f9fc; color: var(--portal-ink-soft); font-size: 13px; }
.call-live-bar.is-live { background: #eefaf8; color: #247d73; }
.call-live-bar strong { color: var(--portal-ink); }
.call-live-bar.is-live strong { color: #247d73; }
.call-live-bar [data-call-timer] { min-width: 48px; color: var(--portal-ink); font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 700; }
.call-live-indicator { width: 9px; height: 9px; border-radius: 50%; background: #a4adbc; }
.call-live-bar.is-live .call-live-indicator { background: var(--portal-teal); box-shadow: 0 0 0 5px rgba(27,154,145,.13); animation: call-pulse 1.5s infinite; }
.call-live-bar form { margin-left: auto; }
.call-workspace-columns { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(300px, 1.25fr); gap: 16px; padding: 20px; background: #fbfcff; }
.call-script-panel, .call-wrapup-panel { padding: 18px; border: 1px solid var(--portal-line); border-radius: 14px; background: #fff; }
.call-script-panel .panel-head, .call-wrapup-panel .panel-head { margin-bottom: 14px; }
.call-script-panel h3, .call-wrapup-panel h3 { margin: 0; color: var(--portal-ink); font-size: 18px; }
.call-script-tag, .call-required-note { padding: 5px 8px; border-radius: 99px; background: #f3f4f8; color: #7c889d; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.call-script-list { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; counter-reset: script; }
.call-script-list li { position: relative; padding-left: 31px; counter-increment: script; }
.call-script-list li::before { position: absolute; top: -1px; left: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--portal-indigo-soft); color: var(--portal-indigo); content: counter(script); font-size: 11px; font-weight: 700; }
.call-script-list strong, .call-script-list span { display: block; }
.call-script-list strong { color: var(--portal-ink); font-size: 13px; }
.call-script-list span { margin-top: 3px; color: var(--portal-ink-soft); font-size: 12px; line-height: 1.45; }
.call-wrapup-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.call-wrapup-form .full-width, .call-wrapup-form .call-followup-toggle { grid-column: 1 / -1; }
.call-wrapup-form textarea { min-height: 110px; }
.call-followup-toggle { display: flex; align-items: center; gap: 8px; color: var(--portal-ink); font-size: 13px; font-weight: 600; }
.call-followup-toggle input { min-height: auto; accent-color: var(--portal-indigo); }
.call-console-empty { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 28px 18px; color: var(--portal-ink-soft); text-align: center; }
.call-console-empty i { color: var(--portal-indigo); font-size: 24px; }
.call-console-empty strong { color: var(--portal-ink); }
.call-console-empty span { font-size: 13px; }
.call-console-empty-large { min-height: 380px; justify-content: center; }
@keyframes call-pulse { 50% { opacity: .45; } }

/* Fiche appel : parcours opérateur simplifié */
.call-detail-page { display: flex; flex-direction: column; gap: 16px; }
.call-detail-back { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--portal-ink-soft); font-size: 13px; font-weight: 700; text-decoration: none; }
.call-detail-back:hover { color: var(--portal-indigo); }
.call-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-radius: 18px; background: linear-gradient(118deg, #192744 0%, #343f80 100%); color: #fff; box-shadow: 0 18px 38px rgba(28, 42, 83, .18); }
.call-detail-hero .eyebrow { color: #f6a68f; }
.call-detail-hero h1 { margin: 0; color: #fff; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
.call-detail-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; color: rgba(255,255,255,.74); font-size: 13px; }
.call-detail-hero-meta i { margin-right: 4px; color: #f6a68f; }
.call-detail-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.call-detail-hero .btn-light { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; }
.call-detail-hero .btn-light:hover { background: rgba(255,255,255,.18); color: #fff; }
.call-detail-grid { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr); gap: 16px; align-items: start; }
.call-detail-card, .call-detail-disclosure { min-width: 0; border: 1px solid var(--portal-line); border-radius: 16px; background: #fff; box-shadow: var(--portal-shadow); }
.call-detail-card { padding: 22px; }
.call-detail-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.call-detail-card h2 { margin: 0; color: var(--portal-ink); font-size: 21px; letter-spacing: -.025em; }
.call-detail-card h3 { margin: 0; color: var(--portal-ink); font-size: 17px; }
.call-detail-card-head .eyebrow { margin-bottom: 5px; }
.call-detail-help { margin: 0 0 15px; color: var(--portal-ink-soft); font-size: 13px; line-height: 1.5; }
.call-step { padding: 6px 9px; border-radius: 99px; background: var(--portal-indigo-soft); color: var(--portal-indigo); font-size: 11px; font-weight: 800; white-space: nowrap; }
.call-contact-primary { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--portal-line); }
.call-contact-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--portal-indigo-soft); color: var(--portal-indigo); }
.call-contact-primary strong, .call-contact-primary span { display: block; }
.call-contact-primary strong { color: var(--portal-ink); font-size: 18px; }
.call-contact-primary span { margin-top: 3px; color: var(--portal-ink-soft); font-size: 12px; }
.call-contact-actions { display: grid; gap: 9px; padding: 16px 0; }
.call-contact-action { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #e7eaf1; border-radius: 11px; color: var(--portal-ink); text-decoration: none; }
.call-contact-action:hover { border-color: var(--portal-indigo); background: #fafaff; color: var(--portal-indigo); }
.call-contact-action > i { width: 18px; color: var(--portal-indigo); text-align: center; }
.call-contact-action small, .call-contact-action span { display: block; }
.call-contact-action small { margin-bottom: 2px; color: var(--portal-ink-soft); font-size: 11px; }
.call-contact-action span { font-weight: 700; font-size: 13px; }
.call-detail-facts { display: grid; gap: 12px; margin: 0; }
.call-detail-facts > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #eef0f5; }
.call-detail-facts > div:last-child { padding-bottom: 0; border-bottom: 0; }
.call-detail-facts dt { color: var(--portal-ink-soft); font-size: 12px; }
.call-detail-facts dd { margin: 0; color: var(--portal-ink); font-size: 13px; font-weight: 700; text-align: right; }
.call-detail-summary { margin-top: 18px; padding: 14px; border-radius: 12px; background: #f7f8fc; }
.call-detail-summary span { display: block; margin-bottom: 6px; color: var(--portal-ink-soft); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.call-detail-summary p { margin: 0; color: var(--portal-ink); font-size: 13px; line-height: 1.55; }
.call-detail-form { display: grid; gap: 15px; }
.call-detail-form-row { display: grid; grid-template-columns: 1fr 1fr .72fr; gap: 11px; }
.call-detail-form label { display: grid; gap: 6px; color: var(--portal-ink); font-size: 12px; font-weight: 700; }
.call-detail-form label > span { display: block; }
.call-detail-form label b { color: #c65b4f; }
.call-detail-form textarea { min-height: 118px; resize: vertical; }
.call-input-with-suffix { position: relative; }
.call-input-with-suffix input { padding-right: 40px; }
.call-input-with-suffix span { position: absolute; top: 50%; right: 11px; color: var(--portal-ink-soft); font-size: 11px; font-weight: 600; transform: translateY(-50%); }
.call-followup-toggle { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 10px !important; padding: 12px; border: 1px solid #e7eaf1; border-radius: 11px; background: #fafbfe; }
.call-followup-toggle input { width: 17px; min-height: 17px; margin-top: 2px; accent-color: var(--portal-indigo); }
.call-followup-toggle strong, .call-followup-toggle small { display: block; }
.call-followup-toggle strong { font-size: 13px; }
.call-followup-toggle small { margin-top: 3px; color: var(--portal-ink-soft); font-size: 11px; font-weight: 500; }
.call-followup-date[hidden] { display: none; }
.call-detail-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 3px; }
.call-detail-form-actions > span { color: var(--portal-ink-soft); font-size: 11px; }
.call-detail-form-actions > span i { margin-right: 4px; color: var(--portal-teal); }
.call-detail-member-edit { border-top: 1px solid var(--portal-line); padding-top: 12px; }
.call-detail-member-edit summary { display: flex; align-items: center; gap: 7px; cursor: pointer; color: var(--portal-indigo); font-size: 12px; font-weight: 800; list-style: none; }
.call-detail-member-edit summary::-webkit-details-marker { display: none; }
.call-detail-member-edit summary::after { margin-left: auto; content: '+'; font-size: 17px; font-weight: 500; }
.call-detail-member-edit[open] summary::after { content: '−'; }
.call-detail-member-edit .member-directory-card { margin-top: 12px; padding: 13px; border: 1px solid #e7eaf1; border-radius: 12px; background: #fafbfe; }
.call-detail-readonly p { color: var(--portal-ink-soft); font-size: 13px; line-height: 1.55; }
.call-detail-disclosure { overflow: hidden; }
.call-detail-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; cursor: pointer; color: var(--portal-ink); font-size: 14px; font-weight: 800; list-style: none; }
.call-detail-disclosure > summary::-webkit-details-marker { display: none; }
.call-detail-disclosure > summary span { display: inline-flex; align-items: center; gap: 8px; }
.call-detail-disclosure > summary i { color: var(--portal-indigo); }
.call-detail-disclosure > summary small { color: var(--portal-ink-soft); font-size: 11px; font-weight: 500; }
.call-detail-disclosure[open] > summary { border-bottom: 1px solid var(--portal-line); background: #fafbfe; }
.call-detail-disclosure-body { padding: 18px 20px 20px; }
.call-detail-advanced-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; }
.call-detail-mini-card { padding: 17px; border: 1px solid #e7eaf1; border-radius: 13px; background: #fff; }
.call-detail-mini-card .eyebrow { margin-bottom: 5px; }
.call-detail-mini-card h3 { margin-bottom: 7px; }
.call-detail-mini-card p:not(.eyebrow) { margin: 0 0 15px; color: var(--portal-ink-soft); font-size: 12px; line-height: 1.5; }
.call-detail-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 17px; }
.call-detail-inline-actions form { margin: 0; }
.call-detail-inline-actions .btn { min-height: 36px; padding: 0 11px; font-size: 11px; }
.call-code-form { display: flex; gap: 6px; }
.call-code-form input { width: 130px; min-height: 36px; }
.call-detail-muted { color: var(--portal-ink-soft); font-size: 11px; }
.call-detail-feedback { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin-top: 14px; padding: 13px 15px; border-radius: 11px; background: #eefaf8; color: #247d73; font-size: 12px; }
.call-detail-feedback strong { color: var(--portal-ink); }
.call-detail-feedback p { flex-basis: 100%; margin: 2px 0 0; color: var(--portal-ink); line-height: 1.5; }

@media (max-width: 900px) {
  .call-detail-grid, .call-detail-advanced-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .call-detail-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .call-detail-hero-actions { justify-content: flex-start; width: 100%; }
  .call-detail-hero-actions .btn { flex: 1; }
  .call-detail-card { padding: 17px; }
  .call-detail-form-row { grid-template-columns: 1fr; }
  .call-detail-form-actions { align-items: stretch; flex-direction: column; }
  .call-detail-form-actions .btn { width: 100%; }
  .call-detail-disclosure > summary { align-items: flex-start; flex-direction: column; }
  .call-detail-disclosure > summary small { padding-left: 26px; }
  .call-detail-disclosure-body { padding: 14px; }
  .call-contact-action { min-width: 0; }
}

@media (max-width: 1050px) {
  .call-console-grid { grid-template-columns: 1fr; }
  .call-queue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 430px; }
  .call-queue-item { border-right: 1px solid #edf0f5; }
}
@media (max-width: 700px) {
  .call-console-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .operator-presence { width: 100%; align-items: stretch; flex-direction: column; }
  .operator-presence select { width: 100%; }
  .call-console-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-queue-list { display: flex; }
  .call-workspace-head { flex-direction: column; }
  .call-workspace-actions { justify-content: flex-start; }
  .call-workspace-columns { grid-template-columns: 1fr; padding: 14px; }
  .call-wrapup-form { grid-template-columns: 1fr; }
  .call-wrapup-form .full-width, .call-wrapup-form .call-followup-toggle { grid-column: auto; }
  .call-live-bar { align-items: flex-start; flex-wrap: wrap; }
  .call-live-bar form { width: 100%; margin-left: 0; }
  .call-live-bar form .btn { width: 100%; }
}

@media (max-width: 480px) {
  .hero { padding: 52px 20px 48px; }
  .section { padding: 44px 20px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes hero-line-reveal {
  from { opacity: 0; transform: scaleX(.2); }
  to   { opacity: 1; transform: scaleX(1); }
}
@keyframes hero-line-glow {
  0%, 100% { box-shadow: 0 0 16px rgba(127,168,255,.22); }
  50% { box-shadow: 0 0 26px rgba(127,168,255,.45); }
}
@keyframes hero-emphasis {
  0%, 100% { color: #7fa8ff; }
  50% { color: #b5cbff; }
}
@keyframes hero-actions-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes hero-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.animate-in { animation: fadeInUp .4s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* Print */
@media print {
  .site-header, .site-footer, .topbar, .nav-toggle { display: none; }
  body { color: #000; }
}

/* ============================================================
   ADAPTATION ESPACE BENEVOLE
   ============================================================ */
.guest-content {
  max-width: 1180px;
}

.page-content {
  display: grid;
  gap: 24px;
}

body.app-internal .page-banner {
  padding: 24px 24px 20px;
}

body.app-internal .page-banner h1 {
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 2px;
}

body.app-internal .page-banner p {
  font-size: 14px;
}

body.app-internal .breadcrumb {
  margin-bottom: 6px;
}

.app-error-list {
  list-style: disc;
  padding-left: 20px;
  color: #b71c1c;
}

.app-admin-toolbar {
  margin-bottom: 24px;
}

.app-admin-toolbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.guest-auth-shell {
  max-width: 560px;
  margin: 0 auto;
}

.guest-auth-shell--narrow {
  max-width: 520px;
}

.guest-card-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.guest-aside-card {
  background: linear-gradient(135deg, #001d5c 0%, #003189 100%);
  color: #fff;
  border-color: transparent;
}

.guest-aside-card .section-title,
.guest-aside-card .section-subtitle,
.guest-aside-card .section-label {
  color: #fff;
}

.guest-aside-card .section-label {
  border-color: rgba(255,255,255,.55);
}

.guest-feature-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.guest-feature-list li {
  position: relative;
  padding-left: 18px;
  color: rgba(255,255,255,.86);
}

.guest-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff8080;
}

.guest-form-card {
  border-top: 4px solid var(--bleu);
}

.guest-form-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
}

.guest-form-copy {
  font-size: 14px;
  color: var(--gris-moyen);
  margin-bottom: 18px;
}

.guest-form-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  font-size: 13px;
}

.guest-auth-note {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--gris-moyen);
}

.auth-helpers {
  margin-bottom: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-divider hr {
  flex: 1;
  border: none;
  border-top: 1px solid var(--gris-clair);
}

.auth-divider span {
  font-size: 12px;
  color: var(--gris-moyen);
  white-space: nowrap;
}

.panel,
.sub-panel,
.metric-card,
.file-card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel,
.sub-panel {
  padding: 20px 24px;
}

.panel-head,
.inline-actions,
.badge-row,
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
}

.metric-card span {
  font-size: 12px;
  color: var(--gris-moyen);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-card strong {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--gris-fonce);
}

.metric-card-compact {
  padding: 14px 16px;
  gap: 2px;
}

.metric-card-compact strong {
  font-size: 24px;
}

.metric-card-compact span {
  font-size: 11px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.dashboard-screen {
  display: grid;
  gap: 16px;
}

.dashboard-stats-grid {
  gap: 12px;
}

.dashboard-grid {
  gap: 16px;
}

.dashboard-grid-top {
  grid-template-columns: minmax(260px, .9fr) minmax(260px, .95fr) minmax(0, 1.35fr) minmax(260px, 1fr);
}

.dashboard-grid-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-panel {
  padding: 16px 18px;
}

.dashboard-panel .panel-head h3,
.dashboard-panel h3 {
  margin: 0;
  font-size: 18px;
}

.dashboard-panel .eyebrow {
  margin-bottom: 4px;
}

.dashboard-panel p {
  margin: 0;
}

.dashboard-panel-actions {
  align-content: start;
}

.dashboard-panel-table,
.dashboard-panel-list {
  min-height: 0;
}

.dashboard-table-wrap {
  max-height: 320px;
  overflow: auto;
}

.dashboard-list-scroll {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.list-cards-compact {
  gap: 8px;
}

.list-cards-compact li {
  padding: 12px 14px;
}

.list-cards-compact strong,
.list-cards-compact span,
.list-cards-compact small {
  display: block;
}

.quick-actions-compact {
  gap: 8px;
}

.quick-actions-compact .primary-button,
.quick-actions-compact .ghost-button {
  padding: 9px 14px;
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.full-width {
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}

.checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.form-grid textarea,
.search-inline input,
.inline-form input,
.inline-form select {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--gris-fonce);
  background: var(--blanc);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.search-inline input:focus,
.inline-form input:focus,
.inline-form select:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(0,49,137,.12);
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.primary-button {
  background: var(--bleu);
  color: var(--blanc);
  border-color: var(--bleu);
}

.primary-button:hover {
  background: var(--bleu-clair);
  color: var(--blanc);
  border-color: var(--bleu-clair);
}

.ghost-button {
  background: transparent;
  color: var(--bleu);
  border-color: var(--bleu);
}

.ghost-button:hover {
  background: var(--bleu-pale);
}

.danger-button {
  background: var(--rouge);
  color: var(--blanc);
  border-color: var(--rouge);
}

.danger-button:hover {
  background: var(--rouge-fonce);
  color: var(--blanc);
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table,
.panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-wrap thead tr,
.panel thead tr {
  background: var(--bleu);
  color: var(--blanc);
}

.table-wrap th,
.panel th {
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
}

.table-wrap td,
.panel td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gris-clair);
  vertical-align: middle;
}

.table-wrap tbody tr:hover,
.panel tbody tr:hover {
  background: var(--bleu-pale);
}

.table-wrap tbody tr:nth-child(even),
.panel tbody tr:nth-child(even) {
  background: var(--gris-bg);
}

.table-wrap tbody tr:nth-child(even):hover,
.panel tbody tr:nth-child(even):hover {
  background: var(--bleu-pale);
}

.list-cards,
.timeline,
.file-list,
.stack-panels {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.list-cards li,
.timeline li,
.file-card,
.sub-panel {
  padding: 16px;
  border: 1px solid var(--gris-clair);
  border-radius: var(--radius);
  background: var(--gris-bg);
}

.definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.definition-list div {
  padding: 16px;
  border: 1px solid var(--gris-clair);
  border-radius: var(--radius);
  background: var(--gris-bg);
}

.definition-list dt {
  font-size: 12px;
  color: var(--gris-moyen);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.definition-list dd {
  margin: 0;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.badge-info,
.badge-neutral,
.badge-accent {
  background: var(--bleu-pale);
  color: var(--bleu);
}

.badge-warning {
  background: #fff8e1;
  color: #6d4c00;
}

.badge-success {
  background: #e8f5e9;
  color: #1b5e20;
}

.badge-danger {
  background: #ffebee;
  color: #b71c1c;
}

.badge-muted {
  background: var(--gris-clair);
  color: var(--gris-fonce);
}

.role-super_admin {
  background: #1a0030;
  color: #e0aaff;
}

.role-admin {
  background: #003189;
  color: #a8c4ff;
}

.role-referent {
  background: #003d1a;
  color: #9bffc6;
}

.role-benevole {
  background: #4a1000;
  color: #ffb899;
}

.role-lecture_seule {
  background: var(--gris-clair);
  color: var(--gris-fonce);
}

.sidebar-logout {
  color: rgba(255,100,100,.75) !important;
}

.search-inline {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  max-width: 320px;
}

.search-inline-sidebar {
  max-width: none;
  margin: 4px 0 18px;
}

.search-inline-sidebar input {
  min-height: 42px;
  background: #fff;
}

.sidebar-search-block {
  padding: 0 18px 6px;
}

.inline-form,
.quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-preview {
  min-height: 24px;
  font-size: 13px;
  color: var(--gris-moyen);
}

.panel-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.panel-links a {
  font-size: 13px;
}

.sub-panel h4 {
  font-family: var(--font-heading);
  font-size: 20px;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,49,137,.05), rgba(255,255,255,.95));
  color: var(--gris-fonce);
}

.empty-state strong {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--bleu);
}

.empty-state p {
  margin: 0;
  color: var(--gris-moyen);
}

.member-directory-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(0, 49, 137, .16);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.member-directory-head {
  display: grid;
  gap: 8px;
}

.member-directory-head h4 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 0;
}

.member-directory-head p {
  margin: 0;
  color: var(--gris-moyen);
  font-size: 14px;
}

.member-search-results {
  display: grid;
  gap: 8px;
}

.member-result-item,
.member-result-empty {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gris-clair);
  background: #fff;
}

.member-result-item {
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.member-result-item:hover {
  border-color: var(--bleu);
  background: var(--bleu-pale);
  transform: translateY(-1px);
}

.member-result-item strong,
.member-result-item span,
.member-result-item small {
  display: block;
}

.member-result-item span,
.member-result-item small,
.member-search-empty {
  color: var(--gris-moyen);
}

.member-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.member-preview div {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gris-clair);
  background: #fff;
}

.member-preview span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gris-moyen);
}

.member-preview strong {
  font-size: 14px;
  color: var(--gris-fonce);
}

@media (max-width: 1024px) {
  .guest-card-grid,
  .content-grid,
  .definition-list,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-grid-top,
  .dashboard-grid-bottom {
    grid-template-columns: 1fr;
  }

  .dashboard-table-wrap,
  .dashboard-list-scroll {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .guest-form-links,
  .panel-links,
  .app-admin-toolbar-links {
    flex-direction: column;
    align-items: stretch;
  }

  .panel,
  .sub-panel,
  .metric-card {
    padding: 18px;
  }
}

/* ============================================================
   REFONTE ESPACE BENEVOLE
   ============================================================ */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

body.app-public,
body.app-internal {
  display: block;
  min-height: 100vh;
}

.app-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
}

.app-topbar-brand strong {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.app-topbar-brand span {
  color: rgba(255,255,255,.72);
  font-size: 12px;
}

.dashboard-layout {
  background: var(--surface-2);
}

.dashboard-sidebar {
  background: var(--portal-sidebar-bg);
  color: var(--portal-sidebar-fg);
  border-right: 1px solid var(--border-default);
}

.sidebar-user {
  gap: 8px;
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border-bottom-color: var(--border-default);
}

.sidebar-user-name {
  color: var(--text-default);
}

.sidebar-user-role {
  color: var(--text-muted);
}

.sidebar-nav a {
  color: var(--text-default);
  border-left-color: transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--surface-3);
  color: var(--primary);
}

.sidebar-nav a.active {
  border-left-color: var(--primary);
}

.sidebar-nav .sidebar-section-title {
  color: var(--text-muted);
}

.sidebar-section-title-spacer {
  margin-top: auto;
}

.app-sidebar-tools {
  margin-top: 10px;
  padding: 0 20px;
  display: grid;
  gap: 10px;
}

.app-assistant-button,
.app-theme-toggle {
  width: 100%;
  justify-content: space-between;
}

.app-assistant-button span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-sidebar-scrim {
  position: fixed;
  inset: 30px 0 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 30;
}

.dashboard-main {
  background: var(--surface-2);
  padding: 24px 28px 40px;
}

.page-content {
  display: grid;
  gap: 24px;
}

.app-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}

.app-page-header .section-title {
  margin-bottom: 6px;
}

.app-page-header .section-subtitle {
  margin-bottom: 0;
  max-width: 70ch;
}

.portal-section .panel-head {
  margin-bottom: 18px;
}

.portal-section .ticket-card-title,
.ticket-card .ticket-card-title {
  margin: 0;
}

.ticket-card p {
  margin: 0;
}

.ticket-card .definition-list {
  margin-top: 8px;
}

.ticket-card .definition-list div,
.portal-section .definition-list div {
  background: var(--surface-2);
  border-color: var(--border-default);
}

.ticket-card .ticket-thread,
.portal-section .ticket-thread {
  margin: 0;
}

.ticket-card .ticket-thread-item {
  background: transparent;
}

.quick-actions {
  gap: 12px;
}

.quick-actions .btn,
.quick-actions .primary-button,
.quick-actions .ghost-button {
  min-height: 44px;
}

.portal-grid {
  align-items: stretch;
}

.portal-kpi-label {
  text-transform: none;
}

.missions-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-directory-card {
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface-1) 100%);
  border-color: rgba(0, 49, 137, .12);
}

.member-result-item,
.member-result-empty,
.member-preview div {
  background: var(--surface-1);
}

.notifications-dropdown {
  position: relative;
}

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 42px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.notif-bell:hover {
  background: rgba(255,255,255,.14);
}

.notif-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
}

.notif-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, 92vw);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  color: var(--text-default);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 60;
}

.notif-menu-head,
.notif-menu-foot {
  padding: 12px 16px;
  background: var(--surface-2);
}

.notif-menu-head {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--border-default);
}

.notif-menu-head strong {
  font-size: 14px;
}

.notif-menu-head span {
  color: var(--text-muted);
  font-size: 12px;
}

.notif-menu-foot {
  border-top: 1px solid var(--border-default);
}

.notif-menu-foot .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}

.notif-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

.notif-empty,
.notif-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
}

.notif-empty {
  color: var(--text-muted);
  text-align: center;
}

.notif-item {
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item:hover {
  background: var(--surface-2);
}

.notif-item-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.notif-item-text {
  font-size: 13px;
  color: var(--text-muted);
}

.notif-item-date {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-user-help {
  margin: 4px 16px 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.volunteer-hero {
  display: grid;
  grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: stretch;
}

.volunteer-hero-copy,
.volunteer-action-card,
.volunteer-workspace {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow);
}

.volunteer-hero-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
}

.volunteer-hero-copy h2 {
  margin: 0;
  color: var(--text-default);
  font-size: 28px;
  line-height: 1.08;
}

.volunteer-hero-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--text-muted);
}

.volunteer-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.volunteer-action-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 12px;
  min-height: 132px;
  padding: 18px;
  color: var(--text-default);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.volunteer-action-card:hover,
.volunteer-action-card:focus-visible {
  color: var(--text-default);
  border-color: rgba(0, 49, 137, .34);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.volunteer-action-card.primary {
  border-color: rgba(0, 49, 137, .36);
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface-1) 100%);
}

.volunteer-action-card i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
}

.volunteer-action-card span {
  align-self: end;
  font-weight: 800;
  color: var(--text-default);
}

.volunteer-action-card small {
  grid-column: 2;
  color: var(--text-muted);
  line-height: 1.35;
}

.volunteer-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.volunteer-workspace {
  padding: 20px;
}

.volunteer-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.volunteer-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.volunteer-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.volunteer-tab:hover,
.volunteer-tab:focus-visible {
  color: var(--primary);
  outline: none;
}

.volunteer-tab.active {
  background: var(--surface-1);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.volunteer-tab-panel {
  display: none;
}

.volunteer-tab-panel.active {
  display: block;
}

.volunteer-card {
  border-color: var(--border-default);
}

.volunteer-next-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.volunteer-help-list {
  display: grid;
  gap: 10px;
}

.volunteer-help-list details {
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.volunteer-help-list summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--text-default);
  font-weight: 800;
}

.volunteer-help-list p {
  padding: 0 14px 14px;
  color: var(--text-muted);
}

/* Version épurée demandée : surfaces blanches, séparation par bordures. */
body.app-internal,
.dashboard-layout,
.dashboard-main,
.dashboard-sidebar,
.sidebar-user,
.portal-section,
.app-page-header,
.ticket-card,
.volunteer-hero-copy,
.volunteer-action-card,
.volunteer-action-card.primary,
.volunteer-workspace,
.volunteer-tabs,
.volunteer-tab.active,
.volunteer-next-step,
.volunteer-help-list details,
.empty-state,
.member-directory-card,
.notif-menu,
.notif-menu-head,
.notif-menu-foot {
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

.dashboard-layout,
.dashboard-main {
  color: var(--text-default);
}

.app-internal,
.app-internal .dashboard-main,
.app-internal .page-content,
.app-internal .portal-section,
.app-internal .ticket-card,
.app-internal .empty-state,
.app-internal .member-directory-card,
.app-internal .documents-group,
.app-internal .documents-items,
.app-internal .document-row,
.app-internal .notif-menu,
.app-internal .notif-list,
.app-internal .notif-item {
  color: #1f2d3d !important;
}

.app-internal h1,
.app-internal h2,
.app-internal h3,
.app-internal h4,
.app-internal .section-title,
.app-internal .ticket-card-title,
.app-internal .ticket-card-title a,
.app-internal .empty-state-title,
.app-internal .panel-head h3,
.app-internal .documents-group h3,
.app-internal .document-row strong {
  color: #1f2d3d !important;
}

.app-internal p,
.app-internal .section-subtitle,
.app-internal .ticket-card-meta,
.app-internal .ticket-meta,
.app-internal .empty-state-desc,
.app-internal .documents-group p,
.app-internal .document-row span,
.app-internal .notif-empty,
.app-internal .notif-item-text,
.app-internal .notif-item-date,
.app-internal .sidebar-user-role,
.app-internal .sidebar-section-title {
  color: #5c6b7a !important;
}

.app-internal .sidebar-user-name,
.app-internal .sidebar-nav a,
.app-internal .notif-item-title {
  color: #1f2d3d !important;
}

.app-internal .ticket-chip,
.app-internal .ticket-meta {
  background: #f7f9fc !important;
  border: 1px solid #d9e3f0 !important;
  color: #425466 !important;
  box-shadow: none !important;
}

.app-internal .ticket-chip.open {
  background: #e9f5ff !important;
  border-color: #c6def5 !important;
  color: #0f6fbf !important;
}

.app-internal .ticket-chip.wait {
  background: #fff4e5 !important;
  border-color: #f3d2a2 !important;
  color: #a76400 !important;
}

.app-internal .ticket-chip.done {
  background: #eaf7ee !important;
  border-color: #c6e4cf !important;
  color: #217a3c !important;
}

.app-internal .ticket-chip.urgent {
  background: #fdecec !important;
  border-color: #f2c4c4 !important;
  color: #b42318 !important;
}

.app-internal .sidebar-nav a:hover,
.app-internal .sidebar-nav a:focus-visible,
.app-internal .sidebar-nav a.active,
.app-internal .ticket-card-title a:hover,
.app-internal .document-row a:hover strong,
.app-internal .notif-item:hover .notif-item-title {
  color: var(--primary) !important;
}

.app-internal .app-page-header .section-title,
.app-internal .volunteer-hero-copy h2,
.app-internal .volunteer-action-card,
.app-internal .volunteer-action-card span,
.app-internal .volunteer-workspace,
.app-internal .volunteer-workspace .ticket-card-title,
.app-internal .volunteer-workspace .ticket-card-title a,
.app-internal .volunteer-workspace .empty-state-title,
.app-internal .volunteer-workspace .ticket-card p,
.app-internal .volunteer-workspace .ticket-meta,
.app-internal .volunteer-workspace .empty-state-desc,
.app-internal .volunteer-tabs .volunteer-tab {
  color: #1f2d3d !important;
}

.app-internal .volunteer-action-card small,
.app-internal .volunteer-hero-copy p,
.app-internal .volunteer-workspace .ticket-card-meta,
.app-internal .volunteer-workspace .notif-empty,
.app-internal .volunteer-workspace .section-subtitle {
  color: #5c6b7a !important;
}

.app-internal .volunteer-tabs .volunteer-tab.active,
.app-internal .volunteer-workspace .volunteer-next-step {
  color: var(--primary) !important;
}

.dashboard-sidebar {
  border-right: 1px solid var(--border-default);
}

.sidebar-user {
  border-bottom: 1px solid var(--border-default);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: #fff !important;
  color: var(--primary);
  border-left-color: var(--primary);
}

.volunteer-hero-copy,
.volunteer-action-card,
.volunteer-workspace,
.portal-section,
.ticket-card {
  border-color: var(--border-default);
}

.volunteer-action-card:hover,
.volunteer-action-card:focus-visible,
.ticket-card:hover {
  border-color: var(--primary);
  transform: none;
}

.volunteer-action-card i {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border-default);
}

.volunteer-tab.active,
.volunteer-next-step {
  color: var(--primary);
  border: 1px solid var(--border-default);
}

.dashboard-layout {
  grid-template-columns: 236px minmax(0, 1fr);
}

.dashboard-sidebar {
  width: 236px;
  min-width: 236px;
  max-width: 236px;
}

.sidebar-user {
  padding: 14px 16px 12px;
  gap: 6px;
}

.sidebar-user img {
  width: 128px;
  max-width: 76%;
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  font-size: 15px;
  border-width: 1px;
}

.sidebar-user-name {
  font-size: 13px;
  line-height: 1.2;
}

.sidebar-user-role {
  font-size: 11px;
}

.sidebar-user-help {
  display: none;
}

.app-sidebar-tools {
  margin-top: 0;
  padding: 8px 10px 10px;
  gap: 6px;
  border-bottom: 1px solid var(--border-default);
}

.app-sidebar-tools .sidebar-section-title {
  padding: 0 0 4px;
  font-size: 9px;
  letter-spacing: 1.4px;
}

.app-assistant-button,
.app-theme-toggle {
  min-height: 34px;
  padding: 7px 10px;
  border-width: 1px;
  font-size: 11px;
}

.sidebar-nav {
  padding-top: 6px;
}

.sidebar-nav .sidebar-section-title {
  padding: 12px 14px 5px;
  font-size: 9px;
  letter-spacing: 1.4px;
}

.sidebar-nav a {
  padding: 8px 14px;
  font-size: 13px;
}

.app-internal .topbar {
  height: auto;
  min-height: 44px;
}

.app-internal .topbar-inner {
  max-width: none;
  margin: 0;
  min-height: 44px;
  padding: 8px 14px 12px;
}

.dashboard-layout {
  height: calc(100vh - 44px);
}

.dashboard-main {
  height: calc(100vh - 44px);
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding-bottom: 2px;
}

.topbar-inner.app-topbar {
  flex-wrap: nowrap;
}

.app-topbar-brand {
  gap: 8px;
}

.app-topbar-brand strong {
  font-size: 12px;
  white-space: nowrap;
}

.app-topbar-brand span {
  font-size: 12px;
  white-space: nowrap;
}

.app-global-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 38px;
  color: #fff;
}

.app-global-search > i {
  position: absolute;
  left: 13px;
  z-index: 1;
  color: rgba(255,255,255,.76);
  font-size: 13px;
}

.app-global-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.app-global-search input::placeholder {
  color: rgba(255,255,255,.76);
}

.app-global-search input:focus {
  background: #fff;
  color: var(--text-default);
  border-color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}

.app-global-search:focus-within > i {
  color: var(--primary);
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  max-width: none;
  justify-self: auto;
}

.app-topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.app-topbar-action span,
.notif-bell-label {
  display: none;
}

.app-topbar-action:hover,
.app-topbar-action:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.32);
  outline: none;
}

.app-topbar-action-primary {
  background: #fff;
  border-color: #fff;
  color: var(--primary);
}

.app-topbar-action-primary:hover,
.app-topbar-action-primary:focus-visible {
  background: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.92);
  color: var(--primary);
}

.app-global-search-results {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.app-global-search-results a,
.app-global-search-empty {
  display: block;
  padding: 10px 12px;
  color: var(--text-default);
  text-decoration: none;
  border-bottom: 1px solid var(--border-default);
  font-size: 13px;
}

.app-global-search-results a:hover,
.app-global-search-results a:focus-visible {
  background: #fff;
  color: var(--primary);
  outline: none;
}

.app-global-search-results small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
}

.app-global-search-empty {
  color: var(--text-muted);
}

.app-page-header {
  padding: 16px 20px;
}

.app-page-header .eyebrow {
  margin-bottom: 4px;
}

.app-page-header .section-title {
  font-size: 28px;
  line-height: 1.05;
}

.app-page-header .section-subtitle {
  font-size: 14px;
}

.documents-simple {
  display: grid;
  gap: 16px;
}

.documents-simple-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.documents-simple-head .section-subtitle {
  margin: 4px 0 0;
}

.documents-search {
  position: relative;
  display: block;
  max-width: 520px;
}

.documents-search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.documents-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
  color: var(--text-default);
  font: inherit;
}

.documents-list {
  display: grid;
  gap: 18px;
}

.documents-group {
  display: grid;
  gap: 10px;
}

.documents-group h3 {
  margin: 0;
  font-size: 16px;
}

.documents-items {
  display: grid;
  gap: 8px;
}

.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
}

.document-row a {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--text-default);
  text-decoration: none;
}

.document-row a:hover strong {
  color: var(--primary);
}

.document-row strong,
.document-row span {
  overflow-wrap: anywhere;
}

.document-row span {
  color: var(--text-muted);
  font-size: 13px;
}

.document-row form {
  flex: 0 0 auto;
}

.documents-empty {
  max-width: 520px;
}

.documents-tools details {
  display: grid;
  gap: 16px;
}

.documents-tools summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 800;
}

.documents-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.documents-tools-grid article {
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
}

.documents-tools-grid h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.documents-tracking-result {
  margin-top: 12px;
}

.documents-result-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
}

.documents-result-card span {
  color: var(--text-muted);
  font-size: 13px;
}

.documents-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.documents-dialog-actions .btn {
  min-height: 40px;
}

.app-internal .ds-modal {
  background: #fff;
  border: 1px solid var(--border-default);
  max-width: 720px;
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-internal .ds-modal-title {
  color: var(--text-default);
  font-size: 1.05rem;
  line-height: 1.2;
}

.app-internal .ds-modal-body {
  background: #fff;
  padding: 22px 24px;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.app-internal .ds-modal-header {
  padding: 18px 24px;
}

.app-internal .ds-modal-footer {
  padding: 18px 24px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  position: sticky;
  bottom: 0;
  z-index: 1;
}

.multi-select-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}

.form-grid select[multiple] {
  min-height: 180px;
}

.app-internal .ds-modal-footer .btn {
  min-height: 42px;
  padding: 0 18px;
}

.app-internal .ds-modal-footer .btn-ghost {
  border-color: var(--border-default);
  color: var(--text-default);
}

.app-internal .ds-modal-footer .btn-ghost:hover {
  background: var(--surface-2);
}

/* Anti-surcharge cognitive : moins de bruit visuel, une action visible à la fois. */
.app-internal a,
.app-internal a:hover,
.app-internal a:focus,
.app-internal a:active,
.app-internal a:visited {
  text-decoration: none !important;
}

.app-internal .page-content {
  max-width: 1040px;
  margin: 0 auto;
}

.app-internal .content-grid,
.app-internal .dashboard-grid-top,
.app-internal .dashboard-grid-bottom {
  grid-template-columns: minmax(0, 1fr);
}

.app-internal .portal-section {
  border-color: var(--border-default);
}

.app-internal .eyebrow {
  display: none;
}

.app-internal .empty-state-desc,
.app-internal .section-subtitle {
  max-width: 58ch;
}

.app-internal .empty-state {
  padding: 14px;
}

.app-internal .empty-state-title {
  font-size: 18px;
}

.app-internal .panel-head {
  align-items: center;
}

.app-internal .panel-head .quick-actions,
.app-internal .quick-actions {
  gap: 8px;
}

.app-internal .btn:not(.btn-sm) {
  min-height: 40px;
}

.simple-list-board {
  display: grid;
  gap: 18px;
}

.simple-list-group {
  display: grid;
  gap: 10px;
}

.simple-list-group > .ticket-card-header {
  padding: 0;
  border: 0;
}

.active-filter-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.active-filter-note a {
  color: var(--primary);
  font-weight: 700;
}

.admin-member-list {
  display: grid;
  gap: 10px;
}

.admin-member-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}

.admin-member-main,
.admin-member-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-member-main h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.admin-member-access-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 6px;
}

.admin-member-access-block {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: #fff;
}

.admin-member-access-block strong {
  color: var(--text-default);
  font-size: 13px;
}

.admin-member-access-block p,
.admin-member-access-groups p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-member-access-groups {
  display: grid;
  gap: 6px;
}

.admin-member-access-groups span {
  color: var(--text-default);
  font-weight: 700;
}

.admin-member-access-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-member-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-member-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-member-meta span {
  padding: 4px 8px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
}

.admin-member-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-left: auto;
  gap: 8px;
  align-self: center;
}

.admin-member-actions .btn {
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  letter-spacing: .4px;
  border-radius: 999px;
}

.admin-member-actions .btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.admin-member-actions .btn-outline:hover,
.admin-member-actions .btn-outline:focus-visible {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  outline: none;
}

.admin-member-actions .btn-danger {
  box-shadow: 0 4px 10px rgba(215, 38, 56, .14);
}

.admin-member-card .status-pill,
.admin-member-card .badge-status {
  align-self: flex-start;
}

.admin-member-card .btn {
  white-space: nowrap;
}

.profile-ai-field {
  display: grid;
  gap: 10px;
}

.profile-mapkit-wrap {
  position: relative;
}

.profile-mapkit-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
  max-height: 220px;
  overflow-y: auto;
}

.profile-mapkit-results li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

.profile-mapkit-results li:hover {
  background: var(--surface-2);
}

.profile-ai-button {
  justify-self: flex-start;
}

.security-warning {
  padding: 12px 14px;
  border: 1px solid rgba(215, 38, 56, .25);
  border-radius: 6px;
  background: #fff5f6;
  color: #8f1f2b;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 44px);
  }

  .dashboard-sidebar {
    position: fixed;
    top: 44px;
    bottom: 0;
    left: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .24s ease;
    max-width: min(320px, 88vw);
    width: min(320px, 88vw);
    min-width: min(320px, 88vw);
  }

  .dashboard-sidebar.is-open {
    transform: translateX(0);
  }

  body.portal-nav-open {
    overflow: hidden;
  }

  .dashboard-main {
    height: auto;
    padding: 20px;
    width: 100%;
    max-width: 100%;
  }

  .app-sidebar-scrim {
    inset: 44px 0 0;
  }

  .app-topbar {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .app-topbar-brand span {
    display: none;
  }

  .app-topbar-action span,
  .notif-bell-label {
    display: none;
  }

  .app-page-header,
  .missions-board,
  .volunteer-hero,
  .volunteer-kpi-grid,
  .documents-tools-grid {
    grid-template-columns: 1fr;
  }

  .app-global-search {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .admin-member-main,
  .admin-member-footer,
  .admin-member-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .admin-member-main {
    flex-wrap: wrap;
  }

  .admin-member-card {
    padding: 14px;
  }

  .admin-member-footer {
    gap: 12px;
  }

  .admin-member-actions {
    margin-left: 0;
    width: 100%;
  }

  .admin-member-actions .btn {
    flex: 1 1 140px;
  }

  .app-internal .ds-modal {
    max-width: calc(100vw - 24px);
    margin: 0 12px;
  }

  .app-internal .ds-modal-header,
  .app-internal .ds-modal-body,
  .app-internal .ds-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 768px) {
  .app-topbar {
    flex-wrap: nowrap;
  }

  .app-topbar-actions {
    gap: 6px;
  }

  .app-topbar-action {
    padding: 0 10px;
  }

  .app-topbar-brand span {
    display: none;
  }

  .app-page-header {
    padding: 18px;
  }

  .portal-section,
  .ticket-card-header,
  .ticket-card-footer,
  .ticket-card-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .portal-section {
    padding: 18px;
  }

  .portal-section .ticket-card,
  .portal-section .ticket-card .ticket-card-header,
  .portal-section .ticket-card .ticket-card-body,
  .portal-section .ticket-card .ticket-card-footer {
    padding-left: 0;
    padding-right: 0;
  }

  .ticket-card-header,
  .ticket-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-card-meta {
    gap: 8px;
  }

  .volunteer-hero-actions,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .volunteer-hero-copy h2 {
    font-size: 23px;
  }

  .volunteer-workspace-head {
    flex-direction: column;
    align-items: stretch;
  }

  .volunteer-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .volunteer-tab {
    padding: 0 8px;
  }

  .volunteer-next-step {
    width: fit-content;
  }

  .documents-simple-head,
  .document-row {
    align-items: stretch;
    flex-direction: column;
  }

  .documents-simple-head .btn,
  .document-row form,
  .document-row .btn {
    width: 100%;
  }

  .app-page-header .section-title {
    font-size: 24px;
  }

  .app-topbar-brand strong {
    display: none;
  }
}
