/* =========================================================
   THEME / VARIABLES
========================================================= */
:root{
  /* Couleurs de fond */
  --bg0:#070b14;
  --bg1:#0b1223;

  /* Surfaces */
  --card: rgba(10,16,32,.58);
  --card2: rgba(10,16,32,.48);
  --border: rgba(255,255,255,.10);

  /* Texte */
  --text:#e5e7eb;
  --muted:#b7c0d0;
  --accent:#f59e0b;

  /* Dimensions */
  --radius: 22px;
  --max: 1180px;
  --headerH: 78px;
  --footerH: 56px;
  --sab: env(safe-area-inset-bottom, 0px);

  /* Effets */
  --shadow: 0 18px 50px rgba(0,0,0,.55);
}

/* =========================================================
   RESET / BASE
========================================================= */
*{ box-sizing:border-box; }

html, body{
  overflow-x:hidden;
  margin:0;
}

body{
  min-height:100dvh; 
  background:#070b14;
  color:var(--text);
  font-family:'Montserrat', system-ui, sans-serif;
  position:relative;
  display:flex; 
  flex-direction:column;
}

a{ color:inherit; text-decoration:none; }

.container{
  width:min(var(--max), calc(100% - 32px));
  margin:0 auto;
}

main{
  position:relative;
  z-index:1;
  flex:1 1 auto;
  padding-bottom: calc(var(--footerH, 56px) + var(--sab) + 8px);
}

footer{
  padding-bottom: calc(12px + var(--sab));
}

/* Pages internes : pas besoin de réserver la place du footer */
body:not(.home) main{
  padding-bottom:24px; /* ou 0 si tu veux vraiment collé */
}

/* HOME : pas d'espace sous le footer overlay */
body.home main{
  padding-bottom:0 !important;
}

body.home main.container{
  /* pas besoin de réserver la place du footer ici, on centre */
  padding-bottom:0 !important;
}

/* =========================================================
   BACKGROUND
========================================================= */
/* Background global : e */
.bg{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;

  background:
    /* couche sombre */
    linear-gradient(
      180deg,
      rgba(7,11,20,.55) 0%,
      rgba(11,18,35,.35) 55%,
      rgba(7,10,18,.60) 100%
    ),
    /* texture */
    url("images/dust.png") center / cover no-repeat;
}

/* =========================================================
   HEADER — STRUCTURE GÉNÉRALE
========================================================= */
.header-wrap{
  position:sticky;
  top:0;
  z-index:1000; /* au-dessus de la page */
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(9,12,20,.78), rgba(9,12,20,.38));
  border-bottom:1px solid rgba(255,255,255,.06);
}

.header-wrap header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:220px;
}

/* Bloc gauche + droite ne rétrécissent pas trop */
.header-wrap .brand,
.header-wrap .partner{
  flex:0 0 auto;
}

.brand h1{
  margin:0;
  font-weight:800;
  letter-spacing:.3px;
  font-size:34px;
  line-height:1;
  transform: scaleY(1.3);
}

.partner{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:220px;
  justify-content:flex-end;
  color:var(--muted);
  font-weight:700;
  letter-spacing:.5px;
}

.partner .badge{
  width:44px;
  height:44px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 44px;
}

.partner .badge2{
  width:66px;
  height:66px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:4px;
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 66px;
}

.logo-img{
  width:100%;
  height:100%;
  border-radius:3px;
  object-fit:contain;
  display:block;
}

.header-center{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1;
}

/* Le titre/zone centrale prend l’espace restant */
.header-wrap .header-center{
  flex:1 1 auto;
  min-width:260px; /* seuil avant wrap (à ajuster) */
}

/* Si le centre est vide, on ne lui réserve pas d’espace */
.header-center:empty{
  display:none !important;
}

.header-subtitle{
  margin:0;
  font-size:23px;
  font-weight:700;
  color:var(--accent);
  text-align:center;
  letter-spacing:.3px;
}

.header-subtitle span{
  color:rgba(245,158,11,.85);
}

.logo-titre{
  width:100px;
  max-width:42vw;
  object-fit:contain;
  display:block;
  margin:0 auto;
  filter:
    drop-shadow(0 6px 18px rgba(0,0,0,.45))
    drop-shadow(0 0 12px rgba(245,158,11,.18));
}

nav{
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:center;
  flex:1;
}

