/**
 * @file style.css
 * @description Styles du module carte agences & partenaires — France métropolitaine
 * @version 2.0.0
 * @lastModified 2024-01-01
 */

/* ============================================================
   1. VARIABLES DESIGN SYSTEM
   ============================================================ */

:root {
  /* Fond */
  --bg:            #f5f6f8;
  --bg-card:       #ffffff;
  --bg-muted:      #f0f1f4;

  /* Textes */
  --text-primary:  #111827;
  --text-secondary:#4b5563;
  --text-muted:    #9ca3af;

  /* Accent principal */
  --accent:        #1e73be;
  --accent-hover:  #1660a8;
  --accent-light:  #e8f1fb;
  --accent-2:      #A9C355;
  --accent-2-light:#f1f5e9;

  /* Recommandée */
  --recommande:    #A9C355;
  --recommande-light: #f4f8e8;

  /* Feedbacks */
  --danger:        #ef4444;
  --danger-light:  #fef2f2;
  --succes:        #16a34a;
  --succes-light:  #f0fdf4;

  /* Bordures */
  --border:        #e5e7eb;
  --border-hover:  #d1d5db;
  --border-focus:  var(--accent);

  /* Ombres */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:     0 10px 30px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  20px;

  /* Typographie */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;

  /* Layout */
  --panel-w:   360px;
  --panel-w-sm: 300px;
  --h-module:  900px;
}

/* ============================================================
   2. RESET
   ============================================================ */

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   3. CONTENEUR PRINCIPAL
   ============================================================ */

.module-carte {
  width: 100%;
  padding: 20px;
}

.module-carte__layout {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
  grid-template-rows: minmax(380px, 1.5fr) minmax(230px, 1fr);
  grid-template-areas:
    "filters map"
    "filters results";
  gap: 16px;
  height: var(--h-module);
  border-radius: var(--radius-xl);
}

/* ============================================================
   MODE CARTE SEULE
   ============================================================ */

.module-carte--carte-seule { padding: 0; }
.module-carte--carte-seule .module-carte__layout { border-radius: 0; gap: 0; }
.module-carte--carte-seule .module-carte__filters-wrap,
.module-carte--carte-seule .module-carte__results-wrap { display: none; }
.module-carte--carte-seule .module-carte__zone-carte { grid-area: unset; }

/* ============================================================
   4. ZONES GRILLE
   ============================================================ */

.module-carte__filters-wrap {
  grid-area: filters;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  align-self: start;
}

.module-carte__results-wrap {
  grid-area: results;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xl) var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: 0;
}

.module-carte__zone-carte {
  grid-area: map;
  min-width: 0;
  position: relative;
}

/* ============================================================
   5. EN-TÊTE PANNEAU
   ============================================================ */

.module-carte__entete {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 0;
}

.module-carte__logo-wrap { flex: 0 0 44px; }

.module-carte__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: contain;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  padding: 3px;
}

.module-carte__titre {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.module-carte__sous-titre {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.2px;
}

/* ============================================================
   6. FILTRES
   ============================================================ */

.module-carte__filtres {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.module-carte__filtres .module-carte__actions {
  padding-top: 4px;
}

.module-carte__section-filtres {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-carte__label-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

/* Boutons radio */

.module-carte__groupe-radio {
  display: flex;
  gap: 6px;
  border: 0;
}

.module-carte__radio-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms, background 140ms, box-shadow 140ms, transform 120ms;
}

.module-carte__radio-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.module-carte__radio-btn:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(30,115,190,0.12);
}

.module-carte__radio-btn input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

.module-carte__radio-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--text-secondary);
  transition: color 140ms;
}

.module-carte__radio-btn:has(input:checked) .module-carte__radio-icone {
  color: var(--accent);
}

.module-carte__radio-texte {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.2;
}

.module-carte__radio-btn:has(input:checked) .module-carte__radio-texte {
  color: var(--accent);
  font-weight: 700;
}

/* Champ code postal */

.module-carte__champ {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.module-carte__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.module-carte__input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: border-color 140ms, box-shadow 140ms, background 140ms;
}

.module-carte__input:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,115,190,0.14);
}

.module-carte__input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.module-carte__input--erreur {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.module-carte__erreur-inline {
  min-height: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  line-height: 1.3;
}

.module-carte__erreur-inline--info {
  color: var(--succes);
}

/* Boutons */

.module-carte__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

.module-carte__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-muted);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, background 130ms, border-color 130ms, box-shadow 130ms, opacity 130ms;
}

.module-carte__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--bg-card);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.module-carte__btn:active:not(:disabled) {
  transform: translateY(0);
}

.module-carte__btn:disabled {
  opacity: 0.50;
  cursor: not-allowed;
  transform: none;
}

.module-carte__btn--principal {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(30,115,190,0.22);
}

