/* ============================================================
   LYZO — Qualité de l'eau
   Design system: brand blue, rounded/friendly, yuka.io-inspired
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  /* Brand */
  --blue: #1D6FA8;
  --blue-dark: #145A87;
  --blue-darker: #0F4568;
  --blue-light: #EAF4FA;
  --blue-pale: #F6FBFE;
  --blue-tint: #D6EAF6;

  /* Status colors — LYZO's own water-quality color code */
  --c-vert: #3CB878;
  --c-vert-fonce: #1F7A4D;
  --c-jaune: #E8C547;
  --c-orange: #F0932B;
  --c-rouge: #E14B4B;
  --c-noir: #2B2B2B;

  /* Neutrals */
  --ink: #1C2B3A;
  --gray-700: #43535F;
  --gray-500: #5F6C77;
  --gray-300: #B9C7D2;
  --gray-100: #EDF3F7;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  /* Shape */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-soft: 0 12px 30px -12px rgba(29, 111, 168, 0.25);
  --shadow-card: 0 8px 24px -10px rgba(29, 111, 168, 0.18);
  --shadow-header: 0 4px 14px rgba(29, 111, 168, 0.13);

  /* Layout */
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.25;
  margin: 0 0 16px;
}

p { margin: 0 0 16px; color: var(--gray-700); }

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

/* RGAA 10.6 — un lien au fil du texte doit rester identifiable sans la couleur */
main p a,
main li a,
.footer-legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
main p a:hover,
main li a:hover { text-decoration-thickness: 2px; }

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

ul { margin: 0 0 16px; padding-left: 22px; color: var(--gray-700); }
li { margin-bottom: 8px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Image placeholders ---------- */
.ph-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.ph-img.no-shadow { box-shadow: none; }
.ph-img.pill { border-radius: var(--radius-pill); box-shadow: none; }
.ph-img.flat { border-radius: var(--radius-sm); box-shadow: none; }

/* ---------- Accessibilité ---------- */
/* Texte destiné aux seules technologies d'assistance */
.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;
}

/* Lien d'évitement : invisible jusqu'à la prise de focus au clavier */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
  color: var(--white);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: var(--shadow-header);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--blue);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 8px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.main-nav a:hover { background: var(--blue-light); color: var(--blue); }
.main-nav a.active { background: var(--blue); color: var(--white); }

.social-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.social-links a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--blue-light);
  color: var(--blue);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.social-links a:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.social-links svg { width: 18px; height: 18px; fill: currentColor; }

.nav-toggle {
  display: none;
  background: var(--blue-light);
  border: none;
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; fill: var(--blue); }

@media (max-width: 880px) {
  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
  }
  .main-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  .social-links { display: none; }
  .main-nav a { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--blue-pale) 0%, var(--white) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  text-align: left;
}

.hero-divider {
  width: 72px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  margin: 6px 0 24px;
}

.hero-text p { font-size: 1.05rem; }