nav a{
  color:var(--muted);
  font-weight:600;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid transparent;
  transition:all .18s ease;
}

nav a:hover{
  color:var(--text);
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.contact-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  font-size:18px;
  text-decoration:none;
  color:rgba(255,255,255,.8);
  border-radius:8px;
  transition:.2s ease;
}

.contact-icon:hover{
  background:rgba(255,255,255,.08);
  color:#f59e0b;
}

/* =========================================================
   HEADER — LOGO TKDES / SVG / EXPAND
========================================================= */
.tkdes-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none; /* ne bloque jamais le panneau */
  transition: opacity .25s ease;
  z-index:900;
}

.header-wrap.is-open + .tkdes-backdrop{
  opacity:1;
}

.logo-dot{
  width:75px;
  height:75px;
  display:grid;
  place-items:center;
  border-radius:14px;
}

#tkdesLogo{
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  position:relative;
  isolation:isolate;
}

#tkdesLogo.logo-dot.logo-expand{
  position:relative;
  width:75px;
  height:75px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  overflow:visible;
  z-index:1200;   /* au-dessus du backdrop */
  transform:none; /* ne pas transformer */
}

/* Halo caché par défaut */
#tkdesLogo::before{
  content:"";
  position:absolute;
  inset:-16px;
  border-radius:20px;
  background: radial-gradient(
    circle,
    rgba(245,158,11,0.45),
    rgba(245,158,11,0.15) 45%,
    rgba(0,0,0,0) 70%
  );
  filter: blur(16px);
  opacity:0;
  transition: opacity .35s ease;
  z-index:-1;
  pointer-events:none;
}

/* Halo visible quand le menu est ouvert */
.header-wrap.is-open #tkdesLogo::before{
  opacity:1;
  filter: blur(22px);
}

/* Panel background */
#tkdesLogo.logo-dot.logo-expand::before{
  content:"";
  position:fixed;
  left:16px;
  top: calc(var(--headerH, 78px) + 4px);
  width: min(560px, 92vw);
  height: min(360px, 55vh);
  border-radius: var(--radius);
  background:
    radial-gradient(240px 160px at 18% 12%, rgba(245,158,11,.18), transparent 65%),
    radial-gradient(340px 220px at 85% 88%, rgba(245,158,11,.12), transparent 70%),
    #0a1020;
  border: 1px solid rgba(245,158,11,.28);
  box-shadow:
    0 18px 55px rgba(0,0,0,.80),
    0 0 0 1px rgba(245,158,11,.14) inset,
    0 0 30px rgba(245,158,11,.10);
  opacity:0;
  pointer-events:none;
  z-index:1800;
  transition: opacity .18s ease;
}

.header-wrap.is-open #tkdesLogo.logo-dot.logo-expand::before{
  opacity:1;
}

/* Box toujours derrière le SVG */
.header-wrap.is-open #tkdesLogo.logo-dot.logo-expand::before{
  z-index:1500 !important;
}

/* Halo autour du bouton */
#tkdesLogo.logo-dot.logo-expand::after{
  content:"";
  position:absolute;
  inset:-18px;
  border-radius:22px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(245,158,11,.55),
    rgba(245,158,11,.18) 45%,
    rgba(245,158,11,0) 72%
  );
  filter: blur(18px);
  opacity:0;
  transition: opacity .22s ease, filter .22s ease;
  z-index:-1;
  pointer-events:none;
}

/* Visible quand menu ouvert */
.header-wrap.is-open #tkdesLogo.logo-dot.logo-expand::after{
  opacity:1;
  filter: blur(24px);
}

/* =========================================================
   HEADER — SVG TKDES / INTERACTIONS
========================================================= */
.tkdes-svg{
  image-rendering: optimizeQuality;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

/* Petit logo (fermé) */
#tkdesLogo .tkdes-svg{
  position:absolute;
  left:50%;
  top:50%;
  width:74px;
  height:74px;
  transform:translate(-50%, -50%) scale(1);
  transform-origin:center;
  transform-box: fill-box;
  pointer-events:none; /* le texte ne bloque pas le hover */

  opacity:1;
  visibility:visible;

  transition:
    opacity .18s ease,
    transform .18s ease,
    filter .18s ease,
    visibility 0s linear .18s;

  will-change: transform, filter;
  backface-visibility: hidden;
}

