/*
Theme Name: ISEM Institut Environnement
Description: Thème personnalisé pour l'Institut d'Excellence en Environnement (ISEM)
Version: 1.2
Author: Custom Development
*/

/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    box-sizing: border-box;
}

/* Container responsive */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
}

/* ===== VARIABLES CSS ===== */
:root {
    --header-height: 84px;
    --mobile-header-height: 65px;
    --primary-color: #2d5016;
    --secondary-color: #4caf50;
    --accent-color: #4a7c59;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    
    /* Breakpoints responsive */
    --mobile: 767px;
    --tablet: 1023px;
    --desktop: 1024px;
    
    /* Espacements responsive */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Tailles de police responsive */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== UTILITAIRES RESPONSIVE ===== */
.is-mobile .container {
    padding: 0 var(--spacing-xs);
}

.is-tablet .container {
    padding: 0 var(--spacing-sm);
}

.is-desktop .container {
    padding: 0 var(--spacing-md);
}

/* Classes utilitaires pour le responsive */
.hidden-mobile {
    display: block;
}

.hidden-tablet {
    display: block;
}

.hidden-desktop {
    display: block;
}

@media (max-width: 767px) {
    .hidden-mobile {
        display: none !important;
    }
    
    .visible-mobile {
        display: block !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hidden-tablet {
        display: none !important;
    }
    
    .visible-tablet {
        display: block !important;
    }
}

@media (min-width: 1024px) {
    .hidden-desktop {
        display: none !important;
    }
    
    .visible-desktop {
        display: block !important;
    }
}

/* ===== GRID SYSTEM RESPONSIVE ===== */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== FLEXBOX RESPONSIVE ===== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

@media (max-width: 767px) {
    .flex-mobile-col {
        flex-direction: column;
    }
    
    .flex-mobile-wrap {
        flex-wrap: wrap;
    }
}

/* ===== MENU HAMBURGER ET NAVIGATION MOBILE ===== */

/* Bouton hamburger - caché par défaut sur desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: 4px;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* Bouton hamburger responsive */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        padding: var(--spacing-xs);
        min-width: 40px;
        min-height: 40px;
    }
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Lignes du hamburger */
.hamburger-line {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation du hamburger quand le menu est ouvert */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== OVERLAY POUR LE MENU MOBILE ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== NAVIGATION MOBILE ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 100%);
    z-index: 1000;
    transition: right var(--transition-normal);
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

/* AJOUT : Sélecteur de langue mobile */
.mobile-language-switcher {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-sm);
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
}

.mobile-language-switcher .lang-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: var(--spacing-xs) var(--spacing-sm) !important;
    font-size: var(--font-size-sm) !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    transition: all var(--transition-normal) !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px !important;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    text-decoration: none;
    margin: 0 var(--spacing-xs);
    display: inline-block;
}

.mobile-language-switcher .lang-btn:hover,
.mobile-language-switcher .lang-btn.active {
    color: #2d5016 !important;
    background: white !important;
    transform: translateY(-1px);
}

/* Afficher correctement le sélecteur cloné à l'intérieur du menu mobile */
.mobile-nav .mobile-language-switcher .language-switcher {
    display: flex !important;
    justify-content: center;
    gap: 10px;
}

