/* ORIENT'A NOU — design institutionnel premium */
:root {
  /* Couleurs Région Réunion */
  --bleu-profond: #003e7e;
  --bleu-clair: #0969da;
  --bleu-pale: #e7f1fb;
  --orange-soleil: #f77f00;
  --jaune-soleil: #fcbf49;
  --turquoise: #06a3a3;
  --rose: #d62976;
  --vert: #2d6a4f;

  /* Neutres */
  --bg: #f7f8fa;
  --bg-white: #ffffff;
  --fg: #1a1f29;
  --fg-soft: #2c333a;
  --muted: #57606a;
  --line: #d0d7de;
  --line-soft: #eaeef2;

  /* Sémantiques */
  --success: #1a7f37;
  --warning: #b15c00;
  --danger: #cf222e;

  /* Typo */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 8% 0%, rgba(9,105,218,0.08), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42rem);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bleu-clair); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================ HEADER */
header.site-top {
  background: linear-gradient(135deg, var(--bleu-profond) 0%, #002a5c 100%);
  color: white;
  padding: 14px 20px;
}
header.site-top .top-wrap {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* 🌟 UNIFICATION DU CONTENEUR LOGO PC / MOBILE */
header.site-top .brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 260px; /* Largeur confortable sur PC */
  height: 52px;
  text-decoration: none;
}

header.site-top .logo-wrapper {
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px; /* 4 magnifiques arrondis par défaut */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  width: 100%;
  height: 44px; /* Alignement sur la recherche PC */
  box-sizing: border-box;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

header.site-top .brand:hover .logo-wrapper {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header.site-top .logo-svg-bg {
  width: 100%;
  height: 100%;
  background-image: url('https://orientanou.devl-dev.fr/assets/img/logo-orient-a-nou.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain; /* Rendu proportionnel net sur PC */
}

header.site-top .brand .text { line-height: 1.1; }
header.site-top .brand .name { font-weight: 800; font-size: 17px; letter-spacing: 0; }
header.site-top .brand .tag { font-size: 11px; opacity: 0.9; margin-top: 2px; }
header.site-top .top-actions { font-size: 12.5px; opacity: 0.92; }
header.site-top .top-actions a { color: white; }

/* ============================================ NAVIGATION */
nav.site-nav {
  position: -webkit-sticky; /* Pour Safari */
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%; /* Important sur mobile */
  background: white;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
nav.site-nav .nav-wrap {
  max-width: 1280px; margin: 0 auto;
  display: flex; gap: 2px; overflow-x: auto;
  padding: 0 8px;
}
nav.site-nav a {
  padding: 14px 14px;
  font-size: 14px;
  color: var(--fg-soft);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
nav.site-nav a:hover { color: var(--bleu-profond); background: var(--bleu-pale); border-bottom-color: var(--bleu-clair); }
nav.site-nav a.active { color: var(--bleu-profond); border-bottom-color: var(--orange-soleil); font-weight: 600; }

/* ============================================ HERO */
.hero {
  background:
    linear-gradient(135deg, rgba(0,62,126,0.98) 0%, rgba(0,51,102,0.96) 54%, rgba(0,105,130,0.92) 100%),
    radial-gradient(circle at 84% 12%, rgba(252,191,73,0.28), transparent 24rem);
  color: white;
  padding: 72px 20px 84px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -5% -38% 38%;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(6,163,163,0.35) 0%, transparent 68%);
  opacity: 0.55; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.34), transparent 72%);
  pointer-events: none;
}
.hero .wrap { max-width: 1120px; margin: 0 auto; position: relative; z-index: 1; }
.hero .hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff; font-size: 12px; font-weight: 800;
  letter-spacing: 0; text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 12px; font-size: 68px; font-weight: 850; letter-spacing: 0; line-height: 0.98;
}
.hero h1 .accent { color: var(--jaune-soleil); }
.hero .subtitle { font-size: 26px; opacity: 0.98; margin: 0 0 10px; font-weight: 750; }
.hero .creole { font-size: 14px; opacity: 0.82; font-style: italic; margin: 0 0 26px; }
.hero .lead { font-size: 17px; line-height: 1.7; opacity: 0.95; max-width: 760px; margin: 0 0 30px; }
.hero .cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.hero .cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 750;
  text-decoration: none;
  transition: all 0.15s;
}
.hero .cta-primary { background: var(--orange-soleil); color: white; }
.hero .cta-primary:hover { background: #e07000; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(247,127,0,0.35); }
.hero .cta-secondary { background: rgba(255,255,255,0.15); color: white; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.3); }
.hero .cta-secondary:hover { background: rgba(255,255,255,0.25); }
.hero .cta-install {
  background: white; color: var(--bleu-profond);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.hero .cta-install:hover { background: #fff6e8; color: #002a5c; transform: translateY(-1px); text-decoration: none; }

/* Page header (smaller hero for inner pages) */
.page-header {
  background: linear-gradient(135deg, var(--bleu-profond) 0%, #002a5c 100%);
  color: white;
  padding: 36px 20px 28px;
}
.page-header .wrap { max-width: 1280px; margin: 0 auto; }
.page-header .breadcrumb { font-size: 12.5px; opacity: 0.8; margin-bottom: 8px; }
.page-header .breadcrumb a { color: white; opacity: 0.8; }
.page-header .breadcrumb a:hover { opacity: 1; }
.page-header h1 { margin: 0 0 6px; font-size: 32px; font-weight: 800; letter-spacing: 0; }
.page-header .subtitle { margin: 0; font-size: 15px; opacity: 0.9; }

/* ============================================ MAIN */
main.site-main { max-width: 1240px; margin: 0 auto; padding: 42px 20px 64px; }
section.section { margin-bottom: 52px; }
section.section h2 {
  font-size: 28px; color: var(--bleu-profond); margin: 0 0 10px;
  font-weight: 800; letter-spacing: 0;
}
section.section h2 .ico { margin-right: 8px; }
section.section .sec-intro { font-size: 15.5px; line-height: 1.65; color: var(--fg-soft); max-width: 860px; margin: 0 0 26px; }

/* ============================================ CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: stretch; }
.page-accueil .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-guide {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,45,96,0.07);
  border: 1px solid rgba(0,62,126,0.13);
  display: flex; flex-direction: column;
  min-height: 100%;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card-guide:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(0,45,96,0.14); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.card-guide .card-header {
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, var(--bleu-clair)));
  color: white;
}
.card-guide .card-header .audience {
  display: inline-block; background: rgba(255,255,255,0.22); padding: 3px 10px;
  border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0;
  text-transform: uppercase; margin-bottom: 10px;
}
.card-guide .card-header h3 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; }
.card-guide .card-body { padding: 18px 24px 22px; flex: 1; display: flex; flex-direction: column; }
.card-guide .card-body p { font-size: 14px; line-height: 1.55; color: var(--fg-soft); margin: 0 0 16px; flex: 1; }
.card-guide .card-actions { display: flex; flex-direction: column; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 7px;
  font-size: 13.5px; font-weight: 750; text-decoration: none;
  transition: all 0.15s; border: none; cursor: pointer;
}
.btn-primary { background: var(--bleu-profond); color: white; }
.btn-primary:hover { background: #002a5c; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,62,126,0.22); text-decoration: none; }
.btn-secondary { background: var(--bleu-pale); color: var(--bleu-profond); }
.btn-secondary:hover { background: #d0e3f7; }
.btn-orange { background: var(--orange-soleil); color: white; }
.btn-orange:hover { background: #e07000; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(247,127,0,0.22); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--bleu-profond); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bleu-pale); border-color: var(--bleu-clair); text-decoration: none; }

/* ============================================ FORMS / FILTERS */
.search-bar {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.search-bar input[type="text"] {
  width: 100%; border: none; outline: none;
  font-size: 16px; padding: 6px 0;
}
.filter-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 10px;
}
.filter-row select, .filter-row input {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13.5px; background: white;
}
.filter-row .count { margin-left: auto; color: var(--muted); font-size: 13px; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 13px; border: 1px solid rgba(0,62,126,0.16); border-radius: 999px;
  background: white; font-size: 12.5px; font-weight: 650; cursor: pointer; user-select: none;
  transition: all 0.12s;
  box-shadow: 0 4px 12px rgba(0,45,96,0.04);
}
.pill:hover { background: var(--bleu-pale); border-color: var(--bleu-clair); text-decoration: none; }
.pill.active { background: var(--bleu-profond); color: white; border-color: var(--bleu-profond); }

/* ============================================ PROFILES (Je suis...) */
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 18px; }
.profile {
  background: white; border: 1px solid rgba(0,62,126,0.14); border-radius: 10px;
  padding: 18px 16px; text-align: left; cursor: pointer;
  text-decoration: none; color: var(--fg);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: 132px;
}
.profile:hover { border-color: var(--bleu-clair); box-shadow: 0 12px 24px rgba(9,105,218,0.12); transform: translateY(-2px); text-decoration: none; }
.profile .ico {
  width: 42px; height: 42px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--bleu-pale);
  font-size: 24px;
}
.profile .label { font-size: 14px; font-weight: 800; color: var(--bleu-profond); line-height: 1.25; }
.profile span { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }

/* ============================================ AIDES */
.aides-categories { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.aide-card {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; transition: box-shadow 0.15s;
}
.aide-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.aide-card .head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.aide-card .ico {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, var(--bleu-pale), white);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.aide-card .head h3 { margin: 0; font-size: 17px; color: var(--bleu-profond); }
.aide-card .head .cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0; font-weight: 600; }
.aide-card .montant {
  display: inline-block; background: var(--orange-soleil); color: white;
  padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  margin-bottom: 12px;
}
.aide-card dl { margin: 0; font-size: 13.5px; line-height: 1.55; }
.aide-card dt { font-weight: 600; color: var(--fg); margin-top: 10px; }
.aide-card dd { margin: 2px 0 0; color: var(--fg-soft); }
.aide-card .actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================ ACTORS */
.acteur-card {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; transition: all 0.15s;
}
.acteur-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.acteur-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.acteur-card .ico { font-size: 28px; }
.acteur-card h3 { margin: 0; font-size: 16px; color: var(--bleu-profond); }
.acteur-card .role { font-size: 13.5px; line-height: 1.5; color: var(--fg-soft); margin: 6px 0; }
.acteur-card .meta-line { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.acteur-card .meta-line strong { color: var(--fg); }

/* ============================================ TIMELINE / CALENDRIER */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(to bottom, var(--bleu-profond), var(--turquoise));
}
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before {
  content: ""; position: absolute; left: -25px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: white; border: 3px solid var(--bleu-profond);
}
.timeline-item.cat-info::before { border-color: var(--bleu-clair); }
.timeline-item.cat-decouverte::before { border-color: var(--turquoise); }
.timeline-item.cat-voeux::before { border-color: var(--orange-soleil); }
.timeline-item.cat-decision::before { border-color: var(--rose); }
.timeline-item.cat-examen::before { border-color: var(--danger); }
.timeline-item.cat-resultat::before { border-color: var(--success); }
.timeline-item.cat-inscription::before { border-color: var(--vert); }
.timeline-item.cat-rentree::before { border-color: var(--jaune-soleil); }
.timeline-item.cat-candidature::before { border-color: var(--turquoise); }
.timeline-item .date { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0; }
.timeline-item .event { font-size: 14.5px; color: var(--fg); margin-top: 2px; }

/* ============================================ FOOTER */
footer.site-foot {
  background: var(--bleu-profond); color: white;
  padding: 36px 20px 24px;
  margin-top: 48px;
}
footer.site-foot .wrap {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
@media (max-width: 720px) {
  footer.site-foot .wrap { grid-template-columns: 1fr; }
} 
footer.site-foot h4 { margin: 0 0 12px; font-size: 14px; color: var(--jaune-soleil); }
footer.site-foot ul { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
footer.site-foot li { margin-bottom: 6px; }
footer.site-foot a { color: rgba(255,255,255,0.85); }
footer.site-foot a:hover { color: var(--jaune-soleil); }
footer.site-foot .credit { font-size: 12px; opacity: 0.7; margin-top: 8px; line-height: 1.5; }
footer.site-foot .bottom {
  max-width: 1280px; margin: 24px auto 0; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px; opacity: 0.7; text-align: center;
}

/* ============================================ FORMATIONS / MAP (sous-sites guides) */
.formations-layout { display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
@media (max-width: 980px) { .formations-layout { grid-template-columns: 1fr; } #map-aside { order: -1; } }
#map { width: 100%; height: 460px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
#map-aside { position: sticky; top: 60px; align-self: start; }
.formations-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.f-card {
  background: white; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; cursor: pointer; transition: all 0.15s;
}
.f-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-1px); }
.f-card.hidden { display: none; }
.f-card h4 { margin: 0 0 4px; font-size: 14.5px; line-height: 1.3; }
.f-card .badges { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  letter-spacing: 0;
}
.badge.niv-CAP, .badge.niv-Bac-Pro { background: #fff8c5; color: var(--warning); }
.badge.niv-Bac-Techno { background: #f1e7ff; color: #6f42c1; }
.badge.niv-Bac-General, .badge.niv-Bac { background: var(--bleu-pale); color: var(--bleu-profond); }
.badge.niv-Seconde { background: var(--line-soft); color: var(--muted); }
.badge.niv-BTS, .badge.niv-BUT, .badge.niv-Licence, .badge.niv-Bac-2, .badge.niv-Bac-3, .badge.niv-Bac-5 { background: #ffebe9; color: var(--danger); }
.badge.voie { background: var(--line-soft); color: var(--muted); }
.f-card .desc { font-size: 12.5px; color: var(--fg-soft); margin: 6px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.f-card .meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.f-card .sites-count { color: var(--bleu-clair); font-weight: 600; }
.formation-card-link {
  display: inline-flex; margin-top: 10px;
  color: var(--bleu-clair); font-size: 12.5px; font-weight: 700;
  text-decoration: none;
}
.formation-card-link:hover { text-decoration: underline; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; z-index: 200; }
.modal-bg.open { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: white; border-radius: 14px; max-width: 720px; width: 100%; max-height: 88vh;
  overflow-y: auto; padding: 24px 26px; box-shadow: 0 16px 48px rgba(0,0,0,0.25); position: relative; }
.modal h2 { margin: 0 0 6px; font-size: 22px; color: var(--bleu-profond); line-height: 1.25; }
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: white; border: 1px solid var(--line);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 24px;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg); font-family: Arial, Helvetica, sans-serif;
}
.modal .desc-full { font-size: 14px; line-height: 1.55; margin: 14px 0; }
.modal .sites-list h4 { margin: 18px 0 8px; font-size: 14px; }
.formation-modal-map-block h4 { margin: 18px 0 8px; font-size: 14px; }
.formation-modal-map {
  height: 280px; width: 100%;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--line-soft);
}
.modal .site-item {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 8px; font-size: 13px;
}
.modal .site-item .name { font-weight: 600; }
.modal .meta-line { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* Editorial blocks */
.editorial {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 24px 26px; font-size: 14.5px; line-height: 1.65; color: var(--fg-soft);
}
.editorial p { margin: 0 0 12px; }
.editorial p:last-child { margin: 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.info-box {
  background: white; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px;
}
.info-box h4 { margin: 0 0 8px; font-size: 15px; color: var(--bleu-profond); }
.info-box p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; color: var(--fg-soft); }

/* Stats banner */
.stats-banner {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin-top: 24px; padding: 14px;
  background: rgba(255,255,255,0.12); backdrop-filter: blur(10px);
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
  max-width: 820px;
}
.stats-banner .stat {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
}
.stats-banner .stat b { font-size: 24px; font-weight: 850; display: block; color: var(--jaune-soleil); line-height: 1; }
.stats-banner .stat span { font-size: 12px; opacity: 0.94; line-height: 1.3; display: block; margin-top: 6px; }

/* ============================================ ACCESSIBILITY */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  padding: 8px 14px; background: var(--bleu-profond); color: white;
  border-radius: 0 0 8px 0; font-size: 14px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ============================================ REGION MARK (historique) */
header.site-top .region-mark { font-size: 12.5px; opacity: 0.9; }

/* ============================================ MOBILE NAV (HAMBURGER) */
nav.site-nav .nav-toggle {
  display: none; /* Masqué sur desktop */
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--bleu-profond);
  cursor: pointer;
}

.burger-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

nav.site-nav .nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bleu-profond);
}

@media (max-width: 860px) {
  nav.site-nav .nav-toggle {
    display: flex; /* Affiché uniquement sur mobile */
  }
  nav.site-nav .nav-wrap {
    display: none;
    flex-direction: column;
    padding: 8px 0 12px;
  }
  nav.site-nav.open .nav-wrap {
    display: flex;
  }
  nav.site-nav a {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line-soft);
  }
  nav.site-nav a.active {
    border-left: 3px solid var(--orange-soleil);
    border-bottom-color: var(--line-soft);
    padding-left: 15px;
  }
}

/* ============================================ ALERT BANNERS */
.alert {
  padding: 14px 18px; border-radius: 10px; margin-bottom: 18px;
  font-size: 13.5px; line-height: 1.55;
}
.alert-info {
  background: var(--bleu-pale); color: var(--bleu-profond);
  border-left: 4px solid var(--bleu-clair);
}
.alert-info strong { color: var(--bleu-profond); }
.alert a { font-weight: 600; }

/* ============================================ CARDS WITH COVERS */
.card-guide .card-cover {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white), var(--accent-dark, var(--bleu-profond))),
    radial-gradient(circle at 70% 15%, rgba(255,255,255,0.26), transparent 12rem);
  padding: 24px 24px 0;
  display: flex; align-items: flex-end; justify-content: center;
  min-height: 226px;
}
.card-guide .card-cover img {
  width: 100%; max-width: 205px; height: 190px;
  object-fit: contain; object-position: bottom center;
  border-radius: 7px 7px 0 0;
  box-shadow: 0 -7px 22px rgba(0,0,0,0.2);
  display: block;
  background: rgba(255,255,255,0.08);
}
.card-guide .card-body { padding: 18px 22px 20px; flex: 1; display: flex; flex-direction: column; }
.card-guide .card-body .audience {
  display: inline-block; align-self: flex-start;
  background: color-mix(in srgb, var(--accent) 14%, white);
  color: var(--accent); font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; letter-spacing: 0; text-transform: uppercase; margin-bottom: 10px;
}
.resource-kind {
  align-self: flex-start;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.card-guide .card-body h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.22; color: var(--fg); }
