/* ==========================
   THÈME BOIS DE CHAUFFAGE
   Fichier autonome : structure + palette
   Palette : brun bois, orange braise, doré chaleureux
   ========================== */

:root {
  --bois-primary: #C9781E;      /* orange bois/braise */
  --bois-primary-dark: #A5610F; /* orange foncé au survol */
  --bois-accent: #E8A857;       /* doré chaleureux */
  --bois-bg-dark: #241812;      /* brun très foncé - fond principal */
  --bois-bg-medium: #3B2A1E;    /* brun moyen - sections alternées */
  --bois-text: #ffffff;
}

/* ==========================
   RESET & BASE
   ========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bois-bg-dark);
  color: var(--bois-text);
  line-height: 1.6;
}

.font-orbitron {
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.container {
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
}

/* ==========================
   ACCESSIBILITÉ
   ========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================
   HEADER
   ========================== */
header {
  width: 100%;
  padding: 1rem 0;
  background-color: var(--bois-bg-dark);
  z-index: 10;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1520px;
  margin: 0 auto;
  gap: 1rem;
  flex-wrap: wrap; /* permet au nav de passer à la ligne s'il manque de place (tablette) */
}

.logo-container,
header .logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: auto;
  justify-content: flex-start;
}

/* Logo : géré désormais uniquement dans nav.css (fichier partagé),
   qui contient la même règle clamp() fluide 45px→100px. Pas de
   redéfinition ici pour éviter la duplication entre fichiers. */

/* ==========================
   EFFET NÉON (bouton/hero/cards)
   ========================== */
.neon-glow:hover {
  box-shadow: 0 0 20px rgba(201, 120, 30, 0.9), 0 0 30px rgba(201, 120, 30, 0.7);
}

/* ==========================
   BREADCRUMB
   ========================== */
.breadcrumb-nav {
  background-color: var(--bois-bg-medium);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--bois-accent);
  font-weight: bold;
}

.breadcrumb a {
  color: var(--bois-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--bois-primary);
  text-decoration: underline;
}

.breadcrumb li:last-child span {
  color: #ffffff;
}

/* ==========================
   HERO SECTION
   ========================== */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  min-height: 400px;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bois-bg-dark), transparent);
  opacity: 0.7;
}

.hero-content-wrapper {
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-image-container {
  position: relative;
  margin: 0 auto;
}

.hero-image-container img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 300px;
  background-color: var(--bois-bg-medium);
}

.hero-title-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.hero-title-overlay h1,
.hero-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: var(--bois-primary);
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.hero-subtitle {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #ffffff;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

/* ==========================
   MAIN CONTENT
   ========================== */
.main-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.main-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--bois-primary);
  margin-bottom: 2rem;
}

.main-content h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--bois-accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.main-content p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.main-content article {
  background-color: var(--bois-bg-medium);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--bois-accent);
  transition: all 0.3s ease;
}

.main-content article:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 6px rgba(232, 168, 87, 0.3);
}

.main-content article h3 {
  margin-top: 0;
}

/* ==========================
   BOUTONS
   ========================== */
.btn-primary {
  background-color: var(--bois-primary);
  color: var(--bois-bg-dark); /* corrigé : contraste 5.1:1 au lieu de 3.39:1 en blanc */
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  display: block;
  max-width: 500px;
  margin: 30px auto;
  text-align: center;
  font-size: clamp(1.25rem, 4vw, 2rem);
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--bois-primary-dark);
  color: #ffffff; /* le fond plus foncé au survol nécessite du texte blanc pour rester accessible */
}

.btn-back {
  margin-top: 1.5rem;
  background-color: var(--bois-primary);
  color: var(--bois-bg-dark); /* corrigé : contraste 5.1:1 au lieu de 3.39:1 en blanc */
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  display: inline-block;
}

.btn-back:hover {
  background-color: var(--bois-primary-dark);
  color: #ffffff; /* le fond plus foncé au survol nécessite du texte blanc pour rester accessible */
}

/* ==========================
   SECTIONS GÉNÉRALES
   ========================== */
.section-section {
  padding: 2rem 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--bois-primary);
}

/* ==========================
   SERVICES GRID
   ========================== */
.services-grid {
  display: grid;
  gap: 2rem;
  padding: 0 1rem;
}

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

@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================
   SERVICE CARD
   ========================== */
.service-card {
  position: relative;
  height: auto;
  min-height: 18rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: all 0.3s ease;
  display: block;
  text-decoration: none;
}

.service-card:hover {
  opacity: 0.7;
}

.service-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card-img {
  transform: scale(1.05);
}

.card-overlay {
  position: relative;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  padding-bottom: 1.5rem;
  transition: opacity 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
}

.service-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay .card-title {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  color: var(--bois-bg-dark);
  background-color: var(--bois-accent);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}

.card-overlay p {
  color: #ffffff;
  margin-bottom: 2rem;
  font-weight: bold;
  padding: 10px;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.card-overlay .btn-icon {
  background-color: var(--bois-primary);
  color: var(--bois-bg-dark); /* corrigé : contraste 5.1:1 au lieu de 3.39:1 en blanc */
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}

/* ==========================
   DETAIL SECTIONS
   ========================== */
.detail-section {
  padding: 2rem 1rem;
  background-color: var(--bois-bg-medium);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1320px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .detail-content {
    flex-direction: row;
  }
}

.detail-text {
  flex: 2;
}

.detail-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  gap: 2rem;
}

