/* ==========================================================
   Pactoo — feuille de style principale
   ========================================================== */

:root {
  /* Couleurs */
  --bg: #161C2B;
  --surface: #1E2536;
  --surface-2: #242C40;
  --text: #E8ECF4;
  --text-strong: #F4F6FA;
  --text-soft: #C9D0DC;
  --text-muted: #A9B1C2;
  --text-faint: #8C95A8;
  --line: rgba(232, 236, 244, 0.16);
  --line-strong: rgba(232, 236, 244, 0.25);
  --line-faint: rgba(232, 236, 244, 0.10);
  --accent: #3DF5C8;
  --on-accent: #070A12;

  /* Typographie */
  --font-serif: 'EB Garamond', 'Apple Garamond', Garamond, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Mise en page */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 16px;

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  /* Grille de fond en filigrane */
  background-image:
    linear-gradient(rgba(232, 236, 244, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 236, 244, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #FFFFFF; }

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

svg { display: block; flex-shrink: 0; }

[hidden] { display: none !important; }

/* ---------- Structure ---------- */

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- En-tête ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
}

.brand {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-strong);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 18px;
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pill:hover {
  border-color: rgba(232, 236, 244, 0.5);
  background-color: rgba(232, 236, 244, 0.04);
}

/* ---------- Accueil ---------- */

.home {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* contenu accroché sous le logo ; le pied de page reste en bas de fenêtre */
  gap: clamp(36px, 6vw, 56px);
  padding: clamp(8px, 2vw, 20px) 0 clamp(40px, 7vw, 72px);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero > .kicker, .hero > h1 { max-width: 980px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 84px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-soft);
}

.tags li {
  padding: 8px 14px;
  border: 1px solid rgba(232, 236, 244, 0.18);
  border-radius: 6px;
  background: rgba(232, 236, 244, 0.03);
}

/* ---------- Cartes Particuliers / Professionnels ---------- */

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.choice {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease;
}
.choice:hover {
  color: var(--text);
  border-color: rgba(232, 236, 244, 0.32);
}

.choice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--accent);
}

.choice-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.choice-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-title {
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.choice-desc {
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  transition: filter 0.2s ease, background-color 0.2s ease;
}

.btn-solid {
  background: var(--accent);
  color: var(--on-accent);
}
.choice:hover .btn-solid { filter: brightness(1.08); }

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
}
.choice:hover .btn-outline { background-color: rgba(61, 245, 200, 0.08); }

/* ---------- Pied de page ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--text); }

/* ---------- Accessibilité ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================
   Page Assistance
   ========================================================== */

.assist {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vw, 44px);
  width: 100%;
  max-width: 820px;
  padding: clamp(16px, 4vw, 40px) 0 clamp(40px, 7vw, 72px);
}

.assist-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.assist-intro h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.assist-intro h1 em { font-style: italic; color: var(--accent); }

