/* =========================================================
   HCB énergie — feuille de style principale
   Climatisation · Chauffage · Ventilation à Lyon
   ========================================================= */

:root {
  /* Couleurs */
  --ink:        #16233f;
  --muted:      #6c778e;
  --muted-2:    #7d879c;
  --muted-3:    #8b93a7;
  --eyebrow:    #a3abbd;
  --blue:       #2f56d9;
  --blue-dark:  #1d3fb0;
  --line:       #eef1f7;
  --line-2:     #e1e6f0;
  --tint:       #eef2fc;
  --panel:      #f4f6fb;
  --navy:       #0e1f39;
  --navy-grad:  linear-gradient(120deg, #0e1f39 0%, #132a4c 60%, #173763 100%);

  /* Rayons */
  --radius:        16px;
  --radius-header: 22px;   /* coins du header, plus arrondis */
  --radius-btn:    12px;

  /* Largeurs */
  --container:  1180px;
  --header-max: 1360px;    /* header allongé : plus large que le contenu */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

img { max-width: 100%; }

h1, h2, h3 { letter-spacing: -0.02em; font-weight: 800; }

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

/* ---------------------------------------------------------
   Boutons — texte parfaitement centré (hauteur + largeur)
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;      /* centrage vertical */
  justify-content: center;  /* centrage horizontal */
  text-align: center;
  line-height: 1;
  font-family: inherit;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  /* compense l'espace ajouté après la dernière lettre par letter-spacing,
     pour que le texte soit optiquement centré au pixel près */
  text-indent: 0.06em;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(47, 86, 217, .35);
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }

.btn-lg      { font-size: 14px; padding: 21px 30px; min-width: 300px; }
.btn-md      { font-size: 14px; padding: 18px 28px; }
.btn-header  { font-size: 11px; letter-spacing: .04em; padding: 11px 18px; flex-shrink: 0;
               box-shadow: 0 10px 24px rgba(47, 86, 217, .35); border-radius: 10px; }

/* ---------------------------------------------------------
   Header — allongé, plus fin, coins arrondis
   --------------------------------------------------------- */
.site-header-wrap {
  width: 100%;
  max-width: var(--header-max);
  margin: 18px auto 0;
  padding: 0 32px;
}

.site-header {
  display: flex;
  align-items: center;              /* centrage vertical du contenu */
  justify-content: space-between;
  gap: 16px;
  padding: 8px 22px;                /* header plus fin */
  background: var(--navy-grad);
  border-radius: var(--radius-header);
  box-shadow: 0 14px 40px rgba(14, 31, 57, .28);
}

.site-header .logo {
  height: 30px;                     /* logo réduit */
  width: auto;
  display: block;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: #dbe4f2;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .18s ease;
}
.main-nav a:hover { color: #fff; }

/* Les deux numéros côte à côte */
.header-phones {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.header-phones .phone-main {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
}
.header-phones .phone-alt {
  color: #9fb2cf;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.header-phones a:hover { color: #fff; }

.phone-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, .22);
  flex-shrink: 0;
}

/* Bouton burger (mobile) */
.nav-toggle {
  display: none;
  width: 38px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #dbe4f2;
}

/* ---------------------------------------------------------
   Emplacements photo (à remplacer par les vraies images)
   --------------------------------------------------------- */
.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(127, 127, 127, .08);
}

.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-2);
  opacity: .8;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .16);
  border-radius: inherit;
}

/* ---------------------------------------------------------
   Titres de section
   --------------------------------------------------------- */
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--eyebrow);
}

.section-title {
  margin: 14px 0 0;
  font-size: 34px;
  line-height: 1.14;
}

.section { margin-top: 96px; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
  margin-top: 56px;
}

.hero h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.06;
  color: var(--ink);
}

.hero p {
  margin: 24px 0 0;
  font-size: 22px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 460px;
}

.hero .btn { margin-top: 38px; }

.hero-media {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  height: 380px;
}

/* ---------------------------------------------------------
   Prestations
   --------------------------------------------------------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 18px 40px rgba(22, 35, 63, .08); transform: translateY(-2px); }

.card .media { height: 190px; border-radius: 0; }

.card-body { padding: 22px 24px 26px; }
.card-body h3 { margin: 0; font-size: 19px; color: var(--ink); }
.card-body p  { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted-2); }

/* ---------------------------------------------------------
   Multi-split
   --------------------------------------------------------- */
.rooms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 34px;
}

.room {
  border-radius: var(--radius);
  background: var(--tint);
  min-height: 300px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.room .num   { font-size: 64px; font-weight: 800; line-height: .9; color: var(--ink); }
.room .unit  { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-top: 6px; }
.room p      { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted-2); }

