/* ============================================
   BELGIQUE INFO — STYLE PRINCIPAL
   Mobile-first, vanilla CSS, design tokens
   ============================================ */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs marque */
  --c-primary: #003D7A;
  --c-primary-dark: #002951;
  --c-primary-light: #0a5cb0;
  --c-secondary: #FFCD00;
  --c-secondary-dark: #d9ad00;
  --c-accent: #F8F9FA;

  /* Texte */
  --c-text: #2D3748;
  --c-text-strong: #1A2332;
  --c-text-muted: #64748B;
  --c-text-inverse: #FFFFFF;

  /* État */
  --c-success: #06D6A0;
  --c-warning: #FFB703;
  --c-danger: #E63946;
  --c-info: #3B82F6;

  /* Surfaces */
  --c-bg: #FFFFFF;
  --c-bg-soft: #F8F9FA;
  --c-bg-muted: #F1F5F9;
  --c-border: #E2E8F0;
  --c-border-strong: #CBD5E1;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.05);

  /* Radius */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 9999px;

  /* Spacing échelle */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Type */
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
  --fs-5xl: 3rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 800px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t: 200ms ease;
  --t-slow: 320ms ease;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary-dark); text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
ul, ol { padding-left: 1.5em; }

h1, h2, h3, h4, h5, h6 {
  color: var(--c-text-strong);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.1;
}
h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  margin-top: var(--s-7);
  letter-spacing: -0.025em;
}
h3 { font-size: var(--fs-xl); margin-top: var(--s-5); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--s-4); }
strong { color: var(--c-text-strong); }
blockquote {
  margin: var(--s-5) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--c-bg-soft);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--r);
  font-style: italic;
  color: var(--c-text-strong);
}
code {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  background: var(--c-bg-muted);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
  font-size: 0.9em;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: 0; left: 0;
  background: var(--c-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10000;
  border-radius: 0 0 var(--r) 0;
  transform: translateY(-100%);
  transition: transform 150ms ease;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--c-secondary);
  outline-offset: 2px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-4);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--s-5); }
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding: var(--s-7) 0; }
.section--soft { background: var(--c-bg-soft); }
.section--primary { background: var(--c-primary); color: #fff; }
.section--primary h2 { color: #fff; }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.flex { display: flex; gap: var(--s-3); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
}
@media (min-width: 768px) {
  .header-inner { padding: var(--s-3) var(--s-5); }
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-text-strong);
  font-weight: 400;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo svg { flex-shrink: 0; }
.logo:hover { text-decoration: none; color: var(--c-primary); }
.logo-text strong { color: var(--c-primary); font-weight: 800; letter-spacing: -0.02em; }
.logo-text strong { color: var(--c-primary); font-weight: 800; }

.nav-toggle {
  background: transparent;
  border: 0;
  width: 44px; height: 44px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  order: 4;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-text-strong);
  border-radius: 2px;
  transition: transform var(--t);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  display: none;
  grid-column: 1 / -1;
}
.primary-nav.is-open { display: block; }
.primary-nav ul {
  list-style: none;
  margin: 0; padding: var(--s-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  border-top: 1px solid var(--c-border);
}
.primary-nav a {
  display: block;
  padding: var(--s-3);
  color: var(--c-text-strong);
  font-weight: 500;
  border-radius: var(--r);
}
.primary-nav a:hover { background: var(--c-bg-soft); text-decoration: none; }
.primary-nav .is-active { color: var(--c-primary); }
.primary-nav .submenu { display: none; padding-left: var(--s-4); }
.primary-nav .has-submenu.is-open .submenu { display: block; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .primary-nav {
    display: block !important;
    grid-column: auto;
  }
  .primary-nav ul {
    flex-direction: row;
    padding: 0;
    border-top: 0;
    align-items: center;
  }
  .primary-nav a { padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
  .primary-nav .has-submenu { position: relative; }
  .primary-nav .submenu {
    position: absolute;
    top: 100%; left: 0;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: var(--r);
    min-width: 240px;
    padding: var(--s-2);
    border: 1px solid var(--c-border);
  }
  .primary-nav .has-submenu:hover .submenu { display: block; }
}

.header-search {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 4px 4px 4px var(--s-3);
  max-width: 280px;
}
.header-search input {
  border: 0;
  background: transparent;
  padding: var(--s-2);
  width: 100%;
  outline: none;
  color: var(--c-text);
  font-size: var(--fs-sm);
}
.header-search button {
  background: var(--c-primary);
  color: #fff;
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-search button:hover { background: var(--c-primary-dark); }
@media (max-width: 767px) {
  .header-search { display: none; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--r);
  font-weight: 600;
  font-size: var(--fs-base);
  border: 0;
  cursor: pointer;
  transition: transform var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
  min-height: 48px;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; box-shadow: var(--shadow); }
.btn-secondary { background: var(--c-secondary); color: var(--c-text-strong); }
.btn-secondary:hover { background: var(--c-secondary-dark); color: var(--c-text-strong); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--c-primary); border: 2px solid var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary); color: #fff; }
.btn-sm { padding: 0.5rem 1rem; font-size: var(--fs-sm); min-height: 36px; }
.btn-lg { padding: 1rem 2rem; font-size: var(--fs-lg); min-height: 56px; }

/* ============================================
   HERO HOME
   ============================================ */
.hero {
  background: linear-gradient(135deg, #002654 0%, var(--c-primary) 50%, #0a4a8f 100%);
  color: #fff;
  padding: clamp(var(--s-7), 8vw, var(--s-9)) 0 clamp(var(--s-8), 10vw, calc(var(--s-9) + var(--s-5)));
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -15%;
  width: 70%; height: 200%;
  background: radial-gradient(ellipse, rgba(255,205,0,.18), transparent 55%);
  pointer-events: none;
  filter: blur(20px);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -50%; left: -10%;
  width: 50%; height: 100%;
  background: radial-gradient(circle, rgba(230,57,70,.08), transparent 60%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 2; }
.hero h1 {
  color: #fff;
  font-size: clamp(1.875rem, 3.8vw, 3rem);
  margin-bottom: var(--s-3);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero p.lead {
  font-size: clamp(1.125rem, 1.7vw, var(--fs-xl));
  opacity: .92;
  margin-bottom: var(--s-6);
  max-width: 640px;
  line-height: 1.5;
}

.hero-search {
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-3);
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  position: relative;
  z-index: 2;
}
.hero-search-tabs {
  display: flex;
  gap: var(--s-1);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--s-3);
}
.hero-search-tabs button {
  background: transparent;
  border: 0;
  color: var(--c-text-muted);
  padding: var(--s-3);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.hero-search-tabs button.is-active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
.hero-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-3);
}
.hero-search-form input {
  padding: var(--s-4);
  font-size: var(--fs-lg);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  width: 100%;
}
.hero-search-form input:focus {
  outline: 3px solid var(--c-secondary);
  outline-offset: -1px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin-top: var(--s-5);
  font-size: var(--fs-sm);
  opacity: .9;
}
.hero-stats span::before { content: '✓ '; color: var(--c-secondary); font-weight: bold; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: transform 200ms cubic-bezier(.2,.7,.3,1),
              box-shadow 200ms ease,
              border-color 150ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(0, 61, 122, 0.15);
  border-color: rgba(0, 61, 122, 0.3);
}
/* Si la card est elle-même un lien, jamais d'underline (ni sur le titre ni sur l'icône) */
a.card,
a.card:hover,
a.card:focus,
a.card:visited {
  text-decoration: none !important;
  color: inherit;
}
a.card:hover h3 { color: var(--c-primary); }
.card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--s-3);
  transition: transform 200ms ease;
  text-decoration: none !important;
}
a.card:hover .card-icon { transform: scale(1.08); }
.card a:not(.btn) { color: inherit; }
.card a:not(.btn):hover { text-decoration: none; }
/* Les boutons dans les cards gardent leurs couleurs propres */
.card .btn-primary { color: #fff !important; }
.card .btn-secondary { color: var(--c-text-strong) !important; }
.card h3 { margin: 0 0 var(--s-2); font-size: var(--fs-lg); }
.card p { margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); }
.card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--s-3);
}

