/* ========================================
   SUPPORT PAGE TEMPLATE - STYLE
   Template pour page de documentation/support
   Structure : menu latéral + contenu
======================================== */

/* Variables CSS personnalisables */
:root {
    --support-sidebar-width: 15%; /* Changez cette valeur pour ajuster la largeur (10% à 30%) */
}

/* ========================================
   WRAPPER PRINCIPAL
======================================== */

.support-page-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* ========================================
   SIDEBAR - MENU LATÉRAL (15%)
======================================== */

.support-sidebar {
    width: var(--support-sidebar-width);
    min-width: 250px;
    max-width: 350px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #001d3d;
    border-right: 1px solid #e0e0e0;
    z-index: 10000;
    /* Le JavaScript ajustera le top en fonction du header */
}

.support-menu-container {
    padding: 20px 0;
}

/* Scrollbar personnalisée pour le menu */
.support-sidebar::-webkit-scrollbar {
    width: 8px;
}

.support-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.support-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.support-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar */
.support-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* ========================================
   CONTENT AREA - ZONE DE CONTENU (85%)
======================================== */

.support-content {
    width: calc(100% - var(--support-sidebar-width));
    flex: 1;
    background: #ffffff !important; /* Couleur de fond de la zone de contenu */
    position: relative;
}

.support-content-inner {
    width: 100%;
    margin: 0;
    padding: 5px;
    background: #ffffff !important;
}

/* Forcer le fond blanc sur les containers Elementor */
.support-content .elementor,
.support-content .elementor-section,
.support-content .e-con,
.support-content .e-con-inner {
    background-color: #ffffff !important;
}

/* ========================================
   LOADED CONTENT (SHORTCODE FIXES)
======================================== */

/* Masquer les H2 de section ajoutés dans le HTML */
.loaded-content > h2:first-child {
    display: none !important;
}

/* Assurer largeur maximale du contenu chargé */
.loaded-content {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Pas de contrainte de largeur sur les containers Elementor */
.loaded-content .elementor-container,
.loaded-content .e-con,
.loaded-content .elementor-section {
    max-width: none !important;
    width: 100% !important;
}

/* Isolation pour éviter que * {} affecte toute la page */
.loaded-content {
    isolation: isolate;
}

/* IMPORTANT : Empêcher tout élément du contenu de passer par-dessus le menu */
.loaded-content,
.loaded-content *,
.loaded-content::before,
.loaded-content::after {
    position: relative !important;
    z-index: auto !important;
}

/* Forcer le menu à rester au-dessus */
.support-sidebar {
    position: sticky !important;
    z-index: 99999 !important;
}

/* ========================================
   SECTIONS AVEC ANCRES
======================================== */

.support-section,
.elementor-section {
    scroll-margin-top: 20px;
    margin-bottom: 60px;
}

/* Headings dans les sections */
.support-content h1,
.support-content h2,
.support-content h3,
.support-content h4 {
    scroll-margin-top: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.support-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.support-content h2 {
    font-size: 28px;
    font-weight: 600;
    color: #2c2c2c;
    margin-top: 50px;
}

.support-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #3c3c3c;
    margin-top: 40px;
}

.support-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #4c4c4c;
    margin-top: 30px;
}

/* ========================================
   ELEMENTOR COMPATIBILITY
======================================== */

/* Sections Elementor */
.support-content .elementor-section {
    margin-bottom: 40px;
}

.support-content .elementor-section:last-child {
    margin-bottom: 0;
}

/* Widgets Elementor */
.support-content .elementor-widget {
    margin-bottom: 20px;
}

/* Headings Elementor */
.support-content .elementor-widget-heading h1,
.support-content .elementor-widget-heading h2,
.support-content .elementor-widget-heading h3,
.support-content .elementor-widget-heading h4 {
    scroll-margin-top: 20px;
}

/* Text Editor Elementor */
.support-content .elementor-widget-text-editor {
    line-height: 1.7;
}

.support-content .elementor-widget-text-editor p {
    margin-bottom: 15px;
}

.support-content .elementor-widget-text-editor ul,
.support-content .elementor-widget-text-editor ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.support-content .elementor-widget-text-editor li {
    margin-bottom: 8px;
}

/* Code blocks */
.support-content pre,
.support-content code {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.support-content pre {
    padding: 15px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.support-content code {
    padding: 2px 6px;
}

.support-content pre code {
    padding: 0;
    border: none;
    background: transparent;
}

/* Tables */
.support-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.support-content table thead {
    /* background supprimé pour préserver les couleurs personnalisées */
}

.support-content table th,
.support-content table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.support-content table th {
    font-weight: 600;
    color: #2c2c2c;
}

/* Images */
.support-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablettes (< 1200px) */
@media (max-width: 1200px) {
    .support-sidebar {
        min-width: 220px;
    }
    
    .support-content-inner {
        padding: 30px 40px;
    }
}

/* Tablettes et petits écrans (< 1024px) */
@media (max-width: 1024px) {
    .support-page-wrapper {
        flex-direction: column;
    }
    
    .support-sidebar {
        width: 100%;
        min-width: auto;
        max-width: none;
        position: relative;
        height: auto;
        max-height: 500px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .support-menu-container {
        padding: 15px 20px;
    }
    
    .support-content {
        width: 100%;
    }
    
    .support-content-inner {
        padding: 30px 30px;
    }
    
    .support-content h1 {
        font-size: 30px;
    }
    
    .support-content h2 {
        font-size: 24px;
    }
    
    .support-content h3 {
        font-size: 20px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .support-sidebar {
        max-height: 400px;
    }
    
    .support-menu-container {
        padding: 10px 15px;
    }
    
    .support-content-inner {
        padding: 20px 15px;
    }
    
    .support-content h1 {
        font-size: 26px;
        margin-top: 20px;
    }
    
    .support-content h2 {
        font-size: 22px;
        margin-top: 30px;
    }
    
    .support-content h3 {
        font-size: 18px;
        margin-top: 25px;
    }
    
    .support-content h4 {
        font-size: 16px;
        margin-top: 20px;
    }
    
    .support-content table {
        font-size: 14px;
    }
    
    .support-content table th,
    .support-content table td {
        padding: 8px 10px;
    }
}

/* Petit mobile (< 480px) */
@media (max-width: 480px) {
    .support-content-inner {
        padding: 15px 10px;
    }
    
    .support-content h1 {
        font-size: 24px;
    }
    
    .support-content h2 {
        font-size: 20px;
    }
    
    .support-content h3 {
        font-size: 18px;
    }
    
    /* Tables responsive */
    .support-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ========================================
   UTILITIES
======================================== */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states pour accessibilité */
.support-content a:focus,
.support-sidebar a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .support-sidebar {
        display: none;
    }
    
    .support-content {
        width: 100%;
    }
    
    .support-content-inner {
        padding: 0;
    }
}

/* ========================================
   CUSTOM ELEMENTOR FIXES
======================================== */

/* Supprimer les marges excessives d'Elementor */
.support-content .elementor-top-section {
    margin-bottom: 0 !important;
}

.support-content .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 10px;
}

/* Fix pour les containers Elementor */
.support-content .elementor-container {
    max-width: 100%;
}

/* ========================================
   DARK MODE SUPPORT (Optionnel)
======================================== */

/* Dark mode removed to preserve custom colors */

/* ========================================
   ANIMATIONS (Optionnel)
======================================== */

/* Fade in des sections au scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-section.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Transition smooth pour le menu */
.support-sidebar a {
    transition: all 0.3s ease;
}
