/* ═══════════════════════════════════════
   SOS CORDISTE — Shared Stylesheet
   Thème Rouge Urgence & Blanc
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #FF1500;
  --red2:     #CC1100;
  --red3:     #990D00;
  --red-pale: #FF4433;
  --red-glow: rgba(255,21,0,0.45);
  --red-soft: rgba(255,21,0,0.12);
  --dark:     #080808;
  --dark2:    #111111;
  --dark3:    #1a1a1a;
  --white:    #FFFFFF;
  --offwhite: #F2F2F2;
  --grey:     #888888;
  --grey2:    #555555;
  --radius:   16px;
}

html { scroll-behavior: smooth; }

a { color: inherit; text-decoration: none; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
  cursor: none; /* custom cursor */
}

/* ── CUSTOM CURSOR ── */
#cursor {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  transform: translate(-50%,-50%);
  transition: width .15s, height .15s, opacity .15s, background .15s;
}
#cursor-ring { display: none; }
body.hovering #cursor { width: 8px; height: 8px; background: var(--red); }

/* ── SCROLL PROGRESS ── */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 300;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--red3), var(--red), #FF6B00);
  box-shadow: 0 0 12px var(--red-glow);
  transition: width .1s linear;
}

/* ── LOADER ── */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-logo { animation: loaderPulse 1s ease-in-out infinite alternate; }
@keyframes loaderPulse { from{transform:scale(0.95);filter:drop-shadow(0 0 10px var(--red-glow))} to{transform:scale(1.05);filter:drop-shadow(0 0 30px var(--red-glow))} }
.loader-bar { width: 200px; height: 3px; background: rgba(255,255,255,.1); border-radius: 2px; margin-top: 32px; overflow: hidden; }
.loader-fill { height: 100%; background: var(--red); border-radius: 2px; animation: loaderFill 1.8s ease forwards; }
@keyframes loaderFill { from{width:0%} to{width:100%} }
.loader-text { margin-top: 16px; font-size: .8rem; letter-spacing: .3em; color: var(--grey); text-transform: uppercase; animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── EMERGENCY TICKER ── */
.emergency-ticker {
  background: var(--red);
  padding: 8px 0; overflow: hidden;
  position: relative; z-index: 99;
  margin-top: 72px;
}
.ticker-inner {
  display: flex; gap: 60px;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap; width: max-content;
}
.ticker-item {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--white);
  display: flex; align-items: center; gap: 12px;
}
.ticker-sep { color: rgba(255,255,255,.5); }
@keyframes tickerScroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 5%;
  backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(8,8,8,0.92);
  border-bottom: 1px solid rgba(255,21,0,0.2);
  transition: padding .3s;
}
nav.scrolled { padding: 10px 5%; border-bottom-color: rgba(255,21,0,0.4); }
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--white);
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,.65); text-decoration: none;
  font-size: .875rem; font-weight: 500; letter-spacing: .02em;
  transition: color .2s; position: relative; cursor: none;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--red); transform: scaleX(0); transition: transform .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-sos {
  background: var(--red) !important;
  color: #fff !important; padding: 10px 22px; border-radius: 8px;
  font-weight: 800 !important; letter-spacing: .05em !important;
  box-shadow: 0 4px 20px var(--red-glow);
  transition: transform .2s, box-shadow .2s !important;
  animation: sosNavPulse 2s ease-in-out infinite;
}
@keyframes sosNavPulse { 0%,100%{box-shadow:0 4px 20px var(--red-glow)} 50%{box-shadow:0 4px 40px rgba(255,21,0,.7)} }
.nav-sos::after { display: none !important; }
.nav-sos:hover { transform: scale(1.05) !important; box-shadow: 0 8px 40px rgba(255,21,0,.8) !important; }

/* ── TYPOGRAPHY ── */
h1,h2,h3 { font-family: 'Bebas Neue', 'Syne', sans-serif; letter-spacing: .02em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 400; line-height: 1.1; margin-bottom: 16px; }
h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; font-family: 'Inter', sans-serif; }
.red-text { color: var(--red); }
.gradient-text {
  background: linear-gradient(90deg, var(--red), #FF6600);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: transform .2s, box-shadow .2s; cursor: none;
  border: none; font-family: 'Inter', sans-serif;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0); transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn-red {
  background: var(--red); color: #fff;
  box-shadow: 0 6px 28px var(--red-glow);
}
.btn-red:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(255,21,0,.6); }
.btn-white {
  background: var(--white); color: var(--dark);
  box-shadow: 0 6px 28px rgba(255,255,255,.15);
}
.btn-white:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(255,255,255,.3); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,.25);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }
/* Ripple */
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.35); transform: scale(0); animation: rippleAnim .6s linear; pointer-events: none; }
@keyframes rippleAnim { to{transform:scale(4);opacity:0} }

