:root {
  --navy: #1b2a78;
  --navy-dark: #121c54;
  --orange: #f5a000;
  --orange-hot: #ff7a00;
  --text: #222;
  --muted: #5b6275;
  --line: #e6e8ef;
  --bg: #fff;
  --soft: #f4f6fb;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(18, 28, 84, 0.12);
  --header: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3 { font-family: "Trebuchet MS", "Source Sans 3", sans-serif; color: var(--navy); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  overflow: visible;
}
.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  max-width: 1280px;
  margin: 0 auto;
}
.menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
}
.menu-btn .burger { display: block; }
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  margin: 3px 0;
}
.menu-btn em { font-style: normal; font-size: 13px; }
.logo {
  justify-self: center;
  display: flex;
  align-items: center;
  line-height: 0;
}
.logo img {
  height: 52px;
  width: auto;
  max-width: min(320px, 58vw);
}
.header-actions { display: flex; gap: 18px; }
.header-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  position: relative;
}
.header-actions svg { width: 22px; height: 22px; fill: #fff; }
.header-actions b {
  position: absolute;
  top: -6px;
  right: 2px;
  background: var(--orange);
  color: #fff;
  border-radius: 99px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  display: grid;
  place-items: center;
}
.header-actions b[hidden] { display: none; }
.cat-nav { display: none; }
.nav-main {
  display: none;
  background: #eee;
  position: relative;
  z-index: 50;
}
.nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.nav-main li.dropdown {
  display: inline-block;
  border-right: 1px solid #ccc;
  position: static;
}
.nav-main li.dropdown:first-child { border-left: 1px solid #ccc; }
.nav-main .dropbtn {
  display: inline-block;
  color: #222;
  text-align: center;
  padding: 22px 28px 22px 62px;
  font-weight: 700;
  font-size: 15px;
  background-repeat: no-repeat;
  background-position: 16px 50%;
  background-size: 32px;
}
.nav-main .dropdown:hover,
.nav-main .dropdown.open {
  background: #ffde42;
  transition: background-color .3s;
}
.nav-main .dropdown-content {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  background: #f9f9f9;
  box-shadow: 0 8px 16px rgba(0,0,0,.2);
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s linear, visibility .3s linear;
}
.nav-main .dropdown:hover .dropdown-content,
.nav-main .dropdown.open .dropdown-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.nav-main .dropdown-content .block-center {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 8px 0 12px;
}
.nav-main .dropdown-content a {
  color: #111;
  padding: 12px 10px;
  text-align: center;
  width: 161px;
  height: 210px;
  border-right: 1px solid #ddd;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.nav-main .dropdown-content a:hover {
  background: #ffde42;
  transition: background-color .3s;
}
.nav-main .dropdown-content a img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
}
.nav-main .dropdown-content a.tile-full img {
  object-fit: contain;
}
.superRemise {
  font-style: italic;
  color: #e00;
  font-weight: 800;
  white-space: nowrap;
}
.promo-spec { color: #c00 !important; }
.icon-volet .dropbtn { background-image: url("../img/pose-a.svg"); }
.icon-fenetre .dropbtn { background-image: url("../img/cat-fenetre.png"); }
.icon-porte .dropbtn { background-image: url("../img/cat-porte.png"); }
.icon-promo .dropbtn { background-image: none; padding-left: 28px; }

@media (min-width: 981px) {
  .menu-btn { display: none; }
  .nav-main { display: block; }
  .side-menu, .menu-overlay { display: none !important; }
  .header-bar {
    grid-template-columns: 1fr auto;
    max-width: none;
    padding: 6px 40px;
  }
  .logo { justify-self: start; }
  .logo img { height: 56px; }
}
.menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50;
  opacity: 0; pointer-events: none; transition: .2s;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.side-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 90vw);
  background: #fff; z-index: 60; transform: translateX(-105%);
  transition: .25s; padding: 18px; overflow: auto;
}
.side-menu.open { transform: none; }
.side-menu-head { display: flex; justify-content: space-between; align-items: center; }
.side-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 600; }
.side-menu button { background: none; border: 0; font-size: 28px; cursor: pointer; }