.card-guide .card-body p { font-size: 13.8px; line-height: 1.58; color: var(--fg-soft); margin: 0 0 18px; flex: 1; }
.card-guide .card-actions { display: flex; flex-direction: column; gap: 8px; }

/* GUIDE INTRO (cover side-by-side with mot d'accueil) */
.guide-intro-row { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: flex-start; }
@media (max-width: 720px) {
  .guide-intro-row { grid-template-columns: 1fr; }
  .guide-intro-row .guide-cover { max-width: 200px; margin: 0 auto; }
}
.guide-cover {
  width: 100%; height: auto; border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  display: block;
}
.editorial .signed { font-style: italic; color: var(--muted); margin-top: 14px; font-size: 13px; }

/* ============================================ ELIGIBILITY BOX */
.elig-box {
  background: var(--bleu-pale);
  border-left: 4px solid var(--bleu-clair);
  padding: 14px 18px; border-radius: 8px;
  font-size: 14px; line-height: 1.55;
}
.elig-box p { margin: 0; }

/* Aides categories pills */
.aides-categories button.pill { font-family: var(--font-sans); }

/* ============================================ HERO SEARCH (on homepage) */
.hero-search {
  display: flex; gap: 10px; flex-wrap: wrap;
  background: white; border-radius: 12px;
  padding: 8px;
  margin: 0 0 18px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.2);
  max-width: 720px;
  border: 1px solid rgba(255,255,255,0.5);
}
.hero-search input {
  flex: 1; min-width: 200px;
  border: none; outline: none; padding: 10px 12px;
  font-size: 15px; color: var(--fg);
}
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(252,191,73,0.35), 0 16px 36px rgba(0,0,0,0.2); }
.hero-search button { white-space: nowrap; padding: 10px 18px; }

