
/* Fonts auto-hébergées via Google Fonts (chargé séparément via <link>) */

:root {
  --rouge: #CE1126;
  --jaune: #FCD116;
  --vert: #009460;
  --jaune-soft: #fef7d4;
  --vert-soft: #def0e7;

  /* Rouge pour le statut "à valider par l'école" */
  --rouge-statut: #DC2626;
  --rouge-statut-soft: #fee2e2;
  --rouge-statut-dark: #991b1b;

  /* Bleu pour les boutons info (i) */
  --bleu-info: #3b82f6;
  --bleu-info-dark: #2563eb;
  --bleu-info-soft: #dbeafe;

  --pp-orange: #F39200;
  --pp-orange-soft: #fff4e0;

  --bg: #fafaf7;
  --ink: #18181b;
  --ink-soft: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --card: #ffffff;

  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --hairline: rgba(24, 24, 27, 0.08);
  --hover: #efeee7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ====== Bandeau drapeau ====== */
.flag-band {
  height: 3px;
  display: flex;
  width: 100%;
}
.flag-band > div { flex: 1 1 33.333%; }
.flag-band .r { background: var(--rouge); }
.flag-band .y { background: var(--jaune); }
.flag-band .g { background: var(--vert); }

/* ====== Hero search (illustration métiers en fond) ====== */
.hero-search {
  width: 100%;
  overflow: hidden;
}

.hero-search svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes heroCloudA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(38px, -3px); }
}
@keyframes heroCloudB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 4px); }
}
.clouds-back { animation: heroCloudA 26s ease-in-out infinite; }
.clouds-front { animation: heroCloudB 19s ease-in-out infinite; }

@keyframes heroSunPulse {
  0%, 100% { opacity: 0.22; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.18); }
}
.sun-glow { transform-origin: 1095px 58px; transform-box: fill-box; animation: heroSunPulse 4.5s ease-in-out infinite; }

@keyframes heroFlap {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.35); }
}
.bird { animation: heroFlap 0.7s ease-in-out infinite; }
.bird-2 { animation-delay: 0.18s; animation-duration: 0.62s; }
.bird-3 { animation-delay: 0.35s; animation-duration: 0.75s; }
.bird-4 { animation-delay: 0.08s; animation-duration: 0.68s; }

@keyframes heroSpinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes heroSpinSlowR { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.compass-1 { transform-origin: 210px 52px; animation: heroSpinSlow 28s linear infinite; }
.compass-2 { transform-origin: 600px 44px; animation: heroSpinSlowR 34s linear infinite; }

@keyframes heroBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.character { animation: heroBob 3.6s ease-in-out infinite; }
.c1 { animation-delay: 0s; animation-duration: 3.4s; }
.c2 { animation-delay: 0.6s; animation-duration: 4.0s; }
.c3 { animation-delay: 1.1s; animation-duration: 3.6s; }
.c4 { animation-delay: 0.3s; animation-duration: 3.8s; }
.c5 { animation-delay: 0.9s; animation-duration: 3.5s; }

@keyframes heroSway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.6deg); }
}
.tree { transform-box: fill-box; transform-origin: 50% 100%; animation: heroSway 5.5s ease-in-out infinite; }
.tree-2 { animation-delay: 1.2s; animation-duration: 6.2s; }
.tree-3 { animation-delay: 0.4s; animation-duration: 4.8s; }
.tree-4 { animation-delay: 1.8s; animation-duration: 5.8s; }
.tree-5 { animation-delay: 0.8s; animation-duration: 5.2s; }
.tree-6 { animation-delay: 2.1s; animation-duration: 6.0s; }

@keyframes heroSawCut {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-8px, 1px); }
}
.saw { animation: heroSawCut 0.55s ease-in-out infinite; }

@keyframes heroTurnWheel {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
}
.wheel { transform-origin: 648px 256px; animation: heroTurnWheel 4.2s ease-in-out infinite; }

@keyframes heroBulbPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}
.bulb-rays { transform-origin: 863px 240px; animation: heroBulbPulse 1.4s ease-in-out infinite; }

@keyframes heroBulbGlow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.bulb-core { animation: heroBulbGlow 1.4s ease-in-out infinite; }

@keyframes heroSparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.2); }
}
.sparkle { transform-box: fill-box; transform-origin: 50% 50%; animation: heroSparkle 2s ease-in-out infinite; }
.sparkle-2 { animation-delay: 0.4s; }
.sparkle-3 { animation-delay: 0.8s; }
.sparkle-4 { animation-delay: 1.2s; }
.sparkle-5 { animation-delay: 1.6s; }

@keyframes heroRaysRot { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.mini-sun-rays { transform-origin: 400px 80px; animation: heroRaysRot 14s linear infinite; }

@keyframes heroScreenFlicker {
  0%, 92%, 100% { opacity: 1; }
  94% { opacity: 0.7; }
  96% { opacity: 1; }
}
.screen { animation: heroScreenFlicker 5s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .clouds-back, .clouds-front, .sun-glow, .bird,
  .compass-1, .compass-2, .character, .tree, .saw, .wheel,
  .bulb-rays, .bulb-core, .sparkle, .mini-sun-rays, .screen {
    animation: none !important;
  }
}

.container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

/* Bandeau d'en-tête : fond blanc bord à bord, contenu centré */
.container--header {
  max-width: none;
  padding: 0 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1.5rem;
}

/* ====== En-tête ====== */
header.official {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
  background: transparent;
  border: 0;
  max-width: 1150px;
  margin: 0 auto;
}

/* Onglets intégrés au header, en haut à droite (boutons carrés) */
header.official .nav {
  margin: 0 0 0 auto;
  align-self: flex-start;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 8px;
  width: auto;
}
header.official .nav a {
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--card);
  padding: 9px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
header.official .nav a:hover { background: var(--hover); color: var(--ink); }
header.official .nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
/* « Résultats des examens » = appel à l'action (orange marque, ça attire) */
header.official .nav a.cta {
  background: var(--pp-orange);
  color: #fff;
  border-color: var(--pp-orange);
  font-weight: 700;
}
header.official .nav a.cta:hover { background: #d97f06; border-color: #d97f06; color: #fff; }
header.official .nav a.cta.active { background: var(--pp-orange); border-color: var(--pp-orange); color: #fff; }

header.official .nav a { white-space: nowrap; }

@media (max-width: 900px) {
  /* Onglets mobiles : texte seul, sans contour — l'actif est souligné */
  header.official .nav {
    margin: 0;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 18px;
  }
  header.official .nav a {
    flex: 0 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    padding: 8px 2px;
    font-size: 12px;
    letter-spacing: 0;
    color: var(--ink-soft);
    border-bottom: 3px solid transparent;
  }
  header.official .nav a:hover { background: transparent; color: var(--ink); }
  header.official .nav a.active {
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    border-bottom-color: var(--ink);
  }
  header.official .nav a.cta {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--pp-orange);
    font-weight: 700;
  }
  header.official .nav a.cta:hover { background: transparent; color: var(--pp-orange); }
  header.official .nav a.cta.active {
    background: transparent;
    color: var(--pp-orange);
    border-bottom-color: var(--pp-orange);
  }
}

header.official .logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

header.official .logo-metfpe { height: 120px; width: auto; }
header.official .logo-parcourspro { height: 80px; width: auto; }

header.official .titles { flex: 1; min-width: 260px; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  background: var(--ink);
  color: white;
  padding: 0.4rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
}

.session-badge .icon-svg {
  width: 14px;
  height: 14px;
  color: var(--pp-orange);
  flex-shrink: 0;
}

/* ====== Fil d'Ariane ====== */
.breadcrumb {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1.5rem 0 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
}

.breadcrumb a:hover { color: var(--pp-orange); }

.breadcrumb .sep { color: var(--line-strong); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ====== Navigation onglets ====== */
.nav {
  display: flex;
  gap: 0.4rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  background: var(--card);
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  width: fit-content;
}

.nav a {
  font-family: var(--font-display);
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover { background: var(--bg); }
.nav a.active {
  background: var(--ink);
  color: white;
  font-weight: 600;
}

/* Nav simplifiée : juste un lien retour accueil */
.nav.nav-simple {
  background: transparent;
  border: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
}

.nav-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-home-link:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--ink-soft);
}

.nav-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* ====== Statistiques (en bas de l'accueil) ====== */
.kpi-section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

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

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}

.stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ink);
}