#tkdesLogo:hover .tkdes-svg{
  filter:
    drop-shadow(0 0 6px rgba(251,146,60,.75))
    drop-shadow(0 0 16px rgba(251,146,60,.35));
  transform: translate(-50%, -50%) scale(1.06);
}

.tkdes-svg .node{
  cursor:pointer;
  pointer-events:auto;
  transform-box: fill-box;
  transform-origin:center;
  transition:
    transform .18s cubic-bezier(.4,0,.2,1),
    filter .18s ease,
    opacity .18s ease;
}

.tkdes-svg .link{
  transition: opacity .18s ease, filter .18s ease;
  opacity:1;
  fill-opacity:1;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 2;
  paint-order: stroke fill;
}

.tkdes-svg .link.is-active{
  fill-opacity:1;
  filter:
    drop-shadow(0 0 6px rgba(251,146,60,.9))
    drop-shadow(0 0 14px rgba(251,146,60,.5));
}

/* état normal : labels cachés */
.tkdes-svg .label{
  opacity:0;
  visibility:hidden;
  pointer-events:auto; /* ne bloque pas les nodes */
  transform-box: fill-box;
  transform-origin:center;
  cursor:pointer;

  transition:
    opacity .18s ease,
    transform .18s cubic-bezier(.4,0,.2,1),
    filter .18s ease,
    visibility 0s linear .18s;
}

/* visible quand panneau ouvert */
.header-wrap.is-open #tkdesLogo .tkdes-svg .label{
  opacity:1;
  visibility:visible;
}

/* hover sur module (node OU texte) */
.tkdes-svg .module:hover .node,
.tkdes-svg .module:focus-within .node{
  transform: scale(1.2);
  filter:
    drop-shadow(0 0 8px rgba(245,158,11,.55))
    drop-shadow(0 0 18px rgba(245,158,11,.35));
}

.tkdes-svg .module:hover .label,
.tkdes-svg .module:focus-within .label{
  transform: scale(1.2);
  filter:
    drop-shadow(0 0 8px rgba(245,158,11,.55))
    drop-shadow(0 0 18px rgba(245,158,11,.35));
}

/* Grand panneau (ouvert) */
.header-wrap.is-open #tkdesLogo .tkdes-svg{
  position:fixed !important;
  left:16px;
  top: calc(var(--headerH, 78px) + 4px);
  width: min(560px, 92vw);
  height: min(360px, 55vh);

  pointer-events:auto;
  opacity:1 !important;
  visibility:visible !important;

  z-index:2000 !important;
  isolation:isolate;
  contain:layout paint;
  backface-visibility:hidden;
  transform: translateZ(0);
  filter:none;
}

/* Dans le panneau ouvert : les lignes ne captent pas la souris */
.header-wrap.is-open #tkdesLogo .tkdes-svg .link{
  fill-opacity:1;
  pointer-events:none;
  filter:
    drop-shadow(0 0 6px rgba(245,158,11,.75))
    drop-shadow(0 0 16px rgba(245,158,11,.35));
}

/* Dans le panneau ouvert : modules interactifs */
.header-wrap.is-open #tkdesLogo .tkdes-svg .node{
  pointer-events:all;
  filter:
    drop-shadow(0 0 8px rgba(245,158,11,.55))
    drop-shadow(0 0 18px rgba(245,158,11,.30));
}

/* Mobile rendering */
@media (max-width: 900px){
  .tkdes-svg{
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
  }

  .tkdes-svg .link{
    shape-rendering: geometricPrecision;
  }
}

/* Pulse doux */
@keyframes tkdesPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.logo-expand{
  animation: tkdesPulse 2s ease-in-out infinite;
  transform-origin: center;
}

/* Quand le panneau est ouvert → on coupe */
.header-wrap.is-open .logo-expand{
  animation:none;
}

/* =========================================================
   HERO / HOME — STRUCTURE GÉNÉRALE
========================================================= */
.hero{
  min-height: calc(100dvh - var(--headerH, 78px) - var(--footerH, 56px));
  display:flex;
  align-items:flex-start;
  width:100%;
  margin:0;
}

body.home .hero{
  /* hauteur dispo entre header et footer */
  min-height: calc(100dvh - var(--headerH, 78px) - var(--footerH, 56px));
  display:flex;
  align-items:center;     /* centrage vertical */
  justify-content:center; /* centrage horizontal */
  padding:0 !important;   /* évite les décalages */
}

