/* ==========================================================================
   THERMI SERVICES — Feuille de style
   Palette issue du logo : bleu froid / rouge chaud / vert éco
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;900&family=Public+Sans:wght@400;500;600&display=swap');

:root {
  /* Bleu et rouge de marque fournis par le client */
  --navy: #21539D;
  --navy-deep: #16386A;
  --paper: #F6F4EF;
  --paper-alt: #EFEBE2;
  --ink: #17232F;
  --cold: #5178B2;
  --cold-deep: #21539D;
  --warm: #E33932;
  --warm-deep: #B12C27;
  --leaf: #5AAD49;
  --line: rgba(33, 83, 157, 0.16);
  --radius: 3px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Archivo', sans-serif;
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.12;
}

h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 900; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--cold-deep); }

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

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

:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 2px;
}

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--warm);
  color: #fff;
}
.btn-primary:hover { background: var(--warm-deep); }

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-secondary:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

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

.header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo img { height: 46px; width: auto; }

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

.nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
}

.nav a:hover { color: var(--warm); }

.nav .btn-nav {
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
}
.nav .btn-nav:hover { background: var(--cold-deep); color: #fff; }

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

.hero {
  position: relative;
  background:
    linear-gradient(100deg, var(--navy-deep) 0%, var(--navy) 46%, var(--cold-deep) 78%, var(--warm-deep) 100%);
  padding: 96px 0 108px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -6%;
  top: -20%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.10), rgba(255,255,255,0) 65%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 640px; }

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-stats {
  position: relative;
  display: flex;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.hero-stat-number {
  font-family: 'Archivo', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.hero-stat-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  margin-top: 6px;
  max-width: 16ch;
}

/* -------------------- Marques & garanties -------------------- */

.brands { padding: 88px 0; text-align: center; }

.brands h2 { max-width: none; }

.brands-intro { margin: 0 auto 40px; }

.brands-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 44px;
}

.brand-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  opacity: 0.72;
}

.brand-guarantee {
  margin: 34px auto 0;
  font-size: 0.95rem;
  color: #3A4653;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-width: 46ch;
}

/* -------------------- Avis -------------------- */

.testimonials {
  padding: 96px 0;
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.testimonials h2 { max-width: 24ch; }
.testimonials-intro { margin-bottom: 44px; }

.grid-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.testimonial {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px 26px;
}

.testimonial p {
  font-size: 0.96rem;
  color: #3A4653;
  margin-bottom: 18px;
}

.testimonial-name { font-weight: 700; color: var(--navy); font-size: 0.94rem; }
.testimonial-city { font-size: 0.85rem; color: #667082; margin-top: 2px; }

.testimonial-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--leaf);
  background: rgba(90, 173, 73, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

/* -------------------- FAQ -------------------- */

.faq { padding: 96px 0; }

.faq h2 { max-width: 22ch; }
.faq-intro { margin-bottom: 40px; }

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 800px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 24px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy);
}

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
  transition: transform 0.25s ease;
}

.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--warm);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::before { width: 14px; height: 2px; }
.faq-icon::after { width: 2px; height: 14px; }

.faq-item.open .faq-icon { transform: rotate(45deg); }

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

.faq-answer-inner {
  padding: 0 24px 24px;
  font-size: 0.95rem;
  color: #3A4653;
}

.faq-answer-inner p { margin-bottom: 12px; }
.faq-answer-inner p:last-child { margin-bottom: 0; }

.faq-safety {
  background: #FDEDEB;
  border-left: 3px solid var(--warm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.93rem;
}

.faq-safety strong { color: var(--warm-deep); }

/* -------------------- Services -------------------- */

.services { padding: 96px 0; }

.services h2 { margin-bottom: 44px; max-width: 20ch; }

.grid-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--paper);
  padding: 34px 30px 30px;
  position: relative;
}

.card::before {
  content: "";
  display: block;
  width: 34px;
  height: 5px;
  background: var(--warm);
  margin-bottom: 20px;
}

