/* ==========================================================================
   Portail CSE - feuille de style principale
   Palette sobre : bleu institutionnel, gris chauds, vert de validation.
   ========================================================================== */

:root {
  --bleu-900: #16324f;
  --bleu-700: #1f4e79;
  --bleu-500: #2e6da4;
  --bleu-100: #e3edf7;
  --bleu-050: #f2f7fc;
  --vert-700: #1e7b4f;
  --vert-100: #e1f3e8;
  --orange-700: #b5651d;
  --orange-100: #fcecd9;
  --rouge-700: #b3261e;
  --rouge-100: #fbe4e2;
  --gris-900: #1f2933;
  --gris-700: #4a5561;
  --gris-500: #7b8794;
  --gris-300: #cbd2d9;
  --gris-200: #e4e8ec;
  --gris-100: #f3f5f7;
  --blanc: #ffffff;
  --radius: 10px;
  --ombre: 0 1px 2px rgba(22, 50, 79, 0.06), 0 4px 14px rgba(22, 50, 79, 0.08);
  --ombre-forte: 0 10px 40px rgba(22, 50, 79, 0.22);
  --police: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --largeur: 1180px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.55;
  color: var(--gris-900);
  background: var(--gris-100);
}

h1, h2, h3 { line-height: 1.25; color: var(--bleu-900); margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .75rem; }
a { color: var(--bleu-500); }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .92em; background: var(--gris-100); padding: .1em .35em; border-radius: 4px; }
s { color: var(--gris-500); }

.container { max-width: var(--largeur); margin: 0 auto; padding: 0 1.25rem; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--bleu-700); color: #fff;
  padding: .5rem 1rem; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid #f4b400; outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Bandeau démo + en-tête
   -------------------------------------------------------------------------- */

.demo-banner {
  background: var(--bleu-900); color: #cfe0f2; font-size: .82rem; text-align: center; padding: .35rem 1rem;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--blanc); border-bottom: 1px solid var(--gris-200);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.brand-logo {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 9px;
  background: var(--bleu-700); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: var(--bleu-900); font-size: 1.02rem; }
.brand-text small { color: var(--gris-500); font-size: .74rem; }

.nav-principale { flex: 1; }
.nav-principale ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; flex-wrap: wrap; }
.nav-principale a {
  display: block; padding: .5rem .7rem; border-radius: 6px; text-decoration: none;
  color: var(--gris-700); font-weight: 500; font-size: .92rem; white-space: nowrap;
}
.nav-principale a:hover { background: var(--bleu-050); color: var(--bleu-700); }
.nav-principale a.active { background: var(--bleu-100); color: var(--bleu-700); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: .75rem; position: relative; margin-left: auto; }

.user-chip { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--gris-700); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bleu-100); color: var(--bleu-700); font-weight: 700; font-size: .78rem;
}

.nav-toggle { display: none; background: none; border: 1px solid var(--gris-300); border-radius: 6px; width: 42px; height: 40px; cursor: pointer; }
.burger, .burger::before, .burger::after {
  display: block; width: 20px; height: 2px; background: var(--gris-700); margin: 0 auto; position: relative; content: "";
}
.burger::before { position: absolute; top: -6px; left: 0; }
.burger::after { position: absolute; top: 6px; left: 0; }