.hero .mark{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-bottom:8px;
}

.hero p{
  margin:12px 0 0;
  font-size:22px;
  color:var(--accent);
  font-weight:700;
}

.hero p span{
  color:rgba(245,158,11,.85);
}

.hero .map{
  min-height:60vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.map svg{
  width:100%;
  height:auto;
  max-height:60vh;
  display:block;
}

/* =========================================================
   HERO / HOME — SPLINE
========================================================= */
.hero .spline-wrap{
  width:100%;
  max-width:1200px;
  margin:auto;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-start !important;
  padding:12px 0;
  overflow:hidden;
}

body.home .hero .spline-wrap{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;   /* centrage vertical */
  padding:0 !important; /* évite le décalage de 12px */
}

.hero .spline-stage{
  flex:0 0 auto !important; /* crucial */
  width:min(100vw, 1920px);
  aspect-ratio:9 / 5;
  height:auto;
  max-width:100% !important;
  max-height:calc(100svh - var(--headerH, 78px) - var(--footerH, 56px) - 24px);
  overflow:hidden !important;
  border-radius:16px !important;
}

body.home .hero .spline-stage{
  width:min(100vw, 1920px);
  aspect-ratio:9 / 5;
  height:auto;
  /* on limite à la hauteur dispo */
  max-height:calc(100dvh - var(--headerH, 78px) - var(--footerH, 56px));
}

.hero .spline-stage #spline-canvas{
  transform:none;
}

/* Spline : interactif par défaut, mais OFF quand panneau ouvert */
#spline-canvas{
  display:block;
  width:100% !important;
  height:100% !important;
  pointer-events:auto;
}

.header-wrap.is-open ~ main #spline-canvas{
  pointer-events:none !important;
}

/* Empêche les gestes de zoom/pan sur la zone Spline uniquement */
body.home .spline-stage,
body.home #spline-canvas{
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
}

/* =========================================================
   GRID / CARTES / LISTES
========================================================= */
.grid{
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  gap:24px;
  padding:26px 0 110px;
  align-items:start;
  grid-auto-flow:row; /* important pour que les items ne se “recalent” pas bizarrement */
}

#bloc1{
  grid-column:1;
  grid-row:1;
}

#bloc2{
  grid-column:2;
  grid-row:1;
}

#bloc3{
  grid-column:1;
  grid-row:2;
}

#bloc4{
  grid-column:2;
  grid-row:2;
}

.card{
  position:relative;
  border-radius:var(--radius);
  padding:28px 28px 24px;
  overflow:hidden;
  background: linear-gradient(180deg, var(--card), var(--card2));
  border:1px solid rgba(245,158,11,.22);
  box-shadow:
    0 18px 50px rgba(0,0,0,.55),
    0 0 0 1px rgba(245,158,11,.10) inset;
  backdrop-filter: blur(10px);
  transition: transform .18s ease, border-color .18s ease;
}

.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  border-radius:inherit;
  background:
    radial-gradient(240px 160px at 18% 12%, rgba(245,158,11,.30), transparent 65%),
    radial-gradient(340px 220px at 85% 88%, rgba(245,158,11,.22), transparent 70%),
    radial-gradient(600px 260px at 50% -10%, rgba(255,255,255,.08), transparent 55%);
  opacity:.95;
}

.card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%)
    top center / 60% 2px no-repeat;
  box-shadow:
    0 0 0 1px rgba(245,158,11,.38) inset,
    0 0 28px rgba(245,158,11,.12);
  opacity:.85;
}

.card:hover{
  transform:translateY(-2px);
  border-color:rgba(245,158,11,.30);
}

.container h3{
  margin:20px 0 0;
  font-size:18px;
  letter-spacing:.2px;
  text-align:center;
}

.card h3{
  margin:0 0 18px;
  font-size:30px;
  letter-spacing:.2px;
}

.list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:14px;
  position:relative;
  z-index:1;
}

.list li{
  display:flex;
  gap:12px;
  align-items:flex-start;
  color:var(--text);
  line-height:1.35;
}

.check{
  flex:0 0 auto;
  width:24px;
  height:24px;
  border-radius:999px;
  display:grid;
  place-items:center;
  margin-top:2px;
  background:rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.30);
  box-shadow:0 10px 20px rgba(245,158,11,.10);
}

