/* ============================================================
   VARIABLES — modifier ces valeurs pour adapter au logo
   ============================================================ */
* {
  user-select: none;
}

:root {
  /* Couleurs principales */
  --color-primary:        #01254d;
  --color-primary-dark:   #01254d;
  --color-primary-light:  #1a4da8;
  --color-accent:         #f09401;
  --color-accent-dark:    #f09401;

  /* Arrière-plans */
  --color-bg:             #f8f9fa;
  --color-bg-alt:         #eef2f7;
  --color-white:          #ffffff;

  /* Texte */
  --color-text:           #1a1a2e;
  --color-text-light:     #5a6478;

  /* Carte interactive */
  --color-dept:           #dce8f5;
  --color-dept-stroke:    #b0c8e8;
  --color-dept-active:    #4a90d9;

  /* Typographie */
  --font-sans:            'Poppins', system-ui, -apple-system, sans-serif;

  /* Espacements */
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   1.5rem;
  --sp-lg:   4rem;
  --sp-xl:   6rem;

  /* Coins arrondis */
  --r-sm:    4px;
  --r-md:    8px;
  --r-lg:    16px;

  /* Ombres */
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.16);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans), serif;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 90px;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--sp-sm);
  background: rgba(255,255,255,0.15);
  border-radius: var(--r-sm);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  border: 2px solid rgba(255,255,255,0.3);
}

/* Réseaux sociaux */
.social-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-md);
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.social-link-label {
  line-height: 1;
}

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero-banner {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary-dark);
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(1, 37, 77, 0.82) 0%,
    rgba(1, 37, 77, 0.58) 100%
  );
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-md);
  text-align: center;
}

.hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.hero-dot.active {
  background: white;
  border-color: white;
}

.hero-dot:hover:not(.active) {
  border-color: white;
  background: rgba(255, 255, 255, 0.4);
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.28);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: white;
}

.hero-prev { left: 1.25rem; }
.hero-next { right: 1.25rem; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-sm);
}

.hero-title {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: white;
  margin-bottom: var(--sp-md);
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--r-md);
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.hero-cta:hover {
  background: white;
  transform: translateY(-2px);
}

.hero-cta svg {
  transition: transform 0.2s;
}

.hero-cta:hover svg { transform: translateX(4px); }

/* ============================================================
   SECTION PRÉSENTATION
   ============================================================ */
#presentation {
  background: var(--color-white);
  padding: var(--sp-xl) 0;
}

.presentation-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--sp-sm);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary-dark);
  margin-bottom: var(--sp-md);
}

.section-title .highlight { color: var(--color-accent-dark); }

.presentation-text {

  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: var(--sp-sm);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.presentation-stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--color-bg-alt);
}

.stat { text-align: center; }

.stat-value {
  text-wrap: nowrap;
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-top: 0.2rem;
}

/* ============================================================
   SECTION CARTE
   ============================================================ */
#map-section {
  background: var(--color-bg-alt);
  padding: var(--sp-xl) 0;
}

.map-section-header {
  text-align: center;
  margin-bottom: var(--sp-lg);
  padding: 0 var(--sp-md);
}

.map-hint {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-text-light);
  margin-top: var(--sp-xs);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
}

.map-hint::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.32em;
}

.map-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

#map-container {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  background: var(--color-primary);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

#map-container::after {
  content: '';
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  width: 130px;
  height: 90px;
  background-image: url('assets/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left bottom;
  pointer-events: none;
  z-index: 5;
}

#france-map {
  display: block;
  width: 100%;
  height: auto;
}

/* Départements SVG */
.dept-path {
  fill: var(--color-dept);
  stroke: var(--color-dept-stroke);
  stroke-width: 0.5;
  transition: fill 0.2s ease;
  cursor: default;
}

.dept-path.dept-hover {
  fill: #b8d4ee;
  stroke: #8ab2d6;
  stroke-width: 0.6;
}

.dept-path.dept-highlighted {
  fill: var(--color-dept-active);
  stroke: #2a6db5;
  stroke-width: 0.8;
}

.dept-path.dept-highlighted.dept-hover {
  fill: #2e75c4;
  stroke: #1a55a0;
  stroke-width: 1;
}

/* Points cabinets */
.agency-point {
  fill: var(--color-accent);
  stroke: white;
  stroke-width: 2.5;
  cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  transition: fill 0.15s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.agency-point:hover,
.agency-point.active,
.agency-point.dept-hovered {
  fill: var(--color-primary);
}

.agency-point:focus {
  outline: none;
}

/* Anneaux pulsants */
.pulse-ring {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  pointer-events: none;
  transform-origin: center;
  transform-box: fill-box;
  animation: none;
  opacity: 0;
  transition: stroke 0.15s ease;
}

.agency-item:has(.agency-point:hover) .pulse-ring,
.agency-item:has(.agency-point.active) .pulse-ring,
.agency-item:has(.agency-point.dept-hovered) .pulse-ring {
  stroke: var(--color-primary);
  animation: pulse-expand 2.5s ease-out infinite;
  opacity: 1;
}

@keyframes pulse-expand {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0;   }
}

