:root {
  --bg: #ffffff;
  --ink: #14352c;
  --muted: #5f736c;
  --primary: #0e8c7d;
  --primary-dark: #0b6e62;
  --accent: #5eead4;
  --tint: #eef7f2;
  --border: #dcebe3;
  --shadow: 0 6px 24px rgba(14, 138, 95, 0.10);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0; }

a { color: var(--primary); text-decoration: none; }

/* ---- Barre de navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  color: var(--ink);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.brand-name strong { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a:not(.nav-cta) { color: var(--ink); font-weight: 500; font-size: 15px; }
.nav-links a:not(.nav-cta):hover { color: var(--primary); }

.nav-cta {
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  background: var(--primary);
  color: #fff !important;
}

.nav-cta:hover { background: var(--primary-dark); }
.nav-cta.ghost {
  background: transparent;
  color: var(--primary) !important;
  border: 1px solid var(--primary);
}

/* Bouton de changement de langue FR / EN */
.lang-switch {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.lang-switch:hover { background: var(--primary); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---- Section héro ---- */
.hero-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(94, 234, 212, 0.22), transparent 60%),
    linear-gradient(135deg, #0e8c7d 0%, #46c8b4 100%);
  color: #fff;
  padding: 88px 20px 72px;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.10) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0, transparent 35%);
}

.hero-inner { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; text-align: center; }

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.10);
}

.hero-section h1 { font-size: clamp(32px, 5vw, 54px); max-width: 760px; margin: 0 auto; }

.hero-sub { margin: 18px auto 28px; max-width: 620px; font-size: 17px; opacity: 0.92; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-stat strong { display: block; font-size: 30px; }
.hero-stat span { font-size: 13px; opacity: 0.85; }

/* ---- Boutons ---- */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #06302a; box-shadow: var(--shadow); }
.btn-primary:hover { background: #46c8b4; }

.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: #ecfff6; }

.btn-ghost-white { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.btn-ghost-white:hover { background: rgba(255, 255, 255, 0.12); }

/* ---- Sections génériques ---- */
.section { max-width: 1140px; margin: 0 auto; padding: 76px 20px; }

.section-tint { max-width: none; background: var(--tint); padding-left: 20px; padding-right: 20px; }
.section-tint > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }

.section-eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-sub { color: var(--muted); margin: 10px 0 0; }

/* ---- Cartes services ---- */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15, 118, 110, 0.16); }

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--tint);
  font-size: 26px;
  margin-bottom: 16px;
}

.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---- Bouton remonter en haut ---- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(14, 138, 95, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, background .15s, visibility .25s;
}
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
  /* Boutons du hero empilés et pleine largeur sur petits écrans */
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  /* Fenêtre modale collée en bas, plus confortable au pouce sur mobile */
  .alert-modal { padding: 0; align-items: flex-end; }
  .alert-modal-card {
    max-width: 100%;
    max-height: 92vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 24px 18px 20px;
  }
  .alert-actions { flex-direction: column; }
  .alert-actions .btn { width: 100%; }
}