.lead {
  margin: 0;
  max-width: 620px;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
  color: var(--text-muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ---------- Formulaire ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(20px, 4vw, 36px);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.grid-cp {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field > label,
.field > .label,
.address legend {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field > .sublabel {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}

.address {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.address legend { padding: 0 0 8px; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
.multiselect-trigger {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(232, 236, 244, 0.2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px; /* >= 16px : évite le zoom automatique sur iPhone */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

textarea {
  min-height: 180px;
  padding: 14px 16px;
  line-height: 1.45;
  resize: vertical;
}

input::placeholder,
textarea::placeholder { color: #6E7789; opacity: 1; }

input:hover, textarea:hover, .multiselect-trigger:hover { border-color: rgba(232, 236, 244, 0.35); }

input:focus, textarea:focus, .multiselect-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

[aria-invalid="true"],
.multiselect.is-invalid .multiselect-trigger { border-color: #FF8A7A; }

.field-error {
  margin: 0;
  min-height: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #FFB4A8;
}
.field-error:empty { display: none; }

.form-error {
  padding: 14px 16px;
  border: 1px solid rgba(255, 138, 122, 0.5);
  border-radius: 10px;
  background: rgba(255, 138, 122, 0.08);
  color: #FFD2CB;
  font-size: 17px;
}

/* ---------- Menu à choix multiples ---------- */

.multiselect { position: relative; }

.multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: #6E7789;
  cursor: pointer;
}
.multiselect.has-value .multiselect-trigger { color: var(--text); }
.multiselect.is-open .multiselect-trigger { border-color: var(--accent); }
.multiselect-trigger svg { transition: transform 0.2s ease; }
.multiselect.is-open .multiselect-trigger svg { transform: rotate(180deg); }

.multiselect-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiselect-panel {
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(232, 236, 244, 0.2);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Avec JavaScript : le panneau devient un menu déroulant */
.js .multiselect-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin-top: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  display: none;
}
.js .multiselect.is-open .multiselect-panel { display: flex; }

/* Sans JavaScript : cases visibles directement, pas de bouton */
html:not(.js) .multiselect-trigger,
html:not(.js) .multiselect-done { display: none; }

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-muted);
  cursor: pointer;
}
.check b { font-weight: 600; color: var(--text); }
.check:hover { background: rgba(232, 236, 244, 0.05); }
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.multiselect-done {
  align-self: flex-end;
  margin: 4px 4px 2px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(232, 236, 244, 0.08);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 17px;
  cursor: pointer;
}
.multiselect-done:hover { background: rgba(232, 236, 244, 0.14); }

/* ---------- Champ piège ---------- */

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Bas du formulaire ---------- */

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.form-note {
  flex: 1 1 260px;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-faint);
}
.form-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }

button.btn {
  border: 0;
  cursor: pointer;
}

.btn-submit {
  align-self: auto;
  min-height: 52px;
  padding: 0 28px;
  font-size: 19px;
  font-weight: 600;
}
.btn-submit:hover { filter: brightness(1.08); }
.btn-submit:disabled { cursor: progress; filter: saturate(0.6) brightness(0.9); }

/* ---------- Confirmation ---------- */

.success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(24px, 5vw, 44px);
}
.success[hidden] { display: none; }
.success:focus { outline: none; }

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.success-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.success-text {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-muted);
}

button.pill {
  background: transparent;
  font-family: var(--font-serif);
  cursor: pointer;
}

/* ---------- Messages après envoi sans JavaScript ---------- */

.notice {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  font-size: 18px;
  color: var(--text-muted);
}
.notice:target { display: flex; }
.notice-title { font-size: 24px; font-weight: 500; color: var(--text); }
.notice-ok { border-color: var(--accent); }
.notice-error { border-color: rgba(255, 138, 122, 0.6); }
.notice a { color: var(--text); text-decoration: underline; }

/* ---------- Saisie assistée de l'adresse ---------- */

.addr-wrap { position: relative; }

.addr-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(232, 236, 244, 0.2);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.addr-list [role="option"] {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.addr-list [role="option"]:hover,
.addr-list [role="option"][aria-selected="true"] { background: rgba(232, 236, 244, 0.07); }

.addr-main { font-size: 18px; color: var(--text); }
.addr-sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-faint); }

.field-hint {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-faint);
}
.success-text a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.notice-close { align-self: flex-start; margin-top: 8px; text-decoration: none !important; }

/* ==========================================================
   Page Éligibilité
   ========================================================== */

.check-pro {
  align-self: flex-start;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(232, 236, 244, 0.2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-muted);
}
.check-pro:hover { border-color: rgba(232, 236, 244, 0.35); }

.map-field.is-invalid .map-empty,
.map-field.is-invalid .map-box { border-color: #FF8A7A; }

.map-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px dashed rgba(232, 236, 244, 0.25);
  border-radius: 12px;
  background: var(--bg);
}
.map-empty p { margin: 0; flex: 1 1 260px; font-size: 17px; color: var(--text-faint); }
.map-empty .pill { font-size: 16px; }
.map-empty .pill:disabled { cursor: progress; opacity: 0.7; }

.map-box {
  overflow: hidden;
  border: 1px solid rgba(232, 236, 244, 0.2);
  border-radius: 12px;
  background: var(--bg);
}

.map {
  position: relative;
  z-index: 0; /* garde la liste d'adresses au-dessus de la carte */
  width: 100%;
  height: clamp(300px, 55vw, 440px);
  background: #10151F;
}

.map-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line-faint);
}

