/* =========================================================
   HOTFIX.CSS — responsive, ergonomie & menu sticky
   + DESIGN 2025 (Vidéo, Glassmorphism, Icons, FAQ)
   ========================================================= */

/* --- BASE --- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

:root {
  --brand:#ff5757;
  --text:#111;
  --muted:#666;
  --border:#eee;
}

/* Typo & containers */
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}
section { padding: clamp(36px, 6vw, 80px) 0; }
.center { text-align: center; }

/* --- TITRES --- */
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.18; font-weight: 800; margin-bottom: .8em; }
h3 { font-size: clamp(18px, 2.2vw, 20px); line-height: 1.25; font-weight: 700; }
.lead { color:#333; }

/* --- BOUTONS --- */
.btn {
  font-size: 1rem;
  border-radius: 12px;
  padding: .65rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cfcfcf;
  transition: background .25s ease, transform .2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); background: #ff4040; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: #111; transform: translateY(-2px); }

.cta-row { display:flex; flex-wrap:wrap; gap:12px; }
.cta-row .btn { min-width: 180px; text-align:center; }

/* --- FORMULAIRES (Mapping Formspree) --- */
.js-contact-form input,
.js-contact-form textarea,
.contact-form-spree input,
.contact-form-spree textarea {
  font-size: 1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  border: 1px solid #d9d9d9;
  width: 100%;
  margin-bottom: 10px; /* Sécurité espacement */
}
.js-contact-form button[type=submit],
.contact-form-spree button[type=submit]{
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
}

/* --- TOPBAR --- */
.topbar {
  position: static; /* non sticky */
  border-bottom: 1px solid #f0f0f0;
  background:#fff;
  z-index: 1001;
}
.topbar-flex { display:flex; align-items:center; justify-content:space-between; padding:6px 0; }
.top-contact { display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.mail-short { display:none; }
.mail-long { display:inline-flex; gap:8px; align-items:center; }

/* --- HEADER STICKY (desktop + mobile) --- */
header{
  position: sticky;
  top: 0;                 /* colle en haut */
  z-index: 1200;          /* au-dessus du contenu */
  background: #fff;
  border-bottom: 1px solid #f6f6f6;
}
.nav { display:flex; align-items:center; justify-content:space-between; padding:12px 0; gap:12px; }
.menu { display:flex; gap:18px; align-items:center; white-space:nowrap; }
.menu a { font-size:16px; color:#111; text-decoration:none; transition:color .2s; }
.menu a:hover{ color:var(--brand); }
.nav-right { display:flex; align-items:center; gap:10px; }

/* Langues */
.lang-btn{
  appearance:none; border:1px solid #ddd; background:#fff;
  padding:.35rem .6rem; border-radius:10px; font-weight:700; cursor:pointer;
}
.lang-btn.active{ border-color:#111; }
.lang-sep{ padding:0 4px; color:#ccc; }

/* Burger */
.burger{
  display:none;
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  padding:.45rem .65rem;
  font-size:18px;
}

/* --- PANNEAU MOBILE --- */
.mobile-panel{
  position: fixed;
  inset: 0;
  display: none;
  background: #fff;
  z-index: 1100;
  padding: 16px;
  overflow-y: auto;
  height: 100dvh;
}
.mobile-panel.open{ display:block; }
.mobile-topline{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:8px 0 14px; border-bottom:1px dashed #eee; margin-bottom:10px;
}
#mobile-panel a{
  display:block; padding:14px 4px; border-bottom:1px solid #f3f3f3;
  font-size:18px; color:#111; text-decoration:none;
}
#mobile-panel a:hover{ color:var(--brand); }
#mobile-panel .btn.btn-primary{ width:100%; text-align:center; font-weight:800; }
.mobile-lang{ display:flex; gap:12px; padding:14px 4px; }

/* --- BLOCS --- */
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.steps{ display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }
.step{ background:#fff; border:1px solid #e9e9e9; border-radius:12px; padding:14px; display:flex; flex-direction:column; }
.step .num{ font-weight:800; font-size:.9rem; color:#666; }
.step .case-img{ width:100%; height:180px; object-fit:cover; border-radius:10px; border:1px solid #e9e9e9; margin-top:10px; }
#clients .grid-3 > .card .case-img{ width:100%; height:200px; object-fit:cover; border-radius:10px; border:1px solid #2a2a2a; margin-bottom:10px; }

/* --- SECTIONS COULEURS --- */
.section-black{ background:#000; color:#fff; }
.section-black .lead{ color:#f2f2f2; }
#pattern-cta{ background:#8b0939; color:#fff; }
#pattern-cta .btn-ghost{ color:#fff; border-color:#ffffff99; }
#pattern-cta .cta-row{ justify-content:center; }

/* --- FOOTER --- */
footer{ background:#0a0a0a; color:#f0f0f0; }
footer .links a{ color:#f0f0f0; text-decoration:none; }
footer .links a:hover{ color:#fff; }
footer .footer-icons a{ color:#fff !important; text-decoration:none; }
footer .copy{ color:#a0a0a0; text-align:center; margin-top:12px; }

/* --- RÉVÉLATION DOUCE --- */
.reveal{ opacity:0; transform:translateY(10px); transition:opacity .5s ease, transform .5s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* --- SCROLL LOCK pour menu --- */
.no-scroll{ overflow:hidden !important; }

/* =========================================================
   NOUVEAU DESIGN 2025 (Refonte UI/UX)
   ========================================================= */

/* --- 1. Section Vidéo Background ("À Propos") --- */
.video-section {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  color: #fff;
  background: #000; /* Fallback */
}
.video-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
}
.video-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.video-bg .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75); /* Assombrit la vidéo pour la lisibilité */
  z-index: 1;
}
.content-front {
  position: relative;
  z-index: 2; /* Au-dessus de l'overlay */
}
/* Utilitaires textes pour fond sombre */
.text-white { color: #fff !important; }
.text-white-op { color: rgba(255,255,255,0.9) !important; }

/* --- 2. Cartes "Glassmorphism" (Verre dépoli) --- */
.glass-grid { gap: 24px; }
.glass-card {
  background: rgba(255, 255, 255, 0.08); /* Fond blanc très transparent */
  backdrop-filter: blur(12px);           /* Flou d'arrière plan */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: transform 0.3s ease, background 0.3s ease;
  padding: 24px;
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
}
.glass-card h3 { color: #fff; margin-top: 0; }
.glass-card p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }

/* Icônes cerclées */
.icon-box {
  width: 54px; height: 54px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 26px; color: #fff;
  box-shadow: 0 4px 10px rgba(255, 87, 87, 0.3);
}

/* --- 3. Section Solutions (Icônes) --- */
.service-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border-top: 4px solid transparent; /* Bordure colorée au survol */
}
.service-card:hover {
  border-top-color: var(--brand);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.service-icon {
  font-size: 2.2rem;
  color: var(--brand);
  margin-bottom: 12px;
}

/* --- 4. FAQ Redesign (Accordéon Moderne) --- */
.faq details {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq details[open] {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.faq summary {
  padding: 18px 24px;
  font-weight: 700;
  cursor: pointer;
  list-style: none; /* Cache la flèche par défaut */
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }

/* Signe + / - animé */
.faq summary::after {
  content: '+';
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--brand);
  transition: transform 0.2s ease;
  line-height: 1;
}
.faq details[open] summary::after {
  content: '−'; /* Signe moins typographique */
  transform: rotate(180deg);
  color: #111;
}
.faq p {
  padding: 0 24px 24px;
  margin: 0;
  color: #555;
  line-height: 1.6;
  border-top: 1px solid transparent;
}
/* Animation d'ouverture */
.faq details[open] p {
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE (Legacy + Ajustements)
   ========================================================= */

/* Desktop → Tablet */
@media (max-width:1024px){
  .steps{ grid-template-columns:repeat(3,1fr); }
  .step .case-img{ height:160px; }
  #clients .grid-3 > .card .case-img{ height:180px; }
}

/* Tablet → Mobile */
@media (max-width:980px){
  /* Topbar */
  .mail-long{ display:none !important; }
  .mail-short{ display:inline-flex !important; }
  .top-contact{ gap:12px; justify-content:center; text-align:center; flex-wrap:wrap; }

  /* Menu desktop masqué, burger visible */
  .menu{ display:none !important; }
  .burger{ display:inline-flex; align-items:center; justify-content:center; width:42px; height:40px; }

  /* CTA header compact + une seule ligne */
  .nav-right .btn-primary{
    font-size:14px;
    padding:.45rem .70rem;
    border-radius:10px;
    white-space:nowrap;
    line-height:1.1;
    min-width:auto;
    max-width:46vw;
  }

  /* Cacher le switch FR/EN du header (gardé dans le burger) */
  .nav-right .lang-btn{ display:none !important; }
  .nav-right .lang-sep{ display:none !important; }

  /* Lorsque le burger est ouvert : cacher le CTA du header */
  html.menu-open .nav-right .btn-primary{ display:none !important; }

  /* CTA full width dans certaines sections */
  .cta-row .btn{ width:100%; }

  /* Grilles empilées */
  .grid-3{ grid-template-columns:1fr; }
  .grid-2{ grid-template-columns:1fr; }
  
  /* Ajustement Glassmorphism Mobile */
  .glass-grid { gap: 16px; }

  /* Contact bloc : texte au-dessus du formulaire */
  #contact .grid-2{ grid-template-columns:1fr !important; gap:20px; }
  #contact .grid-2 > div:first-child{ order:1; text-align:center; }
  #contact .grid-2 > div:last-child{ order:2; }

  /* Footer centré */
  footer .footgrid{ grid-template-columns:1fr !important; text-align:center; }
  footer .logo{ justify-content:center; }
}

/* Mobile petit */
@media (max-width:680px){
  .step .case-img{ height:140px; }
  #clients .grid-3 > .card .case-img{ height:160px; }
  
  /* Titres plus petits sur mobile */
  h1 { font-size: clamp(32px, 8vw, 42px); }
  .video-section { padding: 50px 0; }
}

/* =========================================================
   ANTI-DÉBORDEMENT & SÉCURITÉ
   ========================================================= */
img, svg, video, canvas, iframe { max-width:100%; height:auto; display:block; }
.container{ width:100%; overflow-x:clip; }
.menu a, #mobile-panel a, p, li, h1, h2, h3, h4{ word-break:break-word; overflow-wrap:anywhere; }

/* === FORCE STICKY HEADER (desktop + mobile) === */
body > header{
  position: -webkit-sticky !important; /* Safari iOS */
  position: sticky !important;
  top: 0 !important;
  z-index: 2147483000 !important; /* au-dessus de tout */
  background: #fff !important;     /* évite transparence si site.css change le bg */
  border-bottom: 1px solid #f6f6f6;
}

html, body{ overflow-y: auto; overflow-x: hidden; }
.topbar{ position: static !important; }

/* ================= FIX CALENDLY ================= */

/* 1. Force la hauteur idéale (ni trop petite, ni trop grande) */
.calendly-inline-widget {
  height: 750px !important; 
  width: 100% !important;
}

/* 2. Réduit l'espace blanc en bas de la section RDV */
#rdv {
  padding-bottom: 20px !important;
  min-height: auto !important;
}

/* 3. Masque la barre de scroll interne du widget si possible */
.calendly-inline-widget iframe {
  height: 100% !important;
  display: block;
}

/* ================= FORCE STICKY MENU ================= */

/* 1. Configuration du Header */
header {
  position: -webkit-sticky !important; /* Compatible Safari */
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important; /* Toujours au-dessus du contenu */
  background: #fff !important; /* Fond blanc opaque obligatoire */
  transition: box-shadow 0.3s ease;
}

/* 2. Ajoute une petite ombre quand on scroll (Optionnel mais joli) */
header {
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
}

/* 3. CRITIQUE : Débloque le sticky */
/* Si un parent a overflow:hidden, le sticky ne marche pas. On utilise 'clip'. */
html, body {
  overflow-x: clip !important; 
  overflow-y: visible !important;
}

/* ================= FAQ 2 COLONNES (Desktop/Tablette) ================= */

/* Uniquement pour les écrans plus larges que 768px (Tablettes et PC) */
@media (min-width: 768px) {
  .faq {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Deux colonnes égales */
    gap: 20px; /* Espace entre les colonnes (horizontal et vertical) */
    align-items: start; /* Empêche les cases de s'étirer inutilement */
  }

  /* Retirer la marge du bas des éléments car le "gap" gère l'espace */
  .faq details {
    margin-bottom: 0; 
  }
}