.card:nth-child(2)::before { background: var(--cold); }
.card:nth-child(3)::before { background: var(--leaf); }
.card:nth-child(4)::before { background: var(--navy-deep); }
.card:nth-child(5)::before { background: var(--warm); }
.card:nth-child(6)::before { background: var(--leaf); }

.card p { margin-bottom: 14px; font-size: 0.97rem; color: #3A4653; }

.card .card-note {
  margin: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cold-deep);
}

.card ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 0.92rem;
  color: #3A4653;
}

.card ul li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 7px;
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--warm);
  border-radius: 50%;
}

.card .card-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 2px solid var(--warm);
  padding-bottom: 2px;
}

.card .card-link:hover { color: var(--warm-deep); }

/* -------------------- Bandeau d'annonce -------------------- */

.ribbon {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-size: 0.92rem;
  padding: 11px 16px;
}

.ribbon strong { color: #fff; font-weight: 700; }

/* -------------------- Bandeau professionnels -------------------- */

.pro-banner {
  margin-top: 2px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--leaf);
  padding: 28px 32px;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.pro-banner h3 { margin-bottom: 6px; }
.pro-banner p { margin: 0; font-size: 0.95rem; color: #3A4653; }

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

.realisations {
  padding: 96px 0;
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.realisations h2 { margin-bottom: 44px; }

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.grid-gallery figure {
  margin: 0;
  background: var(--navy);
  overflow: hidden;
}

.grid-gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.grid-gallery a:hover img { transform: scale(1.04); }

.grid-gallery figcaption {
  padding: 12px 14px 14px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

/* -------------------- Contact -------------------- */

.contact { padding: 96px 0 108px; }

.contact .container { max-width: 720px; }

.contact h2 { margin-bottom: 10px; }
.contact > .container > p { margin-bottom: 38px; }

.contact-form {
  display: grid;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--warm);
  padding: 36px;
}

.form-group { display: grid; gap: 8px; }

label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}

input, textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #C7CDD3;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--cold);
  background: #fff;
}

textarea { resize: vertical; min-height: 120px; }

select {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #C7CDD3;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

select:focus { outline: none; border-color: var(--cold); background: #fff; }

.checkbox-group {
  display: grid;
  gap: 8px;
}

.checkbox-group legend {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  padding: 0;
  margin-bottom: 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.93rem;
}

.checkbox-row input { width: auto; padding: 0; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: #3A4653;
}

.consent input { width: auto; margin-top: 3px; }

.consent a { color: var(--cold-deep); }

.contact-form .btn { justify-self: start; margin-top: 4px; }

.contact-note {
  font-size: 0.85rem;
  color: #667082;
  margin-top: 18px;
}

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

.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
  font-size: 0.92rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer p { margin: 0; max-width: none; }

.footer-links {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  width: 100%;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 18px;
  padding-top: 18px;
}

/* -------------------- Pages légales -------------------- */

.legal-page {
  padding: 64px 0 96px;
  max-width: 760px;
}

.legal-page h1 { margin-bottom: 34px; }

.legal-page section { margin-bottom: 34px; }

.legal-page h2 {
  font-size: 1.15rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.legal-page ul { padding-left: 20px; margin: 0 0 1em; }
.legal-page li { margin-bottom: 6px; }

/* -------------------- Responsive -------------------- */

@media (max-width: 900px) {
  .grid-services { grid-template-columns: 1fr; }
  .grid-gallery { grid-template-columns: repeat(2, 1fr); }
  .grid-testimonials { grid-template-columns: 1fr; }
  .hero-stats { gap: 34px; }
  .pro-banner { padding: 24px; }
}

@media (max-width: 640px) {
  .nav ul { gap: 16px; }
  .nav a:not(.btn-nav) { display: none; }
  .hero { padding: 64px 0 76px; }
  .grid-gallery { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; align-items: flex-start; }
  .contact-form { padding: 24px; }
  .ribbon { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