.room-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 300px;
  background: var(--ink);
  padding: 0;
}
.room-photo .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 40, 80, .15) 0%, rgba(12, 24, 50, .82) 100%);
  pointer-events: none;
}
.room-photo .room-content {
  position: absolute;
  inset: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.room-photo .media-label { color: #cdd8ec; opacity: .5; }
.room-photo .num  { color: #fff; }
.room-photo .unit { color: #cdd8ec; }
.room-photo p     { color: #d7e0f0; }

/* ---------------------------------------------------------
   Conseil & expertise
   --------------------------------------------------------- */
.lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 900px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 48px;
}
.split + .split { margin-top: 40px; }

.split h3 { margin: 0 0 14px; font-size: 24px; color: var(--ink); }
.split p  { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.split .media { height: 340px; }
.split .btn { margin-top: 24px; }

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

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.gallery-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gallery .media.h-452 { height: 452px; }
.gallery .media.h-472 { height: 472px; }
.gallery .media.h-290 { height: 290px; }
.gallery .media.h-270 { height: 270px; }

.media-caption {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 40, 80, 0) 40%, rgba(12, 24, 50, .78) 100%);
}
.media-caption .txt { position: absolute; left: 24px; bottom: 22px; }
.media-caption .t   { font-size: 20px; font-weight: 700; color: #fff; }
.media-caption .s   { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #cdd8ec; margin-top: 4px; }

/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */
.contact-intro {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 560px;
}

.contact-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 40px;
  margin-top: 36px;
  align-items: start;
}

.contact-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 36px 34px;
}
.contact-card .title { font-size: 15px; font-weight: 800; color: var(--ink); }
.contact-card .zone  { font-size: 14px; color: var(--muted-3); margin-top: 6px; }

.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}
.contact-lines .tel   { font-size: 20px; font-weight: 800; color: var(--ink); }
.contact-lines .tel:hover { color: var(--blue); }
.contact-lines .mail  { font-size: 15px; font-weight: 600; color: var(--blue); margin-top: 6px; }

.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 0 18px 40px rgba(22, 35, 63, .06);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-3);
  margin-bottom: 8px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input, select { height: 48px; padding: 0 16px; }
textarea { padding: 14px 16px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 86, 217, .12);
}

.field-full { margin-top: 18px; }
.contact-form .btn { margin-top: 22px; }

.map {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 36px;
  height: 400px;
  border: 1px solid var(--line);
}
.map iframe { border: 0; width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
  width: 100%;
  margin-top: 90px;
  background: var(--navy-grad);
}

.footer-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 32px 40px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.site-footer .logo { height: 56px; width: auto; margin-bottom: 18px; display: block; }
.site-footer .about { margin: 0; font-size: 14px; line-height: 1.6; color: #9fb2cf; max-width: 280px; }

.footer-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6d84a6;
  margin-bottom: 18px;
}