@media (max-width: 980px) {
  .page-accueil .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .hero { padding: 48px 18px 58px; }
  .hero .wrap,
  main.site-main,
  section.section { width: 100%; max-width: 100%; }
  .hero .subtitle,
  .hero .creole,
  .hero .lead,
  .hero-search,
  .hero .cta-row,
  .stats-banner,
  section.section h2,
  section.section .sec-intro {
    max-width: 354px;
    overflow-wrap: break-word;
  }
  .hero h1 { font-size: 38px; line-height: 1.04; overflow-wrap: anywhere; }
  .hero .subtitle { font-size: 19px; line-height: 1.28; }
  .hero .creole { font-size: 13px; }
  .hero .lead { font-size: 15.5px; }
  .hero-search { display: grid; grid-template-columns: 1fr; width: 100%; max-width: 100%; }
  .hero-search input { min-width: 0; }
  .hero-search button { width: 100%; }
  .hero .cta { width: 100%; justify-content: center; }
  .stats-banner { grid-template-columns: 1fr; }
  .page-accueil .cards-grid { grid-template-columns: 1fr; gap: 18px; }
  main.site-main { padding: 34px 16px 54px; }
  section.section h2 { font-size: 24px; }
}

/* ============================================ SEARCH HERO (réutilisable) */
.search-hero {
  background: linear-gradient(135deg, var(--bleu-pale), white);
  border-radius: 14px; padding: 28px 28px;
  border: 1px solid var(--line);
}
.search-hero h2 { font-size: 22px; color: var(--bleu-profond); }
.search-hero .search-hero-help { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.search-hero .search-hero-input {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 2px solid var(--bleu-clair); border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(9,105,218,0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-hero .search-hero-input:focus-within {
  border-color: var(--bleu-profond);
  box-shadow: 0 4px 22px rgba(0,62,126,0.18);
}
.search-hero .sh-icon { color: var(--bleu-clair); display: flex; align-items: center; }
.search-hero input {
  flex: 1; border: none; outline: none;
  font-size: 16px; padding: 6px 0; background: transparent;
  color: var(--fg);
}
.search-hero .search-hero-example {
  font-size: 12.5px; color: var(--muted); margin: 12px 0 0;
}
.search-hero .search-hero-example b { color: var(--fg); }
.search-feedback {
  margin-top: 14px; padding: 10px 14px;
  background: white; border-left: 4px solid var(--orange-soleil);
  border-radius: 8px; font-size: 13.5px;
}
.search-feedback .results-count { font-weight: 700; color: var(--bleu-profond); }
.search-feedback .clear-search {
  margin-left: 8px; font-size: 12px; color: var(--bleu-clair);
  text-decoration: underline; cursor: pointer; background: none; border: none; padding: 0;
}

/* ============================================ GUIDE SUBNAV (sticky tabs inside a guide page) */
nav.guide-subnav {
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 51px; /* below site-nav */
  z-index: 90;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
nav.guide-subnav { display: flex; max-width: 1280px; margin: 0 auto; padding: 0 12px; gap: 4px; overflow-x: auto; }
nav.guide-subnav a {
  padding: 12px 14px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: all 0.15s;
}
nav.guide-subnav a:hover { color: var(--bleu-profond); background: var(--bleu-pale); }
nav.guide-subnav a.active { color: var(--bleu-profond); border-bottom-color: var(--orange-soleil); font-weight: 600; }

/* ============================================ TOC OF SECTIONS (on guide main pages) */
.sections-toc {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px; margin-top: 16px;
}
.section-card {
  display: flex; align-items: center; gap: 14px;
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; text-decoration: none; color: var(--fg);
  transition: all 0.18s;
}
.section-card:hover {
  border-color: var(--bleu-clair); box-shadow: 0 6px 22px rgba(9,105,218,0.12);
  transform: translateY(-2px); text-decoration: none;
}
.section-card-icon {
  font-size: 32px; flex-shrink: 0; line-height: 1;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--bleu-pale); border-radius: 10px;
}
.section-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--bleu-profond); }
.section-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.section-card-arrow { color: var(--muted); font-size: 22px; flex-shrink: 0; }
.section-card:hover .section-card-arrow { color: var(--bleu-clair); transform: translateX(3px); }

/* ============================================ SECTION DETAIL PAGE */
.page-guide-section .page-header { padding: 32px 20px 28px; }
.page-guide-section .page-header h1 { font-size: 30px; }
.page-guide-section .page-header .subtitle { font-size: 15px; }

.section-page-intro .lead {
  font-size: 17px; line-height: 1.65; color: var(--fg-soft);
  background: var(--bleu-pale); padding: 18px 24px;
  border-left: 4px solid var(--bleu-clair); border-radius: 8px;
}

.section-page-content { margin-top: 28px; }
.section-page-content .sec-block {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 26px; margin-bottom: 18px;
}
.section-page-content .sec-block h3 {
  margin: 0 0 14px; font-size: 19px; color: var(--bleu-profond);
  padding-bottom: 10px; border-bottom: 2px solid var(--bleu-pale);
}
.section-page-content .sec-block-body { font-size: 14.5px; line-height: 1.65; color: var(--fg-soft); }
.section-page-content .sec-block-body p { margin: 0 0 12px; }
.section-page-content .sec-block-body p:last-child { margin: 0; }
.section-page-content .sec-block-body ul { margin: 0 0 12px; padding-left: 22px; }
.section-page-content .sec-block-body li { margin-bottom: 6px; }
.section-page-content .sec-block-body b { color: var(--fg); }
.section-page-content .sec-block-body a { font-weight: 500; }

.section-page-cta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--line);
}

