/* ══════════════════════════════════════════════
   Présentation Brevet – Morselli Maëlys
   Style diaporama full-screen
══════════════════════════════════════════════ */

:root {
  --blue:    #2563eb;
  --violet:  #7c3aed;
  --teal:    #0d9488;
  --green:   #16a34a;
  --orange:  #f97316;
  --red:     #dc2626;
  --white:   #5c003a;
  --text:    #5c003a;
  --muted:   rgba(92, 0, 58, 0.7);
  --glass:   rgba(255, 255, 255, 0.45);
  --glass-b: rgba(255, 255, 255, 0.65);
  --r:       16px;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #ffc2e0;
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
}

sup { font-size: 0.65em; }

/* ══ DECK — conteneur de toutes les slides ══ */
.deck {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ══ SLIDE — chaque diapositive ══ */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 72px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(80px);
  transition:
    opacity  0.52s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.52s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  overflow: hidden;
  /* scroll interne activé par le responsive */
  -webkit-overflow-scrolling: touch;
}

.slide.is-active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.slide.is-out {
  opacity: 0;
  transform: translateX(-80px);
}

/* ── fond par section ── */
.slide--cover     { background: linear-gradient(135deg, #ffe0f0 0%, #ffc2e0 55%, #ffaad4 100%); }
.slide--intro     { background: linear-gradient(145deg, #ffd6ec 0%, #ffc2e0 55%, #ffaad4 100%); }
.slide--positive  { background: linear-gradient(145deg, #fff0f7 0%, #ffe0f0 55%, #ffc2e0 100%); }
.slide--negative  { background: linear-gradient(145deg, #ffd6ec 0%, #ffb6d9 50%, #ff9ecf 100%); }
.slide--solutions { background: linear-gradient(145deg, #ffe0f0 0%, #ffc2e0 55%, #ffaad4 100%); }
.slide--conclusion{ background: linear-gradient(145deg, #fff0f7 0%, #ffe0f0 55%, #ffc2e0 100%); }

/* ── Orbes décoratifs ── */
.bg-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  display: block;
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.8;
}

.o1 { width: 560px; height: 560px; top: -180px; right: -130px; background: radial-gradient(circle, #ffffff 0%, #ffd6ec 70%); }
.o2 { width: 420px; height: 420px; bottom: -150px; left: -90px; background: radial-gradient(circle, #ffffff 0%, #ffc2e0 70%); }
.o3 { width: 320px; height: 320px; top: 30%; left: 40%; background: radial-gradient(circle, #ffffff 0%, #ffe0f0 70%); opacity: 0.7; }

.c-blue   { background: #1d4ed8; }
.c-violet { background: #6d28d9; }
.c-teal   { background: #0f766e; }
.c-green  { background: #15803d; }
.c-orange { background: #ea580c; }
.c-red    { background: #991b1b; }
.c-rose    { background: radial-gradient(circle, #ffffff 0%, #ffd6ec 70%); }
.c-hotpink { background: radial-gradient(circle, #ffffff 0%, #ffc2e0 70%); }
.c-deeprose{ background: radial-gradient(circle, #ffffff 0%, #ffaad4 70%); }
.c-amber   { background: #f57c00; }

/* ── Glassmorphisme ── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  border-radius: var(--r);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ══ COUVERTURE ══ */
.cover-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.identity-card {
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.college-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c2185b;
  letter-spacing: 0.02em;
}

.badge-icon { width: 32px; height: 32px; color: #c2185b; }

.id-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.id-name {
  font-size: 1.5rem;
  font-weight: 400;
  background: linear-gradient(135deg, #c2185b 0%, #e91e8c 60%, #ff69b4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.25;
}

.id-name strong {
  font-size: 1.85rem;
  font-weight: 900;
  display: block;
}

.id-class {
  font-size: 1.05rem;
  font-weight: 800;
  color: #c2185b;
}

.id-year {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.id-mention {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.cover-main { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 800;
  color: #5c003a;
  margin-bottom: 10px;
  padding: 4px 10px;
  background: rgba(194, 24, 91, 0.1);
  border-radius: 999px;
  border: 1px solid rgba(194, 24, 91, 0.25);
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, #c2185b 0%, #e91e8c 60%, #ff69b4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 14px;
}

h1 em {
  background: linear-gradient(135deg, #e91e8c 0%, #ff69b4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

.cover-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.cover-img-wrap {
  width: min(460px, 98%);
  margin-top: 6px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.cover-real-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  max-height: 38vh;
}

/* Images réelles dans les cartes */
.card-img {
  margin-top: auto;
  padding-top: 10px;
}

.card-real-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* ══ IMAGE SLOTS (placeholders) ── */
.img-slot {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s;
}

.img-slot svg { width: 100%; max-height: 40px; opacity: 0.6; }
.img-slot--sm { height: 64px; }

/* ══ INTRO : layout 2 colonnes + photo ══ */
.intro-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.intro-photo {
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  max-height: 380px;
}

.intro-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  max-height: 380px;
}

.intro-content { display: flex; flex-direction: column; gap: 0; }

/* ══ INTRO : stats ══ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 22px 20px;
  text-align: center;
}

.stat-num {
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, #c2185b 0%, #e91e8c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-num.frac { font-size: 1.9rem; }

.stat-unit {
  font-size: 0.8rem;
  font-weight: 800;
  color: #c2185b;
  margin: 5px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.intro-img { height: 74px; margin-top: 6px; }

/* ══ SLIDES GÉNÉRIQUES ══ */
.slide-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.slide-inner--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.slide-header { margin-bottom: 16px; }

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 900;
  background: linear-gradient(135deg, #c2185b 0%, #e91e8c 60%, #ff69b4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 5px 0 6px;
}

.hl-green  { color: #15803d; }
.hl-red    { color: #dc2626; }
.hl-violet { color: #7c3aed; }

.slide-lead {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 80ch;
}

.slide-lead strong { color: var(--text); }

/* ══ GRILLES DE CARTES ══ */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.fcard {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fcard h3 {
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #c2185b 0%, #e91e8c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 6px;
  line-height: 1.2;
  text-align: center;
  width: 100%;
}

.fcard--danger {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.fcard--sol {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.card-img { margin-top: auto; padding-top: 10px; }

/* ── Image + description côte à côte dans les cartes positifs ── */
.fcard-body {
  display: block;
  margin-top: 2px;
}

.fcard-body-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* ── Icônes feature ── */
.fcard-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.fcard-icon svg { width: 22px; height: 22px; }

.ico-blue   { background: rgba(37,  99, 235, 0.15); color: #1d4ed8; }
.ico-violet { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.ico-green  { background: rgba(22, 163,  74, 0.15); color: #15803d; }
.ico-red    { background: rgba(220,  38,  38, 0.15); color: #dc2626; }
.ico-orange { background: rgba(249, 115,  22, 0.15); color: #ea580c; }
.ico-teal   { background: rgba(13,  148, 136, 0.15); color: #0f766e; }

/* ══ CONCLUSION ══ */
.concl-card {
  width: min(860px, 94%);
  padding: 28px 34px;
  text-align: left;
}

.concl-card h2 { margin-bottom: 16px; }

blockquote {
  border-left: 4px solid #c2185b;
  padding-left: 18px;
  font-size: clamp(0.96rem, 1.8vw, 1.15rem);
  color: rgba(92, 0, 58, 0.85);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 22px;
}

.concl-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #5c003a;
}

.pill svg { width: 20px; height: 20px; flex-shrink: 0; }
.pill--pos { background: rgba(21, 128, 61, 0.15); border: 1px solid rgba(21,128,61,0.25); }
.pill--neg { background: rgba(220, 38, 38, 0.12); border: 1px solid rgba(220,38,38,0.2); }
.pill--sol { background: rgba(124, 58, 237, 0.12); border: 1px solid rgba(124,58,237,0.2); }

.concl-thanks {
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #c2185b;
  text-align: center;
  font-style: italic;
}

.opening {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.opening strong { color: #7c3aed; }

.concl-signature {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

/* ══ OVERLAYS PLEIN ÉCRAN ══ */

/* Overlay images plein écran (slide 3) */
.img-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 194, 224, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  flex-direction: column;
  gap: 16px;
}

.img-fullscreen-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.img-fullscreen-overlay img {
  max-width: 90vw;
  max-height: 78vh;
  width: 75vw;
  object-fit: cover;
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(194, 24, 91, 0.2),
    0 0 0 3px rgba(233, 30, 140, 0.3);
  transform: scale(0.9);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.img-fullscreen-overlay.visible img {
  transform: scale(1);
}

/* Overlay cards popup (slides 4 & 5) */
.card-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 194, 224, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.card-popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.card-popup-inner {
  max-width: min(700px, 88vw);
  width: 100%;
  transform: scale(0.7) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-popup-overlay.visible .card-popup-inner {
  transform: scale(1) translateY(0);
}

.card-popup-inner .fcard {
  padding: 40px;
}

.card-popup-inner .fcard-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  margin-bottom: 6px;
}

.card-popup-inner .fcard-icon svg {
  width: 38px;
  height: 38px;
}

.card-popup-inner .fcard h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 12px;
  text-align: center;
}

.card-popup-inner .fcard p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.6;
}

.card-popup-inner .fcard-body {
  display: block;
  margin-top: 12px;
}

.card-popup-inner .fcard-body-img {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Bouton fermer les overlays */
.overlay-close-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(194, 24, 91, 0.35);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: #c2185b;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 510;
  transition: background 0.2s;
}

.overlay-close-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.overlay-close-btn svg { width: 20px; height: 20px; }

/* Barre de progression overlay */
.overlay-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.12);
  z-index: 510;
}

.overlay-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e91e8c, #ff69b4);
  transition: width linear;
}

/* ══ NAVIGATION ══ */
.slide-dots {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 200;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: none;
  background: rgba(194, 24, 91, 0.25);
  cursor: pointer;
  padding: 0;
  transition: width 0.28s ease, background 0.28s ease;
}

.dot.active {
  width: 28px;
  background: #c2185b;
}

.nav-btns {
  position: fixed;
  bottom: 28px;
  right: 36px;
  display: flex;
  gap: 10px;
  z-index: 200;
}

/* Bouton retour accueil */
.home-btn {
  position: fixed;
  bottom: 72px;
  left: 36px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #e91e8c 0%, #c2185b 100%);
  box-shadow: 0 4px 16px rgba(194, 24, 91, 0.35);
  color: #ffffff;
  display: grid;
  place-items: center;
  text-decoration: none;
  z-index: 200;
  transition: box-shadow 0.2s, transform 0.18s;
}
.home-btn:hover {
  box-shadow: 0 6px 22px rgba(194, 24, 91, 0.55);
  transform: scale(1.08) translateY(-2px);
}
.home-btn svg { width: 20px; height: 20px; }

.nav-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(194, 24, 91, 0.25);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #5c003a;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.18s;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.75);
  transform: scale(1.08);
}

.nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.nav-btn svg { width: 22px; height: 22px; }

.slide-counter {
  position: fixed;
  top: 22px;
  right: 30px;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(92, 0, 58, 0.5);
  letter-spacing: 0.06em;
  z-index: 200;
}

.sep { margin: 0 3px; }

.kb-hint {
  position: fixed;
  bottom: 38px;
  left: 36px;
  font-size: 0.7rem;
  color: rgba(92, 0, 58, 0.4);
  font-weight: 600;
  z-index: 200;
  letter-spacing: 0.04em;
}

/* ══ ANIMATIONS ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.anim-up  { animation: fadeUp 0.52s ease both; }
.anim-d1  { animation-delay: 0.1s; }
.anim-d2  { animation-delay: 0.2s; }
.anim-d3  { animation-delay: 0.3s; }

/* annuler l'anim quand slide inactive (reset) */
.slide:not(.is-active) .anim-up { animation: none; }

/* ══ Hello Kitty 2 — droite ══ */
.hello-kitty2-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
  animation: kittyFloat2 4.4s ease-in-out infinite;
}

.hello-kitty2-svg {
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 8px 32px rgba(255, 20, 147, 0.85)) drop-shadow(0 0 60px rgba(255, 105, 180, 0.6));
  transition: transform 0.3s ease;
}

/* Sur grand écran : plus petite et plus basse pour ne pas gêner le contenu */
@media (min-width: 1024px) {
  .hello-kitty2-wrap {
    bottom: -20px;
    right: 16px;
  }
  .hello-kitty2-svg {
    width: 180px;
    height: 180px;
  }
}

.hello-kitty2-wrap:hover .hello-kitty2-svg {
  transform: scale(1.18) rotate(6deg);
}

.kitty2-bubble {
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 20, 147, 0.4);
  pointer-events: none;
}

.hello-kitty2-wrap:hover .kitty2-bubble {
  opacity: 1;
  transform: translateY(0);
}

@keyframes kittyFloat2 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

