/* ======================================
   RESET & BASE
====================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #7c3aed;
  --teal:    #a855f7;
  --light:   #f3e8ff;
  --dark:    #0f0a1e;
  --mid:     #2d1b6e;
  --accent:  #c084fc;
  --danger:  #e53935;
  --warning: #f59e0b;
  --white:   #ffffff;
  --text:    #e9d5ff;
  --card-bg: rgba(168,85,247,0.08);
  --radius:  18px;
  font-size: 16px;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--dark);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
}

/* ======================================
   PAGE D'ACCUEIL
====================================== */
.landing {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f0a1e 0%, #2d1458 60%, #1a0a2e 100%);
  z-index: 100;
  transition: opacity 0.6s, transform 0.6s;
}
.landing.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.landing.hidden { display: none; }

.landing-bg-circles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.circle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(192,132,252,0.15), transparent 70%);
}
.c1 { width: 600px; height: 600px; top: -150px; left: -150px; background: radial-gradient(circle, rgba(192,132,252,0.15), transparent 70%); animation: blob1 8s ease-in-out infinite; }
.c2 { width: 400px; height: 400px; bottom: -100px; right: -80px; background: radial-gradient(circle, rgba(168,85,247,0.2), transparent 70%); animation: blob2 10s ease-in-out infinite; }
.c3 { width: 200px; height: 200px; top: 40%; left: 60%; background: radial-gradient(circle, rgba(236,72,153,0.12), transparent 70%); animation: blob3 6s ease-in-out infinite; }

@keyframes blob1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, 40px) scale(1.1); }
  66%       { transform: translate(-30px, 70px) scale(0.95); }
}
@keyframes blob2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-70px, -50px) scale(1.15); }
  70%       { transform: translate(40px, -30px) scale(0.9); }
}
@keyframes blob3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-50px, 60px) scale(1.2); }
}

.landing-card {
  position: relative; z-index: 2;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 28px;
  padding: 52px 64px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.landing-badge {
  display: inline-block;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.4);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.landing-ribbon svg {
  width: 56px; height: 56px;
  margin-bottom: 16px;
}

.landing-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 8px;
}
.landing-title span {
  color: var(--accent);
  font-size: 2rem;
}

.landing-info {
  margin: 28px 0 36px;
  display: flex; flex-direction: column; gap: 10px;
}
.info-line {
  font-size: 1rem;
  color: var(--text);
  display: flex; align-items: center; gap: 10px; justify-content: center;
}
.info-line strong { color: var(--white); }
.info-icon { font-size: 1.1rem; }

.btn-start {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 36px;
  border: none; border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 30px rgba(124,58,237,0.5);
}
.btn-start svg { width: 22px; height: 22px; }
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(168,85,247,0.65); }
.btn-start:active { transform: scale(0.97); }

/* ======================================
   SLIDESHOW
====================================== */
.slideshow {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--dark);
  overflow: hidden;
}
.slideshow.hidden { display: none; }

/* Barre du haut */
.top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 56px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(15,10,30,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(91,191,219,0.1);
}

.icon-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: 10px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: rgba(168,85,247,0.2); }
.icon-btn.active { background: rgba(168,85,247,0.25); color: var(--accent); border-color: var(--accent); }

.progress-dots {
  display: flex; gap: 6px; align-items: center;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s, transform 0.3s, width 0.3s;
  cursor: pointer;
}
.dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
  transform: scaleY(1.1);
}

/* Compteur */
.slide-counter {
  position: absolute; bottom: 20px; right: 24px;
  font-size: 0.8rem; color: rgba(255,255,255,0.35);
  z-index: 20;
}

/* ====== SLIDES WRAPPER ====== */
.slides-wrapper {
  display: flex;
  width: 100%; height: 100%;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 60px 60px;
  position: relative;
  overflow: hidden;
}

