/* =====================================================
   VITRINE.CSS — version optimisée (safe)
   Objectifs :
   - Nettoyage léger (sans casser)
   - Navbar FIXE en haut (sans saut)
   - Ajout du “garde-fou” rendu (backface/translateZ)
   - Responsive conservée
   - About background fixe (déjà présent) + rendu plus stable
   ===================================================== */

/* ============ Variables ============ */
:root{
  --bg:#070b14;
  --bg2:#0b1220;
  --panel:rgba(255,255,255,.05);
  --line:rgba(255,255,255,.10);
  --text:#eaf0ff;
  --muted:#b8c3dd;
  --primary:#2f6bff;
  --primary2:#1c49b8;
  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --radius: 18px;

  /* hauteur “réelle” du header (utile si tu veux gérer des ancres) */
  --header-h: 68px;
}

/* ============ Base / reset safe ============ */
*{box-sizing:border-box}
html{height:100%; scroll-behavior:smooth}
html, body{ overflow-x:hidden; }

body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);

  /* stabilité mobile */
  overscroll-behavior-x:none;

  /* fond global */
  background:
    radial-gradient(900px 600px at 15% 15%, rgba(47,107,255,.18), transparent 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(255,60,60,.10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%);
}

a{color:inherit; text-decoration:none}
.container{width:min(1120px, 92%); margin:0 auto}

/* média responsive safe */
img{max-width:100%; height:auto}
svg{max-width:100%}

/* Lock scroll quand menu mobile ouvert */
body.nav-open{
  overflow:hidden;
  overscroll-behavior:none;
}

/* =====================================================
   Overlay (menu mobile)
   ===================================================== */
.nav-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.60);

  /* fermé: pas de blur */
  backdrop-filter:none;
  -webkit-backdrop-filter:none;

  opacity:0;
  pointer-events:none;
  display:none;

  transition: opacity .30s ease;
  z-index:90;
}

body.nav-open .nav-overlay{
  display:block;
  opacity:1;
  pointer-events:auto;

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* =====================================================
   Header / Navbar (FIXE)
   - Passe de sticky à fixed
   - On compense le contenu avec padding-top sur main
   ===================================================== */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:110;

  background:rgba(7,11,20,.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);

  /* fallback iOS < 16 */
  overflow-x:hidden;
}
@supports (overflow: clip) {
  .site-header{ overflow-x: clip; }
}


/* Compensation : évite que le contenu passe sous le header */
main{
  flex:1 0 auto;
  padding-top: var(--header-h);
}

.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:190px;
  position:relative;
  z-index:110;
}

.brand-logo{width:42px; height:42px; object-fit:contain}
.brand-text{display:flex; flex-direction:column; line-height:1.05}
.brand-name{font-weight:800; letter-spacing:.4px}
.brand-sub{font-size:12px; color:var(--muted)}

.nav{
  display:flex;
  align-items:center;
  gap:14px;
}
.nav a{opacity:.92; transition: opacity .2s ease}
.nav a:hover{opacity:1}

/* =====================================================
   Burger toggle
   ===================================================== */
.nav-toggle{
  display:none; /* desktop */
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  cursor:pointer;
  padding:0;

  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  line-height:0;

  position:relative;
  overflow:hidden;
  -webkit-tap-highlight-color:transparent;
  -webkit-user-select: none;
  user-select:none;
  touch-action:manipulation;

  z-index:120;

  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nav-toggle:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(47,107,255,.28);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}
.nav-toggle:active{transform: translateY(1px) scale(.98)}
.nav-toggle:focus-visible{
  outline:none;
  border-color: rgba(47,107,255,.65);
  box-shadow: 0 0 0 3px rgba(47,107,255,.16), 0 14px 30px rgba(0,0,0,.28);
}

.nav-toggle span{
  display:block;
  width:20px;
  height:2px;
  border-radius:999px;
  background: rgba(234,240,255,.92);
  transform-origin:center;
  transition: transform .18s ease, opacity .18s ease, width .18s ease;
}

