@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Argon Color System */
    --primary: #5e72e4;
    --secondary: #8392ab;
    --success: #2dce89;
    --info: #11cdef;
    --warning: #fb6340;
    --danger: #f5365c;
    --light: #f6f9fc;
    --dark: #172b4d;
    --white: #ffffff;

    /* Gradient versions */
    --gradient-success: linear-gradient(87deg, #2dce89 0, #2dcecc 100%);
    --gradient-primary: linear-gradient(87deg, #5e72e4 0, #825ee4 100%);
    --gradient-danger: linear-gradient(87deg, #f5365c 0, #f56036 100%);
    --gradient-dark: linear-gradient(87deg, #172b4d 0, #1a174d 100%);

    /* Shadows */
    --shadow-sm: 0 0 2rem 0 rgba(136, 152, 170, .15);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);

    /* Border Radius */
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-size: 14px;
}

/* ==================== MOBILE HEADER ==================== */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gradient-dark);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header h1 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    font-size: 20px;
    cursor: pointer;
}

/* ==================== SIDEBAR ==================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: white;
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 24px;
    background: var(--gradient-dark);
    color: white;
    position: relative;
}

.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}

.sidebar-section {
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-section-title {
    padding: 8px 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--light);
    color: var(--primary);
}

.nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 16px;
}

.nav-icon.success {
    background: rgba(45, 206, 137, 0.1);
    color: var(--success);
}

.nav-icon.primary {
    background: rgba(94, 114, 228, 0.1);
    color: var(--primary);
}

.nav-icon.danger {
    background: rgba(245, 54, 92, 0.1);
    color: var(--danger);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--light);
    color: var(--dark);
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
}

/* Fixed Logout Button */
.btn-logout-top {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    color: var(--danger);
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: 1px solid rgba(245, 54, 92, 0.2);
    backdrop-filter: blur(10px);
}

.btn-logout-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: var(--danger);
    color: white;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    min-height: 100vh;
    padding-bottom: 40px;
}

/* Hero Header */
.hero-section {
    background: var(--gradient-dark);
    color: white;
    padding: 30px 20px 60px;
    text-align: center;
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 13px;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
}

/* Story Cards */
.story-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px;
    margin-top: -30px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

/* Timeline Mode Enhancements */
.story-cards.timeline-mode {
    padding-bottom: 20px;
    border-bottom: 1px dashed #e9ecef;
    margin-bottom: 30px;
}

.story-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-badge {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    background: #f1f3f9;
    color: #8898aa;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.story-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.story-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.story-content p {
    font-size: 13px;
    color: var(--secondary);
    line-height: 1.5;
}

.story-badge {
    background: var(--light);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
    display: inline-block;
}

/* ==================== CHAPTER PAGES ==================== */
.chapter-header {
    background: var(--gradient-dark);
    padding: 24px 20px 60px;
    color: white;
}

.chapter-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 16px;
}

.chapter-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chapter-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.chapter-title {
    font-size: 20px;
    font-weight: 700;
}

.chapter-subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
}

.chapter-body {
    padding: 20px 16px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

/* ==================== TIMELINE ==================== */
.timeline {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
    border-left: 2px solid #e9ecef;
    margin-left: 8px;
    padding-left: 24px;
    position: relative;
}

.timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--success);
    background: var(--success);
}

.timeline-item.urgent .timeline-dot {
    box-shadow: 0 0 0 2px var(--danger);
    background: var(--danger);
}

.timeline-date {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 600;
}

/* Pulsation effect */
.pulse-item {
    animation: pulse-border 2s infinite;
    position: relative;
    border-radius: var(--radius-xl);
    padding: 15px;
    background: #fffcf0;
    border: 2px solid #fbbf24;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    margin: 4px 0;
}