.stat.regle::before { background: var(--vert); }
.stat.regulariser::before { background: var(--rouge-statut); }
.stat.centres::before { background: var(--pp-orange); }

.stat-icon {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink-soft);
}

.stat-icon .icon-svg {
  width: 22px;
  height: 22px;
}

.stat.regle .stat-icon {
  background: var(--vert-soft);
  color: var(--vert);
}

.stat.regulariser .stat-icon {
  background: var(--rouge-statut-soft);
  color: var(--rouge-statut);
}

.stat.centres .stat-icon {
  background: var(--pp-orange-soft);
  color: var(--pp-orange);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
  margin-top: 0.5rem;
}

.stat-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}

.stat.regle .stat-value { color: var(--vert); }
.stat.regulariser .stat-value { color: var(--rouge-statut); }
.stat.centres .stat-value { color: var(--pp-orange); }

/* Mobile : icône reste en haut à droite mais légèrement plus petite */
@media (max-width: 700px) {
  .stat { padding: 1.1rem 1.2rem; min-height: 100px; }
  .stat-icon { width: 36px; height: 36px; top: 0.85rem; right: 0.9rem; }
  .stat-icon .icon-svg { width: 18px; height: 18px; }
  .stat-value { font-size: 1.9rem; }
}

.sync-text {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.sync-text .icon-svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

/* ====== Notices ====== */
.notice {
  background: var(--jaune-soft);
  border-left: 4px solid var(--jaune);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  border-radius: 12px;
}

.notice strong { color: #8a6500; font-weight: 600; }

.notice-info {
  background: var(--card);
  border-left: 4px solid var(--vert);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  border-radius: 12px;
}

.notice-info strong { color: var(--vert); font-weight: 600; }

/* ====== Séparateur "OU" (entre recherche et grille A-Z sur l'accueil) ====== */
.ou-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0 1.5rem;
  position: relative;
}

.ou-separator::before,
.ou-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 100px;
}

.ou-separator::before { margin-right: 1rem; }
.ou-separator::after { margin-left: 1rem; }

.ou-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 40px;
  padding: 0 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* ====== Section recherche alphabétique sur l'accueil ====== */
.alpha-search-section {
  margin-bottom: 2rem;
}

.alpha-search-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

@media (max-width: 700px) {
  .alpha-search-title {
    font-size: 0.95rem;
  }
  .ou-separator::before, .ou-separator::after { max-width: 50px; }
}

/* ====== Grille de lettres A-Z ====== */
.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.letter-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  text-align: center;
  min-height: 90px;
}

.letter-card:hover {
  border-color: var(--pp-orange);
  background: var(--pp-orange-soft);
  transform: translateY(-2px);
}

.letter-card .letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.letter-card .count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.letter-card.empty {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.letter-card.empty .letter { color: var(--muted); }

.letter-card.has-sub {
  background: linear-gradient(180deg, var(--card) 0%, var(--pp-orange-soft) 100%);
  border-color: var(--pp-orange);
}

.letter-card.has-sub .count small {
  font-size: 0.7rem;
  color: var(--pp-orange);
  font-weight: 600;
  display: block;
  margin-top: 0.1rem;
}

/* ====== Sous-sections (subdivisions des lettres très peuplées) ====== */
.subdivisions-wrap {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.subdivision-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.subdivision-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}

.subdivision-title strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.sub-letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.sub-letter-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.sub-letter-card:hover {
  border-color: var(--pp-orange);
  background: var(--pp-orange-soft);
}

.sub-letter-card .sub-range {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.sub-letter-card .count {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ====== Mini-navigation alphabétique (sur page lettre) ====== */
.mini-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  justify-content: center;
}

.mini-letters a {
  font-family: var(--font-display);
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  min-width: 32px;
  text-align: center;
  transition: background 0.1s, color 0.1s;
}

.mini-letters a:hover {
  background: var(--bg);
  color: var(--ink);
}

.mini-letters a.current {
  background: var(--ink);
  color: white;
  font-weight: 700;
}

/* ====== Ligne en surbrillance (provient de la recherche globale) ====== */
tbody tr.highlighted td {
  background: var(--pp-orange-soft) !important;
  animation: highlight-pulse 1.5s ease-in-out;
}

@keyframes highlight-pulse {
  0%, 100% { background: var(--pp-orange-soft); }
  50% { background: #fde9c8; }
}

/* ====== Colonnes à contenu long ====== */
.institution-cell {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.programme-cell {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.centre-cell {
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
}

.centre-cell.centre-empty {
  color: var(--line-strong);
  font-style: italic;
  font-weight: 400;
}

/* ====== PV vide (pour les "à régulariser") ====== */
.pv-cell.pv-empty {
  color: var(--line-strong);
  font-style: italic;
  text-align: center;
}

/* ====== Distinction visuelle des lignes par statut ====== */
tbody tr.row-regulariser td:first-child,
tbody tr.row-regle td:first-child {
  position: relative;
}

tbody tr.row-regle td:first-child,
tbody tr.row-regulariser td:first-child {
  box-shadow: none;
}

/* ====== Bande de stats (sur page index de lettres) ====== */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.25rem 0;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
}

.stat-pill strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.stat-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.stat-pill.regle .pill-dot { background: var(--vert); }
.stat-pill.regulariser .pill-dot { background: var(--rouge-statut); }

/* ====== Labels de section (petits titres au-dessus des blocs) ====== */
.section-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 400;
  margin: 1.25rem 0 0.5rem 0.5rem;
  font-family: var(--font-body);
}

/* ====== Filtres — style segmented control (iOS) ====== */
.filtres.segmented {
  display: inline-flex;
  background: #ececec;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 1.5rem;
  gap: 0;
  width: auto;
  max-width: 100%;
  overflow: hidden;
}

.filtres.segmented .filtre-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 0.55rem 1.5rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  position: relative;
}

.filtres.segmented .filtre-btn:hover:not(.active) {
  color: var(--ink);
}

.filtres.segmented .filtre-btn.active {
  background: white;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.filtres.segmented .filtre-btn .filtre-count {
  font-size: 0.82rem;
  opacity: 0.75;
  font-weight: 500;
}

.filtres.segmented .filtre-btn.active .filtre-count { opacity: 1; }

/* Le bouton (i) reste cliquable dans le segmented control */
.filtres.segmented .filtre-btn .info-btn {
  margin-left: 0.3rem;
}

@media (max-width: 700px) {
  .filtres.segmented {
    display: flex;
    width: 100%;
  }
  .filtres.segmented .filtre-btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
    flex: 1;
  }
  .filtres.segmented .filtre-btn .filtre-count { display: none; }
  .stats-bar { gap: 0.4rem; }
  .stat-pill { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
}

/* ====== Recherche locale (sur page centre) ====== */
.search-box {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 16px;
}

.search-box input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--pp-orange);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(243, 146, 0, 0.15);
}

.search-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-hint #result-count {
  font-weight: 500;
  color: var(--ink-soft);
}

.scroll-hint {
  display: none;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem;
  font-style: italic;
}

/* Scroll hint masqué — remplacé par le layout carte sur mobile */

/* ====== Toolbar (filtre institution + imprimer) ====== */
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.toolbar-filters {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.toolbar-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}

