/* ============================================================
   PAGE NOS RÉALISATIONS — refonte V2
   ------------------------------------------------------------
   Chargé UNIQUEMENT par realisations.html, et APRÈS
   realisations.css et solutions.css : surcharge l'habillage sans
   modifier les fichiers d'origine, aucun effet sur les autres pages.

   Même grammaire visuelle que l'accueil et la page Solutions :
     étiquette   12.5px · 700 · .05em · bleu marque
     titre       Manrope 700 · #12151c
     paragraphe  14.5px · 400 · #5a6072
     surfaces    blanc / #f6f7fb, rayons 14-24px

   Aucune classe ni aucun identifiant utilisés par le JavaScript
   n'est renommé (#chantiers-container, .card-page-realisation*,
   .bouton-gammes, #solutionTitle, #solutionDesc, #solutionIcon,
   .faq-*). On ne touche qu'à l'apparence.
   ============================================================ */

body {
  padding-top: 0;
  background-color: #fff;
}


/* ============================================================
   1. HERO — photo de chantier, texte en clair
   ============================================================ */
.solutions-hero {
  position: relative;
  padding: 170px 48px 90px !important;
  margin: 0 !important;
  background-color: #0f1f4a !important;
  /* voile plus léger que sur la page Solutions : cette photo est déjà
     sombre (façade à contre-jour), inutile de l'assombrir davantage */
  background-image:
    linear-gradient(100deg, rgba(9, 20, 60, 0.88) 0%, rgba(9, 20, 60, 0.5) 45%, rgba(9, 20, 60, 0.14) 100%),
    url('../../assets/images/realisations-hero.webp?v=4') !important;
  background-size: cover !important;
  background-position: center center !important;
  /* La photo est recadrée au même ratio que la section (3:1), centrée sur
     la maison : la façade tient dans la hauteur sans que la section
     s'allonge démesurément. */
  min-height: 500px;
  display: flex;
  align-items: center;
  background-repeat: no-repeat !important;
  overflow: hidden;
}

.solutions-hero::after { display: none; }

.solutions-hero .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  position: relative;
  z-index: 2;
  background: transparent;
  width: 100%;
}

.titre-page-solutions {
  text-align: left;
  background: transparent;
  margin: 0;
  max-width: 640px;
}

.titre-page-solutions .solutions-eyebrow {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  color: #bcd0f5;
  margin-bottom: 16px;
}

.titre-page-solutions .heading-xl {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  text-align: left;
  margin: 0 0 18px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

.titre-page-solutions .heading-xl .hl {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.titre-page-solutions .subtitle {
  text-align: left;
  margin: 0;
  max-width: 500px;
}

.titre-page-solutions .subtitle p {
  font-family: var(--font-primary);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  color: #e2e8f7;
  text-align: left;
  margin: 0;
}


/* ============================================================
   2. FILTRES PAR GAMME
   ============================================================ */
.tabs-container {
  position: sticky;
  top: 80px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18, 21, 28, 0.07);
  padding: 0 48px;
  margin: 0;
  max-width: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  overflow: visible;
  padding: 16px 0;
  max-width: 1180px;
  margin: 0 auto;
  border-bottom: none;
}

.tabs .bouton-gammes {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(18, 21, 28, 0.12);
  background: #fff;
  color: #5a6072;
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}

.tabs .bouton-gammes .tab-icon { width: 16px; height: 16px; flex-shrink: 0; }

.tabs .bouton-gammes:hover {
  border-color: rgba(36, 81, 196, 0.35);
  color: #12151c;
  transform: translateY(-1px);
}

.tabs .bouton-gammes.active {
  background: #12151c;
  border-color: #12151c;
  color: #fff;
}


/* ============================================================
   3. EN-TÊTE DE SÉLECTION (icône + titre + description)
   ============================================================ */
.rea-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.rea-header .solution-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(36, 81, 196, 0.08);
  color: var(--brand-blue);
  padding: 9px;
  box-shadow: none;
  margin-top: 4px;
}

.rea-header .solution-icon svg { width: 100%; height: 100%; }

.rea-header .solutionTitle {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #12151c;
  text-align: left;
  margin: 0 0 10px;
}

.texte-presentation-realisation {
  font-family: var(--font-primary);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
  color: #5a6072;
  text-align: left;
  max-width: 620px;
  margin: 0;
}

/* Ancien conteneur inutilisé (le rendu se fait dans #chantiers-container) */
#reaPortfolio:empty { display: none; }


/* ============================================================
   4. GRILLE DE CHANTIERS
   Cartes photo pleine hauteur, texte en surimpression et
   description révélée au survol — même traitement que la section
   Réalisations de la page d'accueil.
   ============================================================ */
.chantiers-section {
  background: #fff;
  padding: 32px 48px 90px;
  margin: 0;
}

#chantiers-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.card-page-realisation {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #eef1f7;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: block;
  transition: transform .35s ease, box-shadow .35s ease;
}

.card-page-realisation:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 31, 74, 0.18);
}

/* voile dégradé pour la lisibilité du texte */
.card-page-realisation::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 31, 74, 0) 42%, rgba(15, 31, 74, 0.88) 100%);
  transition: background .35s ease;
  pointer-events: none;
}

.card-page-realisation:hover::after {
  background: linear-gradient(180deg, rgba(15, 31, 74, 0.1) 18%, rgba(9, 18, 50, 0.95) 100%);
}

/* realisations.css impose ici `aspect-ratio: 4/3`, qui l'emportait sur les
   décalages et laissait la photo à 263px de haut dans une carte de 438px. */
.card-page-realisation-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  z-index: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
}

