/* ===== DEFIBRILLATEUR.CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,600;0,700;0,900;1,700&family=IBM+Plex+Mono:wght@300;400;500;700&family=Barlow:wght@300;400;500;600&display=swap');

:root {
  --black:    #060606;
  --bg:       #0b0b0b;
  --panel:    #111111;
  --card:     #161616;
  --red:      #e63946;
  --red-dark: #9c1b25;
  --red-glow: rgba(230,57,70,0.18);
  --amber:    #ff9f1c;
  --green:    #2ec4b6;
  --text:     #f0f0f0;
  --muted:    #6b6b6b;
  --border:   rgba(230,57,70,0.2);
  --border-s: rgba(255,255,255,0.06);
  --font-h:   'Barlow Condensed', sans-serif;
  --font-b:   'Barlow', sans-serif;
  --font-m:   'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Scanline effect */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.07) 2px,
    rgba(0,0,0,.07) 4px
  );
  pointer-events: none; z-index: 0;
}

/* Vignette */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.6) 100%);
  pointer-events: none; z-index: 0;
}

/* ── PROGRESS ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--red);
  width: 0%; z-index: 200;
  box-shadow: 0 0 14px var(--red), 0 0 4px var(--red);
  transition: width .1s;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(6,6,6,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-s);
}

.nav-logo {
  font-family: var(--font-h);
  font-size: 1.1rem; font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); text-decoration: none;
  display: flex; align-items: center; gap: .7rem;
}
.nav-logo .pulse-icon {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--red); color: white;
  display: grid; place-items: center;
  font-size: .9rem;
  animation: pulse-red 1.5s ease-in-out infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230,57,70,.5); }
  50% { box-shadow: 0 0 0 8px rgba(230,57,70,.0); }
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-m); font-size: .72rem;
  color: var(--muted); text-decoration: none;
  letter-spacing: .1em; text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--red); }

.nav-status {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-m); font-size: .68rem;
  color: var(--green);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── HERO ── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 2.5rem 4rem;
  overflow: hidden;
}

/* Shock wave circles bg */
.shock-bg {
  position: absolute;
  right: 0; top: 50%; transform: translateY(-50%);
  width: 700px; height: 700px;
  pointer-events: none; overflow: visible;
}

.hero-alert {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-m); font-size: .72rem;
  color: var(--red); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero-alert::before {
  content: '⚡'; font-size: .9rem;
  animation: flash .8s ease-in-out infinite alternate;
}
@keyframes flash { from { opacity: 1; } to { opacity: .3; } }

.hero h1 {
  font-family: var(--font-h);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 900; line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hero h1 .line1 { color: var(--text); display: block; }
.hero h1 .line2 {
  display: block;
  color: var(--red);
  text-shadow: 0 0 40px rgba(230,57,70,.4);
}

.hero-desc {
  font-size: .97rem; color: var(--muted); max-width: 540px;
  line-height: 1.8; margin-bottom: 2.5rem; font-weight: 300;
}

.hero-metrics {
  display: flex; gap: 3rem; flex-wrap: wrap;
}
.hm { display: flex; flex-direction: column; }
.hm-n {
  font-family: var(--font-h); font-size: 2.6rem; font-weight: 900;
  color: var(--red); line-height: 1;
  text-shadow: 0 0 20px rgba(230,57,70,.3);
}
.hm-l { font-family: var(--font-m); font-size: .65rem; color: var(--muted); letter-spacing: .12em; margin-top: .3rem; }

/* ── URGENT BAND ── */
.urgent-band {
  background: var(--red); padding: 1rem 2.5rem;
  display: flex; align-items: center; gap: 2rem;
  overflow: hidden; position: relative; z-index: 1;
}
.urgent-band p {
  font-family: var(--font-h); font-size: 1.1rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: white;
  white-space: nowrap;
}
.urgent-band::before {
  content: '⚡ URGENCE · ARRÊT CARDIAQUE · APPELER LE 15 ⚡ ';
  font-family: var(--font-h); font-size: 1rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: white;
  white-space: nowrap;
  animation: marquee 18s linear infinite;
  display: block;
}
@keyframes marquee {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ── SECTIONS ── */
.sec { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 5rem 2.5rem; }

.sec-tag {
  font-family: var(--font-m); font-size: .68rem; color: var(--red);
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: .5rem; display: block;
}
.sec-title {
  font-family: var(--font-h); font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900; text-transform: uppercase; letter-spacing: .03em;
  line-height: 1.0;
}
.sec-lead { font-size: .92rem; color: var(--muted); max-width: 580px; line-height: 1.8; margin-top: .8rem; }

/* ── TYPES GRID ── */
.types-wrap {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px; background: var(--border-s); border: 1px solid var(--border-s);
  margin-top: 2.5rem;
}
.type-block {
  background: var(--card); padding: 2rem;
  position: relative; overflow: hidden;
  transition: background .25s;
}
.type-block:hover { background: var(--panel); }
.type-block::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--red);
  transition: height .4s ease;
}
.type-block:hover::before { height: 100%; }