.hero-banner {
  position: relative;
  line-height: 0;
  max-width: 980px;
  width: 100%;
  margin: 16px auto 0;
  padding: 0 16px;
}
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.page-intro { text-align: center; padding: 36px 18px 8px; }
.page-intro h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 10px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.section { padding: 48px 0; }
.center { text-align: center; }
.lead { color: var(--muted); font-size: 18px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 270px));
  justify-content: center;
  gap: 22px;
}
.product-grid .card-visual {
  height: auto;
  aspect-ratio: 4 / 5;
}
.product-grid .card-visual img {
  object-position: center;
}
.cards, .reviews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(18,28,84,.06);
  display: flex;
  flex-direction: column;
}
.card-visual {
  height: 180px;
  background: #d9e2f5;
  position: relative;
  overflow: hidden;
}
.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.card:hover .card-visual img { transform: scale(1.04); }
.card h3 { margin: 14px 16px 4px; font-size: 20px; }
.card p { margin: 0 16px 16px; color: var(--muted); }
.card .btn { margin: auto 16px 16px; }

.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}
.btn { background: var(--orange); color: #1a1a1a; }
.btn:hover { background: #ffb01a; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn.disabled, .btn.desactive { opacity: .45; pointer-events: none; }

.factory {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: center;
  background: var(--soft);
  border-radius: 16px;
  padding: 28px;
}
.hours { background: var(--navy); color: #fff; padding: 22px; border-radius: 12px; }
.hours h3 { color: #fff; }

.reviews .card { padding: 16px; }
.stars { color: var(--orange); letter-spacing: 2px; }

.trust-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 14px 10px;
  font-size: 13px;
  font-weight: 700;
}
.site-footer { background: #0f173d; color: #d7dcf0; padding: 36px 18px 16px; }
.footer-grid {
  max-width: 1180px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.site-footer h3 { color: #fff; font-size: 16px; }
.site-footer a, .site-footer p { display: block; margin: 6px 0; color: #c9d0ea; }
.copy { text-align: center; font-size: 13px; opacity: .7; }

.crumbs { padding: 14px 0 0; color: var(--muted); font-size: 14px; }
.page-title { font-size: clamp(28px, 4vw, 42px); margin: 8px 0 10px; }

.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
  padding-bottom: 80px;
}
.config-form h2 {
  margin: 28px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 22px;
}
.config-form h2:first-child { border-top: 0; }
.option-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.option {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
}
.option img.opt-img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 6px;
  background: #eef2f7;
}
.option input { accent-color: var(--orange); }
.option.choose, .option:has(input:checked) {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245, 160, 0, .18);
}
.option.disabled, .option:has(input:disabled) {
  opacity: .38;
  pointer-events: none;
}
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 54px;
  text-align: center;
  font-size: 11px;
  cursor: pointer;
}
.swatch i {
  display: block;
  height: 38px;
  border-radius: 6px;
  border: 2px solid #ccc;
  margin-bottom: 4px;
}
.swatch:has(input:checked) i { border-color: var(--orange); }
.swatch.disabled { opacity: .38; pointer-events: none; }
.swatch input { display: none; }
.c-9016 { background: #f4f4f0; }
.c-7016 { background: #383e42; }
.c-8019 { background: #4a3728; }
.c-7039 { background: #6b6e70; }
.c-9005 { background: #111; }
.c-chene { background: linear-gradient(45deg, #c49a6c, #8a5a32); }
.c-blanc { background: #fff; border: 1px solid #ddd; }

.dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd3e0;
  border-radius: 8px;
}
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.fab-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--soft);
  padding: 12px;
  border-radius: 10px;
  margin-top: 12px;
}
.fab-box strong { display: block; color: var(--navy); }
.error { color: #c62828; font-weight: 700; min-height: 1.2em; }

.sticky-price {
  position: sticky;
  top: 92px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.preview {
  height: 210px;
  border-radius: 10px;
  background: #cfe3c4;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}
.preview > img.preview-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.factory-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}
.preview-house, .preview-window { display: none; }
.preview-coffre, .preview-slats {
  opacity: .55;
  mix-blend-mode: multiply;
}
.preview-coffre {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 10%;
  height: 18px;
  background: #f2f2ee;
  border: 2px solid #bbb;
  z-index: 2;
}
.preview-slats {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 18%;
  height: 55%;
  background: repeating-linear-gradient(#eee 0 7px, #ddd 7px 8px);
  z-index: 1;
}
.price-old { text-decoration: line-through; color: var(--muted); }
.price-now { font-size: 32px; font-weight: 800; color: #d32f2f; margin: 0; }
.price-4x { color: var(--navy); font-weight: 700; }
.qty-row { display: flex; gap: 8px; margin: 12px 0; }
.qty-row select { flex: 1; }
.recap { font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.recap b { color: var(--text); }

.help-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 8px;
  font-size: 14px;
}
.help-strip div { background: var(--soft); padding: 10px; border-radius: 8px; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; }
.cart-empty { padding: 40px; text-align: center; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-grid form { display: grid; gap: 10px; }
.contact-grid textarea { min-height: 120px; padding: 10px; border-radius: 8px; border: 1px solid #cfd3e0; }

@media (max-width: 960px) {
  .factory, .config-layout, .contact-grid { grid-template-columns: 1fr; }
  .product-grid, .cards, .reviews, .trust-bar, .footer-grid, .help-strip { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 270px)); }
  .cat-nav { display: none; }
  .sticky-price { position: static; }
}
@media (max-width: 640px) {
  .product-grid, .cards, .reviews, .dims, .fab-box { grid-template-columns: 1fr; }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product-grid .card h3 { font-size: 15px; margin: 10px 10px 2px; }
  .product-grid .card p { font-size: 12px; margin: 0 10px 12px; }
  .header-actions span { display: none; }
}

/* Porte d'entrée */
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}
.wizard-steps a {
  padding: 8px 12px;
  background: var(--soft);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.wizard-steps a.active,
.wizard-steps a:hover { background: var(--navy); color: #fff; }
.info-note {
  background: #eef3ff;
  border-left: 4px solid var(--navy);
  padding: 10px 12px;
  font-size: 14px;
  margin: 8px 0 14px;
}
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}
.catalog-by-color { display: flex; flex-direction: column; gap: 20px; }
.model-color-group { margin: 0; }
.model-color-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.model-color-heading i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12);
  flex-shrink: 0;
}
.model-card {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 6px 10px;
  cursor: pointer;
  text-align: center;
  background: #fff;
  margin: 0;
}
.model-card input { position: absolute; opacity: 0; pointer-events: none; }
.model-card svg,
.model-card .model-photo { width: 100%; height: 148px; display: block; object-fit: contain; }
.model-card b { display: block; margin-top: 6px; font-size: 13px; color: var(--navy); }
.model-card:has(input:checked) {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245, 160, 0, .18);
}
.opening-combo {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto;
}
.opening-combo-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.opening-combo-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.opening-combo-overlay svg { width: 100%; height: 100%; margin: 0; }
.opening-grid .option:has(.opening-combo) svg { width: 100%; height: 100%; }
.opening-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.opening-grid .option { min-height: 120px; align-items: center; text-align: center; }
.opening-grid svg { width: 88px; height: 88px; margin: 0 auto; }
.step-next { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 4px; }
.preview.preview-door {
  height: 360px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.preview-door svg,
.preview-door .door-model-photo { height: auto; max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.view-toggle { width: 100%; margin-bottom: 10px; }
.c-9011 { background: #1a1a1a; }
.color-block h3 { font-size: 16px; margin: 12px 0 8px; }
.subopts { margin: 8px 0 16px; padding: 12px; background: var(--soft); border-radius: 10px; }
@media (max-width: 960px) {
  .opening-grid { grid-template-columns: 1fr 1fr; }
}