/* ── SECTION COMMONS ── */
section { padding: 100px 5%; }
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.section-tag::before { content: ''; display: block; width: 24px; height: 2px; background: var(--red); }
.section-sub { font-size: .97rem; color: var(--grey); line-height: 1.75; max-width: 580px; margin-bottom: 52px; }

/* ── CARDS ── */
.card {
  background: var(--dark2); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.card:hover { border-color: rgba(255,21,0,.35); box-shadow: 0 20px 60px rgba(255,21,0,.15); }

/* ── CHIPS ── */
.chip-red { display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:100px;font-size:.72rem;font-weight:700;background:rgba(255,21,0,.15);color:var(--red);border:1px solid rgba(255,21,0,.3); }
.chip-white { display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:100px;font-size:.72rem;font-weight:700;background:rgba(255,255,255,.08);color:var(--white);border:1px solid rgba(255,255,255,.15); }

/* ── FLOATING CTA ── */
.floating-cta {
  position: fixed; bottom: 28px; right: 28px; z-index: 150;
  background: var(--red); color: #fff; text-decoration: none;
  padding: 15px 26px; border-radius: 50px;
  font-weight: 800; font-size: .9rem; letter-spacing: .04em;
  box-shadow: 0 8px 32px var(--red-glow);
  display: flex; align-items: center; gap: 10px;
  transition: transform .2s, box-shadow .2s, opacity .3s;
  cursor: none;
  animation: floatPulse 60s ease-in-out infinite;
}
@keyframes floatPulse { 0%,100%{box-shadow:0 8px 32px var(--red-glow)} 50%{box-shadow:0 8px 60px rgba(255,21,0,.7)} }
.floating-cta:hover { transform: scale(1.06); }
.floating-cta.hidden { opacity: 0; pointer-events: none; }
.float-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.2)} }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 170px 5% 80px; position: relative; overflow: hidden;
  min-height: 420px; display: flex; align-items: flex-end;
}
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.page-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(8,8,8,.9) 0%, rgba(204,17,0,.15) 100%);
}
.page-hero-content { position: relative; z-index: 2; max-width: 700px; }
.page-hero-content h1 {
  font-family: 'Bebas Neue','Syne',sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400; line-height: 1.05; margin-bottom: 16px;
}
.page-hero-content p { font-size: 1rem; color: rgba(255,255,255,.65); line-height: 1.7; }
.breadcrumb { display:flex;align-items:center;gap:8px;font-size:.8rem;color:var(--grey);margin-bottom:18px; }
.breadcrumb a { color: var(--red); text-decoration: none; }

/* ── FOOTER ── */
footer {
  background: #000; border-top: 1px solid rgba(255,21,0,.2);
  padding: 70px 5% 30px;
}
.footer-grid { display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;margin-bottom:52px; }
.footer-brand p { font-size:.87rem;color:var(--grey);line-height:1.75;margin:16px 0 20px;max-width:280px; }
.footer-phone { color:var(--red);font-weight:800;text-decoration:none;font-size:1.1rem; }
.footer-col h5 { font-size:.75rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.3);margin-bottom:18px; }
.footer-col ul { list-style:none;display:flex;flex-direction:column;gap:12px; }
.footer-col a { color:rgba(255,255,255,.55);text-decoration:none;font-size:.875rem;transition:color .2s; }
.footer-col a:hover { color:var(--white); }
.footer-bottom { border-top:1px solid rgba(255,255,255,.05);padding-top:24px;display:flex;justify-content:space-between;align-items:center;font-size:.78rem;color:var(--grey2);flex-wrap:wrap;gap:12px; }
.footer-certs { display:flex;gap:8px; }
.footer-cert { background:rgba(255,21,0,.1);border:1px solid rgba(255,21,0,.2);border-radius:5px;padding:3px 10px;font-size:.7rem;font-weight:700;color:var(--red); }

/* ── REVEAL ANIMATIONS ── */
.reveal { opacity:0;transform:translateY(32px);transition:opacity .7s ease,transform .7s ease; }
.reveal.visible { opacity:1;transform:translateY(0); }
.reveal-left { opacity:0;transform:translateX(-32px);transition:opacity .7s ease,transform .7s ease; }
.reveal-left.visible { opacity:1;transform:translateX(0); }
.reveal-right { opacity:0;transform:translateX(32px);transition:opacity .7s ease,transform .7s ease; }
.reveal-right.visible { opacity:1;transform:translateX(0); }
.reveal-scale { opacity:0;transform:scale(.9);transition:opacity .7s ease,transform .7s ease; }
.reveal-scale.visible { opacity:1;transform:scale(1); }