.toolbar-select label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.select-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.toolbar-select select {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.btn-reset-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.btn-reset-filter:hover {
  background: rgba(0,0,0,0.12);
  color: var(--ink);
}

.toolbar-select select:focus {
  outline: none;
  border-color: var(--primaire);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
}

.btn-print:hover {
  background: var(--bg);
  border-color: var(--line-strong);
}

.btn-print svg {
  width: 14px;
  height: 14px;
}

.btn-print .print-chevron {
  width: 10px;
  height: 10px;
  margin-left: 2px;
}

.print-group {
  position: relative;
}

.print-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 100;
  min-width: 190px;
  overflow: hidden;
}

.print-menu.open {
  display: block;
}

.print-menu-item {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  background: #ffffff;
  color: #18181b;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.print-menu-item:hover {
  background: #f4f4f5;
}

.print-menu-item + .print-menu-item {
  border-top: 1px solid #e4e4e7;
}

/* ====== Pagination ====== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--fond);
  border-color: var(--primaire);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pagination-num:hover {
  background: var(--fond);
  border-color: var(--primaire);
}

.pagination-num.active {
  background: var(--ink);
  color: var(--card);
  border-color: var(--ink);
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.pagination-summary {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

.letter-card-tous .letter {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ====== Print header (visible uniquement à l'impression) ====== */
.print-header {
  display: none;
}

/* ====== Styles d'impression A4 ====== */
@media print {
  @page {
    size: A4 landscape;
    margin: 15mm;
  }

  body {
    background: #fff;
    font-size: 9pt;
    color: #000;
  }

  .flag-band, .breadcrumb, .search-box, .section-label,
  .filtres, .mini-letters, .scroll-hint, .toolbar-row,
  .nav, footer, .modal-overlay, .notice,
  header.official { display: none !important; }

  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 12pt;
    padding-bottom: 8pt;
    border-bottom: 1pt solid #000;
  }

  .print-title {
    font-family: var(--font-display);
    font-size: 16pt;
    font-weight: 700;
  }

  .print-subtitle {
    font-size: 12pt;
    font-weight: 400;
    margin-top: 4pt;
    color: #333;
  }

  .print-subtitle:empty { display: none; }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .table-wrap {
    border: none;
    border-radius: 0;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.5pt;
    table-layout: auto !important;
  }

  colgroup { display: none !important; }

  thead { display: table-header-group !important; }
  thead tr { background: #eee !important; }

  th, td {
    border: 0.5pt solid #999;
    padding: 2pt 4pt;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  th { font-size: 7pt; font-weight: 600; }

  tr { page-break-inside: avoid; }
  tr[style*="display: none"] { display: none !important; }

  .badge {
    border: 0.5pt solid #999;
    background: transparent !important;
    color: #000 !important;
    font-size: 6.5pt;
    padding: 1pt 3pt;
  }

  .info-btn { display: none !important; }
  .pv-empty { color: #666; font-style: italic; }

  /* Forcer le mode tableau (annuler le layout carte mobile) */
  table { display: table !important; }
  thead { display: table-header-group !important; }
  tbody { display: table-row-group !important; }
  tr { display: table-row !important; }
  th, td { display: table-cell !important; text-align: left !important; }
  td::before { display: none !important; }

  .badge-with-info { display: inline !important; }
  .badge-with-info .info-btn { display: none !important; }
}

/* ====== Tableau ====== */
/* Wrapper du tableau — pas d'overflow par défaut pour permettre le sticky thead.
   Sur mobile, on bascule en mode scroll horizontal (avec overflow). */
.table-wrap {
  background: var(--card);
  border: 0;
  border-radius: 0;
  /* Pas d'overflow ici → le sticky thead colle au viewport */
}

.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

colgroup .col-ina        { width: 13%; }
colgroup .col-pv         { width: 11%; }
colgroup .col-nom        { width: 10%; }
colgroup .col-prenom     { width: 10%; }
colgroup .col-programme  { width: 15%; }
colgroup .col-institution{ width: 14%; }
colgroup .col-centre     { width: 16%; }
colgroup .col-statut     { width: 11%; }

td.programme-cell,
td.institution-cell,
td.centre-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

/* ====== Header de tableau STICKY (éditorial : clair, filet d'encre) ====== */
th {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  color: var(--muted);
  text-align: left;
  padding: 0.75rem 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--ink);
}

td {
  padding: 0.8rem 0.65rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
  font-size: 0.85rem;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--hover); }

.pv-cell {
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nom-cell { font-weight: 600; color: var(--ink); }
.prenom-cell { color: var(--ink-soft); }

/* ====== Statut (éditorial : carré plein / vide, monochrome) ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.35;
  background: transparent;
  border-radius: 0;
  color: var(--ink-soft);
}

.badge::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--ink);
}

.badge.regle { color: var(--vert); }
.badge.regle::before { background: var(--vert); }

.badge.regulariser { color: var(--rouge-statut-dark); }
.badge.regulariser::before { background: var(--rouge-statut); }

.statut-cell {
  overflow: visible;
}

.badge-with-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-with-info .badge {
  flex: 1;
  min-width: 0;
}

.badge-with-info .info-btn {
  flex-shrink: 0;
}

/* ====== Cellule INA (mise en valeur, première colonne) ====== */
.ina-cell {
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====== MOBILE : tableau → cartes empilées ====== */
@media (max-width: 800px) {
  .table-wrap {
    background: transparent;
    border: none;
    border-radius: 0;
  }

  table { table-layout: auto; }
  colgroup { display: none; }
  thead { display: none; }

  table, tbody, tr, td {
    display: block;
    width: 100%;
  }

  tbody tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.6rem;
    position: relative;
  }

  tbody tr:nth-child(even) td { background: none; }
  tbody tr:hover td { background: none; }
  tbody tr:hover { background: var(--pp-orange-soft); }

  tbody tr td {
    border-bottom: none;
    padding: 0.15rem 0;
    font-size: 0.88rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }

  tbody tr td::before {
    content: attr(data-label);
    flex-shrink: 0;
    width: 80px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }

  /* Nom + prénom en gros, en haut de la carte */
  tbody tr td.nom-cell {
    order: -3;
    font-size: 1rem;
    font-weight: 700;
    padding-bottom: 0.1rem;
  }

  tbody tr td.nom-cell::before { display: none; }

  tbody tr td.prenom-cell {
    order: -2;
    font-size: 0.95rem;
    color: var(--ink-soft);
    padding-bottom: 0.5rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
  }

  tbody tr td.prenom-cell::before { display: none; }

  /* Statut : badge flottant en haut à droite */
  tbody tr td.statut-cell {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: auto;
    padding: 0;
    overflow: visible;
  }

  tbody tr td.statut-cell::before { display: none; }

  /* INA bien lisible */
  tbody tr td.ina-cell {
    order: -1;
    font-size: 0.82rem;
    padding-bottom: 0.35rem;
  }

  /* PV */
  tbody tr td.pv-cell {
    white-space: normal;
    overflow: visible;
  }

  tbody tr td.pv-cell.pv-empty {
    text-align: left;
    font-size: 0.82rem;
  }

  /* Programme + institution + centre lisibles */
  tbody tr td.programme-cell,
  tbody tr td.institution-cell,
  tbody tr td.centre-cell {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: normal;
    font-size: 0.85rem;
  }

  /* Statut indiqué par le carré du badge (monochrome) — pas de liseré coloré */
  tbody tr.row-regle,
  tbody tr.row-regulariser {
    border-left: 1px solid var(--hairline);
  }

  /* Désactiver le box-shadow inset de desktop */
  tbody tr.row-regle td:first-child,
  tbody tr.row-regulariser td:first-child {
    box-shadow: none;
  }

  /* Scroll hint inutile en mode carte */
  .scroll-hint { display: none; }
}

/* PV vide (apprenants à valider) — "Non généré" */
.pv-cell.pv-empty {
  color: var(--rouge-statut);
  font-style: italic;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: var(--font-body);
}

/* ====== Bouton (i) — déclenche la modal ====== */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bleu-info);
  color: white;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 0.78rem;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
}

.info-btn:hover {
  background: var(--bleu-info-dark);
  transform: scale(1.1);
}