.map-layers {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(232, 236, 244, 0.16);
  border-radius: 999px;
}

.map-layer,
.map-reset {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 16px;
  cursor: pointer;
}
.map-layer.is-active { background: rgba(232, 236, 244, 0.1); color: var(--text); }
.map-reset { border: 1px solid rgba(232, 236, 244, 0.2); color: var(--text); }
.map-reset:hover { background: rgba(232, 236, 244, 0.05); }

.map-coords {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.map-coords:empty { display: none; }

/* Repère */
.pin { background: none; border: 0; }
.pin-dot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  transform-origin: center;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
.pin-dot::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg);
}

/* Habillage sombre des contrôles Leaflet */
.leaflet-container { font-family: var(--font-serif); }
.leaflet-bar a,
.leaflet-bar a:hover {
  width: 36px;
  height: 36px;
  line-height: 36px;
  background-color: var(--surface-2);
  color: var(--text);
  border-bottom-color: rgba(232, 236, 244, 0.12);
}
.leaflet-bar { border: 1px solid rgba(232, 236, 244, 0.2) !important; box-shadow: none !important; }
.leaflet-control-attribution {
  background: rgba(7, 10, 18, 0.75) !important;
  color: var(--text-faint) !important;
  font-size: 11px;
}
.leaflet-control-attribution a { color: var(--text-muted) !important; }
.leaflet-container:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ==========================================================
   Mentions légales (page + fenêtre en surimpression)
   ========================================================== */

.legal-page {
  flex-grow: 1;
  width: 100%;
  max-width: 820px;
  padding: clamp(16px, 4vw, 40px) 0 clamp(40px, 7vw, 72px);
}

.legal { color: var(--text-muted); font-size: 18px; line-height: 1.55; }
.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--text);
}
.legal h1 em { font-style: italic; color: var(--accent); }
.legal h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  scroll-margin-top: 16px;
}
.legal section { padding: 26px 0; border-top: 1px solid var(--line-faint); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--text); font-weight: 600; }

.legal-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 8px;
}
.legal-toc a {
  padding: 6px 12px;
  border: 1px solid rgba(232, 236, 244, 0.18);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  color: var(--text-soft);
}
.legal-toc a:hover { border-color: rgba(232, 236, 244, 0.4); color: var(--text); }

.legal-list {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 10px 20px;
  margin: 0;
}
.legal-list dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 5px;
}
.legal-list dd { margin: 0; color: var(--text-soft); }
@media (max-width: 600px) {
  .legal-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .legal-list dd { margin-bottom: 12px; }
}

/* Fenêtre */
html.legal-open { overflow: hidden; }

.legal-dialog {
  width: min(860px, calc(100vw - 32px));
  max-width: none;
  height: min(29vh, 300px);
  height: min(29dvh, 300px);
  min-height: 220px;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop {
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.legal-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 14px clamp(18px, 4vw, 32px);
  border-bottom: 1px solid var(--line-faint);
}
.legal-dialog-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.legal-dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.legal-dialog-close:hover { background: rgba(232, 236, 244, 0.06); }

.legal-dialog-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px clamp(18px, 4vw, 32px) calc(28px + env(safe-area-inset-bottom, 0px));
}
.legal-dialog-body:focus { outline: none; }
.legal-dialog-body .legal-updated { margin-top: 12px; }
.legal-loading { color: var(--text-faint); }