/* "Voir aussi" */
.voir-aussi { margin-top: 32px; padding-top: 28px; border-top: 2px solid var(--line-soft); }
.voir-aussi h3 { font-size: 15px; color: var(--bleu-profond); margin: 0 0 14px;
  text-transform: uppercase; letter-spacing: 0; }
.voir-aussi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.section-card-mini {
  display: flex; align-items: center; gap: 10px;
  background: white; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; text-decoration: none; color: var(--fg);
  font-size: 13.5px; font-weight: 500;
  transition: all 0.15s;
}
.section-card-mini:hover {
  border-color: var(--bleu-clair); background: var(--bleu-pale); text-decoration: none;
}
.section-card-mini .section-card-icon {
  font-size: 18px; width: auto; height: auto; background: none; padding: 0;
}

/* ============================================ CATEGORIZED TOC PAGE (/<guide>/guide/) */
.toc-cat {
  background: white; border-radius: 14px;
  border: 1px solid var(--line); margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.toc-cat-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cat-color) 12%, white), white 70%);
  border-bottom: 1px solid var(--line);
}
.toc-cat-icon {
  width: 48px; height: 48px;
  background: var(--cat-color); color: white;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.toc-cat-head h2 {
  margin: 0; font-size: 20px; color: var(--cat-color);
  font-weight: 700; letter-spacing: 0;
}
.toc-cat-chapters { display: flex; flex-direction: column; }

.chapter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.12s;
}
.chapter-row:last-child { border-bottom: 0; }
.chapter-row:hover {
  background: color-mix(in srgb, var(--cat-color) 6%, white);
}
.chapter-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 14px 0 14px 24px;
  text-decoration: none;
  color: var(--fg);
}
.chapter-row-main:hover {
  text-decoration: none;
}
.chapter-row .ch-title {
  font-size: 14.5px; font-weight: 500; color: var(--fg);
  line-height: 1.45;
  min-width: 0;
  padding-top: 1px;
}
.chapter-row .ch-meta {
  display: inline-flex; align-items: center; gap: 12px;
  flex-shrink: 0; flex-wrap: nowrap;
}
.chapter-row .ch-page {
  font-size: 12.5px; color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0;
  white-space: nowrap;
  min-width: 56px; text-align: right;
}
.chapter-row .ch-arrow {
  color: var(--cat-color); opacity: 0.5;
  font-size: 16px; transition: transform 0.12s, opacity 0.12s;
  display: inline-flex; align-items: center;
}
.chapter-row:hover .ch-arrow { opacity: 1; transform: translateX(3px); }