.info-btn:active {
  transform: scale(0.95);
}

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

.info-btn-small {
  width: 16px;
  height: 16px;
  font-size: 0.72rem;
  margin-left: 0.4rem;
}

/* Badge avec icône (i) côte à côte */
.badge-with-info {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

/* ====== Notice rouge (warning au lieu de jaune) ====== */
.notice-warning {
  background: var(--rouge-statut-soft) !important;
  border-left-color: var(--rouge-statut) !important;
}

.notice-warning strong {
  color: var(--rouge-statut-dark) !important;
}

/* ====== Modal d'information ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 1.4rem;
  font-weight: 400;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}

.modal-close:hover {
  background: var(--line);
  color: var(--ink);
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bleu-info);
  color: white;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.modal-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
  line-height: 1.55;
  text-align: center;
}

.modal-actions-info {
  background: var(--bleu-info-soft);
  border-left: 3px solid var(--bleu-info);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.modal-actions-info strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.modal-actions-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-actions-info li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.modal-actions-info li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--vert);
  font-weight: 700;
}

.modal-btn-ok {
  display: block;
  width: 100%;
  background: var(--ink);
  color: white;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.15s;
}

.modal-btn-ok:hover {
  background: var(--pp-orange);
}

@media (max-width: 700px) {
  .modal-card {
    padding: 1.75rem 1.25rem 1.25rem;
  }
  .modal-title {
    font-size: 1.2rem;
  }
  .modal-icon {
    width: 48px;
    height: 48px;
    font-size: 1.7rem;
  }
}

/* ====== Pied de page ====== */
footer.site-footer {
  margin-top: 3rem;
  background: var(--card);
  border-top: 1px solid var(--line);
  color: var(--ink);
}

footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2.5rem 1.5rem 2rem;
  max-width: 1150px;
  margin: 0 auto;
}

footer .footer-col h3 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 600;
}

footer .footer-col p,
footer .footer-col a,
footer .footer-col span {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

footer .footer-col a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

footer .footer-col a:hover {
  color: var(--pp-orange);
  border-bottom-color: var(--pp-orange);
}

footer .footer-col .pp-logo { height: 72px; width: auto; margin-bottom: 1rem; }
footer .footer-col .ministry-logo { height: 110px; width: auto; margin-bottom: 1rem; display: block; }

/* Logos institutionnels Guinée + Simandou 2040 sous le logo ministère */
footer .institutional-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

footer .institutional-logo-guinee {
  height: 38px;
  width: auto;
}

footer .institutional-logo-simandou {
  height: 30px;
  width: auto;
  opacity: 0.85;
}
footer .footer-col .intro-text { color: var(--muted); font-size: 0.88rem; line-height: 1.65; margin-bottom: 1rem; }

footer .contact-note {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--hover);
  border: 0;
  border-radius: 0;
}

/* « Réinitialiser » global (pages inscrits) : remet aussi le filtre A-Z sur Tous */
.btn-reset-global {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line-strong);
  padding: 10px 18px;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn-reset-global:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

footer .contact-note strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
}

footer .contact-note p {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

footer .footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 1150px;
  margin: 0 auto;
}

footer .footer-bottom .powered-by {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

footer .footer-bottom .powered-by .logo-netsen { height: 22px; width: auto; }

footer .footer-bottom .powered-by span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* ====== Responsive ====== */
@media (max-width: 700px) {
  .container { padding: 1.2rem 0.8rem 2rem; }
  header.official { gap: 1rem; padding: 1.2rem 0 1rem; flex-direction: column; align-items: center; text-align: center; }
  header.official .logos { gap: 1rem; justify-content: center; }
  header.official .logo-metfpe { height: 80px; }
  header.official .logo-parcourspro { height: 60px; }
  header.official .titles { flex: unset; min-width: unset; text-align: center; }
  .session-badge { justify-content: center; }
  .stat-value { font-size: 1.8rem; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 0.5rem 0.7rem; font-size: 0.82rem; flex: 1; text-align: center; }
  .letters-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
  .letter-card { padding: 0.9rem 0.5rem; min-height: 70px; }
  .letter-card .letter { font-size: 1.5rem; }
  .mini-letters { padding: 0.4rem; }
  .mini-letters a { padding: 0.25rem 0.35rem; font-size: 0.75rem; min-width: 26px; }
  footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 2rem 1rem 1.5rem;
  }
  footer .footer-bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .toolbar-row { flex-direction: column; align-items: stretch; }
  .toolbar-filters { flex-direction: column; }
  .toolbar-select { flex-direction: column; align-items: stretch; min-width: 0; }
  .btn-print { justify-content: center; }
}

/* ====== Empty state (aucune donnée pour cette lettre) ====== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem 5rem;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
  color: var(--muted);
}

.empty-state-icon .icon-svg {
  width: 26px;
  height: 26px;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto 2rem;
  line-height: 1.55;
}

.empty-state .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  background: var(--ink);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.empty-state .btn-back:hover {
  background: var(--pp-orange);
}

/* ====== Subdivisions landing (lettre éclatée en sous-pages) ====== */
.sub-landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0 2rem;
}

.sub-landing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.sub-landing-card:hover {
  border-color: var(--pp-orange);
  background: var(--pp-orange-soft);
  transform: translateY(-1px);
}

.sub-landing-card .sub-range {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.sub-landing-card .sub-count {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* ====== Print ====== */
@media print {
  body { background: white; }
  header.official, .nav, .breadcrumb, footer.site-footer { display: none; }
  .table-wrap { border: none; }
  table { font-size: 11pt; }
  tr:hover td { background: none; }
}

/* ====================================================================== */
/* ====== PAGE DES RÉSULTATS D'EXAMEN =================================== */
/* ====================================================================== */

/* L'attribut [hidden] doit toujours l'emporter sur les display: définis
   ci-dessous (sinon le spinner et les panneaux masqués restent visibles). */
[hidden] { display: none !important; }

/* Barre de filtres du mode « Liste nationale » — une seule ligne alignée */
.liste-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0 0 1rem;
}

.liste-search,
.liste-select {
  height: 44px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}

.liste-search {
  flex: 1 1 240px;
  min-width: 200px;
}

.liste-select {
  flex: 0 1 220px;
  min-width: 160px;
  max-width: 260px;
  cursor: pointer;
}

.liste-search:focus,
.liste-select:focus {
  outline: none;
  border-color: var(--pp-orange);
  box-shadow: 0 0 0 3px var(--pp-orange-soft);
}

.liste-reset {
  height: 44px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.liste-reset:hover { background: var(--bg); color: var(--ink); }

@media (max-width: 640px) {
  .liste-search, .liste-select, .liste-reset { flex: 1 1 100%; max-width: none; }
}

.resultats-intro {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 720px;
  margin: 0.75rem 0 1.25rem;
}

/* --- Bascule des deux modes (segmented control centré) --- */
.resultats-modes {
  margin: 0.5rem 0 1.5rem;
}

.mode-panel {
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* --- Mode 1 : boîte de recherche PV / INA --- */
/* --- Hero de recherche (le champ est la vedette de la page) --- */
.search-hero {
  max-width: 720px;
  margin: 0.5rem auto 0;
  text-align: center;
}

.search-hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pp-orange);
  margin: 0 0 0.5rem;
}

.search-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 1.6rem;
}

.search-hero-form { margin: 0; }

