/* ── France Bâtiment Construction — feuille de style ────────
   Palette reprise du logo F.B.C : bleu marine et jaune.
   Fond clair et aéré, jaune réservé aux appels à l'action. */

:root {
  --ciel:        #eef1f8;   /* fond général, bleu très clair */
  --ciel-fonce:  #e2e7f2;   /* sections alternées */
  --blanc:       #ffffff;
  --encre:       #2c3a5c;   /* marine du logo — titres */
  --texte:       #4d5b7d;   /* paragraphes */
  --gris:        #808da9;   /* mentions secondaires */
  --bord:        #d6dcea;
  --jaune:       #f7e64b;   /* jaune du logo — CTA uniquement */
  --jaune-fonce: #ecd930;
  --jaune-pale:  #fdf7c8;

  --rayon:   16px;
  --rayon-s: 10px;
  --ombre:   0 18px 40px -24px rgba(44, 58, 92, .38);
  --maxw:    1160px;

  --font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Inter, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ciel);
  color: var(--texte);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--encre);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
}

p { margin: 0; }

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--blanc);
  padding: .5rem 1rem;
  border-radius: var(--rayon-s);
}

/* ── Boutons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-cta {
  background: var(--jaune);
  color: var(--encre);
  box-shadow: 0 10px 22px -12px rgba(44, 58, 92, .55);
}

.btn-cta:hover {
  background: var(--jaune-fonce);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--encre);
  border: 1.5px solid var(--bord);
}

.btn-ghost:hover {
  border-color: var(--encre);
  background: rgba(255, 255, 255, .6);
}

/* bouton secondaire posé sur la photo */
.btn-clair {
  background: rgba(255, 255, 255, .12);
  color: var(--blanc);
  border: 1.5px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
}

.btn-clair:hover {
  background: rgba(255, 255, 255, .22);
  border-color: var(--blanc);
}

.btn-lg {
  padding: .95rem 1.9rem;
  font-size: 1rem;
}

/* ── Navigation ──────────────────────────────────────────── */

.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}

/* sur la photo de couverture : texte clair, fond transparent */
.nav-wrap .brand-text strong { color: var(--blanc); }
.nav-wrap .brand-text em     { color: rgba(255, 255, 255, .75); }
.nav-wrap .nav-links a       { color: rgba(255, 255, 255, .92); }

/* dès qu'on fait défiler : barre opaque, texte marine */
.barre-opaque {
  background: rgba(238, 241, 248, .92);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(214, 220, 234, .9);
}

.barre-opaque .brand-text strong { color: var(--encre); }
.barre-opaque .brand-text em     { color: var(--gris); }
.barre-opaque .nav-links a       { color: var(--texte); }

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--encre);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.brand-text em {
  font-style: normal;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gris);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  color: var(--texte);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.nav-links a:hover {
  color: var(--encre);
  border-color: var(--jaune);
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 9rem 1.5rem 0;
  text-align: center;
  color: var(--blanc);
  overflow: hidden;
}

/* la photo de couverture, en fond plein cadre */
.hero-fond {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* voile marine : rend le texte lisible et unifie avec la palette */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(20, 28, 48, .62) 0%,
      rgba(20, 28, 48, .38) 38%,
      rgba(20, 28, 48, .72) 100%);
}

.hero-contenu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: 3.5rem;
}

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 1.25rem;
}

.hero .eyebrow { color: var(--jaune); }

.hero-title {
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  margin-bottom: 1.5rem;
  color: var(--blanc);
  text-shadow: 0 2px 24px rgba(15, 20, 36, .45);
}

.hero-lead {
  max-width: 42rem;
  margin: 0 auto 2.25rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 12px rgba(15, 20, 36, .5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  justify-content: center;
}

/* bandeau de repères, posé en bas de la couverture */
.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 1.5rem max(1.5rem, calc((100% - var(--maxw)) / 2));
  width: 100%;
  background: rgba(16, 23, 41, .55);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.stats li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.stats strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blanc);
  letter-spacing: -.01em;
}

.stats span {
  font-size: .82rem;
  color: rgba(255, 255, 255, .72);
}

/* ── Sections ────────────────────────────────────────────── */

.section {
  padding: 5.5rem 1.5rem;
}

.section-alt {
  background: var(--ciel-fonce);
}

.section-head {
  max-width: 46rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  font-weight: 750;
  margin-bottom: .9rem;
}

.section-lead {
  color: var(--texte);
}

/* ── Réalisations ────────────────────────────────────────── */

.grid-projets {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.carte {
  background: var(--blanc);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
  transition: transform .2s ease, box-shadow .2s ease;
}

.carte:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -26px rgba(44, 58, 92, .45);
}

.carte-corps {
  padding: 1.5rem 1.5rem 1.75rem;
}

.carte-tag {
  display: inline-block;
  margin-bottom: .6rem;
  padding: .2rem .7rem;
  border-radius: 999px;
  background: var(--ciel);
  color: var(--gris);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.carte h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.carte-meta {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--bord);
  font-size: .85rem;
  color: var(--gris);
}

/* ── Services ────────────────────────────────────────────── */