.commune-card {
  display: block;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  text-decoration: none;
  color: inherit;
  transition: transform 200ms cubic-bezier(.2,.7,.3,1),
              box-shadow 200ms ease,
              border-color 150ms ease;
  position: relative;
  overflow: hidden;
}
.commune-card::after {
  content: '→';
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  font-size: var(--fs-xl);
  color: var(--c-primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.commune-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -8px rgba(0, 61, 122, 0.18);
}
.commune-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}
.commune-card h3 {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-xl);
  color: var(--c-primary);
  font-weight: 700;
  letter-spacing: -0.025em;
  padding-right: 28px;
}
.commune-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  align-items: center;
  line-height: 1.4;
}
.commune-card .meta > span {
  white-space: nowrap;
}
.commune-card .meta strong { color: var(--c-text-strong); }
.commune-card .badge {
  display: inline-flex;
  align-items: center;
  background: var(--c-secondary);
  color: var(--c-text-strong);
  padding: 3px 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ============================================
   COMMUNE PAGE
   ============================================ */
.commune-hero {
  background: linear-gradient(135deg, #002654 0%, var(--c-primary) 60%, #0a4a8f 100%);
  color: #fff;
  padding: clamp(var(--s-6), 5vw, var(--s-8)) 0 clamp(var(--s-7), 6vw, var(--s-9));
  position: relative;
  overflow: hidden;
}
.commune-hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 50%; height: 180%;
  background: radial-gradient(ellipse, rgba(255,205,0,.12), transparent 60%);
  pointer-events: none;
  filter: blur(30px);
}
.commune-hero > .container { position: relative; z-index: 2; }
.commune-hero .breadcrumb { margin-bottom: var(--s-4); padding: 0; }
.commune-hero h1 {
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-3);
}
.commune-hero p {
  opacity: .92;
  font-size: var(--fs-lg);
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
}
/* Strong et liens dans le hero bleu : couleurs lisibles */
.commune-hero strong {
  color: #fff;
  font-weight: 700;
}
.commune-hero a:not(.btn) {
  color: var(--c-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,205,0,.4);
  transition: border-color 120ms ease;
}
.commune-hero a:not(.btn):hover {
  border-color: var(--c-secondary);
}