.search-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  box-shadow: 0 6px 20px rgba(24, 24, 27, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-field:focus-within {
  border-color: var(--pp-orange);
  box-shadow: 0 0 0 4px var(--pp-orange-soft), 0 6px 20px rgba(24, 24, 27, 0.06);
}

.search-field-icon {
  width: 22px; height: 22px;
  color: var(--muted);
  flex: 0 0 auto;
}

.search-field-input {
  flex: 1 1 auto;
  border: none; outline: none; background: transparent;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.85rem 0.6rem;
  color: var(--ink);
  min-width: 0;
}

.search-field-input::placeholder { color: var(--muted); }

.search-field-btn {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.7rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.search-field-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.search-field-btn:hover { background: var(--pp-orange); }
.search-field-btn:active { transform: translateY(1px); }
.search-field-btn:disabled { opacity: 1; cursor: default; }
/* Chargement : spinner + « Recherche en cours… » dans le bouton */
.search-field-btn .btn-spinner {
  display: none;
  width: 15px; height: 15px; flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.search-field-btn.is-loading .btn-spinner { display: inline-block; }

/* Bouton « effacer » (×) dans les champs de recherche */
.search-clear {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--muted); font-size: 22px; line-height: 1;
  cursor: pointer; border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.search-clear:hover { color: var(--ink); background: var(--hover); }
.liste-panel .field .search-clear { width: 24px; height: 24px; font-size: 19px; }

/* Stats de session, sous le hero de recherche (centrées) */
.hero-stats {
  display: flex;
  justify-content: center;
  max-width: 540px;
  margin: 2rem auto 0;
  border-top: 1px solid var(--hairline);
}
.hero-stats .hs { flex: 1 1 0; text-align: center; padding: 18px 12px 4px; }
.hero-stats .hs + .hs { border-left: 1px solid var(--hairline); }
.hero-stats .n {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: -0.01em; line-height: 1; color: var(--vert);
  font-variant-numeric: tabular-nums;
}
.hero-stats .hs.neg .n { color: var(--rouge-statut); }
.hero-stats .hs:last-child .n { color: var(--ink); }
.hero-stats .l { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
@media (max-width: 520px) {
  .hero-stats .n { font-size: 20px; }
  .hero-stats .l { font-size: 10px; }
}
/* « Chercher par nom » — toggle + grille alphabétique (éditorial) */
.more-filters-row { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; margin: 14px 0 0; }
.more-filters {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 8px 0;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink);
}
.more-chevron { width: 15px; height: 15px; color: var(--muted); transition: transform 0.2s; }
.more-filters[aria-expanded="true"] .more-chevron { transform: rotate(180deg); }

/* --- Variante « liste des inscrits » : 6 colonnes --- */
.liste-panel .head.head-ins,
.liste-panel .row.row-ins {
  grid-template-columns: 52px 1.5fr 1.1fr 1.2fr 1fr 150px;
}
.liste-panel .row.row-ins { cursor: default; }
.liste-panel .row.highlighted { background: var(--pp-orange-soft); }
.liste-panel .res .info-btn { margin-left: 6px; }

.alpha-nav-label {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--ink); margin: 18px 0 8px;
}
.alpha-nav-label strong { color: var(--ink); }
.alpha-grid-nav { margin: 0 0 10px; }
.alpha-grid-nav .acell { text-decoration: none; color: inherit; }
.alpha-grid-nav .acell.off { pointer-events: none; }

.liste-panel .statut-filter-ins { margin: 14px 0 4px; flex-wrap: wrap; }
.statut-btn { display: inline-flex; align-items: center; }
.statut-btn .statut-count { opacity: 0.65; font-weight: 500; margin-left: 5px; }
.print-wrap { position: relative; flex: 0 0 auto; }
.liste-panel .breadcrumb { margin: 0 0 0.75rem; }

@media (max-width: 720px) {
  .liste-panel .statut-filter-ins .statut-btn { flex: 1 1 auto; justify-content: center; padding: 9px 10px; font-size: 12px; }
}

/* Filtre par statut (segmented carré) */
.statut-filter { display: flex; gap: 8px; margin: 10px 0 4px; }
.statut-btn {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  padding: 9px 20px; border: 1px solid var(--hairline); background: var(--card);
  color: var(--ink-soft); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.statut-btn:hover { background: var(--hover); }
.statut-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.alpha-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  background: var(--hairline); border: 1px solid var(--hairline); margin: 10px 0 4px;
}
.acell {
  background: var(--card); border: 0; cursor: pointer; font-family: inherit;
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px; position: relative; transition: background 0.12s;
}
.acell:hover { background: var(--hover); }
.acell .al { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); }
.acell .al.word { font-size: 15px; letter-spacing: 0.02em; }
.acell .ac { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.acell.sel { background: var(--ink); }
.acell.sel .al, .acell.sel .ac { color: #fff; }
.acell.sel .ac { color: rgba(255, 255, 255, 0.72); }
.acell.sel::before { content: ""; position: absolute; top: 6px; left: 6px; width: 6px; height: 6px; background: #fff; }
.acell.off { cursor: default; }
.acell.off:hover { background: var(--card); }
.acell.off .al, .acell.off .ac { color: #c4c2b8; }

@media (max-width: 820px) { .alpha-grid { grid-template-columns: repeat(4, 1fr); } .acell .al { font-size: 22px; } .acell .al.word { font-size: 13px; } }
@media (max-width: 380px) { .alpha-grid { grid-template-columns: repeat(3, 1fr); } }

.search-hero-help {
  margin: 0.9rem 0 0;
  font-size: 0.83rem;
  color: var(--muted);
}

@media (max-width: 520px) {
  .search-field { flex-wrap: wrap; padding: 0.85rem; gap: 0.6rem; }
  .search-field-icon { display: none; }
  /* Ligne 1 : le texte + la croix d'effacement, inline (croix à droite du texte) */
  .search-field-input { flex: 1 1 0; min-width: 0; padding: 0.4rem 0.2rem; }
  .search-field .search-clear { flex: 0 0 auto; align-self: center; }
  /* Ligne 2 : le bouton pleine largeur */
  .search-field-btn { flex: 1 1 100%; padding: 0.8rem; }
}

/* --- Feedback recherche : chargement + vide --- */
.recherche-feedback { max-width: 640px; margin: 1.5rem auto 0; }

.recherche-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 2rem 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-soft);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--pp-orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.recherche-empty { max-width: 640px; margin: 0 auto; }

/* --- Confettis (résultat admis) --- */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10001;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 15px;
  border-radius: 1px;
  opacity: 0.95;
  will-change: transform;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.3, 0.6, 0.5, 1);
  animation-fill-mode: forwards;
}

.confetti-piece.petal {
  width: 12px;
  height: 12px;
  border-radius: 50% 0 50% 0;
}

@keyframes confetti-fall {
  0% { transform: translate(0, -20px) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--drift, 0), 106vh) rotate(680deg); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}

/* --- Liste nationale : carte mobile (hiérarchie claire, sans collision) --- */
@media (max-width: 800px) {
  #panel-liste tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.3rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 14px;
  }
  #panel-liste tbody tr.row-admis { border-left-color: var(--vert); }
  #panel-liste tbody tr.row-refuse { border-left-color: var(--rouge-statut); }

  /* Champs repris dans la carte détail au tap → masqués ici */
  #panel-liste tbody tr td.institution-cell,
  #panel-liste tbody tr td.mention-cell { display: none; }

  #panel-liste tbody tr td::before { display: none !important; }

  #panel-liste tbody tr td {
    padding: 0;
    display: flex;
    align-items: center;
  }

  /* Ligne 1 : nom (gauche) · résultat (droite) */
  #panel-liste tbody tr td.nom-cell {
    grid-column: 1; grid-row: 1;
    font-size: 1.02rem; font-weight: 700; line-height: 1.2;
    letter-spacing: -0.01em;
  }
  #panel-liste tbody tr td.resultat-cell {
    grid-column: 2; grid-row: 1;
    justify-content: flex-end;
  }

  /* Ligne 2 : programme (gauche) · rang (droite) */
  #panel-liste tbody tr td.programme-cell {
    grid-column: 1; grid-row: 2;
    font-size: 0.82rem; color: var(--muted); line-height: 1.3;
  }
  #panel-liste tbody tr td.rang-cell {
    grid-column: 2; grid-row: 2;
    justify-content: flex-end;
  }

  /* Ligne 3 : PV en pied de carte, discret, séparé par un filet */
  #panel-liste tbody tr td.pv-cell {
    grid-column: 1 / -1; grid-row: 3;
    gap: 0.35rem;
    font-size: 0.74rem; color: var(--muted);
    font-variant-numeric: tabular-nums;
    margin-top: 0.2rem; padding-top: 0.55rem;
    border-top: 1px solid var(--line);
  }
  #panel-liste tbody tr td.pv-cell::before {
    display: inline !important;
    content: 'PV';
    font-weight: 700;
    letter-spacing: 0.03em;
  }
}

