/* ── ALM Détection — thème clair (bleu goutte d'eau + fond blanc) ─────────── */

:root {
  --bg: #ffffff;
  --bg-soft: #eef4fb;        /* sections alternées, champs */
  --card: #ffffff;
  --border: #dbe4ee;
  --accent: #1785c8;         /* bleu (contraste sur blanc) */
  --accent-light: #2f9fe0;   /* bleu de la goutte */
  --accent-dark: #0f6299;
  --accent-2: #ef9d10;       /* touche orange, sobre */
  --text: #16273f;           /* navy foncé */
  --text-soft: #566274;      /* gris */
  --footer-bg: #10233f;      /* navy profond (ancre bas de page) */
  --footer-text: #b9c6d8;
  --shadow: 0 2px 14px rgba(20, 45, 85, .07);
  --radius: 12px;
  --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Raleway", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 { line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .6em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 1.6em 0 .5em; }
h2::after {
  content: ""; display: block; width: 54px; height: 3px; margin-top: 10px;
  background: var(--accent); border-radius: 2px;
}
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
p { margin-bottom: 1em; }

/* ── Bandeau logo (pleine largeur, fond navy du logo) ── */
.top-banner { background: #0f1024; width: 100%; }
.top-banner-inner {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 8px 20px;
}
.banner-logo-link { display: block; line-height: 0; }
.banner-logo { height: 150px; width: auto; max-width: 100%; display: block; }
.banner-phone {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-weight: 700; padding: 9px 16px;
  background: var(--accent); color: #fff; border-radius: 999px; font-size: .92rem;
}
.banner-phone:hover { background: var(--accent-light); text-decoration: none; }

/* ── Barre de navigation (blanche, collante, liens étalés sur la largeur) ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(20, 45, 85, .06);
  backdrop-filter: blur(6px);
}
.nav-inner { display: flex; align-items: center; flex-wrap: wrap; padding: 0 20px; }
.site-nav { flex: 1; }
.site-nav ul { list-style: none; display: flex; justify-content: space-between; gap: 4px; }
.site-nav a {
  display: block; padding: 14px 12px; border-radius: 8px;
  color: var(--text-soft); font-size: .95rem; font-weight: 600;
}
.site-nav a:hover { color: var(--accent-dark); text-decoration: none; }
.site-nav a.active { color: var(--accent-dark); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border);
  color: var(--text); font-size: 1.3rem; padding: 4px 12px; border-radius: 8px; cursor: pointer; margin: 8px 0; }

/* ── Hero ── */
.hero {
  padding: 104px 20px; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 300px;
  background:
    linear-gradient(180deg, rgba(9, 18, 36, .48) 0%, rgba(9, 18, 36, .62) 100%),
    url('/assets/img/hero-piscine.jpg') center / cover no-repeat;
}
.hero h1 {
  font-family: "Raleway", sans-serif; font-weight: 400;
  text-transform: uppercase; letter-spacing: .04em;
  color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
  margin: 0; font-size: clamp(1.9rem, 5vw, 3rem);
}

/* Intro sous le hero (fond blanc, texte descriptif + CTA) */
.hero-intro { text-align: center; }
.hero-intro .lead {
  font-size: 1.15rem; color: var(--text); max-width: 780px; margin: 0 auto 24px;
}
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(23, 133, 200, .28); }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { border: 1.5px solid var(--accent); color: var(--accent); background: #fff; }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }

/* ── Sections / cartes ── */
.section { padding: 40px 0; }
.section-alt { background: var(--bg-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20, 45, 85, .12); }
.card img { width: 100%; height: 170px; object-fit: cover; }
.card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 6px; }
.card-body p { color: var(--text-soft); font-size: .92rem; flex: 1; }
.card-body .card-link { font-weight: 700; font-size: .92rem; color: var(--accent); }

/* ── Page prestation (détail) ── */
.presta-subtitle { font-size: 1.15rem; color: var(--accent-dark); font-weight: 600; margin-top: -.3em; }
.presta-hero-img {
  width: 100%; max-height: 380px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); margin: 8px 0 20px;
}

/* ── Carrousel photos (en vrac) ── */
.carousel { position: relative; margin-top: 18px; }
.carousel-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.carousel-item { flex: 0 0 auto; scroll-snap-align: start; }
.carousel-item img {
  width: 300px; height: 210px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 1.6rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(23, 133, 200, .35);
}
.carousel-btn:hover { background: var(--accent-dark); }
.carousel-prev { left: -8px; }
.carousel-next { right: -8px; }
@media (max-width: 600px) {
  .carousel-item img { width: 240px; height: 170px; }
  .carousel-btn { display: none; }
}

/* ── Galerie photos ── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.gallery img {
  width: 100%; height: 190px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .2s;
}
.gallery img:hover { transform: scale(1.03); }

/* ── Références ── */
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 20px; }
.ref-logo {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  display: flex; align-items: center; justify-content: center; min-height: 110px;
  box-shadow: var(--shadow);
}
.ref-logo img { max-height: 70px; width: auto; object-fit: contain; }

/* ── Avis ── */
.review { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.review .stars { color: var(--accent-2); letter-spacing: 2px; }
.review .review-meta { color: var(--text-soft); font-size: .85rem; margin-top: 6px; }

/* ── Formulaires ── */
form.std { max-width: 560px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: 1rem; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 600; }
.alert-ok { background: #e3f7ea; color: #17743a; border: 1px solid #a9e2bd; }
.alert-err { background: #fde6e9; color: #b3243a; border: 1px solid #f3b3bd; }

/* ── Tableaux admin ── */
table.admin { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .92rem; }
table.admin th, table.admin td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.admin th { color: var(--accent-dark); }
.badge { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-pending { background: #fdefcf; color: #9a6a05; }
.badge-approved { background: #e3f7ea; color: #17743a; }
.badge-rejected { background: #fde6e9; color: #b3243a; }

/* ── Footer ── */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 48px; padding: 40px 0 18px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; }
.footer-brand em { color: var(--accent-light); }
.footer-slogan { color: var(--accent-light); font-weight: 600; }
.footer-title { font-weight: 700; color: #fff; margin-bottom: 6px; }
.site-footer p { color: var(--footer-text); }
.site-footer a { color: #fff; }
.footer-legal { margin-top: 26px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); font-size: .8rem; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .top-banner-inner { flex-direction: column; gap: 10px; padding: 12px 20px; }
  .banner-logo { height: 92px; }
  .banner-phone { position: static; transform: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { display: none; width: 100%; flex-basis: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; justify-content: flex-start; padding: 8px 0; }
  .site-nav a { padding: 10px 12px; }
}