/* ====== FONDS PAR SLIDE ====== */
.slide-intro     { background: linear-gradient(135deg, #0f0a1e 0%, #2d1458 100%); }
.slide-definition{ background: linear-gradient(135deg, #130a2a 0%, #3b0f6e 100%); }
.slide-insuline  { background: linear-gradient(135deg, #0f0a1e 0%, #4a1080 100%); }
.slide-symptomes { background: linear-gradient(135deg, #1a0a2e 0%, #5b1a7a 100%); }
.slide-quotidien { background: linear-gradient(135deg, #0f0a1e 0%, #3a0d6e 100%); }
.slide-hypo      { background: linear-gradient(135deg, #1a0a2a 0%, #6b21a8 100%); }
.slide-hyper     { background: linear-gradient(135deg, #1a0a2e 0%, #7e22ce 100%); }
.slide-consequences { background: linear-gradient(135deg, #130a2a 0%, #4c1d95 100%); }
.slide-emotions  { background: linear-gradient(135deg, #0f0a1e 0%, #3b0f6e 100%); }
.slide-organisation { background: linear-gradient(135deg, #130a2a 0%, #5b21b6 100%); }
.slide-conclusion{ background: linear-gradient(135deg, #0f0a1e 0%, #6d28d9 100%); }

/* Décor fond */
.slide::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(192,132,252,0.1), transparent 60%);
  pointer-events: none;
}

/* ====== CONTENU SLIDE ====== */
.slide-content {
  max-width: 1100px;
  width: 100%;
  animation: slide-in 0.5s ease both;
}
.slide-content.center { text-align: center; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tag {
  display: inline-block;
  background: rgba(192,132,252,0.15);
  border: 1px solid rgba(192,132,252,0.35);
  color: var(--accent);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px;
  margin-bottom: 14px;
}
.tag-danger  { background: rgba(229,57,53,0.15); border-color: rgba(229,57,53,0.4); color: #fca5a5; }
.tag-warning { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.4); color: #fcd34d; }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 28px;
}

p { line-height: 1.7; color: var(--text); }
p strong { color: var(--white); }

/* ====== DEUX COLONNES ====== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.col-text { display: flex; flex-direction: column; gap: 16px; }
.col-img {
  display: flex; align-items: center; justify-content: center;
}
.col-img img {
  max-width: 100%; max-height: 360px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ====== INTRO IMAGE ====== */
.slide-img-wrap {
  margin-top: 24px;
  display: flex; justify-content: center;
}
.slide-img-wrap img {
  max-height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ====== TEXTE INTRO ====== */
.intro-text {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 700px; margin: 0 auto;
}

/* ====== CARDS ROW ====== */
.cards-row {
  display: flex; gap: 20px; justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.info-card {
  background: var(--card-bg);
  border: 1px solid rgba(192,132,252,0.15);
  border-radius: var(--radius);
  padding: 28px 24px;
  flex: 1; min-width: 200px; max-width: 280px;
  text-align: center;
  transition: transform 0.2s;
}
.info-card:hover { transform: translateY(-4px); }
.info-card.highlight {
  background: rgba(168,85,247,0.18);
  border-color: rgba(192,132,252,0.4);
}
.card-icon { font-size: 2.2rem; margin-bottom: 12px; }
.info-card h3 { font-size: 1rem; color: var(--white); margin-bottom: 10px; }
.info-card p { font-size: 0.9rem; color: var(--text); }

/* ====== SYMPTÔMES ====== */
.symptom-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
}
.symptom-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.05rem;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 16px;
}
.symptom-list li span { font-size: 1.3rem; }
.quote {
  font-style: italic;
  color: #d8b4fe;
  font-size: 0.95rem;
  border-left: 3px solid #a855f7;
  padding-left: 14px;
  margin-top: 8px;
}

/* ====== DISPOSITIFS ====== */
.devices-grid {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin: 20px 0;
}
.device-card {
  flex: 1; min-width: 160px; max-width: 240px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}
.device-card img {
  width: 100%; height: 160px; object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.device-card p {
  padding: 10px; font-size: 0.85rem; color: var(--text);
}
.note {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-top: 8px;
}

/* ====== SOLUTION BOX ====== */
.solution-box {
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.95rem;
  margin-top: 12px;
}
.solution-box.warning {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
}

/* ====== CHECKLIST ====== */
.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; 16px;
  margin: 24px auto 0;
  max-width: 700px;
  text-align: left;
}
.check-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--text);
}

/* ====== CONCLUSION ====== */
.conclusion-text {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 700px; margin: 0 auto 24px;
}
.quote-final {
  font-style: italic;
  font-size: 1.2rem;
  color: #e9d5ff;
  text-align: center;
  padding: 18px;
  border: 1px solid rgba(168,85,247,0.35);
  border-radius: var(--radius);
  background: rgba(168,85,247,0.1);
  margin-top: 8px;
}
.final-info {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.btn-restart {
  background: transparent;
  border: 1px solid rgba(168,85,247,0.5);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-restart:hover { background: rgba(168,85,247,0.15); }

/* ====== NAVIGATION FLÈCHES ====== */
.nav-btn {
  position: absolute; top: 50%; z-index: 20;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--white);
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(8px);
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn:hover { background: rgba(168,85,247,0.3); transform: translateY(-50%) scale(1.08); }
.nav-btn.prev { left: 16px; }
.nav-btn.next { right: 16px; }

/* ====== ZOOM INDICATEUR ====== */
#zoom-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(168,85,247,0.85);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 50px;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
#zoom-hint.visible { opacity: 1; }

/* Cacher titre/tag/sous-titre quand zoomé */
.slide.is-zoomed .tag,
.slide.is-zoomed h2,
.slide.is-zoomed .subtitle,
.slide.is-zoomed .note {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.slide .tag,
.slide h2,
.slide .subtitle,
.slide .note {
  transition: opacity 0.3s, transform 0.3s;
}

/* Transition douce sur les conteneurs d'images pour le zoom */
.devices-grid, .cards-row, .checklist, .col-img, .slide-img-wrap {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center center;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .slide { padding: 70px 20px 50px; }
  .two-col { grid-template-columns: 1fr; gap: 20px; }
  .col-img img { max-height: 200px; }
  .cards-row { gap: 12px; }
  .info-card { min-width: 140px; padding: 20px 16px; }
  .devices-grid { gap: 12px; }
  .device-card img { height: 110px; }
  .checklist { grid-template-columns: 1fr; }
  .landing-card { padding: 36px 28px; }
  .landing-title { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .nav-btn { width: 42px; height: 42px; }
}
