/* ============================================
   Assainissement Rennes — CSS Global
   Mobile-first | Lead Gen Optimized
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #1a365d;
  --blue-light: #2a4a7f;
  --green: #2d7d46;
  --green-light: #38a55a;
  --green-dark: #246b3a;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #868e96;
  --gray-700: #495057;
  --gray-900: #212529;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --transition: .25s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--green);
}

ul, ol {
  list-style: none;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

.section--alt {
  background: var(--gray-50);
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
  line-height: 1.3;
}

.section__subtitle {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 32px;
  max-width: 640px;
}

/* --- Header / Navbar --- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.header__nav {
  display: none;
}

.header .header__cta {
  display: none;
}

.header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
}

.header__menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 99;
  padding: 24px 20px;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gray-900);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--gray-100);
  color: var(--green);
}

.mobile-nav__cta {
  margin-top: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.2;
}

.btn--primary {
  background: var(--green);
  color: var(--white);
}

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

.btn--secondary {
  background: var(--blue);
  color: var(--white);
}

.btn--secondary:hover {
  background: var(--blue-light);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn--outline:hover {
  background: var(--green);
  color: var(--white);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn--full {
  width: 100%;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Hero --- */
.hero {
  padding: 40px 0 48px;
  background: linear-gradient(135deg, var(--blue) 0%, #0f2440 100%);
  color: var(--white);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: rgba(255,255,255,.9);
}

.hero__title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero__text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255,255,255,.85);
  margin-bottom: 28px;
  max-width: 560px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 8px;
}

.hero__phone:hover {
  color: var(--green-light);
}

.hero__phone svg {
  width: 22px;
  height: 22px;
}

/* --- Trust Badges --- */
.trust {
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-200);
}

.trust__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.trust__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.trust__icon svg {
  width: 22px;
  height: 22px;
}

.trust__label {
  font-weight: 600;
  font-size: .95rem;
  color: var(--gray-900);
}

.trust__desc {
  font-size: .82rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* --- Cards (Services / Zones) --- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--white);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
}

.card__text {
  font-size: .92rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--green);
}

.card__link:hover {
  gap: 8px;
}

.card__link svg {
  width: 16px;
  height: 16px;
}

/* --- Zone pills --- */
.zones__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-900);
  transition: all var(--transition);
}

.zone-pill:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.zone-pill svg {
  width: 14px;
  height: 14px;
}

/* --- FAQ --- */
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-900);
  text-align: left;
  transition: background var(--transition);
}

.faq__question:hover {
  background: var(--gray-50);
}

.faq__question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gray-500);
  transition: transform var(--transition);
}

.faq__item.is-open .faq__question svg {
  transform: rotate(180deg);
}

.faq__answer {
  display: none;
  padding: 0 20px 18px;
  font-size: .92rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.faq__item.is-open .faq__answer {
  display: block;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.cta-banner__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-banner__text {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 24px;
}

.cta-banner .btn--primary {
  background: var(--white);
  color: var(--green);
}

.cta-banner .btn--primary:hover {
  background: var(--gray-100);
}

/* --- Content (Service/Local pages) --- */
.content {
  max-width: 720px;
}

.content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue);
  margin: 32px 0 12px;
  line-height: 1.3;
}

.content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 24px 0 8px;
}

.content p {
  font-size: .95rem;
  color: var(--gray-700);
  margin-bottom: 16px;
  line-height: 1.7;
}

.content ul {
  margin-bottom: 16px;
  padding-left: 0;
}

.content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: .95rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.content strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Sidebar CTA (service pages) */
.page-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-cta {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
}

.sidebar-cta__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 16px;
  white-space: nowrap;
}

.sidebar-cta__text {
  font-size: .9rem;
  color: var(--gray-700);
  margin-bottom: 20px;
}

.sidebar-cta__phone {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
}

/* Contact sidebar with icons */
.sidebar-cta--contact {
  text-align: left;
  padding: 32px 28px;
}

.sidebar-cta__items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-cta__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sidebar-cta__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.sidebar-cta__icon svg {
  width: 20px;
  height: 20px;
}

.sidebar-cta__item strong {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: var(--gray-900);
}

.sidebar-cta__item span {
  font-size: .82rem;
  color: var(--gray-500);
}

/* --- Contact Form --- */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 540px;
}

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

.form__label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-900);
}

.form__input,
.form__select,
.form__textarea {
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,125,70,.12);
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Footer --- */
.footer {
  background: var(--blue);
  color: rgba(255,255,255,.8);
  padding: 48px 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer__text {
  font-size: .88rem;
  line-height: 1.6;
}

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

.footer__links a {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 20px;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  text-align: center;
}

/* --- Sticky CTA (Mobile) --- */
.sticky-cta {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 12px rgba(0,0,0,.08);
  gap: 10px;
}

.sticky-cta .btn {
  flex: 1;
  padding: 14px 12px;
  font-size: .92rem;
}

/* Extra padding at bottom for sticky CTA */
body {
  padding-bottom: 80px;
}

/* --- Interactive Map --- */
.map-container {
  max-width: 560px;
  margin: 0 auto;
}

.map-svg {
  width: 100%;
  height: auto;
}

.map-dept {
  fill: var(--gray-100);
  stroke: var(--gray-300);
  stroke-width: 2;
}

.map-metro {
  fill: rgba(45, 125, 70, .08);
  stroke: var(--green);
  stroke-width: 1.5;
  stroke-dasharray: 6 3;
}

.map-road {
  stroke: var(--gray-200);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.map-pin--secondary circle {
  fill: var(--gray-300);
  transition: fill var(--transition);
}

.map-pin--secondary:hover circle {
  fill: var(--gray-500);
}

.map-pin--active circle {
  fill: var(--green);
  stroke: var(--white);
  stroke-width: 2;
  cursor: pointer;
  transition: r var(--transition), fill var(--transition);
}

.map-pin--active:hover circle {
  fill: var(--green-dark);
  r: 13;
}

.map-pin--main circle {
  fill: var(--blue);
  stroke: var(--white);
  stroke-width: 3;
  cursor: pointer;
  transition: r var(--transition);
}

.map-pin--main:hover circle {
  r: 17;
}

.map-label {
  font-size: 13px;
  font-weight: 600;
  fill: var(--gray-700);
  text-anchor: middle;
  pointer-events: none;
}

.map-label-main {
  font-size: 11px;
  font-weight: 700;
  fill: var(--white);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.map-pin--active .map-label {
  fill: var(--green-dark);
  font-weight: 700;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 16px 0;
  font-size: .82rem;
  color: var(--gray-500);
}

.breadcrumb a {
  color: var(--gray-500);
}

.breadcrumb a:hover {
  color: var(--green);
}

.breadcrumb span {
  margin: 0 6px;
}

/* ============================================
   Responsive — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .hero {
    padding: 64px 0 72px;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__actions {
    flex-direction: row;
    align-items: center;
  }

  .trust__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-grid {
    flex-direction: row;
    gap: 48px;
  }

  .content {
    flex: 1;
  }

  .sidebar-cta {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }

  .form {
    max-width: 100%;
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .sticky-cta {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* ============================================
   Responsive — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .header__nav a {
    padding: 8px 14px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius);
    transition: all var(--transition);
  }

  .header__nav a:hover,
  .header__nav a.active {
    color: var(--green);
    background: var(--gray-50);
  }

  .header__cta {
    display: inline-flex;
  }

  .header__menu-btn {
    display: none;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .section__title {
    font-size: 2rem;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-banner__title {
    font-size: 1.75rem;
  }
}