.help-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 290px;
  background: var(--blanc); border: 1px solid var(--gris-200); border-radius: var(--radius);
  box-shadow: var(--ombre-forte); padding: .5rem; z-index: 120;
}
.help-menu-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris-500); margin: .35rem .6rem .4rem; font-weight: 600; }
.help-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: .6rem .7rem;
  border-radius: 6px; font: inherit; color: var(--gris-900); cursor: pointer;
}
.help-menu button:hover { background: var(--bleu-050); color: var(--bleu-700); }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bleu-700); color: #fff; }
.btn-primary:hover { background: var(--bleu-900); }
.btn-secondary { background: var(--blanc); color: var(--bleu-700); border-color: var(--bleu-500); }
.btn-secondary:hover { background: var(--bleu-050); }
.btn-help { background: #f4b400; color: var(--gris-900); border-color: #e0a400; }
.btn-help:hover { background: #ffc21a; }
.btn-help span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--gris-900); color: #f4b400; font-size: .78rem; }
.btn-link { background: none; color: var(--bleu-500); padding: .5rem .6rem; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn-small { padding: .3rem .7rem; font-size: .82rem; background: var(--bleu-050); color: var(--bleu-700); }
.btn-small:hover { background: var(--bleu-100); }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Pages et blocs
   -------------------------------------------------------------------------- */

main { padding: 1.75rem 1.25rem 3rem; min-height: 70vh; }
[hidden] { display: none !important; }
.page { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.breadcrumb { font-size: .85rem; color: var(--gris-500); margin-bottom: .75rem; }
.breadcrumb a { color: var(--gris-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.lead { font-size: 1.05rem; color: var(--gris-700); max-width: 70ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--bleu-500); margin-bottom: .35rem; }
.section-title { margin: 2rem 0 1rem; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .btn { flex-shrink: 0; }

.card {
  background: var(--blanc); border: 1px solid var(--gris-200); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--ombre);
}

.hero {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: stretch;
  background: linear-gradient(120deg, var(--bleu-900), var(--bleu-700) 70%, var(--bleu-500));
  color: #fff; border-radius: 14px; padding: 2rem; box-shadow: var(--ombre);
}
.hero h1 { color: #fff; margin-bottom: .75rem; }
.hero .lead { color: #d9e6f3; }
.hero .eyebrow { color: #a9c8e8; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.hero .btn-primary { background: #f4b400; color: var(--gris-900); }
.hero .btn-primary:hover { background: #ffc21a; }
.hero .btn-secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-secondary:hover { background: rgba(255,255,255,.22); }

.hero-solde { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: center; }
.solde-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: #c5d9ec; margin-bottom: .2rem; }
.solde-montant { font-size: 2.4rem; font-weight: 700; margin: 0; line-height: 1.1; }
.solde-detail { color: #c5d9ec; font-size: .88rem; }
.progress { height: 8px; background: rgba(255,255,255,.2); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: #f4b400; border-radius: 4px; transition: width .4s; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }

.card.service { cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.card.service:hover, .card.service:focus-visible { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.card.service .icon { font-size: 1.9rem; line-height: 1; margin-bottom: .6rem; }
.card.service p { color: var(--gris-700); font-size: .93rem; flex: 1; }
.card-link { color: var(--bleu-500); font-weight: 600; font-size: .9rem; }
.card-link::after { content: " →"; }

.two-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; margin-top: 2rem; }

.news-list, .agenda, .people, .check-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: .75rem 0; border-top: 1px solid var(--gris-200); }
.news-list li:first-child { border-top: 0; padding-top: 0; }
.news-list time { display: block; font-size: .8rem; color: var(--gris-500); }
.news-list p { margin: .2rem 0 0; color: var(--gris-700); font-size: .93rem; }

.agenda li { display: flex; gap: .9rem; align-items: flex-start; padding: .65rem 0; border-top: 1px solid var(--gris-200); }
.agenda li:first-child { border-top: 0; padding-top: 0; }
.agenda p { margin: 0; color: var(--gris-700); font-size: .9rem; }
.date-badge {
  flex-shrink: 0; width: 52px; text-align: center; background: var(--bleu-100); color: var(--bleu-700);
  border-radius: 8px; padding: .35rem 0; font-weight: 700; line-height: 1.1; font-size: 1.1rem;
}
.date-badge small { display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; }
.agenda + .btn { margin-top: 1rem; }

.info-box { background: var(--bleu-050); border: 1px solid var(--bleu-100); border-radius: var(--radius); padding: 1.25rem; margin-top: 1.5rem; }
.info-box ul { margin: 0; padding-left: 1.2rem; }
.info-box li { margin-bottom: .35rem; }

/* Filtres */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.chip {
  border: 1px solid var(--gris-300); background: var(--blanc); border-radius: 999px; padding: .4rem .9rem;
  font: inherit; font-size: .88rem; cursor: pointer; color: var(--gris-700);
}
.chip:hover { border-color: var(--bleu-500); color: var(--bleu-700); }
.chip.active { background: var(--bleu-700); color: #fff; border-color: var(--bleu-700); }

/* Offres billetterie */
.offer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.tag { display: inline-block; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--bleu-700); background: var(--bleu-100); padding: .2rem .55rem; border-radius: 4px; }
.offer-discount { font-weight: 700; color: var(--vert-700); background: var(--vert-100); padding: .2rem .55rem; border-radius: 4px; font-size: .85rem; }
.price { font-size: 1.05rem; }
.price strong { font-size: 1.35rem; color: var(--bleu-900); }
.card.offer p:not(.price) { color: var(--gris-700); font-size: .92rem; }
.card.offer .btn { margin-top: .5rem; }

/* Activités */
.card.activity { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.activity-img { height: 120px; background: var(--img); display: grid; place-items: center; font-size: 3rem; }
.activity-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.activity-body h3 { margin-top: .5rem; }
.meta { color: var(--gris-500); font-size: .88rem; }
.places { font-size: .88rem; font-weight: 600; }
.places.ok { color: var(--vert-700); }
.places.warn { color: var(--orange-700); }
.places.full { color: var(--rouge-700); }
.activity-body .btn { margin-top: auto; }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */

.layout-form { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.sticky { position: sticky; top: calc(var(--header-h) + 1rem); }

.form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.form legend { font-weight: 700; color: var(--bleu-900); font-size: 1.05rem; margin-bottom: .75rem; padding: 0; }
.field { margin-bottom: 1.1rem; }
.field label, .field .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.req { color: var(--rouge-700); }
.hint { font-size: .84rem; color: var(--gris-500); margin: .4rem 0 0; }

input[type="text"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--gris-300); border-radius: 8px;
  font: inherit; color: var(--gris-900); background: var(--blanc);
}
input:focus, select:focus, textarea:focus { border-color: var(--bleu-500); box-shadow: 0 0 0 3px var(--bleu-100); outline: none; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--rouge-700); }
textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span { display: flex; flex-direction: column; padding: .8rem .9rem; border: 2px solid var(--gris-200); border-radius: 10px; transition: border .15s, background .15s; }
.radio-card small { color: var(--gris-500); }
.radio-card input:checked + span { border-color: var(--bleu-700); background: var(--bleu-050); }
.radio-card input:focus-visible + span { outline: 3px solid #f4b400; outline-offset: 2px; }

.radio-list label { display: block; padding: .5rem 0; cursor: pointer; }
.radio-list input { margin-right: .5rem; }

.field-row label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--gris-300); border-radius: 8px; overflow: hidden; }
.stepper input { width: 70px; text-align: center; border: 0; border-radius: 0; font-weight: 700; font-size: 1.1rem; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper-btn { width: 42px; height: 44px; border: 0; background: var(--gris-100); font-size: 1.3rem; cursor: pointer; color: var(--bleu-700); }
.stepper-btn:hover { background: var(--bleu-100); }

.input-suffix { display: flex; align-items: center; }
.input-suffix input { border-radius: 8px 0 0 8px; }
.input-suffix span { padding: .6rem .8rem; border: 1px solid var(--gris-300); border-left: 0; border-radius: 0 8px 8px 0; background: var(--gris-100); }

.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; cursor: pointer; padding: .5rem 0; }
.checkbox input { margin-top: .25rem; flex-shrink: 0; }
.checkbox.invalid { color: var(--rouge-700); }

.form-footer { border-top: 1px solid var(--gris-200); padding-top: 1rem; margin-top: .5rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem;
  padding: 1.5rem 1rem; border: 2px dashed var(--gris-300); border-radius: 10px; cursor: pointer;
  background: var(--gris-100); transition: border .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--bleu-500); background: var(--bleu-050); }
.dropzone-icon { font-size: 1.8rem; }
.dropzone small { color: var(--gris-500); }
.file-name { margin-top: .5rem; font-size: .9rem; color: var(--vert-700); font-weight: 600; }
.file-name:empty { display: none; }

/* Récapitulatifs */
.recap h2 { font-size: 1.1rem; }
.recap-list { margin: 0 0 .75rem; }
.recap-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--gris-200); font-size: .93rem; }
.recap-list dt { color: var(--gris-700); }
.recap-list dd { margin: 0; font-weight: 600; text-align: right; }
.recap-list .good { color: var(--vert-700); }
.recap-list .total { border-bottom: 0; border-top: 2px solid var(--bleu-900); margin-top: .25rem; padding-top: .7rem; font-size: 1.05rem; }
.recap-list .total dd { font-size: 1.3rem; color: var(--bleu-900); }
.recap h3 { font-size: .95rem; margin-top: 1rem; }
.check-list li::before { content: "✔ "; color: var(--vert-700); font-weight: 700; }
.check-list li { font-size: .9rem; padding: .15rem 0; }

.recap-inline { display: flex; justify-content: space-between; align-items: center; background: var(--bleu-050); border-radius: 8px; padding: .8rem 1rem; margin: .5rem 0; }
.recap-inline strong { font-size: 1.25rem; color: var(--bleu-900); }
#form-activite { margin-top: 1.5rem; scroll-margin-top: calc(var(--header-h) + 1rem); }

/* --------------------------------------------------------------------------
   Suivi des demandes
   -------------------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--blanc); border: 1px solid var(--gris-200); border-radius: var(--radius); padding: 1rem; text-align: center; box-shadow: var(--ombre); }
.stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--bleu-700); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--gris-700); }

.table-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.table-toolbar .filters { margin-bottom: .75rem; }
.search { flex: 0 1 320px; margin-bottom: .75rem; }

.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--gris-200); vertical-align: middle; }
th { background: var(--gris-100); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gris-700); }
tbody tr:hover { background: var(--bleu-050); }
tbody tr.selected { background: var(--bleu-100); }
td:last-child { text-align: right; }
.empty { padding: 1.5rem; text-align: center; color: var(--gris-500); margin: 0; }

.badge { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge.en-cours { background: var(--bleu-100); color: var(--bleu-700); }
.badge.validee { background: var(--vert-100); color: var(--vert-700); }
.badge.attente { background: var(--orange-100); color: var(--orange-700); }

.detail-panel { margin-top: 1.25rem; border-left: 4px solid var(--bleu-700); scroll-margin-top: calc(var(--header-h) + 1rem); }
.detail-head { display: flex; justify-content: space-between; align-items: center; }
.timeline { list-style: none; margin: 1rem 0; padding: 0 0 0 1.5rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--gris-200); }
.timeline li { position: relative; padding: 0 0 1rem 1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.5rem; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--gris-300); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--gris-300); }
.timeline li.done::before { background: var(--vert-700); box-shadow: 0 0 0 2px var(--vert-700); }
.timeline li.current::before { background: var(--bleu-500); box-shadow: 0 0 0 2px var(--bleu-500); }
.timeline li.alert::before { background: var(--orange-700); box-shadow: 0 0 0 2px var(--orange-700); }
.timeline strong { display: block; }
.timeline small { color: var(--gris-500); }
.timeline p { margin: .2rem 0 0; font-size: .92rem; color: var(--gris-700); }
.detail-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Contact, aide
   -------------------------------------------------------------------------- */

.people li { display: flex; gap: .75rem; align-items: center; padding: .5rem 0; }
.people small { display: block; color: var(--gris-500); }

.tuto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .85rem; margin-top: 1rem; }
.tuto {
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; text-align: left;
  background: var(--bleu-050); border: 1px solid var(--bleu-100); border-radius: 10px; padding: 1rem; font: inherit; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.tuto:hover { transform: translateY(-2px); box-shadow: var(--ombre); border-color: var(--bleu-500); }
.tuto span { font-size: 1.6rem; }
.tuto strong { color: var(--bleu-900); }
.tuto small { color: var(--gris-500); }

#faq { margin-top: 1.25rem; }
details { border-top: 1px solid var(--gris-200); padding: .6rem 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 600; color: var(--bleu-900); padding: .3rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; color: var(--bleu-500); font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin: .5rem 0 .3rem; color: var(--gris-700); }

/* --------------------------------------------------------------------------
   Pied de page, toast, modale
   -------------------------------------------------------------------------- */

.site-footer { background: var(--bleu-900); color: #cfe0f2; padding: 1.5rem 0; font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-inner p { margin: 0; }
.footer-inner ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; align-items: center; }
.footer-inner a, .footer-inner .btn-link { color: #fff; font-size: .88rem; padding: 0; }

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--gris-900); color: #fff; padding: .8rem 1.2rem; border-radius: 8px; box-shadow: var(--ombre-forte);
  z-index: 300; font-size: .93rem; max-width: calc(100% - 2rem);
}

.modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 1rem; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(22, 50, 79, .55); }
.modal-box { position: relative; background: var(--blanc); border-radius: 14px; padding: 2rem; max-width: 520px; width: 100%; box-shadow: var(--ombre-forte); }
.modal-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--vert-100); color: var(--vert-700); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 1rem; }
.modal-box dl { margin: 1rem 0; }
.modal-box dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--gris-200); font-size: .93rem; }
.modal-box dd { margin: 0; font-weight: 600; text-align: right; }
.modal-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Driver.js : habillage aux couleurs du portail
   -------------------------------------------------------------------------- */

