/* ═══════════════════════════════════════════════════════════
   GOSSET — Fondations communes (palette, polices, nav, footer)
   Les styles propres à chaque page vivent dans assets/css/<page>.css
   ═══════════════════════════════════════════════════════════ */

/* ── Polices de marque ─────────────────────────────────────── */
@font-face {
  font-family: 'ES Build';
  src: url('../fonts/ESBuild-Regular.woff2') format('woff2'), url('../fonts/ESBuild-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'ES Build';
  src: url('../fonts/ESBuild-Medium.woff2') format('woff2'), url('../fonts/ESBuild-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'STK Serif';
  src: url('../fonts/STKBureauSerif-Light.woff2') format('woff2'), url('../fonts/STKBureauSerif-Light.otf') format('opentype');
  font-weight: 300 400; font-style: normal; font-display: swap;
}

/* ── Palette officielle Gosset (échantillonnée sur la charte) ── */
:root {
  --navy:      #02364B;  /* Gosset Bleu */
  --navy-mid:  #123f54;
  --navy-soft: #234b5e;
  --ciel:      #D8E4E5;  /* Gosset Ciel */
  --ciel-bg:   #EAF1F1;
  --sage:      #B6C8BE;  /* Gosset Sauge */
  --cream:     #F7F5F0;  /* fond de page */
  --beige:     #EDEBE5;  /* Gosset Beige */
  --beige-mid: #E2DFD6;
  --sand:      #D4CDC0;
  --terre:     #9B8066;  /* Gosset Terre */
  --pourpre:   #872A3C;  /* Gosset Pourpre (accent) */
  --jaune:     #FEF792;  /* Gosset Jaune */
  --lavande:   #EEEDF2;  /* Gosset Lavande */
  --ink:       #02364B;
  --text:      #2C3238;
  --muted:     #6A6560;
  --line:      #E4DED4;

  /* Typo : ES Build = principale (titres + courant) · STK Serif = secondaire (accents) */
  --sans:  'ES Build', 'DM Sans', system-ui, -apple-system, sans-serif;
  --serif: 'STK Serif', 'Cormorant Garamond', Georgia, serif;

  --wrap: 1200px;
  --gut: 40px;
  --nav-h: 74px;   /* hauteur du bandeau de navigation, fixe et posé par-dessus le hero */
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--sans); font-weight: 500; line-height: 1.06; color: var(--ink); letter-spacing: -0.015em; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }

/* Petit intitulé de section (sobre) */
.kicker {
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  color: var(--terre);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.kicker::before {
  content: ''; width: 26px; height: 1px; background: var(--terre); display: inline-block;
}

/* ── Boutons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 15px 28px; border-radius: 3px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn svg { transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-soft); transform: translateY(-1px); }
.btn-accent { background: var(--pourpre); color: #fff; }
.btn-accent:hover { background: #6f2231; transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--ciel); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--sand); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-ghost-light { background: transparent; color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.28); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }

/* Lien fléché discret */
.arrow-link {
  font-size: 15px; font-weight: 500; color: var(--navy);
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--sand); padding-bottom: 3px;
  transition: gap .2s ease, border-color .2s ease;
}
.arrow-link:hover { gap: 13px; border-color: var(--navy); }

/* ═══ NAV ═══════════════════════════════════════════════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 var(--gut);
  background: rgba(250,248,245,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease;
}
.nav.scrolled { background: rgba(250,248,245,.97); border-bottom-color: var(--line); }
.nav-brand { display: flex; align-items: center; gap: 11px; }
.nav-logo-svg { height: 25px; width: auto; color: var(--navy); display: block; }
.nav-welcome { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--terre); padding-left: 12px; border-left: 1px solid var(--sand); line-height: 1; white-space: nowrap; }
@media (max-width: 600px) { .nav-welcome { font-size: 13.5px; padding-left: 9px; } }
@media (max-width: 360px) { .nav-welcome { display: none; } }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-menu > li > a {
  font-size: 15px; color: var(--text); padding: 9px 16px; border-radius: 3px;
  transition: color .2s ease, background .2s ease;
}
.nav-menu > li > a:hover { color: var(--navy); background: rgba(2,54,75,.05); }
.nav-menu > li > a.active { position: relative; color: var(--navy); font-weight: 600; }
.nav-menu > li > a.active::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 3px;
  height: 2px; background: var(--pourpre); border-radius: 2px;
}
.nav-cta { background: var(--navy) !important; color: #fff !important; padding: 10px 20px !important; }
.nav-cta:hover { background: var(--navy-soft) !important; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .25s; }

/* ═══ FOOTER ════════════════════════════════════════════════ */
.footer { background: var(--navy); color: rgba(255,255,255,.62); padding: 80px 0 0; }
/* Filet de séparation, uniquement quand la page finit sur un bloc navy : le footer,
   navy lui aussi, s'y fondait sans rupture. Sur les pages qui finissent en beige,
   le changement de fond sépare déjà, et un filet ne ferait qu'y ajouter un artefact. */
main:has(> .cta) + .footer,
main:has(> .about-cta) + .footer,
main:has(> .avis-cta) + .footer,
main:has(> .fiche-cta) + .footer { border-top: 1px solid rgba(255,255,255,.14); }
.footer a { color: rgba(255,255,255,.62); transition: color .2s ease; }
.footer a:hover { color: var(--ciel); }
.footer-grid {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 56px;
}
/* Le logo renvoie à l'accueil, comme celui du header. Lien en bloc ajusté au contenu :
   `inline` ou `inline-block` l'assoirait sur une ligne de texte et ajouterait ~8px sous
   le logo ; `fit-content` garde la zone cliquable collée au logo plutôt qu'étalée sur
   toute la colonne. */
.footer-brand-link { display: block; width: fit-content; }
.footer-logo-svg { height: 30px; width: auto; color: #fff; margin-bottom: 20px; display: block; transition: color .2s ease; }
/* Le logo porte sa propre couleur : le survol générique des liens du footer ne l'atteint pas. */
.footer-brand-link:hover .footer-logo-svg { color: var(--ciel); }
.footer-desc { max-width: 300px; margin-bottom: 22px; font-size: 15px; }
.footer-contact { font-size: 15px; line-height: 1.9; }
.footer-contact a { color: #fff; }
.footer-col h4 { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ciel); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; font-size: 15px; }
.footer-bottom {
  max-width: var(--wrap); margin: 60px auto 0; padding: 26px var(--gut);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.4);
}
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s ease; }
.footer-legal a:hover { color: #fff; }

/* ── Bandeau cookies ─────────────────────────────────────────── */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 720px; margin: 0 auto;
  background: var(--navy); color: #fff; border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 18px 22px;
  box-shadow: 0 14px 40px rgba(2,54,75,.28);
  display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap;
  opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .3s ease;
}
.cookie-banner.show { opacity: 1; transform: none; }
.cookie-banner p { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.82); flex: 1 1 300px; margin: 0; }
.cookie-banner p a { color: var(--ciel); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn { padding: 11px 22px; font-size: 14px; }
.cookie-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.cookie-banner .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
@media (max-width: 520px) {
  .cookie-banner { padding: 16px 18px; gap: 14px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* ── Surlignage jaune de marque (comme « Lille » sur la HP) ──
   .surligne       : effet surligneur, pour du texte foncé sur fond clair.
   .surligne-plein : aplat jaune + texte navy, pour les fonds sombres (sinon illisible). */
.surligne { background: linear-gradient(transparent 58%, var(--jaune) 58%); padding: 0 .06em; border-radius: 2px; }
.surligne-plein { background: var(--jaune); color: var(--navy); padding: 0 .14em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ── Bloc « Tout ce qu'on sait faire » (HP + Réalisations) ───── */
.savoirfaire { background: var(--cream); padding: clamp(64px, 8vw, 110px) 0; }
.savoirfaire-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.savoirfaire-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.savoirfaire-head h2 { font-size: clamp(30px, 3.6vw, 46px); margin: 6px 0 16px; }
.savoirfaire-head p { color: var(--muted); font-size: 17px; line-height: 1.8; }
.savoirfaire-head strong { color: var(--navy); font-weight: 500; }
.savoirfaire-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sf-card { position: relative; margin: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 3/4; }
.sf-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.sf-card:hover img { transform: scale(1.05); }
.sf-card figcaption {
  position: absolute; inset: 0; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  background: linear-gradient(to top, rgba(2,54,75,.72) 0%, rgba(2,54,75,.05) 46%, transparent 70%);
}
.sf-tag { background: var(--jaune); color: var(--navy); font-weight: 600; font-size: 15px; padding: 5px 12px; border-radius: 4px; }
.sf-desc { color: #fff; font-size: 13.5px; line-height: 1.45; max-width: 22ch; }
.savoirfaire-foot { margin-top: 26px; color: var(--muted); font-size: 16px; display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) { .savoirfaire-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .savoirfaire-grid { grid-template-columns: 1fr; } .sf-card { aspect-ratio: 4/3; } }

/* ── Hero de page interne (commun Expertises / À propos / …) ── */
.page-hero { background: var(--navy); color: #fff; padding: clamp(130px, 16vw, 190px) 0 clamp(60px, 8vw, 96px); }
.page-hero-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.page-hero .kicker { color: var(--ciel); }
.page-hero .kicker::before { background: var(--ciel); }
.page-hero h1 { color: #fff; font-size: clamp(38px, 5.2vw, 66px); max-width: 16ch; margin-bottom: 26px; }
.page-hero h1 em { font-style: normal; color: var(--ciel); }
.page-hero-lead { font-size: clamp(17px, 1.5vw, 20px); color: rgba(255,255,255,.72); max-width: 56ch; line-height: 1.7; }

/* ── Header de page porté par une photo (immersif) ─────────── */
.photo-hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; overflow: hidden; }
.photo-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.photo-hero-scrim { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(2,54,75,.92) 0%, rgba(2,54,75,.62) 38%, rgba(2,54,75,.14) 62%, transparent 82%); }
.photo-hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut) clamp(48px, 7vw, 84px); }
.photo-hero .kicker { color: var(--ciel); }
.photo-hero .kicker::before { background: var(--ciel); }
.photo-hero h1 { color: #fff; font-size: clamp(38px, 5.4vw, 68px); max-width: 15ch; margin-bottom: 20px; }
.photo-hero h1 em { font-style: normal; color: var(--ciel); }
.photo-hero-lead { color: rgba(255,255,255,.85); font-size: clamp(17px, 1.5vw, 20px); max-width: 46ch; line-height: 1.65; }
@media (max-width: 760px) {
  .photo-hero { min-height: 66vh; }
  .photo-hero-scrim { background: linear-gradient(0deg, rgba(2,54,75,.95) 4%, rgba(2,54,75,.55) 48%, rgba(2,54,75,.22) 100%); }
}

/* ── Révélation au scroll ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive commun ─────────────────────────────────────── */
@media (max-width: 860px) {
  :root { --gut: 22px; }
  .nav-menu { position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 14px var(--gut) 24px; gap: 2px;
    transform: translateY(calc(-100% - 110px)); transition: transform .3s ease; }
  .nav-menu.open { transform: none; }
  .nav-menu > li > a { display: block; padding: 13px 8px; }
  .nav-menu > li > a.active::after { display: none; }
  .nav-burger { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}
