/* ============================================
   Presentation — Slide deck styles (16:9)
============================================ */

/* Reset for presentation mode */
.pres-body {
    margin: 0;
    padding: 0;
    background: #111;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---- Slide container ---- */
.slide-deck {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    padding: 60px 80px;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
}
.slide.active { display: flex; }

/* ---- Slide types ---- */
.slide--cover {
    background: linear-gradient(135deg, #0e3d5c 0%, #1a5276 40%, #2980b9 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.slide--cover h1 { font-size: 3.2rem; margin-bottom: 0.3em; font-weight: 800; line-height: 1.2; }
.slide--cover .cover-sub { font-size: 1.4rem; opacity: 0.85; max-width: 700px; }
.slide--cover .cover-meta { margin-top: 2rem; font-size: 1rem; opacity: 0.6; }

.slide--section {
    background: linear-gradient(135deg, #0e3d5c 0%, #1a5276 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.slide--section .section-num {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}
.slide--section h2 { font-size: 2.4rem; margin-bottom: 0.4em; font-weight: 700; max-width: 800px; }
.slide--section .section-duration { font-size: 1.1rem; opacity: 0.6; }

.slide--content { padding: 50px 80px; }
.slide--content h3 {
    font-size: 1.8rem;
    color: #1a5276;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #eaf2f8;
}
.slide--content h4 {
    font-size: 1.2rem;
    color: #1a5276;
    margin: 1rem 0 0.5rem;
}

.slide--two-cols {
    padding: 50px 80px;
}
.slide--two-cols h3 {
    font-size: 1.8rem;
    color: #1a5276;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #eaf2f8;
}
.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    flex: 1;
    align-items: start;
}

/* ---- Text styles ---- */
.slide ul { font-size: 1.15rem; line-height: 1.8; padding-left: 1.5em; }
.slide ul li { margin-bottom: 0.3em; }
.slide p { font-size: 1.15rem; line-height: 1.7; color: #333; }
.slide strong { color: #1a5276; }

/* ---- Encadres ---- */
.pres-box {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
    margin: 0.75rem 0;
}
.pres-box--regl { background: #eaf2f8; border-left: 5px solid #1a5276; }
.pres-box--alert { background: #fadbd8; border-left: 5px solid #e74c3c; }
.pres-box--tip { background: #e8f8f0; border-left: 5px solid #27ae60; }
.pres-box--info { background: #d6eaf8; border-left: 5px solid #3498db; }
.pres-box--warning { background: #fdebd0; border-left: 5px solid #f39c12; }

/* ---- Tables ---- */
.slide table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    margin: 0.75rem 0;
}
.slide th {
    background: #1a5276;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.slide td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.slide tr:nth-child(even) td { background: #f7fafc; }

/* ---- CSS Flowchart ---- */
.flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.flow-step {
    background: #eaf2f8;
    border: 2px solid #1a5276;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 0.95rem;
    text-align: center;
    min-width: 110px;
    font-weight: 500;
    color: #1a5276;
}
.flow-step--accent {
    background: #e8f8f0;
    border-color: #27ae60;
    color: #1e8449;
}
.flow-step--danger {
    background: #fadbd8;
    border-color: #e74c3c;
    color: #c0392b;
}
.flow-arrow {
    font-size: 1.5rem;
    color: #718096;
    padding: 0 6px;
}
.flow-arrow::after { content: "\2192"; }
.flow-arrow--down { transform: rotate(90deg); display: block; margin: 6px auto; }

/* Vertical flow */
.flow--vertical {
    flex-direction: column;
    gap: 0;
}
.flow--vertical .flow-arrow::after { content: "\2193"; }

/* ---- Image placeholder ---- */
.img-placeholder {
    background: #f0f4f8;
    border: 2px dashed #a0aec0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.img-placeholder img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}
.img-placeholder .placeholder-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* ---- Numbered list styled ---- */
.steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step;
}
.steps-list li {
    counter-increment: step;
    padding: 8px 0 8px 50px;
    position: relative;
    font-size: 1.1rem;
}
.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1a5276;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Slide footer ---- */
.slide-footer {
    position: absolute;
    bottom: 20px;
    left: 80px;
    right: 80px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #a0aec0;
}

/* ---- Controls bar ---- */
.pres-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 20px;
    z-index: 100;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.pres-controls:hover, .pres-controls.visible { opacity: 1; }

.pres-controls button {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pres-controls button:hover { background: rgba(255,255,255,0.25); }

.pres-progress {
    flex: 1;
    max-width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
}
.pres-progress-fill {
    height: 100%;
    background: #27ae60;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.slide-counter { min-width: 60px; text-align: center; }

/* ---- Print for PDF export ---- */
@media print {
    .pres-controls { display: none !important; }
    .slide-deck { width: auto; height: auto; }
    .slide {
        position: relative !important;
        display: flex !important;
        page-break-after: always;
        width: 100%;
        height: 100vh;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .slide:last-child { page-break-after: avoid; }
}

/* ---- Illustration images (prevent cropping in two-cols) ---- */
.slide img[src*="illustrations"] {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* ---- Responsive (projector/laptop) ---- */
@media (max-width: 1200px) {
    .slide { padding: 40px 50px; }
    .slide--content, .slide--two-cols { padding: 40px 50px; }
    .slide--cover h1 { font-size: 2.4rem; }
    .slide--section h2 { font-size: 2rem; }
    .slide--content h3, .slide--two-cols h3 { font-size: 1.5rem; }
    .slide ul, .slide p { font-size: 1rem; }
}