.module-carte__btn--principal:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(30,115,190,0.30);
}

.module-carte__btn--secondaire {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.module-carte__btn--secondaire:hover:not(:disabled) {
  color: var(--text-primary);
}

.module-carte__btn--fantome {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.module-carte__btn--fantome:hover:not(:disabled) {
  color: var(--danger);
  border-color: rgba(239,68,68,0.20);
  background: var(--danger-light);
}

.module-carte__btn-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   7. ZONE RÉSULTATS
   ============================================================ */

.module-carte__zone-resultats {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 16px 16px;
  gap: 10px;
  min-height: 0;
}

/* Masque le padding quand aucun résultat n'est affiché */
.module-carte__zone-resultats:has(#conteneur-resultats[hidden]) {
  padding: 0;
}

.module-carte__results-wrap .module-carte__zone-resultats {
  margin-top: 0;
  border-top: 0;
}

/* Conteneur résultats */
.module-carte__resultats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Spinner */
.module-carte__spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.module-carte__spinner-orbite {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  animation: rotation-spinner 700ms linear infinite;
}

@keyframes rotation-spinner {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Compteur */
.module-carte__compteur {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* Erreur globale */
.module-carte__erreur-globale {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  line-height: 1.45;
  background: var(--danger-light);
  border: 1px solid rgba(239,68,68,0.20);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.module-carte__erreur-globale:empty { display: none; }

.module-carte__erreur-globale a {
  color: var(--accent);
  font-weight: 700;
}

/* Liste */
.module-carte__liste {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.module-carte__liste::-webkit-scrollbar { width: 4px; }
.module-carte__liste::-webkit-scrollbar-track { background: transparent; }
.module-carte__liste::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

/* ============================================================
   8. CARTES RÉSULTAT
   ============================================================ */

.module-carte__carte-resultat {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 140ms, transform 140ms, box-shadow 140ms;
  position: relative;
}

.module-carte__carte-resultat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Recommandée */
.module-carte__carte-resultat--recommandee {
  border-color: var(--recommande);
  background: var(--recommande-light);
  box-shadow: 0 4px 18px rgba(169,195,85,0.18);
  padding-top: 10px;
}

.module-carte__carte-resultat--recommandee:hover {
  box-shadow: 0 8px 28px rgba(169,195,85,0.28);
}

/* Badge recommandée — bande pleine largeur en haut de la carte */
.module-carte__badge-recommandee {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--recommande);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  margin-bottom: 2px;
}

/* Visuel */
.module-carte__resultat-visuel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.module-carte__resultat-logo {
  width: 48px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--bg-muted);
  padding: 4px;
  border: 1px solid var(--border);
}

.module-carte__resultat-point {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

/* Infos */
.module-carte__resultat-infos {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.module-carte__resultat-nom {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-carte__resultat-adresse {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.module-carte__resultat-tel {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.module-carte__resultat-tel a {
  color: var(--accent);
  text-decoration: none;
}

.module-carte__resultat-tel a:hover {
  text-decoration: underline;
}

.module-carte__resultat-cta {
  margin-top: 6px;
}

.module-carte__resultat-lien {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-light);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 11px;
  border-radius: var(--radius-md);
  transition: background 130ms, color 130ms, transform 120ms;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.module-carte__resultat-lien:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   9. CARTE LEAFLET
   ============================================================ */

.module-carte__carte {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: #f0f4f8;
}

.leaflet-tile { filter: none; }
.leaflet-container { background: #f0f4f8; }

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.leaflet-popup-content {
  margin: 0;
  font-family: var(--font);
}

/* ============================================================
   10. MARQUEURS
   ============================================================ */

.marqueur-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.marqueur-bulle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
  background: #fff;
  overflow: hidden;
}

.marqueur-bulle img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.marqueur-pointe {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #fff;
  margin-top: -2px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.14));
}

.marqueur-partenaire .marqueur-bulle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.30);
}

.marqueur-recommande .marqueur-bulle {
  width: 46px;
  height: 46px;
  border-color: var(--recommande);
  border-width: 3px;
  box-shadow:
    0 0 0 5px rgba(255,107,53,0.15),
    0 6px 20px rgba(255,107,53,0.25);
}

.marqueur-recommande .marqueur-pointe {
  border-top-color: var(--recommande);
}

.marqueur-label {
  display: none;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--recommande);
  padding: 3px 8px;
  border-radius: 99px;
  margin-top: 5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255,107,53,0.22);
}

.marqueur-recommande .marqueur-label { display: inline-flex; }

.marqueur-surbrillance .marqueur-bulle {
  filter: drop-shadow(0 6px 16px rgba(30,115,190,0.35));
  transform: scale(1.1);
  transition: transform 150ms ease, filter 150ms ease;
}

/* ============================================================
   11. POPUP
   ============================================================ */

.popup-agence {
  padding: 12px 14px;
  min-width: 210px;
  max-width: 290px;
}

.popup-agence__nom {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.25;
}

.popup-agence__adresse {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 8px;
}

.popup-agence__tel {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.popup-agence__tel a {
  color: var(--accent);
  text-decoration: none;
}

.popup-agence__tel a:hover { text-decoration: underline; }

.popup-agence__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.popup-agence__lien {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none !important;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 130ms, transform 120ms;
  font-family: var(--font);
}

.popup-agence__lien--service {
  background: var(--accent);
  color: #fff !important;
}

.popup-agence__lien--service:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.popup-agence__lien--contact {
  background: var(--bg-muted);
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border);
}

.popup-agence__lien--contact:hover {
  background: var(--border);
  transform: translateY(-1px);
}

/* ============================================================
   12. TABLETTE (768–1023px)
   ============================================================ */

@media (max-width: 1023px) {
  .module-carte__layout {
    grid-template-columns: var(--panel-w-sm) 1fr;
  }

  .module-carte__radio-texte { font-size: 10px; }

  .module-carte__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   13. MOBILE (< 768px)
   ============================================================ */

@media (max-width: 767px) {
  .module-carte {
    padding: 0;
  }

  .module-carte__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "filters"
      "map"
      "results";
    height: auto;
    gap: 0;
    border-radius: 0;
  }

  .module-carte__filters-wrap {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-md);
  }

  .module-carte__results-wrap {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .module-carte__zone-carte { grid-area: map; }

  .module-carte__carte {
    height: 50vh;
    min-height: 260px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .module-carte__liste {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .module-carte__zone-resultats {
    max-height: none;
    overflow-y: visible;
  }

  .module-carte__groupe-radio {
    flex-wrap: wrap;
  }

  .module-carte__radio-btn {
    flex: 1 1 80px;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
  }
}

/* ============================================================
   LÉGENDE
   ============================================================ */

.module-carte__legende {
  margin: 0 16px 16px;
  padding: 12px 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.module-carte__legende-titre {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.module-carte__legende-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-carte__legende-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-carte__legende-icone {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.module-carte__legende-icone--franchise img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.module-carte__legende-icone--assainissement {
  background: #A9C355;
  width: 22px;
  height: 22px;
  margin: 0 3px;
}

.module-carte__legende-icone--eau {
  background: #3B82B6;
  width: 22px;
  height: 22px;
  margin: 0 3px;
}

.module-carte__legende-texte {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ============================================================
   FORMULAIRE DE CONTACT
   ============================================================ */

.module-contact {
  font-family: var(--font);
  background: var(--bg);
  border-top: 2px solid var(--border);
  padding: 40px 24px;
  scroll-margin-top: 20px;
}

.module-contact__inner {
  max-width: 760px;
  margin: 0 auto;
}

.module-contact__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.module-contact__titre {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.module-contact__titre span {
  color: var(--accent);
}

.module-contact__fermer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
}

.module-contact__fermer:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.module-contact__grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.module-contact__champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-contact__champ--full {
  grid-column: 1 / -1;
}

.module-contact__champ input[type="text"],
.module-contact__champ input[type="email"],
.module-contact__champ input[type="tel"],
.module-contact__champ textarea,
.module-contact__champ select {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 120ms, box-shadow 120ms;
  box-sizing: border-box;
}

.module-contact__champ input:focus,
.module-contact__champ textarea:focus,
.module-contact__champ select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,115,190,0.12);
}

.module-contact__champ textarea {
  resize: vertical;
  min-height: 110px;
}

.module-contact__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.module-contact__select-wrap {
  position: relative;
}

.module-contact__select-wrap select {
  appearance: none;
  padding-right: 36px;
}

.module-contact__select-icone {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.module-contact__champ--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.module-contact__champ--checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.module-contact__champ--checkbox label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.module-contact__champ--checkbox label a {
  color: var(--accent);
  text-decoration: underline;
}

.module-contact__required {
  color: var(--danger);
  margin-right: 2px;
}

.module-contact__retour {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}

.module-contact__retour--succes {
  background: var(--succes-light);
  color: var(--succes);
  border: 1.5px solid #bbf7d0;
}

.module-contact__retour--erreur {
  background: var(--danger-light);
  color: var(--danger);
  border: 1.5px solid #fecaca;
}

.module-contact__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.module-contact__btn-envoyer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 130ms, transform 120ms;
}

.module-contact__btn-envoyer:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.module-contact__btn-envoyer:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 600px) {
  .module-contact {
    padding: 28px 16px;
  }

  .module-contact__grille {
    grid-template-columns: 1fr;
  }

  .module-contact__champ--full {
    grid-column: 1;
  }
}