.timeline-desc {
    font-size: 13px;
    color: var(--secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.timeline-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(45, 206, 137, 0.1);
    color: var(--success);
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 8px;
}

.timeline-item.urgent .timeline-badge {
    background: rgba(245, 54, 92, 0.1);
    color: var(--danger);
}

.timeline-media {
    margin-top: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.timeline-media img,
.timeline-media video {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.timeline-media .pdf-preview {
    background: var(--light);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-media .pdf-preview .pdf-icon {
    font-size: 32px;
}

.timeline-media .pdf-preview span {
    font-size: 12px;
    color: var(--secondary);
}

/* ==================== THEMATIC CARDS ==================== */
.thematic-section {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
}

.thematic-header {
    padding: 16px 20px;
    background: var(--light);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.thematic-list {
    padding: 0;
}

.thematic-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.thematic-item:last-child {
    border-bottom: none;
}

.thematic-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.thematic-item-desc {
    font-size: 12px;
    color: var(--secondary);
    line-height: 1.4;
}

.thematic-citation {
    margin-top: 10px;
    padding: 10px 14px;
    background: #e8f5e9;
    border-left: 3px solid var(--success);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 12px;
    color: #2e7d32;
    font-style: italic;
}

/* ==================== URGENCY ALERT ==================== */
.urgency-alert {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 20px;
}

.urgency-alert-title {
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.urgency-alert ul {
    list-style: none;
    padding: 0;
}

.urgency-alert li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 13px;
    color: #744210;
}

.urgency-alert li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
    font-size: 12px;
}

.demande-juge {
    background: var(--gradient-danger);
    color: white;
    padding: 20px;
    border-radius: var(--radius-xl);
    margin-top: 20px;
}

.demande-juge h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.demande-juge p {
    font-size: 13px;
    opacity: 0.95;
}

/* ==================== BLOCS CHAPTER 3 ==================== */
.bloc-title {
    font-size: 18px;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.bloc-desc {
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 20px;
}

/* Infographie */
.infographie-container {
    background: white;
    padding: 12px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.infographie-container img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
}

.infographie-zoom {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .photo-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timeline Impact */
.timeline-impact {
    font-size: 13px;
    color: #c53030;
    font-weight: 500;
    margin-bottom: 12px;
}

/* ==================== CTA PROOF BUTTONS ==================== */
.btn-proof {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    text-decoration: none;
}

.btn-proof:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-proof-pdf {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

.btn-proof-video {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
}

/* ==================== PREMIUM FLOATING CLOUD (100% RELIABLE) ==================== */
.cloud-section-premium {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.cloud-header {
    margin-bottom: 30px;
}

.cloud-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cloud-title::before {
    content: "✨";
    font-size: 22px;
}

.cloud-subtitle {
    font-size: 14px;
    color: var(--secondary);
    max-width: 600px;
    margin: 0 auto;
}

.cloud-bubbles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.cloud-bubble {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
}

.cloud-bubble:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 1 !important;
}

/* Colors based on Papa's Qualities vs Legal Risks */
.bubble-success {
    background: #e6fffa;
    color: #2c7a7b;
    border-color: #b2f5ea;
    box-shadow: 0 4px 15px rgba(45, 206, 137, 0.1);
}

.bubble-primary {
    background: #f0f7ff;
    color: #2b6cb0;
    border-color: #bee3f8;
    box-shadow: 0 4px 15px rgba(94, 114, 228, 0.1);
}

.bubble-warning {
    background: #fffaf0;
    color: #7b341e;
    border-color: #feebc8;
}

.bubble-danger {
    background: #fff5f5;
    color: #9b2c2c;
    border-color: #fed7d7;
}

.bubble-critical {
    background: #4a0f0f;
    color: #fc8181;
    border-color: #e53e3e;
    box-shadow: 0 5px 20px rgba(229, 62, 62, 0.3);
}

/* subtle animation to make them feel "alive" */
@keyframes bubbleFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0);
    }
}

.cloud-bubble {
    animation: bubbleFloat 6s ease-in-out infinite;
    animation-delay: calc(var(--delay, 0) * 1s);
}

/* ==================== PREMIUM GALLERY MODAL (MANDARIN STYLE) ==================== */
.gallery-modal-content {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    width: 100% !important;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-thumbs {
    height: 100px;
    background: #111;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.thumb-item {
    height: 70px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--primary);
    transform: translateY(-3px);
}

.gallery-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.gallery-caption-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    backdrop-filter: blur(8px);
    max-width: 80%;
    text-align: center;
}

/* Scroll snap for smooth mobile feeling */
.gallery-thumbs {
    scroll-snap-type: x mandatory;
}

.thumb-item {
    scroll-snap-align: center;
}

.btn-proof-link {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.btn-proof-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.btn-proof-temoignage {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: white;
}

/* ==================== STICKY DEMANDE AU JUGE ==================== */
.sticky-demande {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.sticky-demande-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.sticky-demande-content {
    font-size: 13px;
    line-height: 1.5;
}

.sticky-demande-content strong {
    display: block;
    margin-bottom: 4px;
}

/* Adjust main content padding when sticky is visible */
body:has(.sticky-demande) .main-content {
    padding-bottom: 100px;
}

@media (min-width: 1024px) {
    .sticky-demande {
        left: 280px;
    }
}

/* ==================== MODAL ==================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 14px 20px;
    background: var(--dark);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-body>* {
    max-width: 100%;
    max-height: 100%;
}

.modal-body img {
    max-width: 100%;
    max-height: 100%;
}

.modal-body video {
    width: 100%;
    max-height: 100%;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.pdf-toolbar {
    padding: 12px;
    background: white;
    text-align: center;
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
}

/* ==================== LOGIN ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--secondary);
    font-size: 13px;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(94, 114, 228, 0.3);
}

.btn-switch {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--secondary);
    border: 1px solid #e9ecef;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.15s;
}

.btn-switch:hover {
    background: var(--light);
    color: var(--primary);
    border-color: var(--primary);
}

.pin-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

.alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: var(--danger);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.rgpd-notice {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    color: var(--secondary);
}

/* ==================== ADMIN ==================== */
.admin-section {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin: 20px 16px;
    overflow: hidden;
}

.admin-header {
    padding: 16px 20px;
    background: var(--light);
    font-weight: 600;
    font-size: 14px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.admin-table th {
    background: var(--light);
    font-weight: 600;
    font-size: 11px;
    color: var(--secondary);
    text-transform: uppercase;
}

.btn-delete {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 11px;
    cursor: pointer;
}

/* ==================== TEMOIGNAGES ==================== */
.temoignages-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.temoin-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border-left: 4px solid var(--info);
    transition: transform 0.2s, box-shadow 0.2s;
}

.temoin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.temoin-header {
    background: linear-gradient(135deg, #11cdef 0%, #1171ef 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temoin-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.temoin-mois {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 500;
}

.temoin-body {
    padding: 24px;
}

.temoin-identity {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.temoin-nom {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.temoin-qualite {
    background: var(--light);
    color: var(--secondary);
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
}

.temoin-titre {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.temoin-description {
    font-size: 14px;
    line-height: 1.7;
    color: #525f7f;
    margin-bottom: 20px;
}

.temoin-points {
    background: #f8f9fe;
    border-left: 3px solid var(--info);
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: var(--radius);
}

.temoin-points strong {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 13px;
}

.temoin-points ul {
    margin: 0;
    padding-left: 20px;
}

.temoin-points li {
    font-size: 13px;
    line-height: 1.6;
    color: #525f7f;
    margin-bottom: 6px;
}

.temoin-impact {
    background: #fff5f5;
    border-left: 3px solid var(--warning);
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius);
}

.temoin-impact strong {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 13px;
}

.temoin-impact p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #525f7f;
    font-style: italic;
}

.temoin-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.temoin-documents .btn-proof {
    flex: 1;
    min-width: 200px;
}


/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    .story-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 24px;
    }

    /* Timeline dash for desktop */
    .story-cards.timeline-mode::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 2px;
        background: #e9ecef;
        z-index: -1;
        transform: translateY(-50%);
        display: none;
        /* Can be enabled if strict connectivity is desired, but might be messy with cards */
    }

    .story-card {
        flex-direction: column;
        text-align: center;
    }

    .story-icon {
        margin: 0 auto;
    }

    .chapter-body {
        padding: 24px;
        /* max-width: 800px;  <-- REMOVED to allow full width for Strategy View */
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-section {
        padding: 40px 24px 50px;
    }

    .hero-title {
        font-size: 28px;
    }
}

@media (min-width: 1024px) {
    .mobile-header {
        display: none;
    }

    /* Sidebar Hidden by default on Desktop (Folded) */
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    /* Open state (Overlay or Pinned) */
    .sidebar.open,
    .side-pinned .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        /* Default hidden */
    }

    .sidebar.open~.sidebar-overlay {
        display: block;
        /* Show overlay if just open (not pinned) */
    }

    .side-pinned .sidebar-overlay {
        display: none !important;
        /* No overlay if pinned */
    }

    .sidebar-close {
        display: none;
    }

    /* Main Content: Default margin 0 */
    .main-content {
        margin-left: 0;
        transition: margin-left 0.3s ease;
    }

    /* Pinned state: Push content */
    .side-pinned .main-content {
        margin-left: 280px;
    }

    /* Desktop Menu Button */
    .desktop-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 90;
        width: 40px;
        height: 40px;
        background: white;
        color: var(--dark);
        border: 1px solid #e9ecef;
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        font-size: 20px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .desktop-menu-btn:hover {
        background: var(--light);
        box-shadow: var(--shadow);
    }

    .side-pinned .desktop-menu-btn {
        display: none;
    }

    /* Pin Button in Sidebar */
    .sidebar-pin-btn {
        display: block;
        margin-left: auto;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 4px;
        cursor: pointer;
        text-transform: uppercase;
        font-weight: 600;
    }

    .sidebar-pin-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 1200px) {
    .main-content {
        margin-right: 0;
    }
}