@media (max-width: 600px) {
  .legal-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* Liens rapides de l'en-tête (accueil) */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================
   Page Professionnels
   ========================================================== */

.pro {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 88px);
  padding: clamp(16px, 4vw, 40px) 0 clamp(48px, 8vw, 88px);
}

.pro-hero { display: flex; flex-direction: column; gap: 20px; max-width: 900px; }
.pro-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.pro-hero h1 em, .pro-section h2 em { font-style: italic; color: var(--accent); }
.crumb { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }

.pro-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.pro-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(232, 236, 244, 0.18);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-soft);
}
.pro-jump a:hover { border-color: rgba(232, 236, 244, 0.4); color: var(--text); }

.pro-section { display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 24px; }
.pro-section-head { display: flex; flex-direction: column; gap: 12px; }
.pro-section h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.pro-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid rgba(255, 176, 32, 0.35);
  border-radius: 12px;
  background: rgba(255, 176, 32, 0.06);
  font-size: 18px;
  line-height: 1.45;
  color: var(--text-muted);
}
.pro-note strong { color: #FFC659; font-weight: 600; }
.pro-note-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: #FFB020;
  box-shadow: 0 0 10px rgba(255, 176, 32, 0.7);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin-top: 24px;
  transition: border-color 0.2s ease;
}
.offer:hover { border-color: rgba(232, 236, 244, 0.32); }
.offer-hl { border-color: rgba(61, 245, 200, 0.4); }

.offer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--accent);
}

.offer-name {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.offer-desc { margin: 0; font-size: 18px; line-height: 1.45; color: var(--text-muted); }

.offer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-soft);
}
.offer-chips li {
  padding: 6px 10px;
  border: 1px solid rgba(232, 236, 244, 0.16);
  border-radius: 6px;
  background: rgba(232, 236, 244, 0.03);
}

.offer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  min-height: 44px;
  align-self: flex-start;
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
}
.offer-link:hover { color: #7FFFE0; }
.offer-link svg { transition: transform 0.2s ease; }
.offer-link:hover svg { transform: translateX(3px); }

.pro-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
}
.pro-cta > div { flex: 1 1 380px; }
.pro-cta h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.03em; }
.pro-cta p { margin: 0; font-size: 19px; line-height: 1.45; color: var(--text-muted); }
.pro-cta .btn { align-self: center; min-height: 52px; padding: 0 26px; font-size: 19px; }

.offer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: auto;
  padding-top: 8px;
}
.offer-actions .offer-link { margin-top: 0; padding-top: 0; }
.offer-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 18px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(232, 236, 244, 0.35);
  text-underline-offset: 4px;
}
.offer-more:hover { text-decoration-color: var(--text); }

/* ==========================================================
   Pages produit
   ========================================================== */