/* ============================================================
   PANNEAU CABINET
   ============================================================ */
.agency-panel {
  flex: 0 0 288px;
  background: var(--color-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 645px; /* fallback — overridden by JS ResizeObserver */
}

/* Placeholder (aucune cabinet sélectionnée) */
.panel-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  text-align: center;
}

.placeholder-icon {
  width: 52px;
  height: 52px;
  background: var(--color-dept);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.placeholder-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--color-dept-active);
}

.placeholder-text {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Département sélectionné — liste des cabinets */
.panel-dept-agencies {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel-dept-agencies[hidden] { display: none; }

.panel-agency-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--sp-md) var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.agency-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-bg-alt);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.agency-list-item:hover {
  background: var(--color-dept);
  border-color: var(--color-dept-active);
  color: var(--color-primary);
}

.agency-list-item svg {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s, transform 0.15s;
}

.agency-list-item:hover svg {
  opacity: 1;
  transform: translateX(3px);
}

/* Contenu cabinet */
.panel-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel-content[hidden] { display: none; }

.panel-header {
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
  flex-shrink: 0;
}

.panel-scrollable-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel-scrollable-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.panel-scrollable-wrap.at-end::after {
  opacity: 0;
}

.panel-scrollable {
  height: 100%;
  overflow-y: auto;
  padding: 0 var(--sp-md) var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.panel-footer {
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
  flex-shrink: 0;
  border-top: 1px solid var(--color-bg-alt);
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: var(--sp-sm);
}

.panel-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--color-bg-alt);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.panel-close:hover {
  background: var(--color-primary);
  color: white;
}

.panel-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: rgba(232,184,75,0.15);
  padding: 0.25em 0.65em;
  border-radius: var(--r-sm);
  width: fit-content;
}

.panel-logo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 0.85rem 1.25rem;
  margin-bottom: var(--sp-sm);
  background: var(--color-bg);
  border-radius: var(--r-md);
}

.panel-logo-banner[hidden] { display: none; }

.panel-logo {
  max-height: 88px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.panel-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase ;
  line-height: 1.3;
}

.panel-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.city-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-bg);
  padding: 0.22em 0.6em;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-bg-alt);
}

.city-badge svg {
  width: 11px;
  height: 11px;
  fill: var(--color-accent);
  flex-shrink: 0;
}

.panel-description {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.65;
}

.panel-divider {
  height: 1px;
  background: var(--color-bg-alt);
  border: none;
}

.panel-dept-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.65rem;
}

.panel-dept-section {
  position: relative;
}

.panel-dept-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: calc(3 * (1.6em + 0.5em + 2px) + 2 * 0.35rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.panel-dept-list::-webkit-scrollbar {
  display: none;
}

.panel-dept-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.85));
  pointer-events: none;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: opacity 0.25s ease;
}

.panel-dept-section.at-end::after {
  opacity: 0;
}

.panel-description-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.65rem;
}

.dept-tag {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-dept);
  color: var(--color-primary);
  padding: 0.25em 0.6em;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-dept-stroke);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dept-tag:hover {
  background: var(--color-dept-active);
  border-color: #2a6db5;
  color: white;
}

.btn-visit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--r-md);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-visit:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-visit svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.btn-visit:hover svg { transform: translateX(4px); }

/* ============================================================
   ÉTAT DE CHARGEMENT
   ============================================================ */
.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--color-text-light);
  font-size: 0.9rem;
  gap: 0.75rem;
  flex-direction: column;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-dept-stroke);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.map-error { color: #c0392b; }

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

/* ============================================================
   SECTION RÉSEAUX SOCIAUX
   ============================================================ */
.rs-section {
  background: var(--color-primary-dark);
  padding: var(--sp-xl) 0;
}

.rs-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
}

.rs-header {
  text-align: center;
}

.rs-eyebrow {
  color: var(--color-accent);
}

.rs-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: var(--sp-sm);
}

.rs-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

.rs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.rs-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  color: white;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rs-card:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-3px);
}

.rs-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.rs-card:hover .rs-card-icon {
  background: rgba(255, 255, 255, 0.2);
}

.rs-card-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.rs-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rs-card-name {
  font-size: 1rem;
  font-weight: 700;
}

