:root {
    --bg-general: #f5f7fb;
    --card-bg: #ffffff;
    --primary-blue: #00678f;
    --primary-yellow: #ffcb05;
    --accent-green: #169873;
    --accent-red: #d32f2f;
    --accent-turquoise: #00bcd4;
    --accent-purple: #7b1fa2;
    --text-primary: #2c3e50;
    --text-secondary: #546e7a;
    --border-color: #e0e4e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-general);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Bouton hamburger */
.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-yellow);
    color: var(--primary-blue);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background: #004d6d;
    transform: scale(1.1);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    background: var(--primary-yellow);
    color: white;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.close-sidebar-btn:hover {
    transform: rotate(90deg);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li {
    border-bottom: 1px solid var(--border-color);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.menu-item i {
    font-size: 1.2rem;
    min-width: 24px;
    color: var(--primary-blue);
}

.menu-item:hover {
    background: var(--bg-general);
    padding-left: 30px;
}

.menu-item.active {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    border-left: 4px solid var(--primary-yellow);
}

.menu-item.active i {
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 2px solid var(--border-color);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--primary-blue);
}

.btn-primary:hover {
    background: #004d6d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-small {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
}

/* Carte principale */
.main-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
    min-height: 500px;
}

/* En-tête */
.header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.badge {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Indicateur de section */
.section-indicator {
    text-align: center;
    margin-bottom: 15px;
}

#sectionCounter {
    display: inline-block;
    background: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    color: white;
    font-size: 0.85rem;
}

/* Conteneur de sections */
.sections-container {
    position: relative;
    min-height: 350px;
}

.section-view {
    display: none;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.section-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header-main {
    margin-bottom: 20px;
}

.section-title-main {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid currentColor;
}

.section-title-main i {
    font-size: 1.3rem;
}

.section-title-main.blue { color: var(--primary-blue); }
.section-title-main.green { color: var(--accent-green); }
.section-title-main.red { color: var(--accent-red); }
.section-title-main.turquoise { color: var(--accent-turquoise); }
.section-title-main.purple { color: var(--accent-purple); }

/* Liste de section avec images */
.section-list {
    list-style: none;
    padding: 0;
}

.section-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.section-list li:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    background: #f5f5f5;
}

.section-list li .item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    min-width: 50px;
    border: 2px solid var(--primary-blue);
}

.section-list li i {
    font-size: 1.2rem;
    color: var(--primary-blue);
    min-width: 24px;
}

.section-list li span {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.section-list.forbidden li {
    border-left-color: var(--accent-red);
}

.section-list.forbidden li .item-image {
    border-color: var(--accent-red);
}

.section-list.forbidden li i {
    color: var(--accent-red);
}

/* Boîte highlight */
.section-content-main {
    padding: 15px 0;
}

.highlight-box-main {
    background: linear-gradient(135deg, var(--primary-blue), #0088b8);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: var(--shadow-hover);
}

.highlight-box-main i {
    font-size: 2rem;
}

/* Grille certifications */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.cert-badge {
    background: var(--primary-blue);
    color: white;
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 203, 5, 0.2);
    border: 3px solid var(--primary-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 140px;
}



.cert-logo {
    width: 500px;
    height: 500px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.cert-badge span {
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    text-align: center;
    line-height: 1.2;
    margin-top: 5px;
}

/* Navigation entre sections */
.section-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.nav-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #004d6d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-btn i {
    font-size: 1rem;
}

/* Mode impression */
body.print-mode .hamburger-btn,
body.print-mode .sidebar,
body.print-mode .sidebar-overlay,
body.print-mode .action-buttons,
body.print-mode .section-navigation,
body.print-mode .section-indicator {
    display: none;
}

body.print-mode .main-card {
    box-shadow: none;
    border: 2px solid #333;
}

body.print-mode .sections-container .section-view {
    display: block !important;
    opacity: 1 !important;
    page-break-after: always;
}

/* Responsive */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-card {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .section-title-main {
        font-size: 1.2rem;
    }
    
    .section-list li {
        flex-direction: row;
        text-align: left;
        gap: 12px;
        padding: 10px 12px;
    }
    
    .section-list li span {
        font-size: 0.9rem;
    }
    
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .cert-badge {
        padding: 0px 0px;
        font-size: 0.85rem;
        min-height: 120px;
        gap: 10px;
    }
    
    .cert-logo {
        width: 100px;
        height: 100px;
    }
    
    .cert-badge span {
        font-size: 0.85rem;
    }
    
    .sidebar {
        width: 85%;
        left: -100%;
    }
}

@media screen and (max-width: 480px) {
    .header h1 {
        font-size: 1.2rem;
    }
    
    .section-title-main {
        font-size: 1.1rem;
    }
    
    .highlight-box-main {
        font-size: 1.2rem;
        padding: 25px 15px;
    }
    
    .section-list li {
        padding: 10px;
    }
    
    .section-list li span {
        font-size: 0.85rem;
    }
    
    .cert-badge {
        padding: 0px 0px;
        min-height: 100px;
    }
    
    .cert-logo {
        width: 100px;
        height: 100px;
    }
    
    .cert-badge span {
        font-size: 0.8rem;
    }
}

@media print {
    body {
        background: white;
    }
    
    .hamburger-btn,
    .sidebar,
    .sidebar-overlay,
    .action-buttons,
    .section-navigation,
    .section-indicator {
        display: none !important;
    }
    
    .sections-container .section-view {
        display: block !important;
        page-break-after: always;
    }
}