.ch-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  text-decoration: none;
  white-space: nowrap; line-height: 1;
}
.chapter-row > .ch-badge { margin-right: 24px; }
.ch-badge-catalogue { background: var(--orange-soleil); color: white; }
.ch-badge-catalogue:hover { background: #e07000; text-decoration: none; }

@media (max-width: 600px) {
  .chapter-row { grid-template-columns: 1fr; gap: 0; }
  .chapter-row-main { grid-template-columns: 1fr; gap: 8px; padding: 14px 18px 8px; }
  .chapter-row .ch-meta { width: 100%; justify-content: space-between; }
  .chapter-row .ch-arrow { display: none; }
  .chapter-row > .ch-badge { justify-self: start; margin: 0 18px 14px; }
}

/* ============================================ STUB PAGES */
.stub-notice {
  background: linear-gradient(135deg, #fff8e6, white);
  border: 1px solid #fcbf49;
  border-left: 5px solid var(--orange-soleil);
  border-radius: 12px;
  padding: 24px 28px;
}
.stub-notice h2 { color: var(--orange-soleil); }
.stub-notice p { font-size: 14.5px; line-height: 1.65; color: var(--fg-soft); }
.stub-notice ul { font-size: 14px; line-height: 1.7; color: var(--fg-soft); padding-left: 22px; margin: 12px 0; }

/* ============================================ HERO IMAGES (extracted from InDesign) */
.section-hero-img {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0 0 8px;
  border-radius: 0;
  position: relative;
  box-shadow: inset 0 -100px 80px -40px rgba(0,0,0,0.35);
}
@media (max-width: 720px) {
  .section-hero-img { height: 200px; }
}

.page-guide-section main.site-main,
.page-guide-stub main.site-main {
  padding-top: 0;
}
.page-guide-section .section-hero-img,
.page-guide-stub .section-hero-img {
  margin-top: -1px; /* tight to header */
  margin-bottom: 28px;
}

/* ============================================ PRÉSIDENTE BLOCK */
.presidente-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
  padding: 28px;
  background: linear-gradient(135deg, var(--bleu-pale), white);
  border: 1px solid var(--line);
  border-radius: 14px;
}
@media (max-width: 720px) {
  .presidente-block { grid-template-columns: 1fr; text-align: center; }
}
.presidente-portrait {
  width: 100%; height: auto; max-width: 200px;
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18);
  margin: 0 auto;
  display: block;
}
.presidente-text .lead {
  font-size: 17px; font-weight: 500;
  line-height: 1.55; color: var(--bleu-profond);
  margin: 0 0 10px;
}
.presidente-text p { font-size: 14.5px; line-height: 1.6; color: var(--fg-soft); margin: 0 0 10px; }

/* ============================================ TYPOGRAPHY IMPROVEMENTS */
body { font-feature-settings: "kern", "liga", "ss01"; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { letter-spacing: 0; }
h1 { letter-spacing: 0; }
.editorial p, .sec-block-body p { hyphens: auto; -webkit-hyphens: auto; }

/* ============================================ FORMATION DETAIL PAGES */
.page-formation-detail .page-header h1,
.page-etab-detail .page-header h1 {
  font-size: 26px; line-height: 1.25;
}
.site-detail-card {
  background: white; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px;
}
.site-detail-card h3 {
  margin: 0 0 6px; font-size: 16px; color: var(--bleu-profond);
}
.site-detail-card h3 a { color: inherit; text-decoration: none; }
.site-detail-card h3 a:hover { text-decoration: underline; color: var(--bleu-clair); }
.formation-detail-map {
  height: 420px; width: 100%;
  border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--line-soft);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
@media (max-width: 700px) {
  .formation-detail-map { height: 320px; }
}

/* ============================================ INSTALL APP PAGE */
.install-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center; gap: 28px;
}
.install-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px;
}
.pwa-install-button[hidden] { display: none; }
.install-phone {
  justify-self: center;
  width: 210px; height: 380px; border-radius: 28px;
  padding: 18px; background: #111827;
  box-shadow: 0 20px 42px rgba(0,0,0,0.22);
}
.install-phone-screen {
  height: 100%; border-radius: 20px;
  background: linear-gradient(180deg, #f7fbff 0%, #e7f1fb 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; color: var(--bleu-profond);
  padding: 20px;
}
.install-phone-screen img {
  width: 86px; height: 86px; border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0,62,126,0.25);
}
.install-phone-screen strong { font-size: 18px; }
.install-phone-screen span { color: var(--muted); font-size: 12px; }
.install-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.install-step {
  background: white; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px;
}
.install-step b { color: var(--bleu-profond); display: block; margin-bottom: 6px; }
.install-step p { margin: 0; font-size: 14px; color: var(--fg-soft); }
@media (max-width: 820px) {
  .install-hero { grid-template-columns: 1fr; }
  .install-phone { width: 180px; height: 320px; }
  .install-steps { grid-template-columns: 1fr; }
}

.formations-by-niv .niv-block {
  background: white; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 14px;
}
.formations-by-niv .niv-block h3 {
  margin: 0 0 10px; font-size: 16px; color: var(--bleu-profond);
  display: flex; align-items: center; gap: 8px;
}
.formations-by-niv .niv-block ul {
  list-style: none; padding: 0; margin: 0;
}
.formations-by-niv .niv-block li {
  padding: 6px 0; font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.formations-by-niv .niv-block li:last-child { border-bottom: 0; }
.formations-by-niv .niv-block li a {
  color: var(--fg); text-decoration: none;
}
.formations-by-niv .niv-block li a:hover { color: var(--bleu-clair); text-decoration: underline; }

/* ============================================ GUIDE READER */
.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;
}

