/* ============================================================
   TGF Constructions — Portail
   Fond bleu nuit #000022 · 2 cartes · galerie qui glisse au survol
   Polices auto-hébergées (perf + RGPD : aucun appel à Google Fonts)
   ============================================================ */

@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/plex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/plex-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/plex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/plex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/plex-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* { box-sizing: border-box; }
h1, h2, h3, p { margin: 0; }
a { text-decoration: none; color: inherit; }
body { margin: 0; background: #000022; }
html { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.portal {
  min-height: 100vh;
  background: #000022;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'IBM Plex Sans', sans-serif;
}

/* top bar */
.topbar {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 44px);
}
.portal-logo { height: clamp(60px, 13vw, 98px); width: auto; display: block; }
.topbar-phone {
  display: flex; align-items: center; gap: 10px;
  font: 700 15px 'IBM Plex Sans', sans-serif; color: #fff;
}
.topbar-phone .muted { color: #8fa1ad; font-weight: 500; }

/* question */
.portal-q {
  max-width: 1180px; width: 100%; margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 44px); text-align: center;
}
.portal-q h1 {
  font: 700 clamp(27px, 4.4vw, 44px)/1.1 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  letter-spacing: -.015em; color: #fff; padding: 30px 0 0;
  text-wrap: balance;
}
.portal-sub {
  font: 500 clamp(16px, 2.2vw, 20px) 'IBM Plex Sans', sans-serif;
  color: #8fb0c4; padding: 12px 0 26px;
}

/* ---- Blocs de contenu (SEO / GEO) ---- */
.pblock {
  max-width: 1180px; width: 100%; margin: 0 auto;
  padding: 8px clamp(18px, 5vw, 44px) 42px;
  color: #c1cfd9;
}
.pblock h2 {
  font: 700 clamp(22px, 3vw, 30px)/1.2 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  color: #fff; margin-bottom: 16px; text-wrap: balance;
}
.pblock p { font: 400 16px/1.7 'IBM Plex Sans', sans-serif; margin-bottom: 14px; max-width: 78ch; }
.pblock strong { color: #fff; font-weight: 600; }
.pblock a { color: #ff6a60; text-decoration: underline; text-underline-offset: 2px; }

.pstats {
  list-style: none; margin: 26px 0 18px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px;
}
.pstats li { padding-left: 14px; border-left: 2px solid #d81f27; }
.pstats strong {
  display: block; font: 700 24px 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  color: #fff; font-variant-numeric: tabular-nums;
}
.pstats span { display: block; font: 400 13.5px 'IBM Plex Sans', sans-serif; color: #8fa1ad; margin-top: 3px; }

.pnote {
  font-size: 14.5px !important; color: #8fa1ad;
  border-top: 1px solid #0e2233; padding-top: 16px; margin-top: 8px;
}

.pzones { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.pzones li {
  font: 400 15px/1.6 'IBM Plex Sans', sans-serif; color: #a9b8c4;
  padding-bottom: 12px; border-bottom: 1px solid #0e2233; max-width: 90ch;
}
.pzones b { color: #fff; font-weight: 600; }

.pfaq { border-top: 1px solid #0e2233; padding: 18px 0 4px; }
.pfaq h3 {
  font: 600 17.5px/1.35 'IBM Plex Sans', sans-serif; color: #fff; margin-bottom: 8px;
  text-wrap: balance;
}
.pfaq p { font-size: 15.5px !important; color: #a9b8c4; }

/* cards */
.portal-cards-wrap {
  max-width: 1180px; width: 100%; margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 44px) 30px;
}
.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.pcell { position: relative; }
.pcard {
  position: relative; display: block;
  height: clamp(430px, 56vh, 560px);
  overflow: hidden; background: #0a1a26;
  transition: transform .32s ease, box-shadow .32s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.pimg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top; display: block;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.pcard:hover .pimg { transform: scale(1.07); }
.pcard-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(1,10,16,.95) 0%, rgba(1,10,16,.5) 46%, rgba(1,10,16,.15) 100%);
}
.pcard-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px clamp(24px, 3vw, 40px); }
.pcard-eyebrow {
  font: 600 13px 'IBM Plex Sans', sans-serif; letter-spacing: .16em;
  text-transform: uppercase; color: #8fb0c4;
}
.pcard-body h2 { font: 700 clamp(24px, 3vw, 33px)/1.14 'IBM Plex Sans', sans-serif; color: #fff; margin-top: 8px; }
.pcard-body p { font: 400 15px/1.55 'IBM Plex Sans', sans-serif; color: #c1cfd9; margin-top: 12px; max-width: 440px; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pcard-tags span {
  font: 600 12px 'IBM Plex Sans', sans-serif; color: #d3dee6;
  border: 1px solid rgba(255,255,255,.24); padding: 5px 11px;
}
.pcard-cta {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 22px;
  font: 700 14.5px 'IBM Plex Sans', sans-serif; color: #fff;
}
.parrow { display: inline-block; font-size: 17px; line-height: 1; transition: transform .3s ease; }
.pcard:hover .parrow { transform: translateX(8px); }

/* galerie qui glisse au survol (bureau uniquement) */
.pshots {
  position: absolute; top: 0; bottom: 0;
  display: flex; flex-direction: row; gap: 10px;
  z-index: 5; opacity: 0; pointer-events: none;
  transition: opacity .4s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}
.pshots figure {
  position: relative; margin: 0; height: 100%;
  width: clamp(280px, 44vw, 560px); flex: none;
  overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.pshots figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pshots figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 14px 14px; font: 700 14px 'IBM Plex Sans', sans-serif; color: #fff;
  background: linear-gradient(to top, rgba(1,10,16,.92), rgba(1,10,16,0));
}
.pshots-r { left: 100%; margin-left: 16px; transform: translateX(-16px); }
.pshots-l { right: 100%; margin-right: 16px; transform: translateX(16px); }
@media (hover: hover) and (min-width: 900px) {
  .pcell:hover { z-index: 10; }
  .pcell:hover .pshots { opacity: 1; transform: translateX(0); }
}

/* footer */
.portal-footer {
  margin-top: auto; border-top: 1px solid #0e2233;
  padding: 20px clamp(18px, 5vw, 44px);
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  justify-content: space-between; align-items: center;
}
.pf-left { font: 400 13px/1.6 'IBM Plex Sans', sans-serif; color: #6f7d89; }
.pf-right { font: 400 13px/1.6 'IBM Plex Sans', sans-serif; color: #8794a0; text-align: right; }
.pf-left strong { color: #c1cfd9; font-weight: 600; }
.portal-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) { .pf-right { text-align: left; } }

/* Entrée animée — glissement seul, JAMAIS d'opacité de départ.
   Une opacité 0 sur l'image principale retarde le LCP (Google mesure
   le moment où le plus grand élément devient VISIBLE). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes tgfSlideUp { from { transform: translateY(14px); } to { transform: none; } }
  .portal-q h1 { animation: tgfSlideUp .5s cubic-bezier(.2,.7,.2,1) both; }
  .pcard { animation: tgfSlideUp .55s cubic-bezier(.2,.7,.2,1) both; }
}

/* ---- Barre contact mobile (1 clic) ---- */
.tgf-contactbar { display: none; }
@media (max-width: 860px) {
  body { padding-bottom: 62px; }
  .tgf-contactbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    display: flex; background: #fff;
    box-shadow: 0 -8px 24px rgba(0,0,20,.45);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tcb-btn {
    flex: 1 1 50%; display: inline-flex; align-items: center; justify-content: center;
    gap: 10px; padding: 17px 10px;
    font: 700 15.5px 'IBM Plex Sans', sans-serif; letter-spacing: .01em;
  }
  .tcb-btn svg { display: block; flex: 0 0 auto; }
  .tcb-call { background: #d81f27; color: #fff; }
  .tcb-mail { background: #001523; color: #fff; }
  .pcard { height: 400px; }
}
