/* =========================================================
   iPoolAir — Design system
   Mobile-first. Variables > Base > Layout > Composants > Pages > Media queries
   ========================================================= */

:root {
  /* Couleurs marque */
  --color-navy: #0b3b5c;
  --color-navy-dark: #082b44;
  --color-aqua: #12a5a0;
  --color-aqua-light: #e6f6f5;
  --color-accent: #ff7a33;
  --color-accent-dark: #e85f1c;

  /* Neutres */
  --color-ink: #14202b;
  --color-slate: #5b6b78;
  --color-mist: #f4f7f9;
  --color-line: #e1e8ed;
  --color-white: #ffffff;

  /* Typo */
  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Rythme */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(11, 59, 92, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 59, 92, 0.12);
  --container: 1180px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.6;
  font-size: 16px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* ---------- Typo ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-navy-dark);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--color-slate);
}

.lead {
  font-size: 1.1rem;
  color: var(--color-ink);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-aqua);
  margin-bottom: 0.8em;
}

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

section {
  padding: 56px 0;
}

.section-mist {
  background: var(--color-mist);
}

.section-navy {
  background: var(--color-navy);
  color: var(--color-white);
}

.section-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-navy h2,
.section-navy h3 {
  color: var(--color-white);
}

.section-navy p {
  color: #c9d9e4;
}

.section-head {
  max-width: 680px;
  margin: 0 0 40px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

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

.btn-outline-navy {
  background: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}

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

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-navy-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .logo-dot {
  color: var(--color-aqua);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-navy-dark);
  display: block;
}

.main-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  flex-direction: column;
  padding: 8px 20px 16px;
  display: none;
}

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

.main-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-line);
}

.main-nav a:last-child {
  border-bottom: none;
}

.nav-item {
  position: relative;
}

.nav-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-ink);
  text-align: left;
}

.chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-item.is-open .chevron {
  transform: rotate(-135deg);
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 16px;
  display: none;
}

.nav-item.is-open .submenu {
  display: block;
}

.submenu a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.9rem;
  color: var(--color-slate);
}

.submenu li:last-child a {
  border-bottom: none;
}

.header-cta {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  color: var(--color-white);
  padding: 48px 0 0;
  margin-bottom: 48px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.1rem;
}

.hero p {
  color: #cfe1ec;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-badge {
  font-size: 0.85rem;
  font-weight: 500;
  color: #eaf4f8;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 16px;
}

.hero-badge::before {
  content: "✓";
  color: var(--color-aqua);
  font-weight: 700;
}

.hero-visual {
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
  font-weight: 500;
}

.contact-info a {
  color: var(--color-navy-dark);
  text-decoration: underline;
}

.contact-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-top: 24px;
}

/* ---------- Cartes ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.product-card-media {
  background: var(--color-aqua-light);
  padding: 24px;
}

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card-body h3 {
  margin-bottom: 4px;
}

.product-card-body .btn {
  margin-top: auto;
}

.badge {
  display: inline-block;
  background: var(--color-aqua-light);
  color: var(--color-navy-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  align-self: flex-start;
}

/* ---------- Réassurance / chiffres clés ---------- */
.stats {
  display: grid;
  gap: 24px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-aqua);
}

.stat span {
  color: #cfe1ec;
  font-size: 0.9rem;
}

.testimonials {
  display: grid;
  gap: 20px;
}

.testimonial {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 24px;
}

.testimonial .stars {
  color: var(--color-accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.testimonial footer {
  margin-top: 12px;
  font-weight: 600;
  color: var(--color-navy-dark);
  font-size: 0.9rem;
}

/* ---------- Tableau dimensions ---------- */
.dimensions-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  margin: 24px 0 32px;
}

.dimensions-table {
  min-width: 480px;
}

.dimensions-table th,
.dimensions-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.95rem;
}

.dimensions-table th {
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dimensions-table tr:last-child td {
  border-bottom: none;
}

.dimensions-table tr:nth-child(even) td {
  background: var(--color-mist);
}

.cta-panel {
  background: var(--color-mist);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-top: 8px;
}

.cta-panel p {
  margin-bottom: 20px;
}

/* ---------- Tableau comparatif ---------- */
.compare-table {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 16px;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.95rem;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-heading);
}

.compare-table tbody th {
  text-align: left;
  color: var(--color-navy-dark);
  font-family: var(--font-heading);
  width: 32%;
}

.compare-table .col-ipoolair {
  background: var(--color-aqua-light);
  color: var(--color-navy-dark);
  font-weight: 600;
}

.compare-table thead th.col-ipoolair {
  background: var(--color-aqua);
  color: var(--color-navy-dark);
}

.compare-table tr:last-child td,
.compare-table tr:last-child th {
  border-bottom: none;
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--color-line);
}

.faq-item {
  border-bottom: 1px solid var(--color-line);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-navy-dark);
}

.faq-question .icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
}

.faq-question .icon::before,
.faq-question .icon::after {
  content: "";
  position: absolute;
  background: var(--color-aqua);
  transition: transform 0.2s ease;
}

.faq-question .icon::before {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.faq-question .icon::after {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.faq-item.is-open .icon::after {
  transform: translateX(-50%) rotate(90deg) scale(0);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  padding-bottom: 20px;
}

/* ---------- Formulaire ---------- */
.form-panel {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-navy-dark);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-ink);
}

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

.form-note {
  font-size: 0.8rem;
  color: var(--color-slate);
}

.form-message-success,
.form-message-error {
  display: none;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
  font-weight: 600;
}

.form-message-success {
  background: var(--color-aqua-light);
  border: 1px solid var(--color-aqua);
  color: var(--color-navy-dark);
}

.form-message-error {
  background: #fdecea;
  border: 1px solid #e0554a;
  color: #a3271f;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: #cfe1ec;
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

.footer-brand .logo {
  color: var(--color-white);
}

.site-footer h3 {
  color: var(--color-white);
  font-size: 1rem;
}

.site-footer p {
  color: #cfe1ec;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  color: #cfe1ec;
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-bottom p {
  color: #b7cddb;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  background: var(--color-white);
  padding: 8px 12px;
  z-index: 200;
  border-radius: var(--radius-sm);
}

/* Fil d'ariane */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-slate);
  padding-top: 20px;
}

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

/* Page comparatif : intro */
.intro-block {
  max-width: 760px;
}

.check-list li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  color: var(--color-ink);
}

.check-list li::before {
  content: "✓";
  color: var(--color-aqua);
  font-weight: 700;
}

/* ---------- Media queries ---------- */
@media (min-width: 640px) {
  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 2rem;
  }

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

  .hero-actions .btn {
    width: auto;
  }

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

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex !important;
    flex-direction: row;
    padding: 0;
    border: none;
    gap: 28px;
    align-items: center;
  }

  .main-nav a {
    padding: 8px 0;
    border-bottom: none;
    font-size: 0.95rem;
  }

  .nav-trigger {
    width: auto;
    padding: 8px 0;
    border-bottom: none;
    font-size: 0.95rem;
  }

  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 260px;
    background: var(--color-white);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 8px;
  }

  .nav-item:hover .submenu,
  .nav-item:focus-within .submenu {
    display: block;
  }

  .submenu a {
    padding: 10px 12px;
    border-bottom: none;
    border-radius: 6px;
  }

  .submenu a:hover,
  .submenu a:focus {
    background: var(--color-mist);
    color: var(--color-navy-dark);
  }

  .header-cta {
    display: inline-flex;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }

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

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

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

  .compare-table tbody th {
    width: 26%;
  }
}

@media (min-width: 1140px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