.check svg{
  width:15px;
  height:15px;
  fill:none;
  stroke:var(--accent);
  stroke-width:2.6;
}

.lead{ color:var(--accent); font-weight:800; }
.muted{ color:var(--muted); }

/* Pages internes : pas de gros vide sous les box */
body:not(.home) .grid{
  padding-bottom:24px; /* au lieu de 110px */
}

/* =========================================================
   CONTACT FORM
========================================================= */
.contact-card{ max-width:820px; margin:22px auto; }

.contact-alert{
  border-radius:16px;
  padding:14px 16px;
  margin:14px 0 18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
}

.contact-alert.ok{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}

.contact-alert.err{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

.contact-alert ul{
  margin:10px 0 0;
  padding-left:18px;
}

.contact-form .form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.contact-form .field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.contact-form .field-full{
  grid-column:1 / -1;
}

.contact-form label{
  font-weight:700;
  color:rgba(255,255,255,.78);
  letter-spacing:.2px;
}

.contact-form input,
.contact-form textarea{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:12px;
  outline:none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.contact-form input:focus,
.contact-form textarea:focus{
  border-color: rgba(245,158,11,.45);
  box-shadow: 0 0 0 3px rgba(245,158,11,.10);
  background: rgba(255,255,255,.06);
}

.form-actions{
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:14px;
}

.btn-contact{
  appearance:none;
  border:1px solid rgba(245,158,11,.35);
  background:rgba(245,158,11,.12);
  color:var(--text);
  font-weight:800;
  border-radius:999px;
  padding:12px 18px;
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.btn-contact:hover{
  transform: translateY(-1px);
  border-color: rgba(245,158,11,.55);
  background: rgba(245,158,11,.18);
}

.hp-field{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

.consent-field{
  grid-column:1 / -1;
  margin-top:6px;
}

.consent-line{
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  cursor:pointer;
  color:#e8e8e8;
  font-size:14px;
  line-height:1.5;
}

.consent-line input[type="checkbox"]{
  margin:3px 0 0;
  flex:0 0 auto;
  width:16px;
  height:16px;
}

.consent-line span{
  display:block;
  flex:1 1 auto;
  min-width:0;
}

.consent-line a{
  color:#f0a020;
  text-decoration:none;
}

.consent-line a:hover{
  text-decoration:underline;
}

/* =========================================================
   CLIENTS / IMAGES / PAGE CONTENT
========================================================= */
.clients-screen{
  position:relative;
  z-index:5;
  text-align:center;
  margin-bottom:50px;
}

.clients-screen img{
  display:block;
  margin:0 auto;
  width:90%;
  max-width:800px; /* ajuste selon ton goût */
  height:auto;
}

.page-content{
  position:relative;
  z-index:5;
  max-width:900px;
  margin:60px auto;
  line-height:1.7;
}

.page-content h1{
  margin-bottom:30px;
}

.page-content h2{
  margin-top:30px;
}

/* =========================================================
   MEDIA / MODAL
========================================================= */

/* Lignes interactives */
.media-line{
  cursor:pointer;
  border-radius:14px;
  padding:0 10px;
  margin-left:-10px;   /* pour que le hover “colle” au bord */
  margin-right:-10px;
  transition: background .15s ease, transform .15s ease;
  display:flex;
  gap:12px;
  align-items:flex-start;
  color:var(--text);
  line-height:1.35;
}

.media-line:hover{
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

/* Petit indicateur “cliquable” */
.media-line span:last-child{
  text-decoration: underline;
  text-decoration-color: rgba(245,158,11,.35);
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------
   MODAL — base finale commune
--------------------------------------------------------- */
.media-modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:9999;
}

.media-modal.is-open{
  display:flex;
  align-items:center;
  justify-content:center;
}

.media-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}

.media-modal__img,
.media-modal__video{
  display:block;
  max-width:100%;
  max-height:75vh;
  margin:0 auto;
}

.media-modal__caption{
  margin-top:12px;
  text-align:center;
  color:#fff;
}

.media-modal__close{
  position:absolute;
  top:10px;
  right:10px;
  border:0;
  background:transparent;
  color:#fff;
  font-size:28px;
  cursor:pointer;
}

.media-modal__img[hidden],
.media-modal__video[hidden],
.media-modal__caption[hidden]{
  display:none !important;
}

/* ---------------------------------------------------------
   MODAL
--------------------------------------------------------- */
.media-modal__dialog{
  position:relative;
  z-index:1;
  max-width:90vw;
  max-height:90vh;
  padding:20px;
  border-radius:12px;
  background:#111;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer{
  position:relative;
  z-index:2;
  background:#1f1f1f;
  color:#fff;
  font-size:15px;
}

/* HOME : footer overlay en bas */
body.home .site-footer{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:200;
  background:transparent !important;
}

/* Contenu déroulant */
.site-footer .footer-inner{
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.06);
  overflow:hidden;
  transition:max-height .35s ease;
}

body.home .site-footer.footer--collapsed .footer-inner{
  max-height:0;
}

body.home .site-footer.footer--open .footer-inner{
  max-height:520px;
}

/* HOME : contenu déroulé */
body.home .site-footer .footer-inner{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
}

/* Grille footer */
.site-footer .footer-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:56px;
  padding:18px 0 10px;
  justify-items:center;
}

.site-footer .footer-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.site-footer .footer-col h3,
.site-footer .footer-col h4{
  margin:0 0 14px 0;
  font-size:14px;
  font-weight:700;
  color:#fff;
}

.site-footer .footer-col p{
  color: rgba(255,255,255,0.75);
  line-height:1.6;
}

.site-footer .footer-col ul{
  list-style:none;
  margin:0;
  padding:0;
  width:fit-content;
  max-width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
}

.site-footer .footer-col li{
  margin:0 0 8px 0;
  text-align:center;
}

.site-footer .footer-col a{
  color:#bfbfbf;
  text-decoration:none;
  text-align:center;
  transition:color .2s;
}

.site-footer a:hover{
  color:#fff;
  text-decoration:underline;
}

/* Bas de footer */
.site-footer .footer-bottom{
  margin-top:16px;
  padding-top:10px;
  text-align:center;
  color: rgba(255,255,255,.6);
}

.footer-bottom{
  font-size:13px;
  opacity:.8;
}

.site-footer .footer-bottom div{
  color: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
}

/* Titres masqués quand ouvert */
body.home .site-footer.footer--open .footer-col h4{
  display:none;
}

/* Handle */
.site-footer .footer-handle--notch{
  display:block;
  width:100%;
  padding:0;
  border:0;
  cursor:pointer;
  background:transparent;
  overflow:visible;
  color:#fff;
  min-height:58px;
  position:relative;
}

/* Fond + encoche */
.site-footer .footer-handle--notch::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.06);
  clip-path: polygon(
    0 0,
    45% 0,
    47% 12px,
    50% 24px,
    53% 12px,
    55% 0,
    100% 0,
    100% 100%,
    0 100%
  );
  z-index:0;
}