.card-page-realisation-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.card-page-realisation:hover .card-page-realisation-image img { transform: scale(1.06); }

/* étiquette de gamme */
/* realisations.css place cette étiquette avec `bottom: 1rem` : sans remettre
   bottom/right à auto, mon `top` s'ajoutait au sien et l'étiquette s'étirait
   sur toute la hauteur de la photo. */
.card-page-realisation-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  bottom: auto;
  right: auto;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* texte en surimpression, en bas de carte */
.card-page-realisation-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-page-realisation-body .rea-meta {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin-bottom: 4px;
}

.card-page-realisation-body .rea-meta strong { font-weight: 600; }

.card-page-realisation-body .rea-title {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-align: left;
  margin: 0;
}

/* description : révélée au survol */
.card-page-realisation-body .rea-desc {
  font-family: var(--font-primary);
  font-size: 12.5px;
  line-height: 1.5;
  color: #dbe4fb;
  text-align: left;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s ease, margin-top .4s ease;
}

.card-page-realisation:hover .rea-desc,
.card-page-realisation:focus-within .rea-desc {
  max-height: 88px;
  opacity: 1;
  margin-top: 6px;
}

/* bouton détail : révélé au survol également */
.card-page-realisation-body .btn-details {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s ease, margin-top .4s ease;
}

.card-page-realisation:hover .btn-details,
.card-page-realisation:focus-within .btn-details {
  max-height: 44px;
  opacity: 1;
  margin-top: 12px;
}


/* ============================================================
   5. ÉTAT VIDE
   Quatre gammes n'ont pas encore de chantier publié : sans ce
   bloc, l'onglet renvoyait une zone blanche sans explication.
   ============================================================ */
.rea-vide {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 32px;
  text-align: center;
  background: #f6f7fb;
  border-radius: 20px;
}

.rea-vide-titre {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #12151c;
  margin: 0 0 8px;
}

.rea-vide-texte {
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.6;
  color: #5a6072;
  max-width: 460px;
  margin: 0 auto 22px;
}

.rea-vide-cta {
  display: inline-flex;
  align-items: center;
  background: #12151c;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .18s ease, background .25s ease;
}

.rea-vide-cta:hover {
  transform: translateY(-2px);
  background: var(--brand-blue);
  color: #fff;
}


/* ============================================================
   6. FAQ — reprise du traitement clair de la page Solutions
   ============================================================ */
.faq-section {
  background: #f6f7fb;
  padding: 90px 48px;
  margin: 0;
  overflow: visible;
}

.faq-section::before { display: none; }

.faq-container,
.faq-section #faqList {
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
}

.faq-section .heading-xl {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #12151c;
  text-align: left;
  margin: 0 0 12px;
}

.faq-section .processus-subtitle {
  font-family: var(--font-primary);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
  color: #5a6072;
  text-align: left;
  max-width: 560px;
  margin: 0 0 32px;
}

.faq-item {
  background: #fff;
  border: 1px solid rgba(18, 21, 28, 0.07);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  color: #5a6072;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.faq-item:hover { border-color: rgba(36, 81, 196, 0.3); }

.faq-item.open {
  border-color: rgba(36, 81, 196, 0.35);
  box-shadow: 0 10px 30px rgba(15, 31, 74, 0.06);
}

/* faq.css force `color: var(--text-white) !important` : il faut !important
   pour repasser en texte sombre sur fond clair. */
.faq-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #12151c !important;
}

.faq-header:hover { color: var(--brand-blue) !important; background: transparent; }

.faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--brand-blue);
  transition: transform .3s ease;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.22, 1, .36, 1);
}

.faq-item.open .faq-answer { max-height: 720px; }

.faq-answer-text {
  padding: 0 22px 20px;
  border-top: none;
  font-family: var(--font-primary);
  font-size: 13.5px;
  line-height: 1.7;
  color: #5a6072;
}

.faq-item.open .faq-answer-text { padding-top: 0 !important; }

.faq-answer-text p { margin: 0 0 10px; }
.faq-answer-text ul { margin: 0 0 10px; padding-left: 18px; }
.faq-answer-text li { margin: 0 0 4px; }
.faq-answer-text strong { color: #12151c; }


/* ============================================================
   7. RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .solutions-hero { padding: 150px 24px 70px !important; min-height: 430px; }
  .tabs-container { padding: 0 24px; top: 64px; }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 12px 0;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .rea-header { padding: 40px 24px 0; }
  .chantiers-section { padding: 28px 24px 70px; }
  .faq-section { padding: 70px 24px; }

  #chantiers-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .solutions-hero { padding: 125px 18px 56px !important; min-height: 360px; }
  .tabs-container { padding: 0 18px; top: 60px; }
  .rea-header { padding: 32px 18px 0; flex-direction: column; gap: 12px; }
  .chantiers-section { padding: 24px 18px 56px; }
  .faq-section { padding: 56px 18px; }
  .faq-header { padding: 16px 18px; font-size: 14.5px; }
  .faq-answer-text { padding: 0 18px 18px; }

  #chantiers-container { grid-template-columns: 1fr; }

  /* sur mobile, pas de survol : on montre tout d'emblée */
  .card-page-realisation-body .rea-desc { max-height: 88px; opacity: 1; margin-top: 6px; }
  .card-page-realisation-body .btn-details { max-height: 44px; opacity: 1; margin-top: 12px; }

  /* 10,5 et 11px passent sur un écran de bureau regardé de près, pas sur
     un téléphone tenu à bout de bras. On remonte les petits libellés. */
  .card-page-realisation-tag { font-size: 11.5px; padding: 6px 12px; }
  .card-page-realisation-body .rea-meta { font-size: 12px; letter-spacing: .02em; }
}