.product {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 6vw, 64px);
  padding: clamp(16px, 4vw, 40px) 0 clamp(48px, 8vw, 88px);
}
.product-hero { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.product-title { display: flex; align-items: center; gap: 18px; }
.product-title h1 {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.product-icon { width: 64px; height: 64px; flex-shrink: 0; }
.product-icon svg { width: 32px; height: 32px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.product-block { padding: clamp(20px, 3vw, 28px); }
.product-block h2 { margin: 0 0 12px; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.product-block p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text-muted); }
.product-list { margin: 0; padding-left: 20px; font-size: 18px; line-height: 1.5; color: var(--text-muted); }
.product-list li { margin-bottom: 6px; }
.product-list li::marker { color: var(--accent); }

/* ==========================================================
   Bandeau « Actualité » (accueil)
   ========================================================== */

.news {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 176, 32, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 176, 32, 0.06);
}
.news-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #FFB020;
  box-shadow: 0 0 10px rgba(255, 176, 32, 0.7);
}
.news-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.news-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFC659;
}
.news-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}
.news-text p, .news-more p {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}
.news-text p:last-child, .news-more p:last-child { margin-bottom: 0; }
.news-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 18px;
  border: 1px solid rgba(255, 176, 32, 0.6);
  border-radius: 999px;
  font-size: 17px;
  color: #FFC659;
}
.news-btn:hover { color: #FFD88A; background: rgba(255, 176, 32, 0.08); }
.news-btn svg { transition: transform 0.2s ease; }
.news-btn.is-open svg { transform: rotate(-90deg); }

/* ==========================================================
   Pages d'actualité
   ========================================================== */

.article-page {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  width: 100%;
  max-width: 760px;
  padding: clamp(16px, 4vw, 40px) 0 clamp(48px, 8vw, 88px);
}
.article { display: flex; flex-direction: column; gap: 18px; width: 100%; }
.article h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.article-date { color: #FFC659; }
.article-body { font-size: 20px; line-height: 1.6; color: var(--text-muted); }
.article-body p { margin: 0 0 16px; }
.article-body ul { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body li::marker { color: #FFB020; }
.article-loading { color: var(--text-faint); }

/* ==========================================================
   Cartes de couverture
   ========================================================== */

/* Fond « Plan IGN » assombri pour s'accorder au site (les zones colorées ne sont pas affectées) */
.tiles-dark { filter: invert(0.82) hue-rotate(180deg) brightness(1.12) contrast(0.95) saturate(0.75); }
/* Réglage : invert() fixe la luminosité du fond — 1 = très sombre, 0.7 = gris moyen, 0 = plan clair d'origine. */

.cov {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(16px, 4vw, 40px) 0 clamp(48px, 8vw, 88px);
}
.cov-hero { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.cov-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cov-hero h1 em { font-style: italic; color: var(--accent); }

.cov-map-wrap { position: relative; overflow: hidden; padding: 0; }
.cov-map {
  position: relative;
  z-index: 0;
  width: 100%;
  height: clamp(380px, 68vh, 680px);
  background: #10151F;
}
.cov-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line-faint);
}
.cov-error { margin: 0; padding: 14px 18px; color: #FFD2CB; font-size: 17px; border-top: 1px solid var(--line-faint); }

.cov-legend {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  max-width: calc(100% - 24px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 18, 32, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cov-legend-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.cov-legend ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cov-legend li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text); }
.cov-swatch {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 2px solid;
  opacity: 0.9;
}

.cov-note {
  margin: 0 0 -12px;
  font-size: clamp(20px, 2.4vw, 26px);            /* plus gros, adapté aux petits écrans */
  line-height: 1.35;
  font-weight: 600;
  color: #FF6B6B;                                   /* rouge lisible sur fond sombre */
  animation: cov-note-clignote 1.6s ease-in-out infinite;
}
@keyframes cov-note-clignote { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .cov-note { animation: none; } }
.cov-updated {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 12px 18px;
  border: 1px solid rgba(255, 176, 32, 0.35);
  border-radius: 12px;
  background: rgba(255, 176, 32, 0.06);
}
.cov-updated .news-dot { margin-top: 0; }
.cov-updated-text {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #FFC659;
}

/* Bulle d'information d'une zone */
.cov-popup .leaflet-popup-content-wrapper,
.cov-popup .leaflet-popup-tip {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.cov-popup .leaflet-popup-content { margin: 12px 16px; font-family: var(--font-serif); }
.cov-popup a.leaflet-popup-close-button { color: var(--text-muted); }
.cov-pop { display: flex; flex-direction: column; gap: 6px; }
.cov-pop strong { font-size: 18px; font-weight: 600; }
.cov-pop-tier { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.cov-pop-tier i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Liste des communes */
.cov-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cov-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease;
}
.cov-item:hover { border-color: rgba(61, 245, 200, 0.45); color: var(--text); }
.cov-item-name { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.cov-item-info { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.cov-item-go { margin-top: 10px; font-size: 17px; color: var(--accent); }
.cov-item-go::after { content: ' →'; }
.cov-loading { color: var(--text-faint); font-size: 17px; }

/* Plein écran de la carte de couverture */
.cov-tools-right { display: flex; flex-wrap: wrap; gap: 8px; }
.cov-fs { display: inline-flex; align-items: center; gap: 8px; }
.cov-fs .fs-off { display: none; }
.cov-map-wrap.is-full .cov-fs .fs-on { display: none; }
.cov-map-wrap.is-full .cov-fs .fs-off { display: inline; }

.cov-map-wrap.is-full {
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: 0;
  background: var(--bg);
}
.cov-map-wrap.is-full .cov-map { flex: 1 1 auto; height: auto; min-height: 0; }
.cov-map-wrap.is-full .cov-tools { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.cov-map-wrap.is-full .cov-legend { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* Solution de secours sans API plein écran (iPhone) */
html.cov-noscroll, html.cov-noscroll body { overflow: hidden; }
html.cov-noscroll .cov-map-wrap.is-full {
  position: fixed;
  inset: 0;
  z-index: 1000;
  height: 100vh;
  height: 100dvh;
}
.cov-map-wrap:fullscreen { width: 100%; height: 100%; }
.cov-map-wrap:-webkit-full-screen { width: 100%; height: 100%; }

/* Logo dans l'en-tête */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo img { display: block; height: clamp(38px, 5vw, 50px); width: auto; }

.article-cta { margin-top: 12px; min-height: 52px; padding: 0 26px; font-size: 19px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body u { text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Image d'une offre (cartes Professionnels / Particuliers) */
.offer-img {
  display: block;
  width: 100%;
  max-width: 512px;
  height: auto;            /* garde les proportions 512 × 211 */
  margin-bottom: 6px;
  border-radius: 10px;
}
.offer-top .offer-img-top { margin-bottom: 4px; }
.offer-top:has(.offer-img-top) { display: block; }

/* Grande image des pages produit (1080 × 446) */
.product-img {
  display: block;
  width: 100%;
  max-width: 1080px;       /* jamais agrandie au-delà de sa taille réelle */
  height: auto;            /* garde les proportions */
  margin: 2px 0 6px;
  border-radius: var(--radius);
  border: 1px solid var(--line-faint);
}
.product-hero { max-width: none; }

/* ==========================================================
   Bandeau de références (pages produit)
   ========================================================== */

.refs { display: flex; flex-direction: column; gap: 20px; }
.refs-head { display: flex; flex-direction: column; gap: 10px; }
.refs-head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.03em; }

.refs-viewport {
  overflow: hidden;
  padding: 8px 0;
  /* fondu sur les bords */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.refs-track {
  display: flex;
  gap: 28px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.refs.is-moving .refs-track { animation: refs-scroll var(--refs-duration, 30s) linear infinite; }
.refs.is-moving .refs-viewport:hover .refs-track,
.refs.is-moving .refs-viewport:focus-within .refs-track { animation-play-state: paused; }
@keyframes refs-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--refs-distance, 50%))); }
}
/* Sans animation (préférence « réduire les animations ») : défilement manuel */
.refs.is-static .refs-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }

.ref { flex: 0 0 auto; }
.ref-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 128px;
  color: var(--text-muted);
  text-align: center;
}
a.ref-link:hover { color: var(--text); }
.ref-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 16px;
  background: #F4F6FA;          /* fond clair : les logos sombres restent lisibles */
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.ref-link:hover .ref-tile { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); }
.ref-tile img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ref-name {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

/* Tuile sombre pour les logos blancs (mot « sombre » dans references.txt) */
.ref-dark .ref-tile { background: #2A3247; border-color: rgba(232, 236, 244, 0.22); }

/* Mots-clés de l'accueil en défilement continu */
.tags-viewport { width: 100%; }
.tags-viewport.is-measuring,
.tags-viewport.is-moving { overflow: hidden; }
.tags-viewport.is-measuring .tags,
.tags-viewport.is-moving .tags { flex-wrap: nowrap; width: max-content; }
.tags-viewport.is-moving .tags li { white-space: nowrap; }
.tags-viewport.is-moving {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.tags-viewport.is-moving .tags { animation: refs-scroll var(--refs-duration, 30s) linear infinite; }
.tags-viewport.is-moving:hover .tags { animation-play-state: paused; }

/* ==========================================================
   Questions fréquentes (pages produit)
   ========================================================== */

.faq { padding: clamp(20px, 3vw, 32px); }
.faq h2 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 34px); font-weight: 500; letter-spacing: -0.03em; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--line-faint); }
.faq-item:last-child { border-bottom: 1px solid var(--line-faint); }
.faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 44px;
  padding: 16px 4px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
  list-style: none;            /* masque le triangle natif */
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-q { text-decoration: underline; text-decoration-color: rgba(232, 236, 244, 0.35); text-underline-offset: 4px; }
.faq-icon {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-top: 7px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--accent);   /* triangle pointant vers la droite */
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-icon { transform: rotate(90deg); }
.faq-q strong { font-weight: 600; }
.faq-a {
  padding: 0 4px 18px 23px;    /* aligné sur le texte de la question */
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
}
.faq-a p { margin: 0 0 10px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul { margin: 0 0 10px; padding-left: 20px; }
.faq-a li::marker { color: var(--accent); }
.faq-a strong { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .faq-icon { transition: none; } }

/* FAQ en couleur */
.faq-item { transition: background-color 0.2s ease; }
.faq-item summary:hover .faq-q { color: var(--accent); text-decoration: none; }
.faq-item[open] { background: rgba(61, 245, 200, 0.05); }
.faq-item[open] summary .faq-q { color: var(--accent); }
.faq-a {
  margin: 0 4px 16px 23px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: rgba(61, 245, 200, 0.06);
  color: var(--text-soft);
}
.faq-a strong { color: #FFC659; }   /* le gras ressort en ambre, comme les mises en avant du site */
.faq-a li::marker { color: #FFB020; }

/* ==========================================================
   Réseaux sociaux (accueil)
   ========================================================== */

.social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
  padding: 20px clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.social-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 17px;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.social-link:hover { color: var(--text); border-color: var(--accent); background: rgba(61, 245, 200, 0.06); }
.social-icon { display: inline-flex; width: 22px; height: 22px; color: var(--accent); }
.social-icon img { width: 22px; height: 22px; object-fit: contain; }
.assist-clients strong { color: var(--text); font-weight: 600; }
.assist-clients a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.success-ticket {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid rgba(61, 245, 200, 0.4);
  border-radius: 10px;
  background: rgba(61, 245, 200, 0.06);
  font-size: 19px;
  color: var(--text);
}

/* ==========================================================
   Demande de raccordement en ligne (raccordement.html)
   ========================================================== */

.rac { flex-grow: 1; width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; padding: clamp(12px, 3vw, 28px) 0 56px; }
.rac-intro-bloc { display: flex; flex-direction: column; gap: 14px; }
.rac h1 { margin: 0; font-size: clamp(34px, 6vw, 54px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.rac h1 em, .rac h2 em { font-style: italic; color: var(--accent); }
.rac form { display: flex; flex-direction: column; gap: 20px; }
.rac-carte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); }
.rac-carte h2 { margin: 0 0 14px; font-size: clamp(24px, 3vw, 30px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.rac-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-right: 10px; vertical-align: .3em; }

.rac-resume { list-style: none; padding: 0; margin: 0 0 14px; }
.rac-resume li { position: relative; padding: 5px 0 5px 22px; color: var(--text-soft); }
.rac-resume li::before { content: ""; position: absolute; left: 4px; top: .8em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.rac-groupe { border: 0; padding: 0; margin: 16px 0 0; }
.rac-groupe legend, .rac-label, .rac-champ label {
  display: block; padding: 0; margin: 0 0 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.rac-choix { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rac-option { position: relative; display: block; cursor: pointer; }
.rac-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rac-option span { display: block; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); transition: border-color .15s, background-color .15s; }
.rac-option b { display: block; font-weight: 600; }
.rac-option small { display: block; margin-top: 2px; font-size: 15px; color: var(--text-muted); }
.rac-option input:checked + span { border-color: var(--accent); background: rgba(61, 245, 200, .08); }
.rac-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.rac-champ { margin-top: 16px; }
.rac-ligne { display: flex; flex-wrap: wrap; gap: 14px; }
.rac-ligne > .rac-champ { flex: 1 1 220px; }
.rac-ligne > .rac-cp, .rac-champ.rac-cp { flex: 0 0 170px; max-width: 220px; }
.rac input[type=text], .rac input[type=email], .rac input[type=tel] {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text);
  font-family: var(--font-serif); font-size: 18px;
}
.rac #iban, .rac #bic, .rac #code_client { font-family: var(--font-mono); font-size: 16px; letter-spacing: .04em; }
.rac input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.rac input[aria-invalid=true] { border-color: #FF8A7A; }
.rac input[type=file] { max-width: 100%; color: var(--text-muted); font-family: var(--font-serif); font-size: 16px; }
.rac .req { color: #FFB020; }

.rac-case { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; }
.rac-case input { flex: none; width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--accent); }
.rac-case label { cursor: pointer; }
.rac-case a, .rac-alerte a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.rac-aide { margin: 6px 0 0; font-size: 16px; color: var(--text-muted); }
.rac-texte { margin: 0 0 6px; color: var(--text-soft); }
.rac-petit { margin-top: 18px; font-size: 15px; color: var(--text-muted); }
.rac-erreur { margin: 6px 0 0; font-size: 16px; color: #FF8A7A; }
.rac-erreur:empty { display: none; }
.rac-etat-iban { margin: 6px 0 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.rac-etat-iban.ok { color: var(--accent); }
.rac-etat-iban.ko { color: #FFB020; }

.rac-signature { position: relative; margin-top: 4px; }
.rac-signature canvas { display: block; width: 100%; height: 190px; border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
.rac-signature-aide { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font-style: italic; color: #8A93A6; pointer-events: none; }
.rac-bouton-discret { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border: 1px solid #C9D0DC; border-radius: 8px; background: #fff; color: #161C2B; font-family: var(--font-mono); font-size: 12px; cursor: pointer; }

.rac-bouton { display: block; width: 100%; margin-top: 24px; padding: 16px 20px; border: 0; border-radius: 12px; background: var(--accent); color: #0E1320; font-family: var(--font-serif); font-size: 20px; font-weight: 600; cursor: pointer; }
.rac-bouton:disabled { opacity: .6; cursor: wait; }
.rac-bouton:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.rac-alerte { margin: 0; padding: 14px 16px; border: 1px solid #FFB020; border-radius: 12px; background: rgba(255, 176, 32, .08); color: #FFE2A8; }
.rac #message-global { margin-top: 20px; }
.rac-merci { border-color: var(--accent); }
.rac-merci p { color: var(--text-soft); }
.rac-etapes { padding-left: 1.2em; color: var(--text-muted); }

@media (max-width: 560px) {
  .rac-ligne > .rac-cp, .rac-champ.rac-cp { flex: 1 1 100%; max-width: none; }
  .rac-signature canvas { height: 170px; }
}
.rac-bouton-lien { box-sizing: border-box; text-align: center; text-decoration: none; }
.rac-bouton-lien:hover { filter: brightness(1.06); }