/* Ouvert via JS (.is-open) */
.nav-toggle.is-open span:nth-child(1){transform: translateY(8px) rotate(45deg); width:22px;}
.nav-toggle.is-open span:nth-child(2){opacity:0; transform: scaleX(.6);}
.nav-toggle.is-open span:nth-child(3){transform: translateY(-8px) rotate(-45deg); width:22px;}

/* Auto (si :has dispo) quand .nav.open est présent */
@supports selector(:has(*)) {
  .header-row:has(.nav.open) .nav-toggle span:nth-child(1){transform: translateY(8px) rotate(45deg); width:22px;}
  .header-row:has(.nav.open) .nav-toggle span:nth-child(2){opacity:0; transform: scaleX(.6);}
  .header-row:has(.nav.open) .nav-toggle span:nth-child(3){transform: translateY(-8px) rotate(-45deg); width:22px;}
}

/* =====================================================
   Buttons
   ===================================================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn-primary{
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border-color: transparent;
}
.btn-ghost{background:transparent}
.full{width:100%}

/* =====================================================
   Flash
   ===================================================== */
.flash{padding:12px 0}
.flash-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,.04);
  margin-bottom:8px;
}
.flash-item.success{border-color:rgba(34,197,94,.35)}
.flash-item.error{border-color:rgba(239,68,68,.35)}

/* =====================================================
   Hero / typography
   ===================================================== */
.hero{padding:54px 0 18px}
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  align-items:start;
}
.pill{
  display:inline-flex;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
}
h1{font-size:44px; line-height:1.06; margin:12px 0 10px}
.lead{color:var(--muted); font-size:16px; line-height:1.6; margin:0 0 18px}
.hero-cta{display:flex; gap:10px; flex-wrap:wrap}

.metrics{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
}
.metric{
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
}
.m-num{font-weight:900; font-size:18px}
.m-lbl{color:var(--muted); font-size:12px}

/* =====================================================
   Sections / cards
   ===================================================== */
.section{padding:34px 0}
.section.alt{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  border-top:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.section-head{margin-bottom:14px}
.section-head h2{margin:0 0 8px}
.muted{color:var(--muted)}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}
.grid-3{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px}
.grid-2{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px}

.hero-card .card-head h3{margin:0 0 8px}
.hero-card .card-head p{margin:0; color:var(--muted); line-height:1.6}
.card-actions{display:grid; gap:10px; margin-top:14px}
.card-note{margin-top:12px; color:var(--muted); font-size:13px}

.page-hero{padding:36px 0 10px}
.page-hero h1{font-size:36px; margin:0 0 10px}

/* Split / panel */
.split{display:grid; grid-template-columns: 1.1fr .9fr; gap:14px; align-items:start}
.panel{background:rgba(255,255,255,.04); border:1px solid var(--line); border-radius:var(--radius); padding:18px}

/* Bullets / checklist */
.bullets{margin:10px 0 0; padding-left:18px}
.bullets li{color:var(--muted); margin:8px 0}

.checklist{list-style:none; padding:0; margin:12px 0 0}
.checklist li{
  padding-left:28px;
  position:relative;
  margin:10px 0;
  color:var(--muted);
  line-height:1.6;
}
.checklist li::before{
  content:"";
  position:absolute;
  left:2px;
  top:9px;
  width:8px;
  height:8px;
  border-right:2px solid rgba(47,107,255,.85);
  border-bottom:2px solid rgba(47,107,255,.85);
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 6px rgba(47,107,255,.25));
}

/* =====================================================
   Secteurs
   ===================================================== */
.sector-card{transition: transform .18s ease, border-color .2s ease, background .2s ease}
.sector-card:hover{
  transform: translateY(-2px);
  border-color: rgba(47,107,255,.22);
  background: rgba(255,255,255,.06);
}
.sector-card h3{margin:0}
.sector-head{display:flex; align-items:center; gap:12px; margin-bottom:10px}
.sector-icon{
  width:44px; height:44px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(47,107,255,.35);
  background:
    radial-gradient(120px 80px at 30% 20%, rgba(47,107,255,.35), transparent 60%),
    rgba(255,255,255,.03);
  box-shadow: 0 12px 26px rgba(0,0,0,.25);
  flex: 0 0 44px;
}
.sector-icon svg{width:22px; height:22px; color:var(--text); opacity:.95}
.sector-card p{margin:0; color:var(--muted); line-height:1.6}

