:root{
  --bg:#0b1220;
  --panel:#0f1a2d;
  --panel2:#111f36;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --line:rgba(148,163,184,.18);
  --accent:#60a5fa;
  --accent2:#2563eb;

  --topbarH:72px;
  --actionsH:72px;
  --radius:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; overflow:hidden; }
body{
  overflow-x:hidden;
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 18% 0%, rgba(96,165,250,.22), transparent 60%),
    radial-gradient(900px 500px at 85% 15%, rgba(34,197,94,.08), transparent 55%),
    var(--bg);
}

/* Topbar */
.topbar{
  position:fixed;
  top:0; left:0; right:0;
  height:var(--topbarH);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  z-index:50;
  border-bottom:1px solid var(--line);
  background:rgba(11,18,32,.75);
  backdrop-filter: blur(10px);
}
.topbar__left{ display:flex; flex-direction:column; gap:4px; }
.badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(17,31,54,.55);
  font-size:12px;
  color:var(--muted);
}
.topbar__title{ font-size:14px; display:flex; align-items:center; gap:10px; }
.topbar__sub{ font-size:12px; }
.topbar__right{ display:flex; gap:10px; align-items:center; }

.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(17,31,54,.55);
  text-decoration:none;
  color:var(--text);
  font-weight:800;
  font-size:12px;
}

/* Deck + slides */
.deck{
  overscroll-behavior-y: contain;
  position:relative;
  margin-top:var(--topbarH);
  padding-bottom:var(--actionsH);
  height:calc(100vh - var(--topbarH));
  overflow-y:auto;
  scroll-snap-type:y mandatory;
}


@supports (height: 100dvh){
  .deck{ height:calc(100dvh - var(--topbarH)); }
}


.slide{
  min-height:calc(100vh - var(--topbarH) - var(--actionsH));
  scroll-snap-align:start;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding:22px 16px;
}

.slide__inner{
  width:min(980px, 100%);
  background:rgba(15,26,45,.82);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 30px 70px rgba(0,0,0,.35);
  padding:28px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.slide__kicker{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:#cbd5e1;
}

.slide__title{
  margin:0;
  font-size:28px;
  letter-spacing:-0.03em;
  line-height:1.12;
}

.slide__meta{ display:flex; gap:10px; flex-wrap:wrap; }
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(11,18,32,.55);
  font-size:12px;
  color:var(--muted);
}

.slide__content{
  font-size:15px;
  line-height:1.65;
  color:rgba(229,231,235,.95);
}
/* Preserve authoring newlines (\n / \n\n) in slide copy.
   We also keep nl2br() in PHP as a second safety net. */
.slide__content p{
  margin:0;
  white-space:pre-line;
}

.slide__hint{
  margin-top:auto;
  font-size:12px;
  text-align:center;
  padding-top:10px;
}

.slide__footer{
  margin-top:auto;
  font-size:12px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  padding-top:10px;
}

.dot{ opacity:.55; }
.muted{ color:var(--muted); }

/* Sticky actions */
.actions{
  position:fixed;
  left:0; right:0; bottom:0;
  height:var(--actionsH);
  padding:12px 12px;
  display:flex;
  gap:10px;
  justify-content:center;
  z-index:60;
  border-top:1px solid var(--line);
  background:rgba(11,18,32,.78);
  backdrop-filter: blur(10px);
}

.action{
  width:min(320px, 33%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(17,31,54,.55);
  color:var(--text);
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  font-size:13px;
}

.action--primary{
  border:0;
  background:linear-gradient(135deg, rgba(96,165,250,.95), rgba(37,99,235,.95));
}

.action:active{
  transform:translateY(1px);
}

@media (max-width: 820px){
  .slide__inner{ padding:20px; }
  .slide__title{ font-size:22px; }
  .action{ width:33.33%; padding:12px 10px; font-size:12px; }
}

@media (prefers-reduced-motion: reduce){
  .deck{ scroll-behavior:auto; }
}
@media (max-width: 610px){
    .topbar__inner{
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .topbar__right{
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* Scroll hint (chevron) */
.slide__scroll{
  cursor:pointer;
  opacity:.65;
  transition:opacity .25s ease;
  user-select:none;
}
.slide__scroll:hover{ opacity:1; }

.slide__chev{
  display:block;
  font-size:36px;
  line-height:1;
  font-weight: 700;
  margin-left:6px;
  animation:slideChevBounce 1.6s infinite;
  transform-origin:center;
}

@keyframes slideChevBounce{
  0%{ transform:translateY(0); opacity:.65; }
  50%{ transform:translateY(6px); opacity:1; }
  100%{ transform:translateY(0); opacity:.65; }
}

/* Last slide CTA */
.slide__cta{
  margin-top:auto;
  padding-top:14px;
  text-align:center;
}
.slide__ctaText{
  font-size:14px;
  color:var(--text);
  margin-bottom:12px;
  opacity:.92;
}
.slide__ctaActions{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.slide__ctaBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(17,31,54,.55);
  color:var(--text);
  text-decoration:none;
  font-weight:900;
  font-size:13px;
}
.slide__ctaBtn--secondary{
  background:rgba(11,18,32,.55);
}
/* Page-level tweaks for the topbar layout (scoped to personalized pages) */
        /* The topbar becomes taller to accommodate 2–3 text lines without clipping */
        :root{ --topbarH:110px; }

        /* Align topbar content with the slide cards width (same visual column) */
        .topbar{ padding:12px 0; }
        .topbar__inner{
            width:min(980px, 100%);
            margin:0 auto;
            padding:0 16px;
            display:flex;
            justify-content:space-between;
            align-items:flex-start;
            gap:14px;
        }
        .topbar__left{ gap:6px; }
        .topbar__line1{ font-size:14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
        .topbar__name{ color:inherit; text-decoration:none; font-weight:800; }
        .topbar__line2{ font-size:12px; }
        .topbar__line3{ font-size:12px; }

        /* Language switch (EN <-> FR) */
        .langswitch{ display:flex; align-items:center; gap:10px; }
        .langswitch__labels{ display:flex; align-items:center; gap:8px; font-weight:800; font-size:12px; }
        .toggle{
            position:relative;
            width:44px;
            height:26px;
            border-radius:999px;
            border:1px solid var(--line);
            background:rgba(17,31,54,.55);
            cursor:pointer;
            flex:0 0 auto;
        }
        .toggle input{ position:absolute; opacity:0; pointer-events:none; }
        .toggle__knob{
            position:absolute;
            top:3px;
            left:3px;
            width:20px;
            height:20px;
            border-radius:999px;
            background:rgba(229,231,235,.95);
            transition:transform .18s ease;
        }
        .toggle input:checked + .toggle__knob{ transform:translateX(18px); }

        /* Responsive: keep it readable on small screens */
        @media (max-width:560px){
            :root{ --topbarH:132px; }
            .topbar__inner{ align-items:flex-start; }
            .topbar__right{ gap:8px; }
            .chip{ padding:9px 10px; }
        }
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .slide__chev{ animation:none; }
}