/* HOME : handle fermé plus transparent */
body.home .site-footer.footer--collapsed .footer-handle--notch::before{
  background: rgba(0,0,0,.32) !important;
  backdrop-filter: blur(12px);
}

/* HOME : handle ouvert */
body.home .site-footer.footer--open .footer-handle--notch::before{
  background: rgba(0,0,0,.55) !important;
}

/* Layout du handle */
.site-footer .footer-handle--notch .fh-layout{
  width:min(var(--max), calc(100% - 32px));
  margin:0 auto;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:56px;
  align-items:center;
  padding:14px 0;
}

.site-footer .footer-handle--notch .fh-left,
.site-footer .footer-handle--notch .fh-center,
.site-footer .footer-handle--notch .fh-right{
  justify-self:center;
  text-align:center;
  white-space:nowrap;
  font-size:14px;
  font-weight:700;
  opacity:.95;
}

.site-footer .footer-handle--notch .fh-center{
  pointer-events:none;
}

.site-footer .footer-handle--notch .fh-center-label{
  display:inline-block;
  white-space:nowrap;
  font-size:14px;
  font-weight:700;
  opacity:.95;
}

/* Flèche */
.site-footer .footer-handle--notch .fh-chevron{
  position:absolute;
  top:-28px;
  left:50%;
  transform:translateX(-50%);
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.85);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
  z-index:2;
  transition: transform .25s ease;
}

body.home .site-footer.footer--open .footer-handle--notch .fh-chevron{
  transform: translateX(-50%) rotate(180deg);
}

/* Hors home */
body:not(.home) .site-footer .fh-chevron{
  display:none !important;
}