.type-code {
  font-family: var(--font-m); font-size: .65rem; color: var(--red);
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: .7rem;
}
.type-name {
  font-family: var(--font-h); font-size: 1.3rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: .7rem;
}
.type-desc { font-size: .84rem; color: var(--muted); line-height: 1.75; }
.type-specs { margin-top: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.spec-line {
  font-family: var(--font-m); font-size: .7rem; color: var(--muted);
  display: flex; justify-content: space-between;
  padding: .3rem 0; border-bottom: 1px solid var(--border-s);
}
.spec-line span:last-child { color: var(--amber); }

/* ── PROTOCOL STEPS ── */
.protocol { display: flex; flex-direction: column; gap: 1px; background: var(--border-s); border: 1px solid var(--border-s); }
.proto-step {
  background: var(--card); padding: 1.5rem 2rem;
  display: grid; grid-template-columns: 52px 1fr auto;
  gap: 1.5rem; align-items: center;
  transition: background .2s;
  opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s;
}
.proto-step.visible { opacity: 1; transform: translateY(0); }
.proto-step:hover { background: var(--panel); }
.proto-n {
  font-family: var(--font-h); font-size: 2rem; font-weight: 900;
  color: var(--red); line-height: 1; text-align: center;
  opacity: .7;
}
.proto-body {}
.proto-action { font-family: var(--font-h); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }
.proto-detail { font-size: .82rem; color: var(--muted); line-height: 1.65; }
.proto-timer {
  font-family: var(--font-m); font-size: .78rem;
  background: rgba(230,57,70,.1); border: 1px solid var(--border);
  color: var(--red); padding: .4rem .8rem; border-radius: 2px;
  white-space: nowrap; flex-shrink: 0;
}

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-s); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead { background: var(--panel); }
th {
  font-family: var(--font-m); font-size: .65rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--red);
  padding: .9rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border-s);
}
td { padding: .9rem 1.2rem; border-bottom: 1px solid var(--border-s); color: var(--text); vertical-align: top; }
tr:hover td { background: rgba(230,57,70,.03); }
tr:last-child td { border-bottom: none; }

.tag {
  font-family: var(--font-m); font-size: .63rem; padding: .18rem .5rem;
  border-radius: 2px; letter-spacing: .06em; text-transform: uppercase;
}
.tag-r { background: rgba(230,57,70,.15); color: #f87171; border: 1px solid rgba(230,57,70,.3); }
.tag-g { background: rgba(46,196,182,.12); color: var(--green); border: 1px solid rgba(46,196,182,.25); }
.tag-a { background: rgba(255,159,28,.12); color: var(--amber); border: 1px solid rgba(255,159,28,.25); }

/* ── ENERGY TABLE ── */
.energy-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.energy-card {
  background: var(--card); border: 1px solid var(--border-s);
  padding: 1.5rem; text-align: center;
  transition: border-color .25s, transform .25s;
}
.energy-card:hover { border-color: var(--red); transform: translateY(-3px); }
.e-joules {
  font-family: var(--font-h); font-size: 2.4rem; font-weight: 900;
  color: var(--amber); line-height: 1; margin-bottom: .5rem;
  text-shadow: 0 0 16px rgba(255,159,28,.3);
}
.e-label { font-family: var(--font-m); font-size: .7rem; color: var(--muted); line-height: 1.5; }

/* ── ALERT BOX ── */
.alert-r {
  background: rgba(230,57,70,.07); border: 1px solid rgba(230,57,70,.25);
  border-left: 3px solid var(--red); padding: 1.2rem 1.5rem;
  font-size: .87rem; color: #fca5a5; line-height: 1.75; margin-top: 1rem;
}
.alert-r strong { color: var(--red); }

.alert-g {
  background: rgba(46,196,182,.07); border: 1px solid rgba(46,196,182,.2);
  border-left: 3px solid var(--green); padding: 1.2rem 1.5rem;
  font-size: .87rem; color: rgba(46,196,182,.9); line-height: 1.75; margin-top: 1rem;
}
.alert-g strong { color: var(--green); }

/* ── CHAIN SURVIVAL ── */
.chain {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 1px;
  margin-top: 2rem; background: var(--border-s); border: 1px solid var(--border-s);
}
.chain-link {
  background: var(--card); flex: 1; min-width: 140px; padding: 1.8rem 1.2rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; transition: background .25s;
}
.chain-link:hover { background: var(--panel); }
.chain-link::after {
  content: '→';
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: var(--red); z-index: 2;
}
.chain-link:last-child::after { display: none; }
.chain-icon { font-size: 2rem; margin-bottom: .8rem; }
.chain-num {
  font-family: var(--font-m); font-size: .65rem; color: var(--red);
  letter-spacing: .15em; margin-bottom: .4rem;
}
.chain-label { font-family: var(--font-h); font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }
.chain-desc { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.chain-time { font-family: var(--font-m); font-size: .7rem; color: var(--amber); margin-top: .5rem; }

/* ── FADE IN ── */
.fi { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.fi.visible { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border-s);
  padding: 2rem 2.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  z-index: 1; position: relative;
}
.ft-l { font-family: var(--font-m); font-size: .68rem; color: var(--muted); }
.ft-r { font-family: var(--font-m); font-size: .68rem; color: var(--muted); }

@media(max-width:768px){
  nav { padding: 0 1.2rem; }
  .nav-links { display: none; }
  .sec { padding: 3rem 1.2rem; }
  .hero { padding: 7rem 1.2rem 3rem; }
  .proto-step { grid-template-columns: 40px 1fr; }
  .proto-timer { display: none; }
  .chain { flex-direction: column; }
  .chain-link::after { content: '↓'; top: auto; bottom: -12px; right: 50%; transform: translateX(50%); }
}
