/* ===========================================================
   TABIEXPERT — feuille de style du site français
   Charte : rouge #C8102E · gris #54585A · fond clair #F2F2F2 · texte #231F20
   =========================================================== */

:root {
  --red: #C8102E;
  --red-dark: #a30d25;
  --gray: #54585A;
  --gray-light: #F2F2F2;
  --dark: #231F20;
  --white: #ffffff;
  --border: #e2e2e2;
  --max-width: 1160px;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.55;
}

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

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

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

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.site-header .logo img { height: 62px; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--dark);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .2px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--red);
  text-decoration: none;
  border-bottom-color: var(--red);
}

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 10px 18px !important;
  border-radius: 6px;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--red-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--dark);
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 92px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .main-nav li { border-top: 1px solid var(--border); }
  .main-nav a { display: block; padding: 14px 0; }
  .nav-cta { display: inline-block; margin-top: 12px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: var(--white);
  display: flex;
  align-items: flex-end;
  min-height: 62vh;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35,31,32,.15) 0%, rgba(35,31,32,.55) 55%, rgba(35,31,32,.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0 56px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 13px;
  font-weight: 700;
  color: #f3b6c0;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 780px;
}

.hero p {
  font-size: 17px;
  max-width: 620px;
  color: #f0f0f0;
  margin: 0 0 28px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */

section { padding: 72px 0; }
section.alt { background: var(--gray-light); }

.section-head { max-width: 720px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.kicker {
  color: var(--red);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin: 0 0 10px;
}

h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 12px;
  color: var(--dark);
  text-wrap: balance;
}

.hero h1 { text-wrap: balance; }

.section-head p { color: var(--gray); font-size: 16px; margin: 0; }

/* ---------- Forces / cards grid ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.force-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
section.alt .force-card { background: var(--white); }

.force-card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 14px;
}

.force-card h3 { font-size: 17px; margin: 0 0 8px; }
.force-card p { color: var(--gray); font-size: 14.5px; margin: 0; }

/* ---------- Gamme preview ---------- */

.gamme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.gamme-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: box-shadow .15s ease, transform .15s ease;
}
.gamme-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.gamme-card .badge {
  display: inline-block;
  background: var(--gray-light);
  color: var(--gray);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.gamme-card h3 { margin: 0 0 8px; font-size: 17px; }
.gamme-card p { color: var(--gray); font-size: 14px; margin: 0 0 14px; }

/* ---------- Réalisations ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.photo-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.photo-card img { height: 220px; width: 100%; object-fit: cover; }
.photo-card figcaption {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
}

/* ---------- Client references list ---------- */

.client-list {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.client-list p {
  color: var(--dark);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.9;
  margin: 0;
}
.client-list strong { color: var(--dark); font-weight: 800; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--gray);
  color: var(--white);
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #d9d9d9; max-width: 560px; margin: 0 auto 28px; }
.cta-band .cta-email {
  margin: 18px auto 0;
  font-size: 14px;
  color: #d9d9d9;
}
.cta-band .cta-email a { color: var(--white); font-weight: 700; text-decoration: underline; }

/* ---------- Formulaire de devis ---------- */

.quote-form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 32px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--dark);
  background: var(--white);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-field textarea { resize: vertical; }
.quote-form .btn { width: 100%; border: none; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .quote-form { padding: 22px; }
}

/* ---------- Fiches techniques page ---------- */

.page-head {
  background: var(--dark);
  color: var(--white);
  padding: 56px 0 40px;
}
.page-head h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; }
.page-head p { color: #cfcfcf; max-width: 640px; margin: 0; }

.download-block {
  margin: 0 0 32px;
  padding: 22px 26px;
  background: var(--gray-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.download-block p { margin: 0; color: var(--gray); font-size: 14.5px; max-width: 480px; }
.download-block strong { color: var(--dark); }
.download-block .btn { white-space: nowrap; }

.category-nav {
  position: sticky;
  top: 92px;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.category-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  white-space: nowrap;
}
.category-nav a {
  display: inline-block;
  color: var(--gray);
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}
.category-nav a:hover { color: var(--red); text-decoration: none; background: var(--gray-light); }

.category-block { padding: 56px 0 8px; scroll-margin-top: 146px; }
.category-block h2 { display: flex; align-items: center; gap: 10px; }
.category-block .rw-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  background: #fbe4e8;
  padding: 3px 10px;
  border-radius: 999px;
}
.category-block > p.desc { color: var(--gray); max-width: 680px; margin: 0 0 32px; }

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 8px;
}

.model-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.model-card .thumb { height: 170px; object-fit: cover; width: 100%; }
.model-card .thumb-placeholder {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  color: var(--gray);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .5px;
}
.model-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.model-card h3 { margin: 0 0 6px; font-size: 18px; }
.model-card .spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.model-card .spec-pill {
  background: var(--gray-light);
  color: var(--dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.model-card .spec-pill.rw { background: var(--red); color: var(--white); }
.model-card p.desc { color: var(--gray); font-size: 14px; margin: 0 0 14px; }

.model-card details {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.model-card summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--red);
  list-style: none;
}
.model-card summary::-webkit-details-marker { display: none; }
.model-card summary::before { content: "+ "; }
.model-card details[open] summary::before { content: "– "; }
.model-card ul.options {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--gray);
}
.model-card ul.options li { margin-bottom: 4px; }
.model-card .cert-note {
  font-size: 12px;
  color: #8a8a8a;
  margin-top: 10px;
}

/* ---------- Fonctionnement page ---------- */

.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
  margin-bottom: 14px;
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-link {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.video-link img { width: 100%; display: block; }
.video-link .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35,31,32,.18);
}
.video-link .play-btn span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(200,16,46,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.video-link:hover .play-btn span { background: var(--red); transform: scale(1.08); }
.video-link:hover { text-decoration: none; }
.video-link .play-btn svg { width: 24px; height: 24px; fill: #fff; margin-left: 4px; }

.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.step-row:last-child { border-bottom: none; }
.step-row.reverse .step-media { order: 2; }
.step-row.reverse .step-text { order: 1; }

.step-text .kicker { margin-bottom: 8px; }
.step-text h2 { margin-bottom: 14px; }
.step-text p { color: var(--gray); font-size: 15px; margin: 0 0 12px; }
.step-text ul { color: var(--gray); font-size: 15px; margin: 0 0 12px; padding-left: 20px; }
.step-text ul li { margin-bottom: 6px; }

.step-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.step-media .img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.step-media .img-trio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.step-media figcaption {
  font-size: 12.5px;
  color: var(--gray);
  text-align: center;
  margin-top: 6px;
}

@media (max-width: 820px) {
  .step-row, .step-row.reverse {
    grid-template-columns: 1fr;
  }
  .step-row.reverse .step-media,
  .step-row.reverse .step-text,
  .step-row .step-media,
  .step-row .step-text {
    order: initial;
  }
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--dark);
  color: #cfcfcf;
  padding: 52px 0 26px;
  font-size: 14px;
}
footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
footer h4 {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 14px;
}
footer img.logo { height: 28px; margin-bottom: 14px; filter: brightness(0) invert(1); }
footer p { margin: 0 0 8px; }
footer a { color: #cfcfcf; }
footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #3a3a3a;
  padding-top: 20px;
  font-size: 12.5px;
  color: #8a8a8a;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