/* ---- Bouton d'alerte ramassage (hero) ---- */
.btn-alert {
  background: #f6ad55;
  color: #402400;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.btn-alert:hover { background: #ed8936; }

/* ---- Fenêtre modale d'alerte ---- */
.alert-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 32, 27, 0.55);
  backdrop-filter: blur(2px);
}
.alert-modal[hidden] { display: none; }
.alert-modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.alert-modal-card h3 { margin: 0 0 6px; color: var(--primary-dark, #124035); font-size: 1.25rem; }
.alert-modal-sub {
  margin: 0 0 16px;
  color: #0f5132;
  background: #e8f7ee;
  border: 1px solid #b7e4c7;
  border-left: 4px solid #2e9e5b;
  border-radius: 10px;
  padding: 11px 14px 11px 40px;
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}
.alert-modal-sub::before {
  content: "\1F4E2";
  position: absolute;
  left: 13px;
  top: 10px;
  font-size: 1.05rem;
  font-weight: 400;
}
.alert-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #789;
  cursor: pointer;
  border-radius: 50%;
}
.alert-modal-close:hover { background: #eef2f1; color: #333; }
.alert-modal-card label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334;
}
.alert-modal-card label span { display: block; margin-bottom: 5px; }
.alert-modal-card input,
.alert-modal-card select,
.alert-modal-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cdd6d3;
  border-radius: 9px;
  font: inherit;
  font-weight: 400;
  color: #222;
  box-sizing: border-box;
}
.alert-modal-card input:focus,
.alert-modal-card select:focus,
.alert-modal-card textarea:focus {
  outline: none;
  border-color: var(--accent, #57d9c4);
  box-shadow: 0 0 0 3px rgba(87, 217, 196, 0.25);
}
.alert-agency-locked {
  margin: 4px 0 14px;
  padding: 10px 12px;
  background: #ecf7f2;
  border: 1px solid #cfe8dd;
  border-radius: 9px;
  font-size: 0.9rem;
  color: #24604f;
}
.alert-agency-locked[hidden] { display: none; }
.alert-agency-locked strong { color: #124035; }
.alert-geo {
  margin: 4px 0 14px;
  padding: 9px 12px;
  background: #f2f7f5;
  border-radius: 9px;
  font-size: 0.85rem;
  color: #456;
}
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.alert-actions .btn { flex: 1 1 auto; }
.alert-modal-card .btn-outline { border-color: var(--primary, #1f6f5c); color: var(--primary, #1f6f5c); }
.alert-modal-card .btn-outline:hover { background: rgba(31, 111, 92, 0.08); }
#alertResult { margin: 12px 0 0; font-size: 0.88rem; }

/* ---- Portail d'accès (4 niveaux) ---- */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  border-top: 4px solid var(--primary);
}

.portal-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15, 118, 110, 0.16); }

.portal-card.l1 { border-top-color: #0b6e62; }
.portal-card.l2 { border-top-color: #1f9d4d; }
.portal-card.l3 { border-top-color: #e0952b; }
.portal-card.l4 { border-top-color: #2f7fd1; }

.portal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.portal-ico {
  width: 48px; height: 48px; flex: 0 0 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--tint); font-size: 24px;
}
.portal-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary-dark);
  background: var(--tint); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.portal-card h3 { font-size: 19px; margin: 2px 0 0; }
.portal-desc { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }

.portal-block { margin-bottom: 12px; }
.portal-block h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--primary-dark); margin: 0 0 6px;
}
.portal-block.duties h4 { color: #b5761a; }
.portal-list { list-style: none; margin: 0; padding: 0; }
.portal-list li {
  position: relative; padding-left: 20px; font-size: 13.5px;
  color: var(--ink); margin-bottom: 5px; line-height: 1.4;
}
.portal-block.rights .portal-list li::before { content: '\2713'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.portal-block.duties .portal-list li::before { content: '\2192'; position: absolute; left: 0; color: #d08a1e; font-weight: 700; }

.portal-cta {
  margin-top: auto; display: inline-block; text-align: center;
  background: var(--primary); color: #fff; font-weight: 700;
  padding: 11px 16px; border-radius: 10px; transition: background .15s;
}
.portal-cta:hover { background: var(--primary-dark); }

/* ---- Étapes ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  counter-reset: step;
}

.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 14px;
}

.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---- Zones ---- */
.zones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.zones span {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
}

/* ---- Bandeau CTA ---- */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  text-align: center;
  padding: 64px 20px;
}

.cta-inner { max-width: 640px; margin: 0 auto; }

.cta-inner h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cta-inner p { margin: 12px 0 26px; opacity: 0.92; }
.cta-inner .btn { margin: 4px 6px; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.contact-info h2 { font-size: clamp(26px, 3.4vw, 34px); }
.contact-info p { color: var(--muted); }

.contact-lines { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }

.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
}

.contact-ico {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--tint);
  color: var(--primary);
  font-weight: 700;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  background: #fbfdfc;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

.form-note { min-height: 20px; font-size: 14px; font-weight: 500; color: var(--primary); margin: 0; }

/* ---- Pied de page ---- */
.site-footer { background: #08241c; color: #cfe4de; padding: 48px 20px 24px; }

.footer-stats {
  max-width: 1140px;
  margin: 0 auto 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-stat { text-align: center; }
.footer-stat strong {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.footer-stat span {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand-name { color: #fff; font-size: 18px; }
.footer-brand .brand-name strong { color: var(--accent); }
.footer-brand p { font-size: 14px; opacity: 0.8; margin: 10px 0 0; }

.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }

.footer-col a { display: block; color: #cfe4de; font-size: 14px; margin-bottom: 8px; opacity: 0.85; }
.footer-col a:hover { color: #fff; opacity: 1; }

.footer-copy {
  max-width: 1140px;
  margin: 32px auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  font-size: 13px;
  text-align: center;
  opacity: 0.75;
}

.footer-copy .admin-access {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 12px 20px;
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; }
  .nav-links a.nav-cta { text-align: center; margin-top: 6px; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-section { padding: 60px 20px 56px; }
}


/* ===== Vitrine : publicites & videos d'illustration des services ===== */
.showcase-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.showcase-item {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.showcase-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(14, 138, 95, 0.18);
}
.showcase-item img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.showcase-item figcaption {
  padding: 12px 14px;
  font-size: .95rem;
  color: var(--ink);
  font-weight: 600;
}
.showcase-videos { margin-top: 8px; }
.showcase-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.showcase-video {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.showcase-video video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  aspect-ratio: 16 / 9;
}
.showcase-video figcaption {
  padding: 12px 14px;
  font-size: .95rem;
  color: var(--muted);
}

/* ===== Agences partenaires (accueil) ===== */
.agencies-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.35fr);
  gap: 26px;
  align-items: start;
}
.agencies-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}
.agency-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.agency-card .agency-name {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--gd, #1f7a3c);
}
.agency-card p {
  margin: 4px 0;
  font-size: .92rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.agency-card a { color: inherit; text-decoration: none; }
.agency-card a:hover { text-decoration: underline; }
.agency-card .agency-subscribe {
  margin-top: 12px;
  width: 100%;
  font-size: .92rem;
  padding: 9px 14px;
}
.agencies-empty {
  color: var(--muted);
  font-style: italic;
  padding: 10px 2px;
}
.agencies-map-wrap #mapAgencies { min-height: 420px; }

@media (max-width: 860px) {
  .agencies-layout { grid-template-columns: 1fr; }
  .agencies-list { max-height: none; }
}

/* ---- Fond de carte local (hors-ligne) ---- */
.offline-label span{
  position:absolute; transform:translate(-50%,-160%); white-space:nowrap;
  font-size:.72rem; font-weight:600; color:#3a5540;
  background:rgba(255,255,255,.72); padding:1px 6px; border-radius:8px;
  border:1px solid rgba(111,138,114,.35); pointer-events:none;
}
.offline-badge span{
  position:absolute; transform:translate(6px,-100%); white-space:nowrap;
  font-size:.68rem; color:#5b6a5f; background:rgba(255,255,255,.8);
  padding:2px 8px; border-radius:8px; border:1px solid #d8e0d8; pointer-events:none;
}