.footer-list { display: flex; flex-direction: column; gap: 11px; }
.footer-list a { font-size: 14px; color: #cdd8ec; }
.footer-list a:hover { color: #fff; }
.footer-list .tel { font-size: 15px; font-weight: 800; color: #fff; }
.footer-list .zone { font-size: 14px; color: #9fb2cf; margin-top: 4px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-bottom div { font-size: 13px; color: #7d93b3; }

/* Ligne de crédit de conception */
.footer-credit {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px;
  color: #6d84a6;
  text-align: center;
}
.footer-credit a {
  color: #cdd8ec;
  font-weight: 700;
  transition: color .18s ease;
}
.footer-credit a:hover { color: #fff; }

/* ---------------------------------------------------------
   Pages simples (merci, 404)
   --------------------------------------------------------- */
.page-message {
  margin: 90px 0 120px;
  max-width: 640px;
}
.page-message-title {
  margin: 14px 0 18px;
  font-size: 38px;
  line-height: 1.14;
}
.page-message-text {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.page-message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}
.page-message-tel {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.page-message-tel:hover { color: var(--blue); }

/* ---------------------------------------------------------
   Formulaire : piège à robots + retour d'envoi
   --------------------------------------------------------- */

/* Champ leurre : invisible et hors du parcours clavier, mais bien
   présent dans le DOM — les robots le remplissent, pas les humains.
   On évite display:none, que certains robots savent détecter. */
.champ-leurre {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-retour {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
}
.form-retour.visible { display: block; }
.form-retour.succes {
  background: #eaf5ee;
  border: 1px solid #bfe0cb;
  color: #1c5334;
}
.form-retour.echec {
  background: #fdeeee;
  border: 1px solid #f2c9c9;
  color: #8a2b2b;
}
.form-retour ul { margin: 8px 0 0; padding-left: 20px; }
.form-retour li { margin-top: 4px; }

/* Bouton pendant l'envoi */
.btn[aria-busy="true"] {
  opacity: .65;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Pages légales (mentions, confidentialité)
   --------------------------------------------------------- */
.page-legale {
  max-width: 780px;
  margin: 76px 0 110px;
}
.page-legale > .eyebrow { margin-bottom: 14px; }
.page-legale h1 {
  margin: 0 0 10px;
  font-size: 38px;
  line-height: 1.14;
}
.page-legale .maj {
  font-size: 13px;
  color: var(--muted-3);
  margin: 0 0 40px;
}
.page-legale h2 {
  margin: 44px 0 14px;
  font-size: 21px;
  line-height: 1.3;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.page-legale h2:first-of-type { border-top: none; padding-top: 0; margin-top: 32px; }
.page-legale h3 {
  margin: 26px 0 8px;
  font-size: 16px;
}
.page-legale p,
.page-legale li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}
.page-legale p { margin: 0 0 14px; }
.page-legale ul { margin: 0 0 14px; padding-left: 22px; }
.page-legale li { margin-bottom: 7px; }
.page-legale strong { color: var(--ink); font-weight: 700; }

/* Liste de type « libellé : valeur » */
.fiche {
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 20px;
}
.fiche dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-3);
  padding-top: 3px;
}
.fiche dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
}

/* Encadré d'information */
.encart {
  background: var(--panel);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0 0 20px;
}
.encart p:last-child { margin-bottom: 0; }

/* Information manquante — impossible à rater */
.a-completer {
  display: inline-block;
  background: #fff3cd;
  border: 1px dashed #d9a300;
  border-radius: 6px;
  padding: 2px 9px;
  color: #7a5600;
  font-size: 13.5px;
  font-weight: 700;
  font-style: normal;
}

.retour-accueil {
  display: inline-flex;
  align-items: center;
  margin-top: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

/* Liens légaux du bas de page */
.footer-legal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-legal a { color: #cdd8ec; font-size: 13px; }
.footer-legal a:hover { color: #fff; }
.footer-legal span { color: #55698a; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .main-nav { gap: 13px; }
  .header-right { gap: 16px; }
}

@media (max-width: 1024px) {
  .site-header-wrap { padding: 0 20px; }
  .container { padding: 0 20px; }

  /* 42x40 : cible tactile confortable (le header reste fin) */
  .nav-toggle { display: flex; width: 42px; height: 40px; }

  .header-right {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px;
    background: var(--navy-grad);
    border-radius: var(--radius-header);
    box-shadow: 0 18px 44px rgba(14, 31, 57, .35);
    display: none;
    z-index: 40;
  }
  .site-header { position: relative; }
  .site-header.open .header-right { display: flex; }

  .main-nav { flex-direction: column; align-items: flex-start; gap: 14px; }
  .main-nav a { font-size: 13px; }
  .header-phones { justify-content: flex-start; }
  .btn-header { width: 100%; }

  /* Pages secondaires (mentions, confidentialité, merci, 404) : leur header
     n'a ni menu ni bouton burger. Sans cette règle, .header-right serait
     masqué et il ne resterait que le logo. */
  .site-header--simple .header-right {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  .site-header--simple .btn-header { width: auto; }

  .hero { grid-template-columns: 1fr; gap: 32px; margin-top: 44px; }
  .hero h1 { font-size: 42px; }
  .hero p  { font-size: 19px; }
  .hero-media { height: 320px; }

  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .rooms   { grid-template-columns: repeat(2, 1fr); }
  .split   { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .media { order: 2; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-cols  { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { margin-top: 72px; }

  /* 3 colonnes de photos deviennent trop étroites sous 1024px */
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery .media.h-452 { height: 380px; }
  .gallery .media.h-472 { height: 400px; }
  .gallery .media.h-290 { height: 260px; }
  .gallery .media.h-270 { height: 250px; }
}

@media (max-width: 720px) {
  .site-header-wrap { padding: 0 16px; margin-top: 12px; }
  .container { padding: 0 16px; }

  .hero h1 { font-size: 34px; }
  .hero p  { font-size: 17px; }
  .hero-media { grid-template-columns: 1fr; height: auto; }
  .hero-media .media { height: 220px; }
  .hero .btn, .btn-lg { min-width: 0; width: 100%; }

  .section-title { font-size: 26px; }
  .page-message { margin: 56px 0 80px; }
  .page-message-title { font-size: 28px; }
  .page-legale { margin: 48px 0 72px; }
  .page-legale h1 { font-size: 27px; }
  .page-legale h2 { font-size: 18px; margin-top: 34px; }
  .fiche { grid-template-columns: 1fr; gap: 2px 0; }
  .fiche dd { margin-bottom: 12px; }
  .cards-3 { grid-template-columns: 1fr; }
  .rooms   { grid-template-columns: 1fr; }
  .room, .room-photo { min-height: 220px; }

  .gallery { grid-template-columns: 1fr; }
  .gallery .media.h-452,
  .gallery .media.h-472,
  .gallery .media.h-290,
  .gallery .media.h-270 { height: 240px; }

  .field-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
  .contact-card { padding: 26px 22px; }
  .map { height: 300px; }

  /* Sur petit écran, le header simple garde le logo, un numéro et le bouton */
  .site-header--simple .header-phones .phone-alt,
  .site-header--simple .phone-sep { display: none; }
  .site-header--simple .header-right { gap: 10px; }
  .site-header--simple .btn-header { padding: 9px 12px; font-size: 10px; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-inner { padding: 40px 16px 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