.commune-info-card {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 6px 24px -4px rgba(0, 38, 84, 0.18), 0 1px 3px rgba(0,0,0,.04);
  padding: var(--s-5) var(--s-5) var(--s-4);
  margin-top: -1.75rem;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.5);
}
.commune-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 768px) {
  .commune-info-grid { grid-template-columns: 1fr 1fr; }
}
.commune-mini-map {
  height: 240px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--c-bg-soft);
}
.info-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-4);
}
.info-list dt {
  font-weight: 600;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}
.info-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--c-text-strong);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: var(--s-4) 0 0;
}
.quick-actions .btn {
  flex: 1 1 auto;
  min-width: 180px;
  padding: 10px 18px;
  min-height: 42px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
@media (min-width: 768px) {
  .quick-actions .btn { flex: 0 1 auto; }
}

/* Layout main+sidebar */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  padding: var(--s-6) 0;
}
@media (min-width: 1024px) {
  .main-layout { grid-template-columns: 1fr 320px; }
}
.main-content > *:first-child { margin-top: 0; }
.main-content { min-width: 0; }

.sidebar { display: flex; flex-direction: column; gap: var(--s-4); }
.sidebar-block {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}
.sidebar-block h3 {
  margin: 0 0 var(--s-3);
  font-size: var(--fs-base);
  color: var(--c-primary);
}
.quick-links {
  list-style: none;
  margin: 0; padding: 0;
}
.quick-links li { margin-bottom: var(--s-1); }
.quick-links a {
  display: block;
  padding: var(--s-2);
  border-radius: var(--r-sm);
  color: var(--c-text);
}
.quick-links a:hover { background: var(--c-bg-soft); text-decoration: none; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  padding: var(--s-3) 0;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
.breadcrumb ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: var(--s-2);
  color: var(--c-border-strong);
}
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb [aria-current="page"] { color: var(--c-text-strong); font-weight: 600; }