/* Responsive pour le sélecteur de langue mobile */
@media (max-width: 480px) {
    .mobile-language-switcher {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .mobile-language-switcher .lang-btn {
        padding: var(--spacing-xs) !important;
        font-size: var(--font-size-xs) !important;
        margin: 0 calc(var(--spacing-xs) / 2);
    }
}

/* Menu mobile responsive */
@media (max-width: 480px) {
    .mobile-nav {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 320px) {
    .mobile-nav {
        width: 100%;
    }
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.1);
}

/* Header du menu mobile responsive */
@media (max-width: 480px) {
    .mobile-nav-header {
        padding: var(--spacing-sm);
    }
}

.mobile-nav-logo {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    font-size: var(--font-size-base);
    line-height: 1.4;
}

/* Liens du menu mobile responsive */
@media (max-width: 480px) {
    .mobile-nav a {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
}

.mobile-nav a:hover,
.mobile-nav a.current {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 30px;
    color: #ffffff;
    font-weight: 600;
}

/* Amélioration de l'élément actif */
.mobile-nav a.current {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid #4caf50;
    position: relative;
}

.mobile-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #4caf50;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-nav a:hover::before,
.mobile-nav a.current::before {
    transform: scaleY(1);
}

/* ===== HEADER STYLES AMÉLIORÉS ===== */
.site-header {
    background: rgba(45, 80, 22, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 16px 16px;
    transition: all var(--transition-normal);
    animation: slideInDown 0.6s ease-out;
}

/* Header responsive */
@media (max-width: 767px) {
    .site-header {
        border-radius: 0;
        backdrop-filter: blur(5px);
    }
}

@media (max-width: 480px) {
    .site-header {
        backdrop-filter: none;
        background: rgba(45, 80, 22, 0.95);
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: var(--spacing-lg);
    padding: 0 var(--spacing-xl);
    flex-wrap: wrap;
    overflow: hidden;
    transition: all var(--transition-normal);
}

/* Header content responsive */
@media (max-width: 1023px) {
    .header-content {
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 767px) {
    .header-content {
        min-height: var(--mobile-header-height);
        gap: var(--spacing-sm);
        padding: 0 var(--spacing-xs);
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 var(--spacing-xs);
        gap: var(--spacing-xs);
    }
}

/* ===== LOGO SECTION ===== */
.site-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

/* Logo responsive */
@media (max-width: 1023px) {
    .site-logo {
        gap: var(--spacing-xs);
    }
}

@media (max-width: 767px) {
    .site-logo {
        flex: 1;
        min-width: 0;
        gap: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .site-logo {
        gap: var(--spacing-xs);
    }
}

.site-logo-block {
    display: inline-flex;
    align-items: center;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.site-logo-block:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.site-logo-img {
    height: 72px !important;
    width: auto !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(44,124,89,0.08);
    transition: all var(--transition-normal);
}

/* Logo image responsive */
@media (max-width: 1023px) {
    .site-logo-img {
        height: 64px !important;
    }
}

@media (max-width: 767px) {
    .site-logo-img {
        height: 56px !important;
    }
}

@media (max-width: 480px) {
    .site-logo-img {
        height: 48px !important;
    }
}

.site-logo h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.site-logo p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 2px 0 0 0;
    font-weight: 400;
    line-height: 1.3;
}

/* ===== NAVIGATION ===== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    overflow-x: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 28px 20px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.7px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    position: relative;
    white-space: nowrap;
}

.main-nav a:hover, .main-nav a.current {
    color: #2d5016;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44,124,89,0.08);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #4caf50;
    transition: width 0.3s;
    transform: translateX(-50%);
    border-radius: 2px;
}

.main-nav a:hover::after,
.main-nav a.current::after {
    width: 60%;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px !important;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    text-decoration: none;
}

.lang-btn:hover,
.lang-btn.active {
    color: #2d5016 !important;
    background: white !important;
}

/* ===== MAIN CONTENT ===== */
.site-main {
    margin-top: calc(var(--header-height) + 2rem);
    min-height: calc(100vh - 160px);
    padding-top: 1rem;
}

.page-content {
    background: white;
    margin-top: 2rem;
    width: 100%;
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-xl);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* Page content responsive */
@media (max-width: 1199px) {
    .page-content {
        padding: var(--spacing-lg);
        margin: var(--spacing-md) 0;
    }
}

@media (max-width: 767px) {
    .page-content {
        padding: var(--spacing-md);
        margin: var(--spacing-sm) 0;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: var(--spacing-sm);
        margin: var(--spacing-xs) 0;
        border-radius: 8px;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(rgba(45,80,22,0.8), rgba(74,124,89,0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect width="1200" height="400" fill="%23e8f5e8"/><circle cx="100" cy="100" r="50" fill="%23c8e6c9" opacity="0.5"/><circle cx="1100" cy="300" r="80" fill="%23a5d6a7" opacity="0.3"/></svg>');
    color: white;
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin: calc(-1 * var(--spacing-xl)) calc(-1 * var(--spacing-xl)) var(--spacing-lg) calc(-1 * var(--spacing-xl));
    border-radius: 10px 10px 0 0;
    width: calc(100% + 2 * var(--spacing-xl));
    box-sizing: border-box;
}

/* Hero section responsive */
@media (max-width: 1199px) {
    .hero-section {
        padding: var(--spacing-lg) 0;
        margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-md) calc(-1 * var(--spacing-lg));
        width: calc(100% + 2 * var(--spacing-lg));
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: var(--spacing-md) 0;
        margin: calc(-1 * var(--spacing-md)) calc(-1 * var(--spacing-md)) var(--spacing-sm) calc(-1 * var(--spacing-md));
        width: calc(100% + 2 * var(--spacing-md));
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: var(--spacing-sm) 0;
        margin: calc(-1 * var(--spacing-sm)) calc(-1 * var(--spacing-sm)) var(--spacing-xs) calc(-1 * var(--spacing-sm));
        width: calc(100% + 2 * var(--spacing-sm));
        border-radius: 8px 8px 0 0;
    }
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== BOUTONS ===== */
.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
    width: 100%;
}

/* CTA buttons responsive */
@media (max-width: 767px) {
    .cta-buttons {
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
        margin-top: var(--spacing-sm);
    }
}

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: inline-block;
    font-size: var(--font-size-base);
    line-height: 1.4;
    text-align: center;
}

/* Boutons responsive */
@media (max-width: 767px) {
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 480px) {
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-sm);
        width: 100%;
        margin: var(--spacing-xs) 0;
    }
}

.btn-primary {
    background: #4caf50;
    color: white;
}

.btn-secondary {
    background: rgb(78, 255, 47);
    color: white;
    border: 2px solid white;
}

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

/* ===== SECTIONS DE CONTENU ===== */
.content-section {
    margin: 3rem 0;
    margin-top: 4rem;
    padding: 2rem 0;
}

.section-title {
    color: #2d5016;
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
    margin-top: 2rem;
    text-align: center;
    position: relative;
    line-height: 1.2;
}

/* Section title responsive */
@media (max-width: 1199px) {
    .section-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-sm);
    }
}

@media (max-width: 767px) {
    .section-title {
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-xs);
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #4caf50;
    border-radius: 3px;
}

/* ===== FORMATIONS GRID ===== */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    width: 100%;
}

/* Grille des formations responsive */
@media (min-width: 1200px) {
    .formations-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--spacing-xl);
    }
}