/* --- Colonnes rang / mention / résultat --- */
.col-rang { width: 8%; }
.col-mention { width: 12%; }
.col-resultat { width: 11%; }

.mention-cell {
  font-weight: 600;
  color: var(--ink-soft);
}

/* Pagination : la liste résultats réutilise le style des inscrits
   (défini plus haut : .pagination / .pagination-btn / .pagination-pages /
   .pagination-num / .pagination-dots / .pagination-summary). */

/* ====================================================================== */
/* ====== LISTE NATIONALE — design éditorial (monochrome, carré) ======== */
/* ====================================================================== */

/* Stats sobres, colonnes séparées par des hairlines, sans fond coloré */
.liste-panel .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 8px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.liste-panel .stat {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  overflow: visible; min-height: 0; display: block;
  padding: 16px 26px 16px 0; margin-right: 26px;
}
.liste-panel .stat::before { display: none; }
.liste-panel .stat:not(:last-child) { border-right: 1px solid var(--hairline); }
.liste-panel .stat .n {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: -0.01em; line-height: 1; font-variant-numeric: tabular-nums;
}
.liste-panel .stat .l { font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 0.02em; }
.liste-panel .stat:first-child .n { color: var(--vert); }
.liste-panel .stat.neg .n { color: var(--rouge-statut); }

/* Filtres : champ recherche souligné, selects soulignés, reset discret */
.liste-panel .filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 26px 0 6px; }
.liste-panel .field {
  flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); padding: 10px 2px;
}
.liste-panel .field svg { flex: none; color: var(--muted); }
.liste-panel .field input {
  border: 0; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 15px; color: var(--ink); width: 100%;
}
.liste-panel .field input::placeholder { color: var(--muted); }
.liste-panel .select { position: relative; flex: 0 1 220px; }
.liste-panel .select select {
  appearance: none; -webkit-appearance: none; width: 100%;
  border: 0; border-bottom: 1.5px solid var(--hairline); background: transparent;
  padding: 10px 26px 10px 2px; font-family: var(--font-body); font-size: 14px;
  color: var(--ink-soft); cursor: pointer;
}
.liste-panel .select::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.liste-panel .liste-reset {
  flex: 0 0 auto; font-family: var(--font-body); font-weight: 600; font-size: 13px;
  color: var(--ink-soft); background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 0; padding: 10px 18px; cursor: pointer; letter-spacing: 0.02em;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.liste-panel .liste-reset:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Combo : dropdown filtrable (recherche intégrée au menu) --- */
.combo { position: relative; flex: 0 1 240px; min-width: 190px; }
.combo-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink-soft);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--hairline);
  padding: 10px 2px; cursor: pointer; text-align: left;
}
.combo.has-value .combo-toggle { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.combo-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.combo-chev { width: 15px; height: 15px; color: var(--muted); flex: none; transition: transform 0.2s; }
.combo-toggle[aria-expanded="true"] .combo-chev { transform: rotate(180deg); }

.combo-pop {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 70;
  min-width: 100%; width: max-content; max-width: min(420px, 90vw);
  background: var(--card); border: 1px solid var(--line-strong);
  box-shadow: 0 14px 36px rgba(24, 24, 27, 0.16);
}
.combo-search {
  width: 100%; border: 0; border-bottom: 1px solid var(--hairline);
  padding: 11px 12px; font-family: var(--font-body); font-size: 14px;
  outline: none; background: var(--card); color: var(--ink);
}
.combo-search:focus { border-bottom-color: var(--pp-orange); }
.combo-list { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto; }
.combo-item { padding: 9px 12px; font-size: 13.5px; line-height: 1.4; color: var(--ink-soft); cursor: pointer; }
.combo-item:hover { background: var(--hover); color: var(--ink); }
.combo-item.sel { background: var(--ink); color: #fff; }
.combo-none { padding: 11px 12px; font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .combo { flex: 1 1 100%; }
  .combo-pop { max-width: 100%; width: 100%; }
}

.liste-panel .count { font-size: 13px; color: var(--muted); margin: 20px 0 6px; letter-spacing: 0.01em; }
.liste-panel .count #result-count { color: var(--ink); font-weight: 600; }

/* En-tête de colonnes (desktop) */
.liste-panel .head {
  display: grid; grid-template-columns: 52px 1.6fr 1.3fr 1.3fr 64px 96px; gap: 20px;
  padding: 0 14px 12px; border-bottom: 1.5px solid var(--ink);
}
.liste-panel .head span {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}

/* Liste : aucune bordure de cellule, aucune couleur de statut */
.liste-panel .list { list-style: none; }
.liste-panel .row {
  display: grid; grid-template-columns: 52px 1.6fr 1.3fr 1.3fr 64px 96px;
  align-items: center; gap: 20px; padding: 16px 14px; cursor: pointer;
  border-bottom: 1px solid var(--hairline); transition: background 0.12s ease;
}
/* Effet sur TOUTE la carte au survol / focus / activation — pas de trait */
.liste-panel .row:hover { background: var(--hover); }
.liste-panel .row:active { background: var(--hover); }
.liste-panel .row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--hover); }

/* Monogramme carré avec initiales */
.liste-panel .mono {
  width: 44px; height: 44px; background: var(--ink); color: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
}
.liste-panel .row.na .mono { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--hairline); }