/* ── GLITCH ── */
.glitch {
  position: relative;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0; right: 0;
}
.glitch::before {
  color: var(--red); clip: rect(0,0,0,0);
  animation: glitch1 3s infinite linear;
  left: 2px;
}
.glitch::after {
  color: rgba(255,140,0,0.85); clip: rect(0,0,0,0);
  animation: glitch2 3s infinite linear;
  left: -2px;
}
@keyframes glitch1 {
  0%,94%{clip:rect(0,9999px,0,0)} 95%{clip:rect(20px,9999px,35px,0)} 96%{clip:rect(60px,9999px,70px,0)} 97%{clip:rect(10px,9999px,20px,0)} 98%,100%{clip:rect(0,9999px,0,0)}
}
@keyframes glitch2 {
  0%,92%{clip:rect(0,9999px,0,0)} 93%{clip:rect(40px,9999px,55px,0)} 95%{clip:rect(5px,9999px,15px,0)} 97%{clip:rect(70px,9999px,80px,0)} 99%,100%{clip:rect(0,9999px,0,0)}
}

/* ── TILT CARDS ── */
.tilt-card { transform-style: preserve-3d; }

/* ── NAV HAMBURGER ── */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; border-radius: 8px;
  transition: background .2s, border-color .2s; z-index: 5;
}
.nav-hamburger:hover { background: rgba(255,21,0,.12); }
.nav-hamburger span { display: block; width: 24px; height: 2px; border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-hamburger span:nth-child(1) { background: var(--white); }
.nav-hamburger span:nth-child(2) { background: var(--red); width: 16px; }
.nav-hamburger span:nth-child(3) { background: var(--white); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile caché par défaut sur desktop */
#mobile-menu { display:none; }
.nav-hamburger { display:none; }

/* ── RESPONSIVE ── */
@media(max-width:1024px){ .footer-grid{grid-template-columns:1fr 1fr;} }
@media(max-width:768px){
  section{padding:70px 5%;}
  nav{padding:12px 5%;}
  .nav-links { display:none !important; }

  /* Menu mobile — EN DEHORS du nav pour éviter le bug backdrop-filter */
  #mobile-menu {
    display:none;
    position:fixed; top:64px; left:0; right:0; bottom:0;
    background:#080808;
    flex-direction:column;
    padding:28px 6% 40px;
    gap:0;
    border-top:3px solid var(--red);
    z-index:9000; overflow-y:auto;
    list-style:none;
  }
  #mobile-menu.open { display:flex; }
  #mobile-menu li { border-bottom:1px solid rgba(255,255,255,.06); }
  #mobile-menu a {
    display:block;
    font-size:1.15rem; font-weight:600;
    padding:18px 4px;
    letter-spacing:.03em;
    color:var(--white);
    transition:color .2s, padding-left .2s;
  }
  #mobile-menu a:active { color:var(--red); }
  #mobile-menu a.nav-sos {
    display:block; margin-top:24px;
    background:var(--red); color:#fff !important;
    text-align:center; border-radius:10px;
    padding:16px; font-size:1rem; font-weight:800;
    letter-spacing:.06em;
  }
  /* Hamburger button — prominent on mobile */
  .nav-hamburger {
    display:flex; flex-direction:row; align-items:center;
    gap:10px; padding:9px 16px;
    background:rgba(255,21,0,.12);
    border:1.5px solid rgba(255,21,0,.4);
    border-radius:10px;
  }
  .nav-hamburger::after {
    content:'MENU';
    font-family:'Inter',sans-serif;
    font-size:.72rem; font-weight:800;
    letter-spacing:.14em; color:var(--white);
  }
  .nav-hamburger.open {
    background:var(--red);
    border-color:var(--red);
  }
  .nav-hamburger.open::after { content:'FERMER'; }
  .nav-hamburger.open span:nth-child(1),
  .nav-hamburger.open span:nth-child(2),
  .nav-hamburger.open span:nth-child(3) { background:#fff; }
  .footer-grid{grid-template-columns:1fr;}
  body{cursor:auto;}
  #cursor,#cursor-ring{display:none;}
  .btn{cursor:pointer;}
  .floating-cta{cursor:pointer;bottom:16px;right:16px;padding:12px 20px;font-size:.82rem;}
}