/* =====================================================
   Métiers
   ===================================================== */
.job-card{transition: transform .18s ease, border-color .2s ease, background .2s ease}
.job-card:hover{
  transform: translateY(-2px);
  border-color: rgba(47,107,255,.22);
  background: rgba(255,255,255,.06);
}
.job-card h3{margin:0}
.job-head{display:flex; align-items:center; gap:12px; margin-bottom:10px}
.job-icon{
  width:44px; height:44px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(47,107,255,.35);
  background:
    radial-gradient(120px 80px at 30% 20%, rgba(47,107,255,.35), transparent 60%),
    rgba(255,255,255,.03);
  box-shadow: 0 12px 26px rgba(0,0,0,.25);
  flex: 0 0 44px;
}
.job-icon svg{width:22px; height:22px; color:var(--text); opacity:.95}
.job-card .bullets{margin-top:8px}

/* =====================================================
   Forms
   ===================================================== */
.form{margin-top:8px}
.form-grid{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px}
.field{position:relative}
.field label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}

.field input, .field textarea, .field select{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}
.field input:focus, .field textarea:focus, .field select:focus{
  border-color:rgba(47,107,255,.65);
  box-shadow: 0 0 0 3px rgba(47,107,255,.14);
}

/* Select dark + flèche */
.field select{
  -webkit-appearance:none;
  appearance:none;
  color-scheme:dark;
  padding-right:44px;
  cursor:pointer;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23eaf0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:18px 18px;
}
.field select:hover{background-color: rgba(255,255,255,.03)}
.field select:active{transform: translateY(1px)}
.field select option{background:#0b1220; color:#eaf0ff}
.field select option:checked{background:#1c49b8; color:#fff}

.field.full{grid-column:1 / -1}
.note{margin-top:12px; color:var(--muted); font-size:13px}

/* =====================================================
   Footer
   ===================================================== */
.site-footer{
  flex-shrink:0;
  margin-top:34px;
  border-top:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  padding:18px 0;
}
.footer-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.footer-left{display:flex; align-items:center; gap:12px}
.footer-logo{width:40px; height:40px; object-fit:contain}
.footer-title{font-weight:900}
.footer-sub{color:var(--muted); font-size:13px}
.footer-links{display:flex; gap:12px; flex-wrap:wrap; color:var(--muted)}
.footer-links a:hover{color:var(--text)}
.footer-bottom{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
}
.to-top{opacity:.9}
.to-top:hover{opacity:1}

/* =====================================================
   Reveal animations
   ===================================================== */
.reveal{
  opacity:0;
  transform: translateY(14px) scale(.99);
  transition: opacity .65s ease, transform .65s ease;
  will-change: opacity, transform;
}
.reveal.in-view{
  opacity:1;
  transform: translateY(0) scale(1);
}

/* =====================================================
   About page blocks
   ===================================================== */
.about-hero-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.about-card .bullets{margin-top:10px}
.about-head{display:flex; align-items:center; gap:12px; margin-bottom:10px}
.about-icon{
  width:44px; height:44px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(47,107,255,.35);
  background:
    radial-gradient(120px 80px at 30% 20%, rgba(47,107,255,.35), transparent 60%),
    rgba(255,255,255,.03);
  box-shadow: 0 12px 26px rgba(0,0,0,.25);
  flex: 0 0 44px;
}
.about-icon svg{width:22px; height:22px; color:var(--text); opacity:.95}

.step-card p{margin:0; color:var(--muted); line-height:1.6}
.step-head{display:flex; align-items:center; gap:10px; margin-bottom:10px}
.step-badge{
  width:38px; height:38px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  letter-spacing:.5px;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 14px 26px rgba(0,0,0,.25);
  flex: 0 0 38px;
}

.about-stats{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
}
.stat{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius:16px;
  padding:12px;
}
.stat-num{font-weight:900; font-size:22px; letter-spacing:.3px}
.stat-label{margin-top:4px; color:var(--muted); font-size:12px}

.about-card, .step-card{
  transition: transform .18s ease, border-color .2s ease, background .2s ease;
}
.about-card:hover, .step-card:hover{
  transform: translateY(-2px);
  border-color: rgba(47,107,255,.22);
  background: rgba(255,255,255,.06);
}
.about-icon, .step-badge{transition: transform .18s ease}
.about-card:hover .about-icon,
.step-card:hover .step-badge{
  transform: translateY(-1px);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 980px){
  h1{font-size:38px}
  .hero-grid{grid-template-columns: 1fr}
  .metrics{grid-template-columns: 1fr}
  .grid-3{grid-template-columns: 1fr}
  .grid-2{grid-template-columns: 1fr}
  .split{grid-template-columns: 1fr}
  .form-grid{grid-template-columns: 1fr}

  .nav-toggle{display:inline-flex}

  /* Off-canvas */
  .nav{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:auto;

    width:min(85vw, 340px);
    height:100vh;

    padding:80px 24px 24px;

    border-radius: 18px 0 0 18px;
    background: #0b1220;
    border-left:1px solid var(--line);
    box-shadow: var(--shadow);

    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:15px;

    transform: translate3d(105%, 0, 0);
    pointer-events:none;

    transition: transform .40s cubic-bezier(.16, 1, .3, 1);
    z-index:100;

    overflow:auto;
    -webkit-overflow-scrolling: touch;

    will-change: transform;
    contain: paint;
  }

  .nav.open{
    transform: translate3d(0,0,0);
    pointer-events:auto;
  }

  .nav a{
    width:100%;
    font-size:18px;
    padding:10px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .nav .btn{
    width:100%;
    justify-content:center;
    margin-top:10px;
  }

  .about-stats{grid-template-columns:1fr}
}

/* =====================================================
   Hero media (pour index etc.)
   ===================================================== */
.hero--media{
  position:relative;
  overflow:hidden;
}
.hero--media::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(7,11,20,.92) 0%, rgba(7,11,20,.72) 55%, rgba(7,11,20,.88) 100%),
    url("/vitrine/img/hero-night.png") center/cover no-repeat;
  filter: saturate(.92) contrast(1.05);
  transform: scale(1.02);
  z-index:0;
}
.hero--media::after{
  content:"";
  position:absolute;
  inset:-40px;
  background:
    radial-gradient(700px 420px at 20% 25%, rgba(47,107,255,.22), transparent 60%),
    radial-gradient(700px 420px at 85% 30%, rgba(255,60,60,.12), transparent 55%);
  z-index:0;
  pointer-events:none;
}
.hero--media .container{position:relative; z-index:1}

/* =====================================================
   ABOUT: background plein écran FIXE
   + garde-fou “propreté” demandé
   ===================================================== */
body.page-about{position:relative}

/* Fond image fixe */
body.page-about::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background:
    linear-gradient(90deg, rgba(7,11,20,.92) 0%, rgba(7,11,20,.70) 55%, rgba(7,11,20,.88) 100%),
    url("/vitrine/img/hero-night.png") center / cover no-repeat;
  filter: saturate(.92) contrast(1.05);
  -webkit-transform: translateZ(0) scale(1.02);
  transform: translateZ(0) scale(1.02);
}

/* Glow fixe */
body.page-about::after{
  content:"";
  position:fixed;
  inset:-40px;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(700px 420px at 20% 25%, rgba(47,107,255,.22), transparent 60%),
    radial-gradient(700px 420px at 85% 30%, rgba(255,60,60,.12), transparent 55%);
}

/* ✅ Garde-fou rendu (anti-liseré/saut) */
body.page-about::before,
body.page-about::after{
  backface-visibility:hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* sections transparentes sur about */
body.page-about .section,
body.page-about .page-hero{
  background:transparent;
}