.store-badges {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.store-badges img {
  height: 56px;
  width: auto;
  border-radius: var(--radius-sm);
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-text h1, .hero-text .hero-divider { text-align: left; margin-left: 0; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 64px 0; }
.section.alt { background: var(--blue-light); }

.section-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.section-row.reverse { grid-template-columns: 1.15fr 1fr; }
.section-row.reverse .section-media { order: 2; }
.section-row.reverse .section-content { order: 1; }

.section-media.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Capture d'écran de smartphone : largeur limitée et centrée */
.section-media.phone-shot img {
  display: block;
  max-width: 300px;
  margin-inline: auto;
}

@media (max-width: 880px) {
  .section-row, .section-row.reverse {
    grid-template-columns: 1fr;
  }
  .section-row.reverse .section-media,
  .section-row.reverse .section-content,
  .section-row .section-media,
  .section-row .section-content { order: unset; }
  .section-media.two-up { grid-template-columns: 1fr 1fr; }
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.section-icon svg { width: 24px; height: 24px; stroke: var(--blue); fill: none; stroke-width: 1.8; }

.section-content h1,
.section-content h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

/* full-width text-only section (no media) */
.section-full { max-width: 820px; }
.section-full.centered { margin: 0 auto; text-align: center; }
.section-full.centered ul { text-align: left; display: inline-block; }

/* ---------- Trois atouts regroupés (accueil) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}
.feature-card h2 { font-size: 1.25rem; }
.feature-card p:last-child { margin-bottom: 0; }

@media (max-width: 980px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .feature-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Sommaire de page (En savoir plus) ---------- */
.sommaire-bloc {
  background: var(--blue-light);
  padding: 28px 0;
}
.sommaire-titre {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  margin: 0 0 14px;
}
.sommaire {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sommaire li { margin: 0; }
.sommaire a {
  display: block;
  /* Pastille bordée : la forme identifie déjà le lien, le soulignement
     imposé aux liens au fil du texte (RGAA 10.6) n'est pas utile ici. */
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--blue-tint);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-dark);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sommaire a:hover,
.sommaire a:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* L'en-tête est collant : sans cette marge, le titre visé se glisse dessous */
main section[id] { scroll-margin-top: 96px; }

/* ---------- Color legend list (En savoir plus) ---------- */
.color-legend { list-style: none; padding: 0; margin: 0; }
.color-legend li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.color-legend li:last-child { border-bottom: none; }
.color-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-top: 3px;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--gray-100);
}
.color-legend strong { color: var(--ink); }

/* ---------- Threshold cards (Nitrate) ---------- */
.threshold-list { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.threshold-card {
  background: var(--blue-pale);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.threshold-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--blue-dark);
}
.threshold-card ul { margin-bottom: 0; }
.threshold-card a { font-weight: 700; }

/* ---------- Hardness classes list ---------- */
.classes-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.classes-list li {
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  color: var(--blue-dark);
}

/* ---------- Parameter conformity legend ---------- */
.param-legend { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.param-legend li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.param-legend .color-dot { margin-top: 0; }

/* ============================================================
   MEDIA & AVIS (home page)
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}
.media-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
@media (max-width: 640px) { .media-grid { grid-template-columns: 1fr; gap: 20px; } }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .reviews-grid { grid-template-columns: 1fr; } }

.review-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.review-card p {
  font-style: italic;
  color: var(--ink);
  margin: 0;
  font-size: 1.02rem;
}
.review-card::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--blue-tint);
  position: absolute;
  top: 6px;
  left: 16px;
  line-height: 1;
}

/* ============================================================
   CARTE page
   ============================================================ */
.map-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 8px;
}
.map-hero img { margin: 0 auto 28px; max-width: 140px; }
.map-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.map-hero .hero-divider { margin-left: auto; margin-right: auto; }

.map-cards { display: flex; flex-direction: column; gap: 40px; margin-top: 48px; }
.map-card {
  background: var(--blue-pale);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.map-card h3 {
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 4px;
}
.map-card a { display: block; }
.map-card img { border-radius: var(--radius-md); box-shadow: var(--shadow-card); }

/* ============================================================
   A PROPOS page
   ============================================================ */
.about-hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) { .about-hero { grid-template-columns: 1fr; } }

.about-hero img { margin: 0 auto; max-width: 320px; }

.signature {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue);
  font-size: 1.15rem;
  margin-top: 24px;
}

.donate-box {
  margin-top: 40px;
  padding: 32px;
  background: var(--blue-light);
  border-radius: var(--radius-lg);
  text-align: center;
}
.donate-box p { max-width: 560px; margin-left: auto; margin-right: auto; }

.btn-donate {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  background: var(--blue);
  padding: 14px 40px;
  border-radius: var(--radius-pill);
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-donate:hover { background: var(--blue-dark); color: var(--white); transform: translateY(-2px); }

.donate-box .ph-img { max-width: 130px; margin: 20px auto 0; }

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 880px) { .history-grid { grid-template-columns: 1fr; } }

.history-grid h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--blue-dark);
  margin-bottom: 12px;
}
.history-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history-list li {
  font-size: 0.92rem;
  color: var(--gray-700);
  padding-left: 18px;
  position: relative;
}
.history-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.history-list strong { color: var(--ink); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--blue-darker);
  color: var(--blue-tint);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: var(--radius-sm); }
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 1.1rem;
}
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--blue-tint); font-weight: 600; margin-right: 22px; }
.footer-nav a:last-child { margin-right: 0; }
.footer-nav a:hover { color: var(--white); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  transition: background 0.15s ease;
}
.footer-social a:hover { background: var(--blue); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-legal {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem;
  color: rgba(214, 234, 246, 0.75);
  text-align: center;
}
.footer-legal h2 {
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 8px;
}
.footer-legal p { color: inherit; margin-bottom: 4px; }
.footer-legal p:last-child { margin-bottom: 0; }

.footer-bottom {
  margin-top: 20px;
  padding-top: 0;
  font-size: 0.85rem;
  color: rgba(214, 234, 246, 0.7);
  text-align: center;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--blue);
  background: var(--blue-light);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