/* Breadcrumb dans les hero bleus → contraste blanc + lisible */
.commune-hero .breadcrumb,
.commune-hero .breadcrumb a,
.commune-hero .breadcrumb a:link,
.commune-hero .breadcrumb a:visited,
.commune-hero .breadcrumb [aria-current="page"],
.commune-hero .breadcrumb span {
  color: rgba(255,255,255,.95) !important;
}
.commune-hero .breadcrumb a:hover {
  color: var(--c-secondary) !important;
}
.commune-hero .breadcrumb li:not(:last-child)::after {
  color: rgba(255,255,255,.5);
}

/* Breadcrumb sur fond blanc (pages legal, contact, etc) — contraste correct */
:not(.commune-hero) > .breadcrumb a,
:not(.commune-hero) > .breadcrumb a:link,
:not(.commune-hero) > .breadcrumb a:visited {
  color: var(--c-text-muted);
}
:not(.commune-hero) > .breadcrumb [aria-current="page"] {
  color: var(--c-text-strong);
}

/* ============================================
   TABLEAUX
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-5) 0;
  font-size: var(--fs-sm);
}
th, td {
  text-align: left;
  padding: var(--s-3);
  border-bottom: 1px solid var(--c-border);
}
th {
  background: var(--c-bg-soft);
  font-weight: 600;
  color: var(--c-text-strong);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:hover { background: var(--c-bg-soft); }
.table-wrapper { overflow-x: auto; }

/* ============================================
   AUTOCOMPLETE
   ============================================ */
.autocomplete {
  position: relative;
}
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.autocomplete-list.is-open { display: block; }
.autocomplete-item {
  padding: var(--s-3);
  cursor: pointer;
  border-bottom: 1px solid var(--c-border);
  transition: background var(--t-fast);
}
.autocomplete-item:last-child { border-bottom: 0; }
.autocomplete-item:hover, .autocomplete-item.is-selected { background: var(--c-bg-soft); }
.autocomplete-item strong { color: var(--c-primary); }
.autocomplete-meta { font-size: var(--fs-xs); color: var(--c-text-muted); }

/* ============================================
   FAQ
   ============================================ */