@media (max-width: 1199px) {
    .formations-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 767px) {
    .formations-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .formations-grid {
        gap: var(--spacing-sm);
    }
}

.formation-card {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    padding: var(--spacing-lg);
    border-radius: 10px;
    border-left: 5px solid #4caf50;
    transition: all var(--transition-normal);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Cartes de formation responsive */
@media (max-width: 1199px) {
    .formation-card {
        padding: var(--spacing-md);
    }
}

@media (max-width: 767px) {
    .formation-card {
        padding: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .formation-card {
        padding: var(--spacing-sm);
        margin: 0;
    }
}

.formation-card:hover {
    transform: translateY(-5px);
}

.formation-card h3 {
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ===== ORGANISATION GRID ===== */
.organization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.org-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e8f5e8;
    transition: border-color 0.3s;
}

.org-item:hover {
    border-color: #4caf50;
}

.org-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4caf50;
    display: block;
}

/* ===== FORMULAIRE DE CONTACT ===== */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d5016;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e8f5e8;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4caf50;
}

/* ===== ARTICLES BLOG ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
}

.article-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: #2d5016;
}

.article-card p {
    padding: 0 1.5rem 1.5rem;
    color: #666;
}

/* ===== INFORMATIONS DE CONTACT ===== */
.contact-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-item:before {
    content: '📍';
    margin-right: 10px;
    font-size: 1.2rem;
}

.contact-item.phone:before { content: '📞'; }
.contact-item.email:before { content: '✉️'; }

/* ===== FOOTER ===== */
.site-footer {
    background: #2d5016;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* ===== SUPPORT RTL POUR L'ARABE ===== */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .main-nav ul {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-item:before {
    margin-right: 0;
    margin-left: 10px;
}

/* CORRECTION DU DÉCALAGE EN ARABE */
[dir="rtl"] .hero-section {
    text-align: right;
}