.reader-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--reader-accent) 14%, white), white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.reader-promo-kicker {
  color: var(--reader-accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.reader-promo h2 { margin: 0 0 8px; }
.reader-promo p { color: var(--fg-soft); margin: 0 0 16px; max-width: 760px; }
.reader-promo .guide-cover { max-width: 160px; justify-self: center; }
.reader-promo-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.page-guide-reader .site-foot { margin-top: 0; }
.guide-reader {
  background: #eef2f6;
  max-width: none;
  min-height: calc(100vh - 220px);
  padding: 0;
}
.reader-toolbar {
  position: sticky;
  top: 47px;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}
.reader-toolbar-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.reader-tool,
.reader-tool-link,
.reader-icon-tool {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--fg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 11px;
  text-decoration: none;
}
.reader-icon-tool {
  width: 34px;
  padding: 0;
  font-size: 18px;
}
.reader-tool:hover,
.reader-tool-link:hover,
.reader-icon-tool:hover {
  background: var(--bleu-pale);
  border-color: var(--bleu-clair);
  text-decoration: none;
}
.reader-tool:disabled,
.reader-icon-tool:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.reader-tool[aria-pressed="true"] {
  background: var(--reader-accent);
  border-color: var(--reader-accent);
  color: white;
}
.reader-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.reader-page-jump input {
  width: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: center;
}
.reader-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 260px);
}
.reader-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 14px;
  position: sticky;
  top: 104px;
}
.reader-panel {
  border-bottom: 1px solid var(--line-soft);
  padding: 0 0 16px;
  margin-bottom: 16px;
}
.reader-panel h2 {
  color: var(--bleu-profond);
  font-size: 15px;
  margin: 0 0 10px;
}
.reader-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  padding: 9px 10px;
}
.reader-muted {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}
.reader-results,
.reader-toc {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.reader-result,
.reader-toc-row {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  text-align: left;
}
.reader-result:hover,
.reader-toc-row:hover {
  border-color: var(--bleu-clair);
  background: var(--bleu-pale);
}
.reader-result-page,
.reader-toc-page {
  color: var(--bleu-clair);
  font-size: 11px;
  font-weight: 800;
}
.reader-toc-cat {
  color: var(--toc-color);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.reader-toc-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
.reader-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.reader-thumb {
  border: 2px solid transparent;
  border-radius: 7px;
  background: white;
  cursor: pointer;
  padding: 4px;
  position: relative;
}
.reader-thumb img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.reader-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0,0,0,0.72);
  border-radius: 999px;
  color: white;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 6px;
}
.reader-thumb.active {
  border-color: var(--reader-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--reader-accent) 22%, white);
}
.reader-stage {
  min-width: 0;
  overflow: auto;
  padding: 24px;
}
.reader-spread {
  --reader-zoom: 1;
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 0 auto;
  min-width: min-content;
}
.reader-page {
  margin: 0;
  width: calc(620px * var(--reader-zoom));
  max-width: calc(100vw - 390px);
}
.reader-spread.is-two-page .reader-page {
  width: calc(520px * var(--reader-zoom));
}
.reader-page img {
  width: 100%;
  height: auto;
  background: white;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}
.reader-page figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  text-align: center;
}
.guide-reader button:focus-visible,
.guide-reader a:focus-visible,
.guide-reader input:focus-visible,
.reader-promo a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--orange-soleil) 75%, white);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .reader-layout { grid-template-columns: 1fr; }
  .reader-sidebar {
    max-height: none;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .reader-panel-thumbs { display: none; }
  .reader-stage { padding: 16px 10px 24px; }
  .reader-spread { min-width: 0; }
  .reader-page,
  .reader-spread.is-two-page .reader-page {
    width: min(calc(100vw - 28px), calc(640px * var(--reader-zoom)));
    max-width: none;
  }
  .reader-toolbar { top: 0; }
}

@media (max-width: 720px) {
  .reader-promo { grid-template-columns: 1fr; }
  .reader-promo .guide-cover { max-width: 130px; }
  .reader-toolbar { align-items: stretch; }
  .reader-toolbar-group { width: 100%; justify-content: center; }
  .reader-tool,
  .reader-tool-link { flex: 1 1 auto; }
  .reader-icon-tool { flex: 0 0 38px; }
  .reader-page-jump { flex: 0 0 auto; }
}

