/*
Theme Name: Prim Learning Theme
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: Thème personnalisé pour le site PRIM LEARNING avec intégration LearnDash.
Version: 1.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prim-learning
*/

/* --- Variables CSS --- */
:root {
    --primary-color: #212529;
    --secondary-color: #0056b3;
    --background-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-color: #333;
    --text-light-color: #666;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --shadow-hover-color: rgba(0, 0, 0, 0.1);
}

/* --- Réinitialisation et styles de base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Header / Navigation --- */
.site-header {
    background-color: var(--surface-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.1s ease;
}
.logo:active {
    color: var(--secondary-color);
    transform: scale(0.98);
}

#main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

#main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

#main-nav a:hover,
#main-nav .current-menu-item > a {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* --- Menu Burger pour Mobile --- */
.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.burger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* --- Structure de Page --- */
.site-main {
    padding: 0;
}

/* --- Contenu Principal (Hero) --- */
.hero-section {
    padding: 60px 0;
}

.content-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px var(--shadow-color);
    overflow: hidden;
}

.image-section {
    flex: 1;
    padding-right: 40px;
}

.image-section img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.text-section h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.text-section p {
    font-size: 1.1em;
    color: var(--text-light-color);
    margin-bottom: 30px;
}

/* --- Barre de recherche --- */
.search-form {
    display: flex;
    width: 100%;
}