[dir="rtl"] .hero-content h1 {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .hero-content p {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .cta-buttons {
    justify-content: flex-start;
}

[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn i {
    order: 2;
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .btn span {
    order: 1;
}

[dir="rtl"] .stats-section {
    text-align: right;
}

[dir="rtl"] .stats-grid {
    direction: rtl;
}

[dir="rtl"] .stat-item {
    text-align: right;
}

[dir="rtl"] .stat-number {
    direction: ltr;
    unicode-bidi: bidi-override;
}

[dir="rtl"] .about-content {
    direction: rtl;
}

[dir="rtl"] .formations-grid {
    direction: rtl;
}

[dir="rtl"] .articles-grid {
    direction: rtl;
}

[dir="rtl"] .page-content {
    text-align: right;
}

[dir="rtl"] .page-content h1,
[dir="rtl"] .page-content h2,
[dir="rtl"] .page-content h3 {
    text-align: right;
}

[dir="rtl"] .page-content p {
    text-align: right;
}

/* Correction du menu mobile en arabe */
[dir="rtl"] .mobile-nav {
    right: auto;
    left: -100%;
}

[dir="rtl"] .mobile-nav.active {
    left: 0;
    right: auto;
}

[dir="rtl"] .mobile-nav a::before {
    right: 0;
    left: auto;
}

[dir="rtl"] .mobile-nav a.current {
    border-left: none;
    border-right: 4px solid #4caf50;
}

[dir="rtl"] .mobile-nav-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-nav-close {
    margin-left: 0;
    margin-right: auto;
}

/* Correction des numéros de téléphone en arabe */
[dir="rtl"] .header-phone {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-phone i {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .phone-numbers {
    flex-direction: row-reverse;
}

/* Correction des listes en arabe */
[dir="rtl"] ul, [dir="rtl"] ol {
    padding-right: 20px;
    padding-left: 0;
}

[dir="rtl"] li {
    text-align: right;
}

/* Correction des grilles en arabe */
[dir="rtl"] .grid {
    direction: rtl;
}

[dir="rtl"] .grid > * {
    direction: ltr;
}

/* Correction des formulaires en arabe */
[dir="rtl"] .contact-form input,
[dir="rtl"] .contact-form textarea {
    text-align: right;
}

[dir="rtl"] .contact-form label {
    text-align: right;
}

/* Correction des articles en arabe */
[dir="rtl"] .article-category {
    text-align: right;
}

[dir="rtl"] .article-meta {
    text-align: right;
}

/* Correction des marges et paddings en arabe */
[dir="rtl"] .site-logo {
    margin-right: 0;
    margin-left: 20px;
}

[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

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

/* Desktop Large (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .header-content {
        min-height: 90px;
        padding: 0 30px;
    }
    
    .site-main {
        margin-top: 90px;
    }
    
    .site-logo h1 {
        font-size: 32px;
    }
    
    .main-nav a {
        padding: 35px 22px;
        font-size: 17px;
    }
    
    .formations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop Standard (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .container {
        max-width: 1100px;
    }
    
    .header-content {
        min-height: 85px;
        padding: 0 25px;
    }
    
    .site-main {
        margin-top: 85px;
    }
    
    .main-nav a {
        padding: 32px 18px;
        font-size: 16px;
    }
}

/* Tablette Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 25px;
    }
    
    .header-content {
        min-height: 75px;
        gap: 20px;
    }
    
    .site-main {
        margin-top: 75px;
    }
    
    .site-logo h1 {
        font-size: 24px;
    }
    
    .site-logo-img {
        height: 58px !important;
    }
    
    .main-nav a {
        padding: 28px 14px;
        font-size: 14px;
    }
    
    .hero-section h1 {
        font-size: 2.8rem;
    }
    
    .hero-section p {
        font-size: 1.2rem;
    }
    
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-buttons {
        gap: 1.2rem;
    }
    
    .btn {
        padding: 0.9rem 2.2rem;
        font-size: 0.95rem;
    }
}

/* Tablette Portrait et Mobile Large (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    /* Activer le menu mobile */
    .mobile-menu-toggle {
        display: flex;
        order: 3;
        margin-left: auto;
    }
    
    .main-nav {
        display: none;
    }
    
    .language-switcher {
        order: 2;
        margin-left: auto;
        margin-right: 15px;
    }
    
    .header-content {
        min-height: 70px;
        padding: 0 20px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .site-main {
        margin-top: 70px;
    }
    
    .site-logo {
        order: 1;
        flex-shrink: 0;
    }
    
    .site-logo h1 {
        font-size: 22px;
    }
    
    .site-logo-img {
        height: 50px !important;
    }
    
    .page-content {
        padding: 2rem;
        margin: 1.5rem 0;
    }
    
    .hero-section {
        padding: 4rem 0;
        margin: -2rem -2rem 2rem -2rem;
    }
    
    .hero-section h1 {
        font-size: 2.4rem;
    }
    
    .hero-section p {
        font-size: 1.15rem;
    }
    
    .formations-grid,
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    
    .organization-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 90%;
        justify-content: center;
    }
}

/* Mobile Standard (320px - 480px) */
@media (max-width: 480px) {
    /* Activer le menu mobile */
    .mobile-menu-toggle {
        display: flex;
        order: 3;
        margin-left: auto;
    }
    
    .main-nav {
        display: none;
    }
    
    .language-switcher {
        order: 2;
        margin-left: auto;
        margin-right: 10px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        min-height: 65px;
        padding: 0 15px;
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .site-main {
        margin-top: 65px;
    }
    
    .site-logo {
        order: 1;
        flex-shrink: 0;
    }
    
    .site-logo h1 {
        font-size: 20px;
    }
    
    .site-logo p {
        font-size: 12px;
    }
    
    .site-logo-img {
        height: 45px !important;
    }
    
    .page-content {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .hero-section {
        padding: 3rem 0;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-section p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .formations-grid,
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .formation-card,
    .article-card {
        margin: 0;
    }
    
    .organization-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.9rem;
        margin-bottom: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .btn {
        width: 95%;
        padding: 0.8rem 1.8rem;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .contact-form {
        padding: 0 10px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    
    /* Ajustements spécifiques pour mobile */
    .mobile-nav {
        width: 90%;
        max-width: 300px;
    }
}

/* Très petit mobile (moins de 320px) */
@media (max-width: 319px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        padding: 0 10px;
        min-height: 60px;
    }
    
    .site-main {
        margin-top: 60px;
    }
    
    .site-logo h1 {
        font-size: 18px;
    }
    
    .site-logo-img {
        height: 40px !important;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.7rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }
}

/* ===== MASQUER LES MENUS SELON L'ÉCRAN ===== */

/* Masquer le menu desktop sur mobile et tablette */
@media (max-width: 767px) {
    .main-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* Masquer le menu mobile sur desktop */
@media (min-width: 768px) {
    .mobile-menu-toggle,
    .mobile-nav,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ===== OPTIMISATIONS POUR LES ÉCRANS TACTILES ===== */
@media (hover: none) and (pointer: coarse) {
    /* Améliorer les zones de toucher */
    .main-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Désactiver les effets hover sur tactile */
    .formation-card:hover,
    .article-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.site-header {
    animation: slideInDown 0.6s ease-out;
}

.main-nav li {
    animation: slideInDown 0.6s ease-out;
    animation-fill-mode: both;
}

.mobile-nav.active {
    animation: slideInRight 0.3s ease-out;
}

.mobile-menu-overlay.active {
    animation: fadeIn 0.3s ease-out;
}

/* ===== AMÉLIORATION DE L'ACCESSIBILITÉ ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour l'accessibilité */
.mobile-menu-toggle:focus,
.mobile-nav a:focus {
    outline: 2px solid #4caf50;
    outline-offset: 2px;
}

/* ===== STYLES SPÉCIFIQUES POUR LE HEADER EXISTANT ===== */

/* Adaptation du numéro de téléphone dans le header */
.header-phone {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-phone i {
    color: #4caf50;
    font-size: 1.1rem;
}

/* ===== FOOTER STYLES COMPLETS ===== */

/* Styles pour la section réseaux sociaux du footer */
.footer-social {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link.facebook:hover {
    background-color: #1877f2;
    border-color: #1877f2;
}

.social-link.linkedin:hover {
    background-color: #0a66c2;
    border-color: #0a66c2;
}

.social-link.email:hover {
    background-color: #ea4335;
    border-color: #ea4335;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #e6683c;
}

.social-link svg {
    width: 24px;
    height: 24px;
}

/* Section liens légaux */
.footer-legal {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Masquer complètement les widgets Archives et Catégories */
.footer-widgets,
.footer-widget,
.footer-widget-backup {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Masquer spécifiquement les widgets Archives et Catégories */
.widget_archive,
.widget_categories,
.widget_pages,
.widget_meta,
.widget_recent_entries,
.widget_recent_comments,
.widget_rss,
.widget_search,
.widget_text {
    display: none !important;
}

/* Styles du footer principal */
.site-footer {
    background: linear-gradient(135deg, #1a4d2e 0%, #2d5a3d 100%);
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: 50px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Contenu du footer */
.footer-content {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Contact du footer */
.footer-contact {
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.footer-tel,
.footer-mail {
    font-size: 14px;
    margin: 0 15px;
}

.footer-contact a {
    color: #4fc3f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #81d4fa;
    text-decoration: underline;
}

/* ===== RESPONSIVE FOOTER ===== */
@media (max-width: 768px) {
    .site-footer {
        padding: 30px 0 15px;
    }
    
    .footer-social h3 {
        font-size: 16px;
    }
    
    .social-icons {
        gap: 10px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-legal a {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .site-footer .container {
        padding: 0 15px;
    }
    
    .footer-social h3 {
        font-size: 16px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== STYLES D'ANIMATION POUR LES ÉLÉMENTS DE MENU ===== */
.main-nav li:nth-child(1) { animation-delay: 0.1s; }
.main-nav li:nth-child(2) { animation-delay: 0.15s; }
.main-nav li:nth-child(3) { animation-delay: 0.2s; }
.main-nav li:nth-child(4) { animation-delay: 0.25s; }
.main-nav li:nth-child(5) { animation-delay: 0.3s; }
.main-nav li:nth-child(6) { animation-delay: 0.35s; }
.main-nav li:nth-child(7) { animation-delay: 0.4s; }
.main-nav li:nth-child(8) { animation-delay: 0.45s; }

/* ===== HERO SECTION AMÉLIORÉ ===== */
.hero-section {
    background: linear-gradient(rgba(45,80,22,0.9), rgba(74,124,89,0.9)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect width="1200" height="400" fill="%23e8f5e8"/><circle cx="100" cy="100" r="50" fill="%23c8e6c9" opacity="0.5"/><circle cx="1100" cy="300" r="80" fill="%23a5d6a7" opacity="0.3"/></svg>');
    color: white;
    text-align: center;
    padding: 6rem 0;
    margin: -3rem -3rem 3rem -3rem;
    border-radius: 10px 10px 0 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== BOUTONS AMÉLIORÉS ===== */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}

.btn-secondary {
    background: rgb(127, 226, 127);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}

.btn-secondary:hover {
    background: white;
    color: #2d5016;
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .mobile-menu-toggle,
    .mobile-nav,
    .mobile-menu-overlay,
    .language-switcher,
    .cta-buttons,
    .social-icons {
        display: none !important;
    }
    
    .site-main {
        margin-top: 0 !important;
    }
    
    .page-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* ===== STYLES MENU MOBILE ANTI-DOUBLONS ===== */

/* Menu principal : visible uniquement sur desktop */
.main-nav {
    display: block;
}

@media (max-width: 767px) {
    .main-nav {
        display: none !important;
    }
}

/* Bouton hamburger : visible uniquement sur mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1001;
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* Lignes du hamburger */
.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation du hamburger quand actif */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menu mobile */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 100%);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
    right: 0;
}

/* Header du menu mobile */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-logo {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* Liste du menu mobile */
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
    background: rgba(255, 255, 255, 0.1);
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Éviter les conflits avec le sélecteur de langue */
.mobile-nav .language-switcher {
    display: none;
}

/* Masquer les éléments dupliqués */
.mobile-nav .current {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Support pour les navigateurs qui ne supportent pas les custom properties */
@supports not (height: calc(var(--vh, 1vh) * 100)) {
    .mobile-nav {
        height: 100vh;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .mobile-nav {
        background: linear-gradient(135deg, #1a3009 0%, #2d5016 100%);
    }
}

/* Réduire les animations si l'utilisateur le préfère */
@media (prefers-reduced-motion: reduce) {
    .mobile-nav,
    .mobile-menu-overlay,
    .hamburger-line,
    .mobile-nav a {
        transition: none !important;
    }
}

/* Fix pour Safari iOS */
@supports (-webkit-touch-callout: none) {
    .mobile-nav {
        -webkit-overflow-scrolling: touch;
    }
}

/* Amélioration de l'accessibilité */
.mobile-menu-toggle:focus,
.mobile-nav-close:focus {
    outline: 2px solid #4caf50;
    outline-offset: 2px;
}

/* Performance : utiliser transform au lieu de right pour l'animation */
@media (min-width: 768px) {
    .mobile-nav,
    .mobile-menu-overlay,
    .mobile-menu-toggle {
        display: none !important;
    }
}


/* ===== PAGE ACTUALITÉS AMÉLIORÉE ===== */

/* Hero Section Actualités */
.actualites-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
    padding: 4rem 0 3rem 0;
    position: relative;
    overflow: hidden;
}

.actualites-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect width="1200" height="400" fill="%23ffffff" opacity="0.1"/><circle cx="100" cy="100" r="30" fill="%23c8e6c9" opacity="0.3"/><circle cx="1100" cy="300" r="50" fill="%23a5d6a7" opacity="0.2"/></svg>');
    z-index: 1;
}

.actualites-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.actualites-hero .section-title {
    font-size: 3rem;
    color: #2d5016;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.actualites-hero .section-title i {
    font-size: 2.5rem;
    color: #4caf50;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #4caf50;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filtres fonctionnels */
.actualites-filters {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: #2d5016;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e8f5e8;
    border-radius: 8px;
    font-size: 1rem;
    color: #2d5016;
    background: white;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #4caf50;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.filter-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Statistiques des actualités */
.actualites-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    border: 1px solid #e8f5e8;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2.5rem;
    color: #4caf50;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d5016;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* Articles en vedette */
.featured-articles {
    margin: 4rem 0;
}

.section-subtitle {
    color: #2d5016;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-subtitle i {
    font-size: 1.5rem;
    color: #4caf50;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    margin: 2rem 20;
}

.featured-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.featured-thumb {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-content {
    padding: 2rem;
}

.featured-title {
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.featured-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.featured-link {
    color: #4caf50;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.featured-link:hover {
    color: #2d5016;
}

/* Articles normaux améliorés */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.article-thumb {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-overlay i {
    color: white;
    font-size: 2rem;
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.article-date,
.article-cat,
.article-author {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-date {
    color: #4caf50;
}

.article-cat {
    color: #2d5016;
    font-weight: 600;
}

.article-author {
    color: #888;
}

.article-title {
    margin-bottom: 1rem;
}

.article-title a {
    color: #2d5016;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #4caf50;
}

.article-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e8f5e8;
}

.article-link {
    color: #4caf50;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: #2d5016;
}

.article-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.views-count,
.comments-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Pagination améliorée */
.actualites-pagination {
    text-align: center;
    margin-top: 3rem;
}

.actualites-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 0.2rem;
    background: #f8f9fa;
    color: #2d5016;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #e8f5e8;
}

.actualites-pagination .page-numbers:hover,
.actualites-pagination .page-numbers.current {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.actualites-pagination .prev,
.actualites-pagination .next {
    padding: 0 1rem;
}

/* Section Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 100%);
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter-form button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Message pas d'articles */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
}

.no-articles i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #666;
}

.no-articles p {
    font-size: 1.1rem;
    color: #999;
}

/* Responsive pour la page actualités */
@media (max-width: 768px) {
    .actualites-hero .section-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .actualites-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-form input[type="email"] {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .actualites-hero {
        padding: 3rem 0 2rem 0;
    }
    
    .actualites-hero .section-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .featured-content {
        padding: 1.5rem;
    }
    
    .article-content {
        padding: 1rem;
    }
}

/* actualtes */

.all-articles {
    margin-bottom: 3rem;
}

.articles-list {
    display: grid;
    gap: 2rem;
}

.article-item {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #4caf50;
}

.article-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-title {
    color: #2d5016;
    font-size: 1.4rem;
    margin: 0;
    flex: 1;
}

.article-badges {
    display: flex;
    gap: 0.5rem;
}

.article-badge {
    background: #e8f5e8;
    color: #2d5016;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.9rem;
}


   /* ===== CORRECTION PROBLÈME ESPACE BLANC ===== */
   html,
   body {
       margin: 0;
       padding: 0;
       width: 100%;
       overflow-x: hidden;
   }

   .page-content {
       background: linear-gradient(135deg, #f8fffe 0%, #e8f5e8 100%);
       min-height: 100vh;
       width: 100%;
       max-width: 100vw;
       box-sizing: border-box;
       margin: 0;
       padding: 0;
   }

   .hero-section {
       background: linear-gradient(135deg, rgba(45, 80, 22, 0.95), rgba(76, 175, 80, 0.9)),
           url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 400"><path d="M0,300 C300,200 500,350 1000,250 L1000,400 L0,400 Z" fill="rgba(255,255,255,0.1)"/></svg>');
       color: white;
       padding: 5rem 2rem;
       text-align: center;
       position: relative;
       overflow: hidden;
       margin-left: 5px;
       max-width: 100%;
       box-sizing: border-box;
   }

   .hero-content h1 {
       /* font-size: 5px; */
       font-size: 1rem;
       margin-bottom: 1.5rem;
       font-weight: 700;
       width: 100%;
       text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
       line-height: 1.1;
   }

   .hero-content p {
       font-size: 1.3rem;
       margin-bottom: 2rem;
       opacity: 0.95;
       max-width: 800px;
       margin-left: auto;
       margin-right: auto;
       line-height: 1.5;
   }

   /* ===== CORRECTION AFFICHAGE MOBILE - TEXTE ET CARTES ===== */

   /* Correction pour la section about-content sur mobile */
   @media (max-width: 767px) {
       .about-content {
           grid-template-columns: 1fr !important;
           gap: 2rem !important;
           margin-left: 0 !important;
       }
       
       .about-text {
           order: 1;
           width: 100% !important;
           max-width: 100% !important;
       }
       
       .about-features {
           order: 2;
           width: 100% !important;
       }
       
       .feature-item {
           width: 100% !important;
           margin: 0 !important;
       }
   }

   /* Correction pour les grilles de formations sur mobile */
   @media (max-width: 767px) {
       .formations-grid {
           grid-template-columns: 1fr !important;
           gap: 1.5rem !important;
       }
       
       .formation-card {
           width: 100% !important;
           margin: 0 !important;
           box-sizing: border-box !important;
       }
   }

   /* Correction pour les grilles d'articles sur mobile */
   @media (max-width: 767px) {
       .articles-grid {
           grid-template-columns: 1fr !important;
           gap: 1.5rem !important;
       }
       
       .article-card {
           width: 100% !important;
           margin: 0 !important;
           box-sizing: border-box !important;
       }
   }

   /* Correction pour la grille d'organisation sur mobile */
   @media (max-width: 767px) {
       .organization-grid {
           grid-template-columns: 1fr !important;
           gap: 1.5rem !important;
       }
       
       .org-item {
           width: 100% !important;
           margin: 0 !important;
           box-sizing: border-box !important;
       }
   }

   /* Correction pour les grilles générales sur mobile */
   @media (max-width: 767px) {
       .grid {
           grid-template-columns: 1fr !important;
           gap: 1.5rem !important;
       }
       
       .grid > * {
           width: 100% !important;
           margin: 0 !important;
           box-sizing: border-box !important;
       }
   }

   /* Correction pour les sections de contenu sur mobile */
   @media (max-width: 767px) {
       .content-section {
           padding: 2rem 1rem !important;
           margin: 0 !important;
           width: 100% !important;
           box-sizing: border-box !important;
       }
       
       .content-grid {
           grid-template-columns: 1fr !important;
           gap: 2rem !important;
           margin-bottom: 2rem !important;
       }
       
       .content-card {
           width: 100% !important;
           margin: 0 !important;
           box-sizing: border-box !important;
           padding: 1.5rem !important;
       }
   }

   /* Correction pour les cartes de fonctionnalités sur mobile */
   @media (max-width: 767px) {
       .feature-item {
           flex-direction: column !important;
           text-align: center !important;
           padding: 1.5rem 1rem !important;
           gap: 1rem !important;
       }
       
       .feature-item i {
           margin-bottom: 0.5rem !important;
       }
   }

   /* Correction pour les statistiques sur mobile */
   @media (max-width: 767px) {
       .stats-grid {
           grid-template-columns: 1fr !important;
           gap: 1.5rem !important;
           padding: 0 1rem !important;
       }
       
       .stat-item {
           width: 100% !important;
           margin: 0 !important;
           box-sizing: border-box !important;
           padding: 1.5rem 1rem !important;
       }
   }

   /* Correction pour les boutons CTA sur mobile */
   @media (max-width: 767px) {
       .cta-buttons {
           flex-direction: column !important;
           align-items: center !important;
           gap: 1rem !important;
           width: 100% !important;
       }
       
       .btn {
           width: 100% !important;
           max-width: 300px !important;
           justify-content: center !important;
           text-align: center !important;
       }
   }

   /* Correction pour les sections hero sur mobile */
   @media (max-width: 767px) {
       .hero-section {
           padding: 3rem 1rem !important;
           margin: 0 !important;
           width: 100% !important;
           box-sizing: border-box !important;
           border-radius: 0 !important;
       }
       
       .hero-content {
           padding: 0 !important;
           width: 100% !important;
           max-width: 100% !important;
       }
       
       .hero-content h1 {
           font-size: 2.5rem !important;
           line-height: 1.2 !important;
           word-wrap: break-word !important;
           overflow-wrap: break-word !important;
       }
       
       .hero-content p {
           font-size: 1.1rem !important;
           line-height: 1.5 !important;
           margin-left: 0 !important;
           margin-right: 0 !important;
           max-width: 100% !important;
       }
   }

   /* Correction pour les titres de section sur mobile */
   @media (max-width: 767px) {
       .section-title {
           font-size: 2rem !important;
           margin-bottom: 1.5rem !important;
           text-align: center !important;
           padding: 0 1rem !important;
       }
       
       .section-subtitle {
           font-size: 1.5rem !important;
           margin-bottom: 1.5rem !important;
           text-align: center !important;
           padding: 0 1rem !important;
       }
   }

   /* Correction pour les marges et paddings généraux sur mobile */
   @media (max-width: 767px) {
       .page-content {
           padding: 1rem !important;
           margin: 0 !important;
           width: 100% !important;
           box-sizing: border-box !important;
           border-radius: 0 !important;
       }
       
       .container {
           padding: 0 1rem !important;
           width: 100% !important;
           box-sizing: border-box !important;
       }
   }

   /* Correction spécifique pour les pages avec contenu en colonnes */
   @media (max-width: 767px) {
       /* Force l'empilement vertical sur toutes les grilles */
       [class*="grid"] {
           grid-template-columns: 1fr !important;
       }
       
       /* Force l'empilement vertical sur tous les flexbox */
       [class*="flex"] {
           flex-direction: column !important;
       }
       
       /* Assure que tous les éléments prennent la largeur complète */
       [class*="card"],
       [class*="item"],
       [class*="section"] {
           width: 100% !important;
           max-width: 100% !important;
           margin: 0 0 1.5rem 0 !important;
           box-sizing: border-box !important;
       }
       
       /* Supprime les marges négatives sur mobile */
       .hero-section,
       .content-section,
       .stats-section {
           margin-left: 0 !important;
           margin-right: 0 !important;
           width: 100% !important;
           box-sizing: border-box !important;
       }
   }

   /* Correction pour les très petits écrans */
   @media (max-width: 480px) {
       .page-content {
           padding: 0.5rem !important;
       }
       
       .container {
           padding: 0 0.5rem !important;
       }
       
       .hero-section {
           padding: 2rem 0.5rem !important;
       }
       
       .content-section {
           padding: 1.5rem 0.5rem !important;
       }
       
       .section-title {
           font-size: 1.8rem !important;
           padding: 0 0.5rem !important;
       }
       
       .feature-item {
           padding: 1rem 0.5rem !important;
       }
       
       .formation-card,
       .article-card,
       .content-card {
           padding: 1rem !important;
       }
   }