.grid-services {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service {
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 1.75rem 1.5rem;
}

.service-icone {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: var(--jaune-pale);
  color: var(--encre);
}

.service-icone svg { width: 24px; height: 24px; }

.service h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.service p {
  font-size: .95rem;
}

/* ── Bandeau CTA ─────────────────────────────────────────── */

.bandeau {
  max-width: var(--maxw);
  margin: 0 auto 5.5rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: var(--blanc);
  border-radius: 24px;
  box-shadow: var(--ombre);
}

.bandeau h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 750;
  margin-bottom: .6rem;
}

.bandeau p { margin-bottom: 1.75rem; }

/* ── Pied de page ────────────────────────────────────────── */

.footer {
  background: var(--encre);
  color: #c2cade;
  padding: 4rem 1.5rem 2rem;
}

.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 2.5rem;
}

.footer h3 {
  color: var(--blanc);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.brand-footer { margin: 0 0 1rem; }

.brand-footer .brand-text strong { color: var(--blanc); }
.brand-footer .brand-text em { color: #9aa5c0; }

.footer-note {
  font-size: .92rem;
  max-width: 22rem;
  margin-bottom: 1.25rem;
}

.footer address {
  font-style: normal;
  font-size: .95rem;
}

.footer-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
  font-size: .95rem;
}

.footer-liste a {
  text-decoration: none;
  border-bottom: 1px solid rgba(185, 205, 221, .35);
}

.footer-liste a:hover {
  color: var(--blanc);
  border-color: var(--jaune);
}

.footer-bas {
  max-width: var(--maxw);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  justify-content: space-between;
  font-size: .82rem;
  color: #9aa5c0;
}

/* ── Adaptations écrans ──────────────────────────────────── */

@media (max-width: 960px) {
  .grid-projets   { grid-template-columns: 1fr 1fr; }
  .grid-services  { grid-template-columns: 1fr 1fr; }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
  .stats          { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .nav-links      { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding-top: 7rem; min-height: 82vh; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stats strong { font-size: 1rem; }
  .section { padding: 4rem 1.25rem; }
  .grid-projets  { grid-template-columns: 1fr; }
  .grid-services { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

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

/* ── Mouvements ──────────────────────────────────────────────
   Rien de tape-à-l'œil : l'image de couverture respire, les blocs
   arrivent au défilement, les photos avancent légèrement au survol. */

@keyframes respiration {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to   { transform: scale(1.15) translate3d(-1.5%, -1.2%, 0); }
}

.hero-fond {
  animation: respiration 30s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes montee {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.hero-contenu > * {
  animation: montee .9s cubic-bezier(.2, .7, .3, 1) both;
}

.hero-contenu > *:nth-child(1) { animation-delay: .10s; }
.hero-contenu > *:nth-child(2) { animation-delay: .22s; }
.hero-contenu > *:nth-child(3) { animation-delay: .34s; }
.hero-contenu > *:nth-child(4) { animation-delay: .46s; }

.stats { animation: montee 1s cubic-bezier(.2, .7, .3, 1) .6s both; }

/* apparition au défilement, posée par le script */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .3, 1);
}

.reveal.vu {
  opacity: 1;
  transform: none;
}

/* la photo avance dans sa carte */
.carte img {
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}

.carte:hover img { transform: scale(1.05); }

.service {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.service:hover {
  transform: translateY(-3px);
  border-color: var(--jaune);
  box-shadow: var(--ombre);
}

/* respecte le réglage système « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  .hero-fond,
  .hero-contenu > *,
  .stats { animation: none !important; }

  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── Formulaire de devis ─────────────────────────────────── */

/* la barre est fixe : on décale les ancres pour ne rien masquer */
[id] { scroll-margin-top: 84px; }

.devis {
  background: var(--ciel-fonce);
}

.formulaire {
  max-width: 46rem;
  margin: 0 auto;
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 2rem;
  box-shadow: var(--ombre);
}

.champs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.champ {
  display: grid;
  gap: .4rem;
}

.champ-large { grid-column: 1 / -1; }

.champ label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gris);
}

.formulaire input,
.formulaire select,
.formulaire textarea {
  width: 100%;
  padding: .7rem .8rem;
  font: inherit;
  font-size: .95rem;
  color: var(--encre);
  background: var(--ciel);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-s);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.formulaire textarea { resize: vertical; }

.formulaire input:focus,
.formulaire select:focus,
.formulaire textarea:focus {
  outline: none;
  background: var(--blanc);
  border-color: var(--encre);
  box-shadow: 0 0 0 3px var(--jaune-pale);
}

.formulaire [aria-invalid="true"] { border-color: #d1495b; }

.formulaire-pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.formulaire-etat {
  margin: 0;
  font-size: .9rem;
  color: var(--gris);
}

.formulaire-etat[data-etat="erreur"] { color: #d1495b; }
.formulaire-etat[data-etat="ok"]     { color: #2f6f5e; }

@media (max-width: 620px) {
  .champs { grid-template-columns: 1fr; }
  .formulaire { padding: 1.5rem 1.25rem; }
  .formulaire-pied .btn { width: 100%; }
}


/* ── Cartes de réalisation, format généreux ──────────────── */

.carte-corps { padding: 1.6rem 1.6rem 1.9rem; }
.carte h3    { font-size: 1.3rem; }
