:root{
  --bg: #FDFDFD;
  --surface: #FFFFFF;
  --text: #0B1020;
  --muted: #4B5563;
  --border: #E5E7EB;
  --header-h: 128px; /* au lieu de 128px */


  /* Logo-inspired */
  --primary: #012271;
  --primary-2: #0A2782;
  --ink: #020306;

  --container: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2,3,6,.10);

  /* Focus ring */
  --focus: #111827;
}

/* MODE SOMBRE */
[data-theme="dark"]{
  --bg: #0b1020;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;

  --primary: #93c5fd;
  --primary-2: #60a5fa;
  --ink: #e5e7eb;

  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --focus: #e5e7eb;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;

  /* nécessaire avec header fixed */
  padding-top: var(--header-h);
}


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

a{ color: var(--primary); text-underline-offset: 3px; }
a:hover{ color: var(--primary-2); }

:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container{
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:0;
  background: var(--focus);
  color:#fff;
  padding:.75rem 1rem;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{ left:1rem; top:1rem; }

/* =========================
   HERO / SECTIONS
   ========================= */

.hero{
  padding: 1.4rem 0 1.2rem;
}

.hero-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.hero-top{
  padding: 1.6rem 1.4rem;
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--primary) 14%, transparent),
    color-mix(in srgb, var(--primary-2) 6%, transparent)
  );
}

.hero h1{
  margin: 0 0 .5rem;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height:1.2;
}

.hero p{
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.hero-actions{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  padding: 1rem 1.4rem 1.4rem;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration:none;
  color: var(--ink);
}

.btn:hover{
  background: color-mix(in srgb, var(--ink) 3%, var(--surface));
}

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

.btn.primary:hover{
  background: var(--primary-2);
  border-color: var(--primary-2);
}

/* Sections */
.section{
  padding: 1.25rem 0 2rem;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card{
  grid-column: span 6;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.card h2{
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}

.card p{ margin:0; color: var(--muted); }

@media (max-width: 920px){
  .card{ grid-column: span 12; }
}

/* =========================
   UTILITAIRES / COMPOSANTS
   ========================= */

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
}

iframe { max-width: 100%; }

/* Docs list */
.doc-list{
  margin: .75rem 0 0;
  padding-left: 1.1rem;
}
.doc-list li{ margin: .35rem 0; }
.doc-list a{ font-weight: 600; }

/* Forms */
.form{
  display:grid;
  gap:.75rem;
  margin-top: .75rem;
}
.field{ display:grid; gap:.35rem; }
label{ font-weight: 650; }

input, textarea, select{
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
textarea{ min-height: 140px; resize: vertical; }

.help{
  font-size: .95rem;
  color: var(--muted);
}

/* Badges / stacks */
.badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.35rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  color: var(--muted);
  font-size: .9rem;
}

.stack{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-top:.5rem;
}

/* Lists */
.list-clean{
  margin: .75rem 0 0;
  padding-left: 1.1rem;
}
.list-clean li{ margin: .35rem 0; }

/* Notice / Alert (fusion des doublons) */
.notice,
.alert{
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: var(--radius);
  padding: 1rem;
}

/* Table */
.table{
  width:100%;
  border-collapse: collapse;
  margin-top:.75rem;
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
}
.table th, .table td{
  padding:.75rem .85rem;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align: top;
}
.table th{
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  font-weight: 700;
}
.table tr:last-child td{ border-bottom:0; }

/* Details / FAQ */
details{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .85rem 1rem;
}
details + details{ margin-top: .75rem; }
summary{ cursor: pointer; font-weight: 700; }
summary::marker{ color: var(--primary); }
details p{ margin: .6rem 0 0; color: var(--muted); }

/* Tiles */
.tiles{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.tile{
  grid-column: span 3;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-decoration:none;
  color: var(--ink);
  box-shadow: none;
}
.tile:hover{
  background: color-mix(in srgb, var(--ink) 2%, var(--surface));
}
.tile strong{ display:block; margin-bottom:.25rem; }
.tile span{ color: var(--muted); font-size:.95rem; }

@media (max-width: 920px){
  .tile{ grid-column: span 6; }
}
@media (max-width: 560px){
  .tile{ grid-column: span 12; }
}

/* Hero split (badge internat) */
.hero-split{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.hero-text{ flex: 1; }
.hero-badge{ flex-shrink: 0; }
.hero-badge img{
  max-width: 140px;
  height: auto;
  opacity: .9;
}
@media (max-width: 720px){
  .hero-split{
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-badge{ display: none; }
}

/* Le conteneur d'injection ne doit pas "pousser" la page */
#header, #footer{
  min-height: 0;
}


/* Pas de “saut” pendant l’injection */
html.is-loading body{
  visibility: hidden;
}

html.is-ready body{
  opacity: 1;
  transition: opacity .12s ease;
}

main{
  padding-top: 4rem; /* ajuste à 0.75rem / 1.25rem si tu veux */
}

/* Sur la page d'accueil : réduit l'écart entre slider et hero */
.home-slider + main .hero{
  padding-top: 0 !important;
}

.home-slider{
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* si jamais le premier bloc a une marge par défaut */
.home-slider + main .hero-card{
  margin-top: 0 !important;
}

/* ===============================
   ACTUALITÉS (table + badge)
   Compatible avec /data/actus.html + #actus-content
================================ */

.table[aria-label*="Actualités"]{
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

/* Header du tableau un peu plus “propre” */
.table thead th{
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

/* Lignes plus lisibles */
.table tbody td{
  line-height: 1.45;
}

/* Alternance très légère */
.table tbody tr:nth-child(even) td{
  background: color-mix(in srgb, var(--ink) 2%, transparent);
}

/* Hover discret */
.table tbody tr:hover td{
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* Badge "Nouveau" */
.news-badge{
  display:inline-flex;
  align-items:center;
  margin-left: .5rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-size: .85rem;
  font-weight: 750;
  white-space: nowrap;
}

/* Optionnel : ligne "new" un poil mise en avant */
.news-row--new td{
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

/* Mobile : date + badge restent clean */
@media (max-width: 560px){
  .news-badge{
    margin-left: .35rem;
    font-size: .82rem;
  }
}

/* ===============================
   HOME ONLY — Cards “moins fades”
   (ne s’applique QUE sur index.html grâce à body.page-home)
================================ */

.page-home .card.card--home{
  padding: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 6px 18px rgba(2,3,6,.06);
}

/* Bandeau titre discret (bleu léger) */
.page-home .card.card--home > h2{
  margin: 0;
  padding: .95rem 1.05rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--primary) 10%, transparent),
    color-mix(in srgb, var(--primary-2) 5%, transparent)
  );
}

/* Le reste du contenu reprend un padding normal */
.page-home .card.card--home > *:not(h2){
  padding-left: 1.05rem;
  padding-right: 1.05rem;
}

.page-home .card.card--home > p,
.page-home .card.card--home > .help{
  margin: 0;
  padding-top: .85rem;
  padding-bottom: .85rem;
  color: var(--muted);
}

/* Si tu as un bouton dans une card (ex: lien “Voir …”) */
.page-home .card.card--home .btn{
  margin-top: .75rem;
}

/* Hover léger, officiel */
.page-home .card.card--home:hover{
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  box-shadow: 0 10px 26px rgba(2,3,6,.10);
  transform: translateY(-1px);
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}