.driver-popover.cse-popover {
  border-radius: 12px; padding: 1.1rem 1.2rem; max-width: 380px; font-family: var(--police);
  box-shadow: var(--ombre-forte);
}
.driver-popover.cse-popover .driver-popover-title { font-size: 1.05rem; color: var(--bleu-900); font-weight: 700; }
.driver-popover.cse-popover .driver-popover-description { color: var(--gris-700); font-size: .93rem; line-height: 1.5; }
.driver-popover.cse-popover .driver-popover-progress-text { color: var(--gris-500); font-size: .8rem; }
.driver-popover.cse-popover .driver-popover-navigation-btns button {
  font: inherit; font-size: .88rem; font-weight: 600; padding: .45rem .9rem; border-radius: 6px;
  text-shadow: none; border: 1px solid var(--bleu-500); color: var(--bleu-700); background: #fff;
}
.driver-popover.cse-popover .driver-popover-navigation-btns .driver-popover-next-btn { background: var(--bleu-700); color: #fff; border-color: var(--bleu-700); }
.driver-popover.cse-popover .driver-popover-navigation-btns button:hover { background: var(--bleu-050); }
.driver-popover.cse-popover .driver-popover-navigation-btns .driver-popover-next-btn:hover { background: var(--bleu-900); }
.driver-popover.cse-popover .driver-popover-close-btn { color: var(--gris-500); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: .75rem; padding-top: .5rem; padding-bottom: .5rem; }
  .brand { order: 1; }
  .nav-toggle { display: block; order: 3; }
  .btn-help { white-space: nowrap; }
  .header-actions { order: 2; margin-left: auto; }
  .user-name { display: none; }
  .nav-principale { order: 4; flex: 1 0 100%; display: none; border-top: 1px solid var(--gris-200); padding: .5rem 0; }
  .nav-principale.open { display: block; }
  .nav-principale ul { flex-direction: column; }
  .nav-principale a { padding: .65rem .75rem; font-size: 1rem; }
  .hero { grid-template-columns: 1fr; padding: 1.5rem; }
  .two-cols { grid-template-columns: 1fr; }
  .layout-form { grid-template-columns: 1fr; }
  .sticky { position: static; }
}

@media (max-width: 640px) {
  main { padding: 1.25rem .9rem 2.5rem; }
  .brand-text small { display: none; }
  .btn-help { padding: .5rem .7rem; }
  .help-menu { right: -60px; width: min(290px, 90vw); }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .stat-value { font-size: 1.5rem; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }

  /* Tableau en cartes empilées */
  table thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border-bottom: 6px solid var(--gris-100); padding: .5rem 0; }
  td { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 1rem; border: 0; text-align: right; }
  td::before { content: attr(data-label); font-weight: 600; color: var(--gris-500); font-size: .8rem; text-align: left; }
  td:last-child { justify-content: flex-end; }
  td:last-child::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