.search-form input[type="text"] {
    flex-grow: 1;
    padding: 12px 20px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 50px 0 0 50px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form input[type="text"]:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.search-form button {
    padding: 12px 25px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1em;
    font-weight: 500;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #343a40;
}


/* --- Sections Générales --- */
.section-title {
    text-align: center;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2em;
    color: var(--text-light-color);
    margin-top: -30px;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Section "Pourquoi nous choisir ?" --- */
.features-section {
    padding: 60px 0;
    background-color: var(--surface-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-item {
    padding: 20px;
}

.feature-item .icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.feature-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

/* --- Section "Méthode de Travail" --- */
.method-section {
    padding: 60px 0;
    background-color: #e9ecef;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.method-item {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.method-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-hover-color);
}

.method-item .icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.method-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* --- Pied de page (Footer) --- */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.footer-links a {
    color: var(--text-light-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.copyright {
    font-size: 0.9em;
    color: #888;
    margin-top: 10px;
}

/* --- STYLES POUR LA PAGE CATALOGUE --- */
.domains-section {
    padding: 60px 0;
}

.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.domain-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    overflow: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.domain-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.domain-card .card-icon {
    padding: 16px;
    border-radius: 9999px;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.domain-card:hover .card-icon {
    transform: scale(1.1);
}

.domain-card .icon {
    height: 32px;
    width: 32px;
}

.domain-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.domain-card p {
    color: var(--text-light-color);
    font-size: 0.875rem;
}

/* Couleurs des icônes */
.bg-blue-100 { background-color: #DBEAFE; } .text-blue-600 { color: #2563EB; }
.bg-green-100 { background-color: #D1FAE5; } .text-green-600 { color: #059669; }
.bg-purple-100 { background-color: #E9D5FF; } .text-purple-600 { color: #9333EA; }
.bg-yellow-100 { background-color: #FEF3C7; } .text-yellow-600 { color: #D97706; }
.bg-red-100 { background-color: #FEE2E2; } .text-red-600 { color: #DC2626; }
.bg-indigo-100 { background-color: #E0E7FF; } .text-indigo-600 { color: #4F46E5; }
.bg-pink-100 { background-color: #FCE7F3; } .text-pink-600 { color: #DB2777; }
.bg-teal-100 { background-color: #CCFBF1; } .text-teal-600 { color: #0D9488; }


/* --- STYLES POUR LA PAGE CONTACT --- */
.contact-section {
    padding: 60px 0;
}

.contact-info-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
    margin-top: 50px;
}

.contact-item {
    background-color: var(--surface-color);
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-hover-color);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.contact-item p {
    font-size: 1.1em;
}

.contact-item a {
    text-decoration: none;
    color: var(--text-light-color);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}


/* --- Media Queries pour la Responsivité --- */
@media (max-width: 768px) {
    /* Navigation Mobile */
    #main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
        box-shadow: 0 4px 12px var(--shadow-color);
    }
    
    #main-nav ul.active {
        display: flex;
    }

    #main-nav li {
        text-align: center;
        padding: 10px 0;
    }

    .burger-menu {
        display: flex;
    }

    /* --- Sections Générales sur Mobile --- */
    .hero-section,
    .features-section,
    .method-section,
    .domains-section,
    .contact-section {
        padding: 40px 0; /* padding vertical réduit */
    }

    .section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .section-subtitle {
        font-size: 1em;
        margin-bottom: 40px;
    }

    /* --- Contenu Principal Mobile (Hero) --- */
    .content-wrapper {
        flex-direction: column;
        padding: 20px; /* padding réduit */
        text-align: center;
    }

    .image-section {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .text-section {
        align-items: center;
    }

    .text-section h1 {
        font-size: 2em;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }

    .search-form input[type="text"],
    .search-form button {
        border-radius: 50px;
    }


    /* --- Grilles sur Mobile --- */
    .features-grid,
    .method-grid,
    .contact-info-wrapper {
        gap: 30px; /* espacement réduit */
    }
    
    .feature-item {
        padding: 0;
    }

    .method-item {
        padding: 20px; /* padding réduit */
    }

    .feature-item h3,
    .method-item h3 {
        font-size: 1.2em;
    }
}

/* --- STYLES SPÉCIFIQUES POUR LES COURS INDIVIDUELS (single-sfwd-courses.php) --- */

.course-grid-layout {
    /* Mise en page pour les grands écrans : Contenu principal + Barre latérale (Sidebar) */
    display: grid;
    grid-template-columns: 2.2fr 1fr; /* 70% pour le contenu, 30% pour la sidebar */
    gap: 40px;
    align-items: start; 
    padding: 40px 0;
}

.course-main {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.course-sidebar {
    /* Rendre la sidebar "collante" pour que le bouton d'inscription reste visible */
    position: sticky; 
    top: 90px; /* Aligné sous le header sticky */
    padding: 20px;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-shadow-color);
}

/* Styles pour les éléments LearnDash natifs (prix, boutons) */

/* Prix du cours (dans la sidebar, généré par LearnDash) */
.learndash-course-meta .ld_course_grid_price,
.learndash-course-meta .ld_course_grid_price span {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

/* Boutons d'action (S'inscrire/Continuer) */
.learndash-course-meta .btn-join-course,
.learndash-course-meta .learndash-link-wrap a {
    display: block;
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}
.learndash-course-meta .btn-join-course:hover,
.learndash-course-meta .learndash-link-wrap a:hover {
    background-color: #004499;
}

/* Responsivité du gabarit de cours */
@media (max-width: 1024px) {
    /* Passage à une seule colonne pour la plupart des mobiles et tablettes verticales */
    .course-grid-layout {
        grid-template-columns: 1fr;
        gap: 30px; 
        padding: 20px 0;
    }

    .course-sidebar {
        /* Enlève le positionnement sticky sur mobile/tablette */
        position: static; 
        top: auto;
    }
}

/* --- Menu Burger pour Mobile --- */
.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    
    /* AJOUT CRUCIAL : Assure que le burger est cliquable */
    position: relative; /* Doit être positionné (relative, absolute, fixed, or sticky) pour que le z-index fonctionne */
    z-index: 2000; /* Valeur très élevée pour être au-dessus de tout */
}

/* --- Header / Navigation --- */
.site-header {
    /* ... code existant ... */
    position: sticky;
    top: 0;
    z-index: 1000; /* CONSERVEZ UNE VALEUR ÉLEVÉE */
    box-shadow: 0 2px 4px var(--shadow-color);
}