.rs-card-tagline {
  font-size: 0.8rem;
  opacity: 0.72;
  line-height: 1.4;
}

.rs-card:hover .rs-card-tagline {
  opacity: 0.9;
}

.rs-card-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.rs-card:hover .rs-card-arrow {
  transform: translateX(4px);
  opacity: 1;
}

@media (max-width: 768px) {
  .rs-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MENTIONS LÉGALES
   ============================================================ */
.legal-main {
  min-height: calc(100vh - 88px - 56px);
  background: var(--color-bg-alt);
  padding: var(--sp-lg) var(--sp-md) var(--sp-xl);
}

.legal-inner {
  max-width: 820px;
  margin: 0 auto;
}

/* --- En-tête --- */
.legal-head {
  margin-bottom: var(--sp-lg);
}

.legal-main h1 {
  position: relative;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--color-primary-dark);
  padding-bottom: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.legal-main h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

.legal-intro {
  max-width: 60ch;
  color: var(--color-text-light);
  font-size: 1.02rem;
  line-height: 1.6;
}

/* --- Sections en cartes --- */
.legal-main section {
  background: var(--color-white);
  border: 1px solid rgba(1, 37, 77, 0.07);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-md) clamp(1.25rem, 4vw, 2rem);
  margin-bottom: var(--sp-md);
  transition: box-shadow 0.2s, transform 0.2s;
}

.legal-main section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.legal-main h2 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-primary);
  padding-left: 0.9rem;
  border-left: 3px solid var(--color-accent);
  margin-bottom: var(--sp-sm);
}

.legal-main p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: var(--sp-sm);
}

.legal-main section p:last-child {
  margin-bottom: 0;
}

.legal-main strong {
  color: var(--color-text);
  font-weight: 600;
}

/* --- Listes --- */
.legal-main ul {
  list-style: none;
  margin: var(--sp-sm) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.legal-main li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.legal-main li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* --- Liens --- */
.legal-main a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.legal-main a:hover {
  color: var(--color-accent);
}

/* --- Pied de page de la mention --- */
.legal-updated {
  margin-top: var(--sp-md);
  text-align: right;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.65);
  padding: var(--sp-md) 0;
  text-align: center;
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-copy {
  color: rgba(255,255,255,0.55);
}

.footer-link {
  color: rgba(255,255,255,0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: white;
}

.footer-credit {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
}

.footer-link-credit {
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-link-credit:hover {
  color: var(--color-accent);
}

/* ============================================================
   TOOLTIP
   ============================================================ */
.map-tooltip {
  text-transform: uppercase;
  position: fixed;
  background: var(--color-primary-dark);
  color: white;
  font-family: var(--font-sans), serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3em 0.7em;
  border-radius: var(--r-md);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.map-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-primary-dark);
}

.map-tooltip.visible {
  opacity: 1;
}

/* Callout variant : positioned explicitly by JS, no CSS arrow */
.map-callout {
  transform: none;
}
.map-callout::after {
  display: none;
}

/* Leader-line overlay */
#map-leader-lines {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 199;
}
.leader-line {
  stroke: var(--color-primary-dark);
  stroke-width: 1;
  opacity: 0.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .map-tooltip,
  #map-leader-lines {
    display: none !important;
  }

  .header-inner {
    height: 76px;
    padding: 0 var(--sp-sm);
  }

  .logo-img,
  .logo-fallback {
    height: 62px;
    font-size: 0.95rem;
  }

  .social-link-label { display: none; }

  .social-link {
    padding: 0.45rem;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    justify-content: center;
  }

  .hero-nav { display: none; }

  .social-cta { font-size: 0.7rem; }

  .social-link {
    width: 38px;
    height: 38px;
  }

  .social-link svg {
    width: 17px;
    height: 17px;
  }

  .hero-banner { min-height: 360px; }

  .presentation-stats {
    gap: var(--sp-md);
    flex-wrap: wrap;
  }

  .stat { flex: 1 1 calc(50% - var(--sp-md)); }

  /* Panneau passe sous la carte sur mobile */
  .map-wrapper {
    flex-direction: column;
    gap: var(--sp-sm);
  }

  .agency-panel {
    flex: none;
    width: 100%;
    min-height: 160px;
  }

  .panel-scrollable-wrap {
    flex: none;
    overflow: visible;
  }

  .panel-scrollable {
    height: auto;
    max-height: 40vh;
  }

  .panel-agency-list {
    max-height: 40vh;
    flex: none;
  }

  .panel-logo {
    width: 80px;
  }
}

@media (max-width: 480px) {
  #presentation,
  #map-section {
    padding: var(--sp-lg) 0;
  }

  .map-wrapper { padding: 0 var(--sp-sm); }
}