.faq-list { margin: var(--s-5) 0; }
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  margin-bottom: var(--s-3);
  overflow: hidden;
  background: #fff;
}
.faq-question {
  background: transparent;
  border: 0;
  padding: var(--s-4);
  width: 100%;
  text-align: left;
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--c-text-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--c-primary);
  transition: transform var(--t);
}
.faq-item.is-open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 var(--s-4) var(--s-4);
  color: var(--c-text);
  display: none;
}
.faq-item.is-open .faq-answer { display: block; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--c-text-strong);
  color: #cbd5e1;
  padding: var(--s-7) 0 var(--s-5);
  margin-top: var(--s-9);
}
.site-footer h3, .site-footer h4 { color: #fff; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--c-secondary); text-decoration: none; }
/* Force le contraste blanc dans le footer (override .strong color global) */
.site-footer p, .site-footer li, .site-footer span { color: #cbd5e1; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer .footer-bottom p { color: #94a3b8; }
.site-footer .footer-bottom strong { color: #fff; }

.footer-newsletter {
  background: linear-gradient(135deg, rgba(255,205,0,.06) 0%, rgba(0,61,122,.12) 100%);
  border: 1px solid rgba(255,205,0,.15);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-7);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: stretch;
}
@media (min-width: 720px) {
  .footer-newsletter {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
  }
}
.footer-newsletter .newsletter-text { flex: 0 0 auto; max-width: 380px; }
.footer-newsletter h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.footer-newsletter p {
  margin: 0;
  color: #cbd5e1;
  font-size: var(--fs-sm);
  line-height: 1.4;
}
.site-footer .footer-newsletter strong { color: #fff; }
.footer-newsletter .newsletter-form {
  flex: 1 1 auto;
  max-width: 480px;
  margin-left: auto;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: stretch;
}
.newsletter-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: var(--fs-base);
  height: auto;
}
.newsletter-form input::placeholder { color: #94a3b8; }
.newsletter-form input:focus {
  outline: 2px solid var(--c-secondary);
  outline-offset: -1px;
  background: rgba(255,255,255,.12);
}
.newsletter-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .newsletter-form { flex-wrap: wrap; }
  .newsletter-form input, .newsletter-form button { flex: 1 1 100%; }
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
}
.footer-col li { margin-bottom: var(--s-2); font-size: var(--fs-sm); }

.footer-bottom {
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  font-size: var(--fs-sm);
  color: #94a3b8;
}
.legal-shortcuts { margin-top: var(--s-3); }
.legal-shortcuts a { font-size: var(--fs-xs); }

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: var(--s-4); left: var(--s-4); right: var(--s-4);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s-5);
  z-index: 1000;
  max-width: 720px;
  margin: 0 auto;
}
.cookie-banner-inner {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 768px) {
  .cookie-banner-inner { grid-template-columns: 1fr auto; align-items: center; }
}
.cookie-banner h2 { margin: 0 0 var(--s-2); font-size: var(--fs-lg); }
.cookie-banner p { margin: 0; font-size: var(--fs-sm); color: var(--c-text-muted); }
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: var(--s-4); }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--s-2);
  color: var(--c-text-strong);
  font-size: var(--fs-sm);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: var(--s-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  font-size: var(--fs-base);
  background: #fff;
  transition: border-color var(--t-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: 3px solid var(--c-secondary);
  outline-offset: -1px;
  border-color: var(--c-primary);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-help { font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: var(--s-1); }
.form-error {
  background: #fef2f2;
  color: var(--c-danger);
  padding: var(--s-3);
  border-radius: var(--r);
  border-left: 4px solid var(--c-danger);
  margin-bottom: var(--s-4);
  font-size: var(--fs-sm);
}
.form-success {
  background: #ecfdf5;
  color: #047857;
  padding: var(--s-3);
  border-radius: var(--r);
  border-left: 4px solid var(--c-success);
  margin-bottom: var(--s-4);
  font-size: var(--fs-sm);
}

/* Slider volume déménagement */
.range-slider { width: 100%; }
.volume-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s-2);
  margin: var(--s-3) 0;
}
.volume-preset {
  background: #fff;
  border: 2px solid var(--c-border);
  border-radius: var(--r);
  padding: var(--s-3);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.volume-preset:hover { border-color: var(--c-primary-light); }
.volume-preset.is-active { border-color: var(--c-primary); background: var(--c-bg-soft); }
.volume-preset strong { display: block; color: var(--c-primary); }
.volume-preset small { color: var(--c-text-muted); font-size: var(--fs-xs); }

/* ============================================
   AD SLOTS
   ============================================ */
.ad-wrapper {
  margin: var(--s-6) 0;
  text-align: center;
}
.ad-placeholder {
  background: var(--c-bg-soft);
  border: 2px dashed var(--c-border-strong);
  border-radius: var(--r);
  padding: var(--s-6);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  text-align: center;
}
.affiliate-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  background: linear-gradient(135deg, var(--c-secondary), var(--c-secondary-dark));
  color: var(--c-text-strong);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg);
  margin: var(--s-5) 0;
}
.affiliate-banner strong { font-size: var(--fs-lg); }