.liste-panel .cell-name { min-width: 0; }
.liste-panel .name {
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.liste-panel .pv { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.02em; margin-top: 2px; }

.liste-panel .k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: none; }
.liste-panel .v { font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Rang : nombre + EX en micro-label bordé (pas d'orange) */
.liste-panel .rang { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); }
.liste-panel .rang .num { font-weight: 800; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.liste-panel .rang .ex {
  font-family: var(--font-body); font-weight: 700; font-size: 9px; letter-spacing: 0.1em;
  color: var(--muted); border: 1px solid var(--hairline); padding: 1px 4px;
}
.liste-panel .rang.none { color: var(--muted); }

/* Résultat : statut par typographie + carré plein (admis) / vide (non admis) */
.liste-panel .res { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; letter-spacing: 0.02em; color: var(--vert); }
.liste-panel .res .sq { width: 9px; height: 9px; background: var(--vert); flex: none; }
.liste-panel .res.na { color: var(--rouge-statut); font-weight: 600; }
.liste-panel .res.na .sq { background: var(--rouge-statut); box-shadow: none; }

/* Méta : en desktop, se comporte comme des cellules de la grille */
.liste-panel .meta { display: contents; }

/* Pagination alignée à l'esthétique carrée */

/* ================= MOBILE : carte carrée, pas de tableau ================ */
@media (max-width: 720px) {
  .liste-panel .stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .liste-panel .stat {
    padding: 14px 8px; margin-right: 0;
    border-right: 1px solid var(--hairline);
  }
  .liste-panel .stat:last-child { border-right: 0; }
  .liste-panel .stat .n { font-size: 19px; }
  .liste-panel .stat .l { font-size: 10.5px; margin-top: 4px; }
  .liste-panel .head { display: none; }
  .liste-panel .row,
  .liste-panel .row.row-ins {
    grid-template-columns: 44px 1fr auto;
    grid-template-areas: "mono name res" "mono meta meta";
    row-gap: 10px; column-gap: 14px; padding: 18px 8px; align-items: start;
    border-bottom: 1px solid var(--hairline);
  }
  .liste-panel .mono { grid-area: mono; }
  .liste-panel .cell-name { grid-area: name; }
  .liste-panel .res { grid-area: res; align-self: center; }
  .liste-panel .meta {
    grid-area: meta; display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin-top: 2px;
  }
  .liste-panel .k { display: block; }
  .liste-panel .meta .v { font-size: 13px; white-space: normal; }
  .liste-panel .name { white-space: normal; }
  .liste-panel .filters { gap: 14px; }
  .liste-panel .field, .liste-panel .select { flex: 1 1 100%; }
}

.result-count-bar {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

/* --- Lignes cliquables --- */
tr.resultat-row { cursor: pointer; }
tr.resultat-row:focus-visible {
  outline: 2px solid var(--pp-orange);
  outline-offset: -2px;
}

/* --- Rang + ex aequo --- */
.rang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
}

.ex-badge {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.05rem 0.3rem;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.rang-empty { color: var(--muted); }

/* --- Badges résultat --- */
.badge.admis {
  background: var(--vert-soft);
  color: var(--vert);
}

.badge.refuse {
  background: var(--rouge-statut-soft);
  color: var(--rouge-statut-dark);
}

/* --- Carte détaillée (modal résultat) — design éditorial --- */
.result-modal {
  position: relative;
  background: var(--card);
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  overflow-y: auto;
  text-align: left;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.result-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--hairline);
  color: var(--ink); cursor: pointer;
}
.result-close:hover { background: var(--hover); }

.result-inner { padding: 40px 30px 26px; }

.result-crest { width: 60px; height: 60px; margin: 0 auto; display: flex; color: var(--vert); }
.result-modal.na .result-crest { color: var(--rouge-statut); }
.result-crest svg { width: 100%; height: 100%; }

.result-state { text-align: center; margin-top: 16px; }
.result-lead {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--vert);
}
.result-modal.na .result-lead { color: var(--rouge-statut); }
.result-name {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: -0.01em; margin-top: 6px; color: var(--ink);
}
.result-rule { width: 46px; height: 3px; background: var(--vert); margin: 14px auto 0; }
.result-modal.na .result-rule { background: var(--rouge-statut); }

.result-details { margin: 28px 0 0; text-align: left; }
.result-details .line {
  display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--hairline);
}
.result-details .line:last-child { border-bottom: 1px solid var(--hairline); }
.result-details dt { font-size: 13px; color: var(--muted); padding-top: 2px; margin: 0; }
.result-details dd {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  text-align: right; line-height: 1.4; color: var(--ink);
}
.result-details dd.mono { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.result-details dd.long { font-weight: 600; font-size: 13.5px; line-height: 1.5; }

.result-details .rang { display: inline-flex; align-items: baseline; gap: 7px; justify-content: flex-end; font-family: var(--font-display); }
.result-details .rang .num { font-weight: 800; font-size: 17px; }
.result-details .rang .ex { font-family: var(--font-body); font-weight: 700; font-size: 9px; letter-spacing: 0.1em; color: var(--muted); border: 1px solid var(--hairline); padding: 2px 5px; }

/* Mode « aucun résultat » de la modale */
.result-nf-text {
  margin: 22px 0 4px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.result-modal.nf .result-lead { color: var(--ink); }
.result-modal.nf .result-rule { background: var(--muted); }
.result-modal.nf .result-details,
.result-modal.nf .result-verdict,
.result-modal.nf .result-share { display: none; }

.result-verdict {
  display: flex; margin: 24px 0 4px; padding: 16px 0 16px 16px;
  border-left: 3px solid var(--vert);
}
.result-modal.na .result-verdict { border-left-color: var(--rouge-statut); }
.result-verdict .vt { font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.4; color: var(--vert); }
.result-modal.na .result-verdict .vt { color: var(--rouge-statut); }
.result-verdict .vs { font-size: 12px; color: var(--muted); margin-top: 3px; }

.result-share { margin-top: 22px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.result-share-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink);
}
.result-share-toggle .lft { display: flex; align-items: center; gap: 10px; }
.result-share-toggle .lft svg { width: 17px; height: 17px; }
.share-chevron { width: 16px; height: 16px; color: var(--muted); transition: transform 0.2s; }
.result-share-toggle[aria-expanded="true"] .share-chevron { transform: rotate(180deg); }

.result-share-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.sbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 8px; background: transparent; border: 1px solid var(--hairline); cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--ink);
  text-align: center; line-height: 1.3; text-decoration: none;
}
.sbtn:hover { background: var(--hover); }
.sbtn svg { width: 20px; height: 20px; }

