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

:root {
    --cream: #fafaf8;
    --rose-border: #d4a0a0;
    --rose-deep: #8B1A1A;
    --rose-dark: #8B1A1A;
    --asphalt: #1a1916;
    --blush: #f5eeee;
    --sand: #e8e6e1;
    --text-muted: #4a4846;
}

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--asphalt);
    font-family: 'Inter', sans-serif;
    color: var(--asphalt);
}

/* ── DECK SHELL ── */
#deck {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ── SLIDE BASE ── */
.slide {
    position: absolute;
    inset: 0 0 4.5rem 0;
    display: flex;
    flex-direction: column;
    background: var(--cream);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1);
    transform: translateX(60px);
}

.slide.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.slide.exit-left {
    opacity: 0;
    transform: translateX(-60px);
}

/* ── SLIDE HEADER BAR ── */
.slide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    height: 60px;
    border-bottom: 1px solid var(--rose-border);
    background: var(--cream);
    flex-shrink: 0;
}

/* ── LOGO — identique au site ── */
.slide-logo-dot {
    width: 1.6rem; height: 1.6rem;
    border: 1.5px solid var(--rose-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.slide-logo-dot img { width: 100%; height: 100%; object-fit: cover; }

.slide-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--asphalt);
    text-decoration: none;
}

.slide-header img.ensc-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

img { max-width: 100%; height: auto; }

.slide-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── SLIDE CONTENT AREA ── */
.slide-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 5vw;
    overflow: hidden;
}

.slide-body.row { flex-direction: row; align-items: center; gap: 4rem; }
.slide-body.padded { padding: 2rem 6vw; }

/* ── SLIDE FOOTER ── */
.slide-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2.5rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--rose-border);
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    z-index: 2;
}

/* ── SECTION NAV (remplace progress bar) ── */
.section-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0 1rem;
    overflow: visible;
}

.section-nav-item {
    flex: 1;
    height: 2px;
    background: var(--rose-border);
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.section-nav-item.active { background: var(--rose-deep); }
.section-nav-item.past { background: var(--rose-deep); opacity: 0.45; }

.section-nav-item::after {
    content: attr(data-label);
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.7;
}

.section-nav-item.active::after {
    color: var(--rose-deep);
    opacity: 1;
    font-weight: 600;
}

.slide-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.nav-btn {
    background: none;
    border: 1px solid var(--rose-border);
    color: var(--rose-deep);
    border-radius: 50%;
    width: 2.25rem; height: 2.25rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) { background: var(--rose-deep); color: var(--cream); border-color: var(--rose-deep); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── TYPOGRAPHY ── */
.label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rose-deep);
    font-weight: 500;
    margin-bottom: 1rem;
}

h1.slide-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--asphalt);
    margin-bottom: 1rem;
}

h1.slide-title em {
    font-style: italic;
    font-weight: 600;
    color: var(--rose-deep);
    letter-spacing: -0.02em;
}

h2.slide-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--asphalt);
    margin-bottom: 1.25rem;
}

h3.slide-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    color: var(--rose-deep);
    margin-bottom: 0.5rem;
}

.slide-lead {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 680px;
}

.italic-quote {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.75;
    color: var(--rose-dark);
    border-left: 3px solid var(--rose-deep);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

/* ── CARDS GRID ── */
.cards-grid {
    display: grid;
    gap: 1px;
    background: var(--rose-border);
}

.cards-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.cards-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.cards-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ── CARD — DA site (bord gauche, fond blanc, pas de radius) ── */
.card {
    background: var(--cream);
    border: none;
    border-left: 2px solid var(--rose-border);
    border-radius: 0;
    padding: 1.1rem 1.3rem;
    transition: border-left-color 0.2s;
}

.card:hover { border-left-color: var(--rose-deep); }

.card-num {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--rose-deep);
    line-height: 1;
    margin-bottom: 0.3rem;
    letter-spacing: -0.04em;
}

.card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.card-icon { font-size: 1.4rem; margin-bottom: 0.5rem; }
.card-title { font-weight: 700; font-size: 0.9rem; color: var(--asphalt); margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.card-body { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ── TROUBLE CARDS (slide troubles, style identique au site) ── */
.troubles-slide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5px;
    background: var(--rose-border);
    flex: 1;
    margin-top: 1rem;
}

.trouble-slide-card {
    background: var(--cream);
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: background 0.4s;
    cursor: default;
}

.trouble-slide-card::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--rose-deep);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.trouble-slide-card:hover { background: var(--rose-deep); }
.trouble-slide-card:hover::after { transform: scaleY(1); }
.trouble-slide-card > * { position: relative; z-index: 1; }

.trouble-slide-num {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.4s;
}

.trouble-slide-wave {
    width: 100%;
    height: 28px;
    margin-bottom: 0.75rem;
    overflow: visible;
}

.trouble-slide-wave path {
    stroke: var(--rose-border);
    stroke-width: 1.5;
    fill: none;
    transition: stroke 0.4s;
}

.trouble-slide-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rose-deep);
    margin-bottom: 0.4rem;
    transition: color 0.4s;
}

.trouble-slide-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--asphalt);
    margin-bottom: 0.5rem;
    transition: color 0.4s;
}

.trouble-slide-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    flex: 1;
    transition: color 0.4s;
}

.trouble-slide-freq {
    margin-top: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding-top: 0.75rem;
    border-top: 0.5px solid var(--rose-border);
    transition: color 0.4s, border-color 0.4s;
}