/* ============================================
   MAP / CARTE
   ============================================ */
.map-fullscreen {
  height: calc(100vh - 200px);
  min-height: 500px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.map-controls {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  padding: var(--s-3);
  background: #fff;
  border-radius: var(--r) var(--r) 0 0;
  border: 1px solid var(--c-border);
  border-bottom: 0;
}

/* ============================================
   BADGES & TIERS
   ============================================ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--r-sm);
  background: var(--c-bg-muted);
  color: var(--c-text-strong);
}
.tier-very-low { background: #d1fae5; color: #065f46; }
.tier-low      { background: #ecfccb; color: #3f6212; }
.tier-medium   { background: #fef3c7; color: #92400e; }
.tier-high     { background: #fee2e2; color: #991b1b; }
.tier-very-high{ background: #fce7f3; color: #9d174d; }

/* ============================================
   ARTICLE / GUIDES
   ============================================ */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 760px;
}
.article-content h2 {
  border-bottom: 2px solid var(--c-border);
  padding-bottom: var(--s-2);
}
.article-content ul, .article-content ol { margin: var(--s-4) 0; }
.article-content li { margin-bottom: var(--s-2); }
.article-content img { border-radius: var(--r); margin: var(--s-5) 0; }
.article-meta {
  display: flex;
  gap: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--s-5);
}
.article-cover {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-5);
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-result {
  padding: var(--s-4);
  border-bottom: 1px solid var(--c-border);
}
.search-result h3 {
  margin: 0 0 var(--s-1);
  font-size: var(--fs-lg);
}
.search-result h3 a { color: var(--c-primary); }
.search-result p { margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); }
.search-result .url {
  color: var(--c-success);
  font-size: var(--fs-xs);
  margin-bottom: var(--s-2);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  justify-content: center;
  margin: var(--s-6) 0;
}
.pagination a, .pagination span {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--c-text);
  min-width: 40px;
  text-align: center;
}
.pagination a:hover { background: var(--c-bg-soft); }
.pagination .is-current {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--s-5) 0;
  justify-content: center;
  padding: 8px;
  background: var(--c-bg-soft);
  border-radius: var(--r-pill);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.alphabet-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  background: transparent;
  transition: all 150ms ease;
  border: 0;
  letter-spacing: -0.01em;
}
.alphabet-nav a:hover {
  background: #fff;
  color: var(--c-primary);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.alphabet-nav a.is-active,
.alphabet-nav .is-active {
  background: var(--c-primary);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 61, 122, .25);
}
@media (max-width: 640px) {
  .alphabet-nav { width: 100%; }
  .alphabet-nav a { min-width: 36px; padding: 0 8px; font-size: var(--fs-xs); }
}

/* ============================================
   UTILITIES
   ============================================ */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-3) 0;
}
.tag {
  display: inline-block;
  padding: var(--s-1) var(--s-3);
  background: var(--c-bg-muted);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  color: var(--c-text);
  text-decoration: none;
}
.tag:hover { background: var(--c-primary); color: #fff; text-decoration: none; }

.alert {
  padding: var(--s-4);
  border-radius: var(--r);
  margin: var(--s-4) 0;
  border-left: 4px solid;
}
.alert-info    { background: #eff6ff; border-color: var(--c-info); }
.alert-success { background: #ecfdf5; border-color: var(--c-success); }
.alert-warning { background: #fffbeb; border-color: var(--c-warning); }
.alert-danger  { background: #fef2f2; border-color: var(--c-danger); }

.no-bullets { list-style: none; padding: 0; margin: 0; }

/* ============================================
   PRINT
   ============================================ */
@media print {
  .site-header, .site-footer, .cookie-banner, .ad-wrapper, .affiliate-banner, .nav-toggle, .header-search { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