.detail-image picture {
  width: 100%;
  max-width: 640px;
}

.detail-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  color: var(--bois-primary);
}

.detail-section h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--bois-accent);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.detail-section p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 1rem;
}

.detail-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.detail-section li {
  margin-bottom: 0.5rem;
}

.detail-section img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* ==========================
   CONTACT SECTION
   ========================== */
.contact-section {
  background: linear-gradient(to bottom, var(--bois-bg-dark), var(--bois-bg-medium));
  text-align: center;
  padding: 4rem 1rem;
}

.contact-content {
  max-width: 28rem;
  margin: 0 auto;
}

.contact-content p {
  margin-bottom: 0.5rem;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.contact-content strong {
  color: var(--bois-primary);
}

.contact-content a {
  color: var(--bois-accent) !important;
}

/* ==========================
   BACK TO TOP
   ========================== */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--bois-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  text-decoration: none;
  line-height: 50px;
  text-align: center;
  z-index: 1000;
}

#back-to-top:hover {
  background-color: var(--bois-primary-dark);
}

#back-to-top.show {
  display: block;
}

/* ==========================
   SCROLL REVEAL
   ========================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================
   IMAGES CACHÉES (SEO)
   ========================== */
.hidden {
  display: none;
}

/* ==========================
   FAQ SECTION
   ========================== */
.faq-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 1rem;
  background-color: var(--bois-bg-dark);
}

.faq-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--bois-primary);
  margin-bottom: 3rem;
  text-align: center;
}

.faq-item {
  background-color: var(--bois-bg-dark);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--bois-accent);
}

.faq-item h3 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  letter-spacing: 0.03em;
  color: var(--bois-accent);
  margin-bottom: 1rem;
}

.faq-item p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.8;
}

/* ==========================
   PRICING TABLE
   ========================== */
.pricing-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.pricing-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--bois-primary);
  margin-bottom: 3rem;
  text-align: center;
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.services-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bois-bg-medium);
  border-radius: 0.5rem;
  overflow: hidden;
}

.services-table thead {
  background-color: var(--bois-primary);
}

.services-table th {
  padding: 1rem;
  text-align: left;
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: clamp(0.875rem, 2vw, 1rem);
  white-space: nowrap;
  color: var(--bois-bg-dark); /* corrigé : contraste 5.1:1 au lieu de 3.39:1 en blanc */
}

.services-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--bois-bg-dark);
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.services-table tbody tr:hover {
  background-color: var(--bois-bg-dark);
}

/* ==========================
   REVIEWS SECTION
   ========================== */
.reviews-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 1rem;
  background-color: var(--bois-bg-medium);
}

.reviews-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--bois-primary);
  margin-bottom: 3rem;
  text-align: center;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.review-card {
  background-color: var(--bois-bg-dark);
  padding: 2rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--bois-accent);
}

.stars {
  color: #fbbf24;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.review-text {
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
}

.review-author {
  font-weight: 600;
  color: var(--bois-accent);
  font-size: 0.9rem;
}

.review-summary {
  text-align: center;
  padding: 2rem;
  background-color: var(--bois-bg-dark);
  border-radius: 0.5rem;
}

.review-summary p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--bois-accent);
}

/* ==========================
   SERVICE AREA
   ========================== */
.service-area {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.service-area h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-family: 'Arial Black', 'Franklin Gothic Bold', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--bois-primary);
  margin-bottom: 2rem;
}

.service-area p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.service-area ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 2rem 0;
}

.service-area li {
  background-color: var(--bois-bg-medium);
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 3px solid var(--bois-accent);
  font-weight: 600;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

/* ==========================
   RESPONSIVE MOBILE (≤768px)
   ========================== */
@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* laisse le nav passer à la ligne sous logo+bouton */
    gap: 0.75rem;
  }

  /* Le nav prend toute la largeur et passe donc automatiquement
     à la ligne suivante, sous le logo et le bouton hamburger.
     flex-basis: 100% force le retour à la ligne même si nav.css
     définit "nav { flex: 1; }" globalement (flex-basis: 0% par défaut). */
  header nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
  }

  .logo-container {
    width: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .hero-title-overlay h1 {
    margin-bottom: 0.75rem;
  }

  .mobile-menu-toggle {
    width: auto;
  }
}

/* ==========================
   TABLEAU TARIFS - RESPONSIVE (≤600px)
   Transforme le tableau en cartes empilées pour éviter
   le débordement horizontal sur mobile
   ========================== */
@media (max-width: 600px) {
  .services-table thead {
    display: none;
  }

  .services-table,
  .services-table tbody,
  .services-table tr,
  .services-table td {
    display: block;
    width: 100%;
  }

  .services-table {
    border: none;
  }

  .services-table tr {
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    overflow: hidden;
  }

  .services-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: right;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .services-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--bois-accent);
    text-align: left;
    white-space: nowrap;
  }
}

/* ==========================
   LOGO RESPONSIVE
   Géré directement dans la règle de base .logo-container img
   via clamp() — fluide de 45px (≤400px) à 100px (≥1024px)
   ========================== */