.trouble-slide-card:hover .trouble-slide-num,
.trouble-slide-card:hover .trouble-slide-tag,
.trouble-slide-card:hover .trouble-slide-title,
.trouble-slide-card:hover .trouble-slide-desc,
.trouble-slide-card:hover .trouble-slide-freq { color: rgba(255,255,255,0.9) !important; }
.trouble-slide-card:hover .trouble-slide-title { color: #fff !important; }
.trouble-slide-card:hover .trouble-slide-wave path { stroke: rgba(255,255,255,0.5); }
.trouble-slide-card:hover .trouble-slide-freq { border-color: rgba(255,255,255,0.25) !important; }

/* ── STEP LIST ── */
.step-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.step-list li {
    display: flex; align-items: flex-start; gap: 1rem;
    font-size: clamp(0.82rem, 1.3vw, 1rem);
    line-height: 1.55;
    color: var(--text-muted);
}

.step-num {
    width: 1.75rem; height: 1.75rem;
    background: var(--rose-deep);
    color: white;
    border-radius: 50%;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── SPLIT LAYOUT ── */
.col-left { flex: 1; }
.col-right { flex: 1; }

/* ── ACCENT BOX ── */
.accent-box {
    background: var(--rose-deep);
    color: var(--cream);
    padding: 1.5rem 2rem;
}

.accent-box .label { color: rgba(255,255,255,0.6); }
.accent-box h2.slide-title { color: white; }
.accent-box .slide-lead { color: rgba(255,255,255,0.85); }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
    display: flex; gap: 1.25rem; position: relative;
}

.timeline-spine { display: flex; flex-direction: column; align-items: center; }
.timeline-dot {
    width: 0.85rem; height: 0.85rem;
    background: var(--rose-deep); border-radius: 50%; flex-shrink: 0;
    margin-top: 4px;
}
.timeline-line { width: 1px; background: var(--rose-border); flex: 1; min-height: 1.25rem; }
.timeline-item:last-child .timeline-line { display: none; }

.timeline-content { padding-bottom: 1rem; }
.timeline-date {
    font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--rose-deep); font-weight: 600; margin-bottom: 0.15rem;
}
.timeline-text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.timeline-text strong { color: var(--asphalt); }

/* ── TAG PILLS ── */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tag {
    background: var(--blush);
    border: 1px solid var(--rose-border);
    color: var(--rose-dark);
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ── HERO SLIDE 1 (canvas waveform) ── */
.slide-hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 5vw 3rem 6vw;
    position: relative;
    z-index: 2;
}

.slide-hero-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-left: 1px solid var(--rose-border);
}

.hero-canvas-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── WAVE ANIMATION (petite barre, legacy) ── */
.wave-row { display: flex; align-items: flex-end; gap: 4px; height: 3rem; margin-bottom: 1rem; }
.wave-bar {
    width: 4px; border-radius: 9999px; background: var(--rose-deep);
    animation: wave 1.6s ease-in-out infinite;
}
@keyframes wave { 0%,100%{transform:scaleY(.3)} 50%{transform:scaleY(1)} }

/* ── RESULT HIGHLIGHT ── */
.result-highlight {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--cream);
    border-left: 2px solid var(--rose-border);
    padding: 1.5rem; text-align: center;
}

.result-big {
    font-family: 'Inter', sans-serif; font-weight: 800;
    font-size: clamp(2rem, 4vw, 3.5rem); color: var(--rose-deep); line-height: 1;
    letter-spacing: -0.04em;
}

.result-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.4; }

/* ── KEYBOARD HINT ── */
.kbd { display: inline-flex; align-items: center; justify-content: center; padding: 0.15rem 0.5rem; background: var(--blush); border: 1px solid var(--rose-border); border-radius: 4px; font-size: 0.7rem; font-family: monospace; color: var(--text-muted); }

/* ── TROUBLES GRID flex fill ── */
.troubles-slide-grid { flex: 1; min-height: 0; }

/* ── FULLSCREEN BTN — au-dessus du footer ── */
#fs-btn {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    z-index: 999;
    background: var(--cream);
    border: 1px solid var(--rose-border);
    color: var(--rose-deep);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex; align-items: center; gap: 0.4rem;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

#fs-btn:hover { background: var(--rose-deep); color: var(--cream); border-color: var(--rose-deep); }

/* ── PDF CARD BUTTON ── */
.pdf-card-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--cream);
    border: 1px solid var(--rose-border);
    border-left: 2px solid var(--rose-deep);
    border-radius: 0;
    padding: 1rem 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}
.pdf-card-btn:hover {
    background: var(--blush);
    border-left-color: var(--rose-deep);
    box-shadow: 0 2px 12px rgba(139,26,26,0.12);
}
.pdf-btn-arrow {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.8rem; font-weight: 600;
    color: var(--rose-deep);
    white-space: nowrap;
}

/* ── QR CODE ── */
.qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    border-left: 2px solid var(--rose-border);
    background: var(--cream);
}

.qr-block img {
    width: 200px;
    height: 200px;
    display: block;
}

.qr-url {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--rose-deep);
    text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .slide-body.row { flex-direction: column; gap: 2rem; }
    .cards-grid.cols-3 { grid-template-columns: 1fr 1fr; }
    .cards-grid.cols-4 { grid-template-columns: 1fr 1fr; }
    .troubles-slide-grid { grid-template-columns: 1fr; }
    .slide-hero-right { display: none; }
    .section-nav-item::after { display: none; }
}

@media (max-width: 600px) {
    .cards-grid.cols-2, .cards-grid.cols-3, .cards-grid.cols-4 { grid-template-columns: 1fr; }
    .slide-body { padding: 1.5rem; }
    .troubles-slide-grid { grid-template-columns: 1fr; }
}