.result-footer { padding: 6px 30px 30px; }
.result-btn-close {
  width: 100%; padding: 15px; background: var(--ink); color: #fff; border: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer;
}
.result-btn-close:hover { background: #000; }
.result-powered {
  margin-top: 14px; text-align: center; font-size: 0.68rem; letter-spacing: 0.03em;
  color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.result-powered strong { font-weight: 700; color: var(--ink-soft); }
.powered-logo { height: 14px; width: auto; vertical-align: middle; }

@media (max-width: 420px) {
  .result-inner { padding: 34px 20px 22px; }
  .result-footer { padding: 6px 20px 24px; }
  .result-details .line { grid-template-columns: 92px 1fr; gap: 12px; }
}

@media (max-width: 640px) {
  .toolbar-actions { width: 100%; }
  .toolbar-actions .btn-rechercher,
  .toolbar-actions .btn-reset-search { flex: 1; }
}

/* ====================================================================== */
/* ====== ACCUEIL — identité éditoriale (carré, monochrome, filets) ===== */
/* ====================================================================== */

/* === Hero d'accueil : bannière pleine largeur + recherche superposée === */
.page-accueil .accueil-hero { position: relative; margin-bottom: 2.5rem; }
.page-accueil .accueil-hero-media { width: 100%; line-height: 0; }
.page-accueil .accueil-hero-media img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.page-accueil .accueil-hero-container { position: relative; }

/* La carte de recherche remonte pour chevaucher le bas de la bannière */
.page-accueil .global-search.accueil-hero-search {
  position: relative;
  z-index: 5;
  margin: -104px 0 0 !important;
  background: var(--card) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 0 !important;
  box-shadow: 0 22px 60px -18px rgba(24, 24, 27, 0.30) !important;
  padding: 1.9rem 2.1rem !important;
}
.page-accueil .accueil-hero-search .global-search-inner {
  background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important;
}
.page-accueil .accueil-hero-search .global-search-label {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--ink); margin: 0 0 0.9rem;
}
.page-accueil .accueil-hero-search .global-search-label .icon { display: none; }
.page-accueil .accueil-hero-search .global-search-input-wrap {
  background: transparent !important; border: 0 !important; border-bottom: 2.5px solid var(--ink) !important;
  border-radius: 0 !important; box-shadow: none !important; padding: 12px 2px !important;
}
.page-accueil .accueil-hero-search .global-search-input-wrap:focus-within {
  box-shadow: none !important; border-bottom-color: var(--pp-orange) !important;
}
.page-accueil .accueil-hero-search .global-search-input,
.page-accueil .accueil-hero-search .global-search-input:focus,
.page-accueil .accueil-hero-search .global-search-input:focus-visible {
  border: 0 !important; border-radius: 0 !important; background: transparent !important;
  box-shadow: none !important; outline: none !important;
}

@media (max-width: 720px) {
  .page-accueil .accueil-hero-media img { height: 240px; }
  .page-accueil .global-search.accueil-hero-search { margin-top: -64px !important; padding: 1.4rem 1.25rem !important; }
  .page-accueil .accueil-hero-search .global-search-label { font-size: 0.95rem; }
}

/* Grille A-Z : carrés pleins séparés par un filet */
.page-accueil .letters-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px;
  background: var(--hairline); border: 1px solid var(--hairline); margin: 0;
}
.page-accueil .letters-grid .letter-card {
  background: var(--card); border: 0; border-radius: 0; box-shadow: none;
  aspect-ratio: 1 / 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px; transition: background 0.12s;
}
.letters-grid .letter-card::before,
.page-accueil .letters-grid .letter-card::after { display: none; }
.page-accueil .letters-grid .letter-card:hover { background: var(--hover); transform: none; }
.page-accueil .letters-grid .letter-card .letter { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; color: var(--ink); }
.page-accueil .letters-grid .letter-card .count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.page-accueil .letters-grid .letter-card .count small { font-size: 9px; }
.page-accueil .letters-grid .letter-card.has-sub .count small { color: var(--ink-soft); font-weight: 600; }
.page-accueil .letters-grid .letter-card.empty { cursor: default; opacity: 1; background: var(--card); }
.letters-grid .letter-card.empty .letter,
.page-accueil .letters-grid .letter-card.empty .count { color: #c4c2b8; }
.page-accueil .letters-grid .letter-card-tous .letter { font-size: 13px; letter-spacing: 0.02em; }

/* Chiffres clés : blocs carrés, chiffres encre, filet séparateur */
.page-accueil .stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  background: var(--hairline); border: 1px solid var(--hairline); margin-bottom: 1rem;
}
.page-accueil .stats .stat {
  background: var(--card); border: 0; border-radius: 0; box-shadow: none;
  padding: 26px 24px; min-height: 0; display: block; overflow: visible;
}
.page-accueil .stats .stat::before { display: none; }
.page-accueil .stats .stat .stat-icon { display: none; }
.page-accueil .stats .stat .stat-value { font-family: var(--font-display); font-weight: 800; font-size: 38px; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.page-accueil .stats .stat.regle .stat-value { color: var(--ink); }
.stats .stat.regulariser .stat-value,
.page-accueil .stats .stat.centres .stat-value { color: var(--muted); }
.page-accueil .stats .stat .stat-label { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Encart « À valider » : bloc plein à fond uni, sans filet ni bord arrondi */
.page-accueil .notice.notice-warning {
  background: var(--hover) !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 18px 20px !important;
}
.page-accueil .notice.notice-warning strong { color: var(--ink) !important; }

@media (max-width: 860px) {
  .page-accueil .letters-grid { grid-template-columns: repeat(6, 1fr); }
  /* KPIs compacts sur une ligne */
  .page-accueil .stats { grid-template-columns: repeat(3, 1fr); }
  .page-accueil .stats .stat { padding: 16px 10px; }
  .page-accueil .stats .stat .stat-value { font-size: 21px; }
  .page-accueil .stats .stat .stat-label { font-size: 10.5px; margin-top: 6px; }
  /* Grille A-Z : montrer l'essentiel — la mention « (N pages) » disparaît */
  .page-accueil .letters-grid .letter-card { overflow: hidden; gap: 2px; padding: 4px; }
  .page-accueil .letters-grid .letter-card .count small { display: none; }
  .page-accueil .letters-grid .letter-card .letter { font-size: 18px; }
  .page-accueil .letters-grid .letter-card .count { font-size: 10px; }
}
@media (max-width: 480px) { .page-accueil .letters-grid { grid-template-columns: repeat(4, 1fr); } }

/* ====================================================================== */
/* ====== Système de filtres unifié : un seul bouton « Filtres »   ====== */
/* ====== Panneau déroulant sur desktop · bottom-sheet sur mobile   ====== */
/* ====================================================================== */

.fbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1.25rem;
}
.fbar--search .field { flex: 1 1 auto; min-width: 0; }
.fbar-spacer { flex: 1 1 auto; }

.filter-anchor { position: relative; flex: none; }

/* --- Le bouton unique --- */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.filter-toggle:hover { border-color: var(--ink); }
.filter-toggle[aria-expanded="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}
.filter-toggle svg { width: 17px; height: 17px; flex: none; }
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pp-orange);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.filter-badge[hidden] { display: none; }

/* --- Le fond semi-transparent --- */
.filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 900;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.filter-backdrop.is-open { opacity: 1; }
.filter-backdrop[hidden] { display: none; }

/* --- Le panneau (base = desktop, dropdown ancré au bouton) ---
   Ancré au bord DROIT du bouton et déployé vers la gauche, pour ne jamais
   déborder de l'écran (le bouton Filtres est en bout de barre). */
.filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: 380px;
  max-width: calc(100vw - 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px -12px rgba(24, 24, 27, 0.28), 0 4px 12px rgba(24, 24, 27, 0.08);
  z-index: 950;
  overflow: hidden;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 620px);
}
.filter-panel.is-open { transform: translateY(0); opacity: 1; }
.filter-panel[hidden] { display: none; }

.filter-panel__handle { display: none; }

.filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.filter-panel__header h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.filter-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--hover);
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.filter-panel__close:hover { background: var(--line-strong); color: var(--ink); }

.filter-panel__body {
  padding: 0.9rem 1.15rem 1.1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.filter-group { margin-top: 1.1rem; }
.filter-group:first-child { margin-top: 0.2rem; }
.filter-group__title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

/* Selects natifs dans le panneau : pleine largeur, épurés */
.filter-panel select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}
.filter-panel select:focus {
  outline: none;
  border-color: var(--pp-orange);
  box-shadow: 0 0 0 3px rgba(243, 146, 0, 0.15);
}

/* Segmented control dans le panneau : vertical, pleine largeur */
.filter-panel .filtres.segmented { display: flex; width: 100%; margin: 0; }
.filter-panel .filtres.segmented .filtre-btn { flex: 1; padding: 0.55rem 0.6rem; font-size: 0.85rem; }
.filter-panel .filtres.segmented .filtre-btn .filtre-count { display: none; }

/* Combos & statut du volet résultats à l'intérieur du panneau */
.filter-panel .combo { flex: 1 1 100%; min-width: 0; }
.filter-panel .combo-toggle {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.filter-panel .statut-filter { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.filter-panel .statut-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}
.filter-panel .statut-btn .statut-count { margin-left: auto; opacity: 0.7; }
.filter-panel .statut-btn.active .statut-count { opacity: 1; }
.filter-panel .more-filters-row { margin: 0; gap: 0; flex-direction: column; align-items: stretch; }
/* Grille A-Z dans le panneau étroit : 5 colonnes qui tiennent sans déborder.
   minmax(0,1fr) autorise les pistes à rétrécir sous la taille du contenu
   (sinon repeat(8,1fr) = minmax(auto,1fr) déborde et se fait rogner à droite). */
.filter-panel .alpha-grid {
  margin-top: 0.6rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.filter-panel .alpha-grid .acell { padding: 6px 2px; gap: 2px; }
.filter-panel .alpha-grid .acell .al { font-size: 17px; }
.filter-panel .alpha-grid .acell .al.word { font-size: 10.5px; }
.filter-panel .alpha-grid .acell .ac { font-size: 10px; }

/* Pied du panneau : Effacer + Appliquer */
.filter-panel__footer {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--line);
  flex: none;
  background: var(--card);
}
.filter-panel__footer button {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-panel__clear {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.filter-panel__clear:hover { border-color: var(--ink); color: var(--ink); }
.filter-panel__apply {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
}
.filter-panel__apply:hover { background: #000; }

/* Empêche le scroll du corps quand le sheet est ouvert (mobile) */
body.filter-open { overflow: hidden; }

/* --- MOBILE : le panneau devient un bottom-sheet --- */
@media (max-width: 700px) {
  .fbar { flex-wrap: wrap; }
  .filter-anchor { flex: 1 1 auto; }
  .filter-toggle { width: 100%; justify-content: center; }
  .fbar-spacer { display: none; }

  .filter-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    border: none;
    box-shadow: 0 -12px 40px rgba(24, 24, 27, 0.25);
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .filter-panel.is-open { transform: translateY(0); }

  .filter-panel__handle {
    display: block;
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: var(--line-strong);
    margin: 0.7rem auto 0.1rem;
    flex: none;
  }
  .filter-panel__header { padding: 0.6rem 1.15rem 0.9rem; }
  .filter-panel__body { padding-bottom: 1.4rem; }
}