body:not(.home) .site-footer [data-footer-toggle]{
  cursor:default;
}

body:not(.home) .site-footer .footer-handle--notch::before{
  clip-path:none !important;
}

/* =========================================================
   COOKIE BANNER / PREFS
========================================================= */
.cookie-banner{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:9999;
  display:none;
}

.cookie-banner.is-open{
  display:block;
}

.cookie-banner__inner{
  max-width:1100px;
  margin:0 auto;
  background: rgba(10,10,10,0.92);
  color:#fff;
  border-radius:16px;
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
}

.cookie-banner__text p{
  margin:6px 0 0;
  opacity:.92;
}

.cookie-banner a{
  color:#fff;
  text-decoration:underline;
}

.cookie-banner__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.cb-btn{
  border:1px solid rgba(255,255,255,0.25);
  background:transparent;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font:inherit;
}

.cb-btn--primary{
  background:#f59e0b;
  border-color:transparent;
  color:#111;
  font-weight:600;
}

.cb-btn--ghost:hover{
  background: rgba(255,255,255,0.08);
}

.cb-btn--primary:hover{
  filter: brightness(0.95);
}

.cookie-prefs{
  position:fixed;
  inset:0;
  z-index:10000;
  background: rgba(0,0,0,0.5);
  display:grid;
  place-items:center;
  padding:16px;
}

.cookie-prefs__box{
  width:min(720px, 100%);
  background:#111;
  color:#fff;
  border-radius:18px;
  padding:18px;
  border:1px solid rgba(255,255,255,0.12);
}

.cookie-prefs__row{
  display:flex;
  gap:14px;
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  border-top:1px solid rgba(255,255,255,0.10);
}

.cookie-prefs__row p{
  margin:4px 0 0;
  opacity:.9;
}

.cookie-switch{
  padding:8px 10px;
  border-radius:12px;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  white-space:nowrap;
}

.cookie-switch--locked{
  opacity:.85;
}

.cookie-toggle{
  display:flex;
  gap:10px;
  align-items:center;
  white-space:nowrap;
}

.cookie-toggle input{
  width:18px;
  height:18px;
}

.cookie-prefs__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.10);
  margin-top:10px;
}

.cookie-manage{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:9998;
  border:1px solid rgba(0,0,0,0.15);
  background:#fff;
  color:#111;
  padding:10px 12px;
  border-radius:999px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  cursor:pointer;
}

/* IMPORTANT : si hidden => jamais visible */
.cookie-prefs[hidden]{
  display:none !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px){
  /* Header */
  .header-wrap header{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
  }

  /* GAUCHE */
  .header-wrap .brand{
    order:1;
    display:flex;
    align-items:center;
    gap:8px;
    flex:1 1 auto;
    min-width:0;
  }

  /* DROITE */
  .header-wrap .partner{
    order:2;
    display:flex;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
    margin-left:auto;
  }

  .header-wrap .partner a{
    white-space:nowrap;
    font-size:14px;
  }

  .header-wrap .logo-img{
    max-width:58px;
    height:auto;
  }

  /* TITRE ligne 2 */
  .header-wrap .header-center{
    order:3;
    flex:0 0 100%;
    text-align:center;
    margin-top:8px;
    min-width:0 !important; /* enlève le 260px */
  }

  /* Empêche les min-width desktop de casser le mobile */
  .brand,
  .partner{
    min-width:0 !important;
  }

  /* Grid */
  .grid{
    grid-template-columns:1fr !important;
  }

  #bloc1,
  #bloc2,
  #bloc3,
  #bloc4{
    grid-column:1 !important;
    grid-row:auto !important;
    margin-top:0 !important;
  }
}

@media (max-width: 720px){
  .contact-form .form-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .site-footer .footer-handle--notch .fh-layout{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:10px;
    padding:12px 0;
  }

  .site-footer .footer-handle--notch .fh-left,
  .site-footer .footer-handle--notch .fh-right{
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .site-footer .footer-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:16px 18px;
  }

  .site-footer .footer-col:nth-child(3){
    grid-column:1 / -1;
  }
}

@media (max-width: 520px){
  .hero{
    padding-top:0 !important;
  }
}

@media (max-width: 420px){
  .header-wrap .logo-titre{
    max-width:82px;
  }

  .header-wrap .logo-img{
    max-width:54px;
  }

  .header-wrap .partner a{
    font-size:13px;
  }
}