/* --- V2 SPA FORMATIONS --- */
.spa-formations-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.spa-map-column {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  z-index: 1;
}
.spa-filter-bar {
  background: var(--bg-white, #fff);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-top: -20px;
  position: relative;
  z-index: 10;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.spa-filter-select {
  flex: 1;
  min-width: 180px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  background-color: var(--bg-light, #f8f9fa);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

@media (min-width: 992px) {
  .spa-formations-layout {
    grid-template-columns: 1fr 450px;
  }
  .spa-map-column {
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    min-height: 500px;
  }
}

/* Spécifique formation-details.html */
.spa-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}
@media (min-width: 992px) {
  .spa-detail-layout {
    grid-template-columns: 1fr 380px;
  }
}
.spa-detail-block {
  background: var(--bg-white, #fff);
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.spa-detail-block h2 { margin-top: 0; font-size: 18px; border-bottom: 2px solid var(--bg-light); padding-bottom: 10px; margin-bottom: 16px; }
.spa-site-card {
  background: var(--bg-light); padding: 16px; border-radius: 6px; margin-bottom: 12px; border-left: 4px solid var(--bleu-profond);
}
.spa-site-card h3 { margin: 0 0 4px 0; font-size: 16px; }
  
/* ==========================================================================
   CATALOGUE SPA — DESIGN DES CARTES DE FORMATIONS PREMIUM
   ========================================================================== */
.card-formation-premium {
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--line-soft, #eaeef2);
  border-left: 4px solid var(--bleu-clair, #0969da);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-formation-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 52, 120, 0.06);
  border-color: var(--line, #d0d7de);
}

.card-premium-header {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.badge-premium-niveau {
  background: var(--bleu-pale, #e7f1fb);
  color: var(--bleu-profond, #003e7e);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-premium-count {
  background: #f1f3f5;
  color: var(--muted, #57606a);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.card-premium-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.card-premium-title a {
  color: var(--bleu-profond, #003e7e);
  text-decoration: none;
  transition: color 0.15s ease;
}

.card-premium-title a:hover {
  color: var(--bleu-clair, #0969da);
  text-decoration: underline;
}

.card-premium-body {
  font-size: 14px;
  border-top: 1px dashed var(--line-soft, #eaeef2);
  padding-top: 12px;
}

.card-body-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #57606a);
  margin-bottom: 8px;
  font-weight: 600;
}

.card-premium-sites-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-premium-sites-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--fg-soft, #2c333a);
  line-height: 1.4;
}

.card-site-icon { font-size: 13px; flex-shrink: 0; }
.card-site-name { font-weight: 500; }
.card-site-city { color: var(--muted, #57606a); font-size: 13px; }
.card-sites-more { font-size: 13px; color: var(--bleu-clair, #0969da); font-weight: 600; padding-top: 2px; }

.card-premium-footer {
  margin-top: auto;
  border-top: 1px solid var(--line-soft, #eaeef2);
  padding-top: 12px;
}

.card-premium-action-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted, #57606a);
 text-decoration: none;
  font-weight: 500;
}

.card-premium-action-link span {
  background: #f7f8fa;
  color: var(--bleu-clair, #0969da);
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  transition: background 0.15s ease, color 0.15s ease;
  border: 1px solid var(--line-soft, #eaeef2);
}

.card-formation-premium:hover .card-premium-action-link span {
  background: var(--bleu-clair, #0969da);
  color: var(--bg-white, #ffffff);
  border-color: var(--bleu-clair, #0969da);
}
.spa-site-card p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.4; }
 
/* ==========================================================================
   ENRICHISSEMENTS VISUELS DU CATALOGUE & DES FICHES DÉTAILS
   ========================================================================== */
.catalogue-counter-badge {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
  color: var(--bleu-profond);
  background: var(--bleu-pale);
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid var(--bleu-clair);
  display: inline-block;
}

.premium-block-shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
  border: 1px solid var(--line-soft);
}

.block-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--bleu-profond);
  margin-bottom: 16px;
  border-bottom: 2px solid var(--line-soft);
  padding-bottom: 8px;
}

.premium-etab-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-detail-card {
  background: #fafbfc;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 18px;
  transition: border-color 0.15s ease;
}

.site-detail-card:hover { border-color: var(--line); }

.site-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.site-card-header h4 { margin: 0; font-size: 16px; color: var(--fg); font-weight: 700; }

.pill-voie {
  background: #f1f3f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.site-card-meta { margin: 0 0 6px 0; font-size: 13px; color: var(--fg-soft); }
.site-card-link { margin: 10px 0 0 0; font-size: 13px; font-weight: 600; }
.site-card-link a { color: var(--bleu-clair); text-decoration: none; }
.site-card-link a:hover { text-decoration: underline; }

.map-sticky-container {
  position: sticky;
  top: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.map-header-bar {
  background: var(--bleu-profond);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}

.contextual-source-box {
  background: #fafbfc;
  border-left: 4px solid var(--orange-soleil);
}

/* ==========================================================================
   DASHBOARD DES GUIDES REGIONAUX — LOOK PREMIUM
   ========================================================================== */
.guide-action-box {
  background: var(--bg-white);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 24px;
  margin-top: 20px;
  box-shadow: 0 4px 20px rgba(0, 62, 126, 0.02);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-action-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.guide-action-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.guide-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 768px) { .guide-dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .guide-dashboard-grid { grid-template-columns: repeat(3, 1fr); } }

.guide-tile-card {
  background: var(--bg-white);
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--tile-color, var(--bleu-clair));
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.guide-tile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 52, 120, 0.06);
  border-color: var(--line);
  border-left-color: var(--tile-color);
}

.guide-tile-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }

.guide-tile-category {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--tile-color, var(--bleu-clair));
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.guide-tile-icon { font-size: 24px; opacity: 0.8; transition: transform 0.2s ease; }
.guide-tile-card:hover .guide-tile-icon { transform: scale(1.15) rotate(5deg); }
.guide-tile-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--bleu-profond); line-height: 1.4; }

.guide-tile-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line-soft);
  padding-top: 10px;
}

.guide-tile-page { font-weight: 600; background: #f1f3f5; padding: 2px 6px; border-radius: 4px; }
.guide-tile-action { font-weight: 700; color: var(--bleu-clair); }

/* ==========================================================================
   TIMELINE CHRONOLOGIQUE APPLICATIVE
   ========================================================================== */
.premium-timeline {
  position: relative;
  margin: 32px 0;
  padding-left: 24px;
  border-left: 3px solid var(--line-soft);
}

.premium-timeline-item { position: relative; margin-bottom: 28px; }
.premium-timeline-item:last-child { margin-bottom: 0; }

.premium-timeline-badge {
  position: absolute;
  left: -33px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 4px solid var(--timeline-color, var(--bleu-clair));
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg);
}

.premium-timeline-content {
  background: var(--bg-white);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.premium-timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.premium-timeline-date { font-weight: 700; font-size: 14px; color: var(--timeline-color, var(--bleu-profond)); }

.premium-timeline-tag {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
}

.premium-timeline-event { margin: 0; font-size: 15px; font-weight: 500; color: var(--fg); }

.timeline-color-decouverte { --timeline-color: var(--turquoise); }
.timeline-color-voeux { --timeline-color: var(--bleu-clair); }
.timeline-color-decision { --timeline-color: var(--orange-soleil); }
.timeline-color-examen { --timeline-color: var(--rose); }
.timeline-color-resultat { --timeline-color: var(--success); }
.timeline-color-inscription { --timeline-color: var(--bleu-profond); }

/* ==========================================================================
   CHARTE STRUCTURELLE ET RE-STYLAGE DES PAGES SIMPLES (MCO)
   ========================================================================== */
.editorial-container { display: flex; flex-direction: column; gap: 24px; }

.premium-block-shadow {
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--line-soft, #eaeef2);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
}

.block-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--bleu-profond);
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--line-soft);
  padding-bottom: 8px;
}

.premium-grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.premium-grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }

@media (min-width: 768px) {
  .premium-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .premium-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) { .premium-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.contextual-source-box {
  background: #fafbfc;
  border-left: 4px solid var(--orange-soleil);
  padding: 20px;
  border-radius: 4px;
}

/* ==========================================================================
   RÈGLES DÉDIÉES À LA PAGE AIDES (Barre de filtres & Cartes injectées)
   ========================================================================== */
.aides-categories {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 0 12px 0;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
  .aides-categories { justify-content: center; overflow-x: visible; white-space: normal; }
}

.aides-categories .pill {
  background: var(--bg-white, #ffffff);
  color: var(--fg-soft, #2c333a);
  border: 1px solid var(--line, #d0d7de);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.aides-categories .pill:hover { background: var(--bg, #f7f8fa); border-color: var(--muted); }

.aides-categories .pill.active {
  background: var(--bleu-profond, #003e7e);
  color: var(--bg-white, #ffffff);
  border-color: var(--bleu-profond);
  box-shadow: 0 2px 6px rgba(0, 62, 126, 0.15);
}

.aide-card {
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--line-soft, #eaeef2);
  border-top: 4px solid var(--bleu-clair, #0969da);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 52, 120, 0.05);
  border-color: var(--line, #d0d7de);
}

.aide-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--bleu-profond); }
.aide-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg-soft); }

.aide-card[data-cat="Mobilité"], .aide-card.cat-mobilité { border-top-color: var(--bleu-clair); }
.aide-card[data-cat="Hébergement"], .aide-card.cat-hébergement { border-top-color: #5a189a; }
.aide-card[data-cat="Supérieur"], .aide-card.cat-supérieur { border-top-color: var(--orange-soleil); }
.aide-card[data-cat="Lycée"], .aide-card.cat-lycée { border-top-color: var(--rose); }

.aide-card .actions {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   INTERFACES RESPONSIVES DES AIDES REGIONALES
   ========================================================================== */
.aides-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }

@media (min-width: 768px) { .aides-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .aides-grid { grid-template-columns: repeat(3, 1fr); } }

.aide-card .head { display: flex; gap: 12px; align-items: center; }
.aide-card .head .ico { font-size: 24px; background: var(--bg, #f7f8fa); padding: 6px; border-radius: 6px; }
.aide-card .head h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--bleu-profond); line-height: 1.3; }
.aide-card .desc { margin: 0; font-size: 14px; color: var(--fg-soft); line-height: 1.5; }

.aide-card .meta {
  margin: 0; padding-top: 12px; border-top: 1px dashed var(--line-soft);
  display: grid; grid-template-columns: 90px 1fr; gap: 8px 4px; font-size: 13px;
}
.aide-card .meta dt { font-weight: 700; color: var(--muted); }
.aide-card .meta dd { margin: 0; color: var(--fg); }
.aide-card .actions .btn { flex: 1; padding: 10px 12px; font-size: 13px; font-weight: 600; text-align: center; border-radius: 6px; cursor: pointer; text-decoration: none; }

.btn-orange { background: var(--orange-soleil); color: white; border: none; }
.btn-orange:hover { background: #e07300; }

/* ==========================================================================
   CORRECTIFS DE CONFORTS RESPONSIVES MOBILES TRÈS HAUTE DENSITÉ
   ========================================================================== */
input[type="text"], select { font-size: 16px !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 576px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .page-header { padding: 24px 0; }
  .page-header h1 { font-size: 24px !important; }
}

/* ==========================================================================
   MCO V3 : COMPOSANTS DYNAMIQUES (PILLS & SPINNER)
   ========================================================================== */
.niveau-pill {
  cursor: pointer; padding: 6px 14px; background: #f0f2f5; color: var(--fg-soft); border-radius: 20px;
  font-size: 13px; font-weight: 500; border: 1px solid var(--line-soft); transition: all 0.2s ease-in-out; user-select: none;
}
.niveau-pill:hover { background: #e4e6eb; border-color: var(--line); }
.niveau-pill.active {
  background: var(--bleu-profond) !important; color: white !important; font-weight: 600 !important;
  border-color: var(--bleu-profond) !important; box-shadow: 0 2px 6px rgba(0, 62, 126, 0.15);
}

.loading-spinner {
  padding: 40px 20px; text-align: center; color: var(--bleu-profond); font-weight: 600; font-size: 15px;
  width: 100%; background: white; border-radius: 8px; border: 1px solid var(--line-soft);
}

/* ==========================================================================
   STABILISATION ET NETTETÉ DU LOGO SUR PC (VERTICAL / HORIZONTAL)
   ========================================================================== */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 260px;
  height: 52px;
  text-decoration: none;
}

.logo-wrapper {
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  width: 100%;
  height: 44px;
  box-sizing: border-box;
}

/* RECHERCHE GLOBALE SÉCURISÉE */
.global-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 12px;
  flex-grow: 1;
  max-width: 500px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  z-index: 5;
}

.global-search input {
  flex: 1 !important;
  min-width: 0 !important;
  width: auto !important;
}

.global-search .gs-submit {
  flex-shrink: 0 !important;
  margin-left: 8px;
}

/* ==========================================================================
   RÉSOLUTION MOBILE ULTIME : FOCUS TEXTE ENTIER (PORTRAIT)
   ========================================================================== */
@media (max-width: 576px) and (orientation: portrait) {
  .top-wrap {
    flex-direction: column !important;
    align-items: center !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .brand {
    width: 320px !important;
    min-width: 320px !important;
    height: 46px !important;
    margin: 0 auto !important;
    display: flex !important;
    visibility: visible !important;
  }

  .logo-wrapper {
    width: 100% !important;
    height: 100% !important;
    padding: 4px 4px !important; 
    border-radius: 8px !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1) !important;
  }

  .logo-svg-bg {
    width: 100% !important;
    height: 100% !important;
    background-image: url('https://orientanou.devl-dev.fr/assets/img/logo-orient-a-nou.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% auto !important; /* Force l'affichage horizontal total sans couper "union" */
  }

  .global-search {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    height: 42px !important;
  }
}

/* ==========================================================================
   BLINDAGE IPHONE À L'HORIZONTAL (MODE PAYSAGE / LANDSCAPE)
   ========================================================================== */
@media (max-width: 920px) and (orientation: landscape) {
  .top-wrap {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 16px !important;
    gap: 16px !important;
  }

  .brand {
    display: flex !important;
    visibility: visible !important;
    width: 230px !important;
    min-width: 230px !important;
    height: 40px !important;
    margin: 0 !important;
  }

  .logo-wrapper {
    display: flex !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
    padding: 4px 6px !important;
    background: #ffffff !important;
    border-radius: 6px !important;
  }

  .logo-svg-bg {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url('https://orientanou.devl-dev.fr/assets/img/logo-orient-a-nou.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% auto !important; 
  }

  .global-search {
    flex-grow: 1 !important;
    max-width: 450px !important;
    height: 38px !important;
  }
}
/* ==========================================================================
   BOUTON RETOUR EN HAUT (BACK TO TOP) - PREMIUM
   ========================================================================== */
.btn-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background-color: var(--orange-soleil); /* Couleur dynamique de ta charte */
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150; /* Passe au-dessus de la nav (100) mais sous la modal (200) */
  
  /* États initiaux pour l'animation d'apparition */
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.25s ease-in-out;
}

/* Effets au survol et focus (Accessibilité clavier) */
.btn-top:hover {
  background-color: #e07000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-top:focus-visible {
  outline: 3px solid var(--bleu-profond);
  outline-offset: 2px;
}

/* Classe active déclenchée par le JS lors du scroll */
.btn-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Ajustement spécifique Smartphone (Safe Area) */
@media (max-width: 576px) {
  .btn-top {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 44px;
    height: 44px;
  }
}