/* ============================================================
   OPTIBEN — Design system (repris du WordPress Elementor /guide/)
   ============================================================ */
:root {
  --brand-blue: #3257a4;      /* hero + titres (H1/H2 Elementor) */
  --brand-blue-dark: #27467f;
  --link-blue: #01309c;       /* liens dans le contenu */
  --accent-orange: #ff9b48;   /* boutons CTA */
  --accent-orange-dark: #f1590b;
  --accent-green: #17b978;     /* checkmarks */
  --accent-teal: #26a69a;      /* en-têtes de tableaux */
  --text: #212020;
  --text-muted: #555;
  --border: #e5e8ef;
  --bg-soft: #f5f7fb;
  --white: #fff;
  --radius: 6px;
  --container: 1140px;
  --font: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; }
a { color: var(--link-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 14px rgba(20, 40, 90, .08);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 0;
}
.site-header .logo img { width: 170px; height: auto; display: block; }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: var(--text); font-weight: 600; font-size: 16px; padding: 6px 0;
}
.main-nav a:hover { color: var(--brand-blue); text-decoration: none; }
.nav-cta {
  background: var(--accent-orange); color: #fff !important; font-weight: 700;
  padding: 11px 22px; border-radius: 4px; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-orange-dark); text-decoration: none; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 26px; height: 3px; background: var(--brand-blue); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--brand-blue);
  color: #fff;
  padding: 54px 0 60px;
}
.hero .inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 800; margin: 0 0 18px; color: #fff; }
.hero h1 strong { color: #ffd37a; }
.hero .checks { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.hero .checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.hero .checks li::before {
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent-green);
  color: #fff; font-size: 14px; flex: 0 0 24px;
}
.hero .hero-img { text-align: center; }
.btn-cta {
  display: inline-block; background: var(--accent-orange); color: #fff;
  font-weight: 700; font-size: 18px; padding: 14px 30px; border-radius: 4px;
  border: 0; cursor: pointer; transition: background .2s;
}
.btn-cta:hover { background: var(--accent-orange-dark); color: #fff; text-decoration: none; }

/* ---------- Formulaire de devis ---------- */
.devis-card {
  background: #fff; color: var(--text); border-radius: 10px;
  box-shadow: 0 20px 50px rgba(10, 25, 60, .25); padding: 0; overflow: hidden;
  max-width: 460px; margin-left: auto;
}
.devis-head {
  background: var(--accent-orange); color: #fff; font-weight: 700;
  text-align: center; padding: 14px 18px; font-size: 17px;
}
.devis-form { padding: 20px; display: grid; gap: 12px; }
.devis-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.devis-form input, .devis-form select {
  width: 100%; padding: 11px 12px; border: 1px solid #d5dbe8; border-radius: 6px;
  font: inherit; font-size: 15px; background: #fff; color: var(--text);
}
.devis-form input:focus, .devis-form select:focus {
  outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(50, 87, 164, .15);
}
.devis-form .field-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.devis-form .dob { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; }
.devis-submit { width: 100%; margin-top: 4px; }
.devis-submit:disabled { opacity: .6; cursor: default; }
.devis-error { color: #c0392b; font-size: 14px; margin: 0; font-weight: 600; }
.devis-thanks { max-width: 460px; text-align: center; padding: 36px 28px; }
.devis-thanks .devis-check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-green);
  color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.devis-thanks h2 { color: var(--brand-blue); font-size: 24px; margin: 0 0 12px; }
.devis-thanks .devis-sub { color: var(--accent-orange-dark); font-weight: 700; }

/* ---------- Content (migration fidèle, restylée Elementor) ---------- */
.page-content { padding: 44px 0 56px; }
.legacy-content { max-width: var(--container); margin: 0 auto; }
.legacy-content h2 {
  font-size: 28px; font-weight: 700; color: var(--brand-blue);
  margin: 34px 0 14px; line-height: 1.25;
}
.legacy-content h3 { font-size: 21px; font-weight: 700; color: var(--text); margin: 26px 0 10px; }
.legacy-content h4 { font-size: 18px; font-weight: 700; color: var(--brand-blue-dark); margin: 20px 0 8px; }
.legacy-content p { margin: 0 0 16px; }
.legacy-content ul, .legacy-content ol { margin: 0 0 18px; padding-left: 22px; }
.legacy-content li { margin: 6px 0; }
.legacy-content a { color: var(--link-blue); font-weight: 600; }
.legacy-content img { border-radius: 6px; height: auto; }
.legacy-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 16px; }
.legacy-content th { background: var(--accent-teal); color: #fff; text-align: left; padding: 12px 14px; }
.legacy-content td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.legacy-content tr:nth-child(even) td { background: var(--bg-soft); }

/* Neutraliser l'ancienne grille Bootstrap 2 à l'intérieur du contenu */
.legacy-content .container,
.legacy-content .row-fluid,
.legacy-content [class^="span"],
.legacy-content [class*=" span"],
.legacy-content .item,
.legacy-content .courses,
.legacy-content .info,
.legacy-content .slider {
  width: auto !important; max-width: 100% !important; margin-left: 0 !important;
  float: none !important; display: block !important; position: static !important;
  padding: 0 !important;
}
.legacy-content .courses .item img[style*="float"] { float: left !important; margin: 6px 18px 12px 0 !important; }

/* Neutraliser les conteneurs Elementor (CSS Elementor non chargé) -> rendu via notre design */
.legacy-content .elementor,
.legacy-content .elementor-section,
.legacy-content .elementor-container,
.legacy-content .elementor-row,
.legacy-content .elementor-column,
.legacy-content .elementor-column-wrap,
.legacy-content .elementor-widget-wrap,
.legacy-content .elementor-element,
.legacy-content [class*="elementor-column-"] {
  width: auto !important; max-width: 100% !important; margin: 0 !important;
  padding: 0 !important; display: block !important; flex: none !important;
  position: static !important; min-height: 0 !important;
}
.legacy-content .elementor-widget { margin: 0 0 12px !important; }
.legacy-content .elementor-widget-image { text-align: center; }
.legacy-content .elementor-widget-image img { display: inline-block; }
.legacy-content .elementor-heading-title { margin-top: 1.4em; }
.legacy-content .elementor-icon-list-items { list-style: none; padding-left: 0; }
.legacy-content .elementor-icon-list-item { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.legacy-content .elementor-button {
  display: inline-block; background: var(--accent-orange); color: #fff !important;
  font-weight: 700; padding: 12px 26px; border-radius: 4px; margin: 8px 0;
}
.legacy-content .elementor-button:hover { background: var(--accent-orange-dark); text-decoration: none; }
/* Masquer les éléments décoratifs/vides Elementor sans contenu utile */
.legacy-content .elementor-background-overlay,
.legacy-content .elementor-shape,
.legacy-content .e-con-inner > .elementor-element:empty { display: none !important; }

/* ---------- Footer ---------- */
.site-footer { background: #1f2a44; color: #cfd6e6; margin-top: 40px; }
.site-footer a { color: #cfd6e6; }
.site-footer a:hover { color: #fff; }
.footer-partners { background: var(--bg-soft); padding: 30px 0; }
.footer-partners h4 { text-align: center; color: var(--brand-blue); margin: 0 0 18px; font-size: 18px; }
.footer-partners .logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; align-items: center; }
.footer-partners .logos img { max-height: 48px; width: auto; filter: grayscale(.1); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 44px 0 28px; }
.footer-cols h5 { color: #fff; font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin: 7px 0; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 14px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .inner { grid-template-columns: 1fr; }
  .hero .hero-img { display: none; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .main-nav { position: fixed; inset: 64px 0 auto 0; background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,.1); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px; }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav a { display: block; padding: 12px 0; }
  .burger { display: block; }
  .nav-cta { display: none; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 30px; }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ===== Formulaires produit (hero 2 colonnes + carte) ===== */
.hero .inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-left h1 { font-size: 38px; line-height: 1.12; font-weight: 800; margin: 6px 0 20px; color: #fff; }
.hero-left .checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero-left .checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.hero-left .checks li::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-green); color: #fff; font-size: 14px; flex: 0 0 24px; }

/* CTA + illustration (pages de contenu) */
.hero-cta { display: inline-block; margin-top: 26px; font-size: 18px; padding: 15px 30px; text-transform: none; }
.hero-right { display: flex; justify-content: center; }
.hero-illu { display: block; max-width: 100%; }
.hero-illu img { display: block; width: 100%; max-width: 440px; height: auto; }

.devis-card { background: #fff; color: var(--text); border-radius: 12px; overflow: hidden; box-shadow: 0 22px 50px rgba(10, 25, 60, .28); }
.devis-head { background: var(--accent-orange); color: #fff; font-weight: 700; text-align: center; padding: 13px 18px; font-size: 16px; }
.devis-form { padding: 20px 22px 22px; }
.devis-form .step { color: var(--accent-orange-dark); font-weight: 800; font-size: 17px; margin: 14px 0 12px; }
.devis-form .step:first-of-type { margin-top: 0; }
.devis-form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.devis-form .f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.devis-form .f.full { grid-column: 1 / -1; }
.devis-form label { color: var(--brand-blue); font-weight: 600; font-size: 13.5px; }
.devis-form input, .devis-form select { font: inherit; font-size: 15px; color: var(--text); background: #eef1f6; border: 1px solid #dbe1ec; border-radius: 7px; padding: 11px 12px; width: 100%; }
.devis-form input:focus, .devis-form select:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(50, 87, 164, .16); }
.devis-form .btn-cta { width: 100%; margin-top: 18px; text-transform: uppercase; letter-spacing: .3px; }

@media (max-width: 900px) {
  .hero .inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-left h1 { font-size: 28px; }
}
@media (max-width: 520px) {
  .devis-form .grid { grid-template-columns: 1fr; }
}
