/* =====================================================
   EFC TUNISIE - Styles principaux (Responsive)
   ===================================================== */

/* Variables CSS */
:root {
    --primary: #1e3a5f; /* Bleu EFC */
    --primary-dark: #0f172a;
    --secondary: #2563eb;
    --accent: #dc2626; /* Rouge EFC */
    --accent-hover: #b91c1c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--gray-50);
}

.card, .admin-card, .poster-card {
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow-lg);
}

.btn {
    border-radius: 10px;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: scale(0.95);
}

.logo-icon {
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 10px rgba(30, 58, 95, 0.3);
}

/* Thème sombre */
body.theme-dark {
    --primary: #1a1a2e;
    --primary-dark: #16213e;
    --white: #1a1a2e;
    --gray-50: #16213e;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-800: #f3f4f6;
    --gray-900: #ffffff;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Images responsives - S'adaptent automatiquement */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

video {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* =====================================================
   HEADER
   ===================================================== */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.logo-title {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
    line-height: 1.2;
}

.logo-subtitle {
    display: block;
    font-size: 10px;
    color: var(--gray-500);
}

.main-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--gray-100);
    color: var(--secondary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dropdown {
    position: relative;
}

.dropdown-btn {
    padding: 8px 12px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: all 0.3s;
    white-space: nowrap;
}

.dropdown-btn:hover {
    background: var(--gray-200);
}

.user-btn {
    background: var(--secondary);
    color: white;
}

.user-btn:hover {
    background: var(--primary);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 1001;
}

[dir="rtl"] .dropdown-content {
    right: auto;
    left: 0;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: var(--gray-700);
    transition: all 0.3s;
    font-size: 14px;
}

.dropdown-content a:hover,
.dropdown-content a.active {
    background: var(--gray-100);
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gray-700);
    padding: 5px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 10px 0;
    border-top: 1px solid var(--gray-200);
}

.mobile-nav.show {
    display: flex;
}

.mobile-nav .nav-link {
    padding: 12px 15px;
    width: 100%;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary);
}

.btn-danger {
    background: var(--accent);
    color: white;
}

.btn-danger:hover {
    background: var(--accent-hover);
}

.btn-white {
    background: white;
    color: var(--accent);
}

.btn-white:hover {
    background: var(--gray-100);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-white:hover {
    background: white;
    color: var(--accent);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

/* =====================================================
   VIDEO SLIDER (Responsive)
   ===================================================== */
.video-slider {
    position: relative;
    height: 650px;
    max-height: 90vh;
    overflow: hidden;
    background: #000;
}

.slide video {
    filter: brightness(0.65) contrast(1.1);
}

.slide-content h1 {
    font-size: clamp(32px, 6vw, 68px) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    margin-bottom: 25px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: clamp(18px, 2.5vw, 26px) !important;
    border-left: 5px solid var(--accent);
    padding-left: 20px;
    font-weight: 300;
    margin-bottom: 40px;
}

.slide-overlay {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
}

.slider-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(30, 58, 95, 0.9), rgba(30, 58, 95, 0.5));
    z-index: 2;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    max-width: 600px;
    z-index: 3;
    padding: 0 15px;
}

[dir="rtl"] .slide-content {
    left: auto;
    right: 10%;
}

.slide-content h1 {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.slide-content p {
    font-size: clamp(16px, 2.5vw, 24px);
    margin-bottom: 25px;
    opacity: 0.95;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.dot:hover { background: rgba(255, 255, 255, 0.8); }
.dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 10px;
    border-color: white;
}

/* =====================================================
   STATS BAR
   ===================================================== */
.stats-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 30px 0;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    font-size: clamp(12px, 1.5vw, 16px);
    opacity: 0.9;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 40px;
}

.section-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: 20px;
}

.bg-light {
    background: var(--gray-50);
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

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

.text-white {
    color: white !important;
}

.text-danger {
    color: var(--accent);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-small {
    font-size: 13px;
}

.text-large {
    font-size: 18px;
}

.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }
.py-12 { padding: 40px 0; }

/* =====================================================
   GRID LAYOUTS (Responsive)
   ===================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

/* =====================================================
   PRESENTATION COMPACT
   ===================================================== */
.presentation-compact {
    padding: 40px 0;
    background: var(--white);
}

.compact-grid {
    gap: 30px;
    align-items: center;
}

.compact-title {
    font-size: clamp(22px, 3vw, 26px);
    margin-bottom: 15px;
}

.compact-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--gray-600);
}

.compact-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

.compact-features .feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.compact-features .feature-item i {
    font-size: 18px;
}

.compact-levels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.level-card {
    padding: 20px 15px;
    border-radius: var(--radius-lg);
    color: white;
    text-align: center;
}

.level-card h3 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: bold;
    margin-bottom: 8px;
}

.level-card p {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.4;
}

/* =====================================================
   FEATURES LIST
   ===================================================== */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
}

.feature-item i {
    font-size: 20px;
}

/* =====================================================
   SPECIALITES GRID
   ===================================================== */
.specialites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.specialite-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-200);
}

.specialite-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: var(--secondary);
}

.specialite-body {
    padding: 30px;
}

.specialite-body h3 {
    font-size: 22px;
    margin: 15px 0 10px;
}

.course-card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-lg);
}

.course-image {
    height: 180px;
}

.news-card {
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.specialite-header {
    height: 4px;
}

.specialite-body {
    padding: 20px;
}

.specialite-body h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 12px 0 8px;
    color: var(--gray-900);
}

.specialite-body p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--warning);
}

.badge-formation { background: var(--secondary); }
.badge-examen { background: var(--danger); }
.badge-stage { background: var(--success); }
.badge-autre { background: var(--gray-500); }

.link-primary {
    color: var(--secondary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.link-primary:hover {
    color: var(--primary);
}

/* =====================================================
   NEWS GRID
   ===================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
}

.news-image {
    height: 180px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 48px;
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.news-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--gray-900);
    line-height: 1.4;
}

.news-content p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* =====================================================
   POSTERS / AFFICHES (Responsive)
   ===================================================== */
.posters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.poster-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.poster-header, .poster-header-blue, .poster-header-white {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.poster-header-blue { background: #f0f9ff; }
.poster-header-white { background: #fff; }

.logo-efc {
    font-weight: bold;
    color: #1e3a5f;
    font-size: 18px;
}

.poster-title {
    font-size: 11px;
    color: #666;
}

/* Affiche 1: Niveaux */
.poster-levels .levels-columns {
    display: flex;
    flex: 1;
}

.level-col {
    flex: 1;
    padding: 15px 8px;
    text-align: center;
    font-size: 11px;
}

.level-col h3 { 
    color: white; 
    padding: 8px 5px; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    font-size: 16px;
}
.level-col.cap h3 { background: #6366f1; }
.level-col.btp h3 { background: #f59e0b; }
.level-col.bts h3 { background: #10b981; }

.level-col ul { 
    list-style: disc; 
    padding-left: 15px; 
    text-align: left; 
    margin-bottom: 15px; 
    font-size: 10px;
    line-height: 1.6;
}
.level-col .highlight { color: #dc2626; font-weight: bold; }

.badge-diplome {
    background: #1e3a5f;
    color: white;
    padding: 5px 8px;
    border-radius: 15px;
    font-size: 9px;
    font-weight: bold;
}

/* Affiche 2: Formation */
.poster-formation .poster-content-center {
    padding: 15px;
    text-align: center;
    background: #fff;
}
.poster-formation h2 { color: #1e40af; font-size: 20px; margin: 10px 0; }
.badge-bac { 
    background: #fee2e2; 
    color: #991b1b; 
    padding: 5px 10px; 
    border-radius: 5px; 
    font-size: 11px; 
    display: inline-block; 
    margin-bottom: 10px; 
    border: 1px solid #991b1b; 
}
.arabic-text { color: #1e40af; font-size: 16px; font-weight: bold; margin-top: 10px; }

.poster-formation .formations-list { padding: 15px; flex: 1; }
.form-group h4 { color: #dc2626; font-size: 16px; margin-bottom: 5px; }
.form-group small { color: #666; font-size: 11px; font-weight: normal; }
.form-group ul { list-style: disc; padding-left: 15px; font-size: 11px; color: #1e3a5f; line-height: 1.6; }
.form-group p { font-size: 11px; color: #1e3a5f; }

.poster-footer {
    background: #1e3a5f;
    color: white;
    padding: 12px;
    display: flex;
    justify-content: space-around;
    font-weight: bold;
    font-size: 12px;
}

/* Affiche 3: Inscription */
.poster-inscription { background: #1e3a5f; color: white; }
.poster-inscription .inscription-content { 
    padding: 20px 15px; 
    text-align: center; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.poster-inscription h2 { font-size: 26px; font-weight: 900; margin-bottom: 5px; }
.poster-inscription h3 { font-size: 20px; font-style: italic; margin-bottom: 20px; color: #fca5a5; }

.offers-box { background: rgba(255,255,255,0.1); padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.offers-box h4 { color: #fca5a5; margin-bottom: 10px; font-size: 14px; }
.offers-box ul { list-style: none; padding: 0; font-size: 13px; }
.offers-box li { margin-bottom: 5px; }

.contact-box { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn-contact, .btn-avenir { 
    background: #dc2626; 
    padding: 12px 10px; 
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 11px; 
    cursor: pointer;
    line-height: 1.4;
}
.btn-contact { flex: 1; min-width: 120px; }
.btn-avenir { flex: 1.5; min-width: 150px; }

/* =====================================================
   TESTIMONIALS
   ===================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.stars {
    margin-bottom: 15px;
}

.stars i {
    font-size: 18px;
}

.testimonial-text {
    font-size: 15px;
    font-style: italic;
    margin-bottom: 18px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

/* =====================================================
   CALENDAR
   ===================================================== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.calendar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}

[dir="rtl"] .calendar-card {
    border-left: none;
    border-right: 4px solid var(--accent);
}

.calendar-icon {
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 12px;
}

.calendar-card h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--gray-900);
    line-height: 1.4;
}

.calendar-date {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =====================================================
   COURSES GRID
   ===================================================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.course-card:hover {
    box-shadow: var(--shadow-lg);
}

.course-image {
    height: 150px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 48px;
}

.course-content {
    padding: 18px;
}

.course-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.course-content h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--gray-900);
    line-height: 1.4;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    font-size: 13px;
    color: var(--gray-600);
    flex-wrap: wrap;
    gap: 8px;
}

/* =====================================================
   CTA SECTION
   ===================================================== */
.cta-section {
    background: linear-gradient(135deg, var(--accent), #991b1b);
    color: white;
    padding: 60px 0;
}

.cta-section h2 {
    font-size: clamp(24px, 4vw, 42px);
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.3;
}

.cta-section p {
    font-size: clamp(16px, 2.5vw, 22px);
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* =====================================================
   FOOTER
   ===================================================== */
.main-footer {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 50px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo h3 {
    font-size: 18px;
    font-weight: bold;
}

.footer-text {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 15px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
    font-size: 16px;
}

.social-link.facebook { background: #1877f2; }
.social-link.instagram { background: #e4405f; }
.social-link.youtube { background: #ff0000; }
.social-link.linkedin { background: #0077b5; }

.social-link:hover {
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    display: inline-block;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.footer-contact i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
}

.footer-legal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.footer-legal a:hover {
    color: white;
}

/* =====================================================
   RESPONSIVE - TABLETTE (max 1024px)
   ===================================================== */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .specialites-grid,
    .news-grid,
    .testimonials-grid,
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .poster-card:last-child {
        grid-column: 1 / -1;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compact-levels {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================================================
   RESPONSIVE - MOBILE (max 768px)
   ===================================================== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .video-slider {
        height: 400px;
    }
    
    .slide-content {
        left: 5%;
        right: 5%;
        max-width: 100%;
    }
    
    [dir="rtl"] .slide-content {
        right: 5%;
        left: 5%;
    }
    
    .slide-content h1 {
        font-size: 26px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .slider-btn.prev { left: 10px; }
    .slider-btn.next { right: 10px; }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .specialites-grid,
    .news-grid,
    .testimonials-grid,
    .courses-grid,
    .calendar-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .posters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .poster-card {
        min-height: auto;
    }
    
    .poster-card:last-child {
        grid-column: auto;
        max-width: 100%;
    }
    
    .poster-levels .levels-columns {
        flex-direction: column;
    }
    
    .level-col {
        padding: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .compact-levels {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .compact-features {
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .news-image {
        height: 150px;
    }
    
    .course-image {
        height: 120px;
    }
    
    .header-controls .dropdown-btn span {
        display: none;
    }
    
    .logo-text {
        display: none;
    }
}

/* =====================================================
   RESPONSIVE - PETIT MOBILE (max 480px)
   ===================================================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .video-slider {
        height: 350px;
    }
    
    .slide-content h1 {
        font-size: 22px;
    }
    
    .slide-content p {
        font-size: 14px;
        margin-bottom: 18px;
    }
    
    .stats-bar {
        padding: 20px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .poster-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .contact-box {
        flex-direction: column;
    }
    
    .btn-contact, .btn-avenir {
        width: 100%;
    }
    
    .form-group ul {
        font-size: 10px;
    }
}

/* =====================================================
   UTILITAIRES
   ===================================================== */
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }

/* =====================================================
   RESPONSIVE GLOBAL - CORRECTIONS FINALES
   ===================================================== */

/* Empêcher le débordement horizontal sur tous les écrans */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Tous les tableaux scrollent horizontalement */
.admin-card, .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Input/Select ne dépassent jamais leur conteneur */
input, select, textarea, button {
    max-width: 100%;
    box-sizing: border-box;
}

/* Grilles sur tablette */
@media (max-width: 1024px) {
    .container {
        padding: 0 12px;
    }
    .header-content {
        padding: 8px 0;
    }
    .logo-text .logo-subtitle {
        display: none;
    }
}

/* Grilles sur mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    /* Forcer les affiches en 1 colonne sur mobile */
    .posters-grid {
        grid-template-columns: 1fr !important;
    }

    /* Header mobile */
    .header-content {
        padding: 8px 0;
        gap: 8px;
    }
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    .logo-text {
        display: none;
    }
    .header-controls .dropdown-btn span {
        display: none;
    }
    .header-controls .dropdown-btn {
        padding: 6px 10px;
    }
    .btn.btn-primary {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Forcer les grilles en 1 colonne */
    .grid-2,
    .specialites-grid,
    .news-grid,
    .testimonials-grid,
    .courses-grid,
    .calendar-grid,
    .posters-grid,
    .affiches-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stats bar */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .stat-number {
        font-size: 24px;
    }
    .stat-label {
        font-size: 11px;
    }
    .stats-bar {
        padding: 20px 0;
    }

    /* Sections */
    .section {
        padding: 30px 0;
    }
    .section-title {
        font-size: 22px;
    }
    .section-text {
        font-size: 14px;
    }

    /* Slider */
    .video-slider {
        height: 300px;
    }
    .slide-content {
        left: 15px;
        right: 15px;
        max-width: 100%;
        padding: 0;
    }
    .slide-content h1 {
        font-size: 22px;
        margin-bottom: 10px;
    }
    .slide-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    .slide-content .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    .slider-btn.prev { left: 8px; }
    .slider-btn.next { right: 8px; }
    .slider-dots {
        bottom: 15px;
    }

    /* Presentation compacte */
    .compact-levels {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    .compact-features {
        flex-direction: column;
    }

    /* Affiches/Posters */
    .poster-card {
        min-height: auto;
    }
    .poster-levels .levels-columns {
        flex-direction: column;
    }
    .poster-footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    /* CTA */
    .cta-section {
        padding: 40px 0;
    }
    .cta-section h2 {
        font-size: 22px;
    }
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Footer */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .footer-legal {
        justify-content: center;
    }

    /* Bouton retour en haut */
    #backToTop {
        bottom: 15px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
    }
}

/* Très petit écran */
@media (max-width: 360px) {
    .video-slider {
        height: 250px;
    }
    .slide-content h1 {
        font-size: 18px;
    }
    .slide-content p {
        font-size: 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .header-controls {
        gap: 4px;
    }
}

/* =====================================================
   THÈME SOMBRE - Améliorations
   ===================================================== */
body.theme-dark {
    background-color: #0f172a;
    color: #e2e8f0;
}
body.theme-dark .main-header {
    background: #1e293b;
    border-color: #ef4444;
}
body.theme-dark .nav-link {
    color: #94a3b8;
}
body.theme-dark .nav-link:hover,
body.theme-dark .nav-link.active {
    background: #334155;
    color: #fff;
}
body.theme-dark .dropdown-content {
    background: #1e293b;
    border-color: #334155;
}
body.theme-dark .dropdown-content a {
    color: #cbd5e1;
}
body.theme-dark .dropdown-content a:hover {
    background: #334155;
}
body.theme-dark .section {
    background: #0f172a;
}
body.theme-dark .bg-light {
    background: #1e293b;
}
body.theme-dark .specialite-card,
body.theme-dark .news-card,
body.theme-dark .course-card,
body.theme-dark .calendar-card {
    background: #1e293b;
    border: 1px solid #334155;
}
body.theme-dark .section-title {
    color: #f1f5f9;
}
body.theme-dark .specialite-body h3,
body.theme-dark .news-content h3,
body.theme-dark .course-content h3,
body.theme-dark .calendar-card h3 {
    color: #f1f5f9;
}
body.theme-dark .specialite-body p,
body.theme-dark .news-content p,
body.theme-dark .calendar-date {
    color: #94a3b8;
}
body.theme-dark .poster-card {
    background: #1e293b;
    border: 1px solid #334155;
}
body.theme-dark .main-footer {
    background: #020617;
}

/* Impression globale */
@media print {
    .main-header, .main-footer, #backToTop, #toast-container, .mobile-menu-btn, .mobile-nav, #poster-overlay {
        display: none !important;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .section, .bg-light, .bg-primary {
        background: #fff !important;
        color: #000 !important;
    }
}

/* =====================================================
   ANIMATIONS - Scroll fade-in
   ===================================================== */
.anim-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* =====================================================
   HOVER ANIMATIONS - Témoignages
   ===================================================== */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}
.testimonial-card:hover .author-avatar {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.author-avatar {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
}
.testimonial-card:hover .stars i {
    animation: star-pulse 0.5s ease forwards;
}
@keyframes star-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.stars i {
    transition: transform 0.3s ease;
    display: inline-block;
}
.testimonial-card:hover .testimonial-text {
    color: #ffffff;
}
.testimonial-text {
    transition: color 0.3s ease;
}

/* =====================================================
   HOVER ANIMATIONS - Cards génériques
   ===================================================== */
.specialite-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.specialite-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.news-card:hover .news-image img {
    transform: scale(1.05);
}
.news-image img {
    transition: transform 0.5s ease;
}

.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.calendar-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.calendar-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-left-color: var(--secondary);
}

/* =====================================================
   HOVER ANIMATIONS - Affiches (avant zoom)
   ===================================================== */
.poster-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), 
                box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
}
.poster-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.poster-card::after {
    content: '🔍 Cliquer pour agrandir';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    text-align: center;
    padding: 20px 10px 10px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 12px 12px;
    pointer-events: none;
}
.poster-card:hover::after {
    opacity: 1;
}

/* =====================================================
   POSTER ZOOM OVERLAY (Lightbox)
   ===================================================== */
#poster-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}
#poster-overlay.poster-overlay-show {
    display: flex;
    animation: overlay-fadein 0.3s ease;
}
#poster-overlay-content {
    max-width: 700px;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
    cursor: default;
    animation: poster-zoomin 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#poster-overlay-content .poster-card {
    cursor: default;
    transform: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 0;
    min-height: auto;
}
#poster-overlay-content .poster-card::after {
    display: none;
}
#poster-overlay-content .poster-card:hover {
    transform: none;
}

@keyframes overlay-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes poster-zoomin {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =====================================================
   HOVER ANIMATIONS - Stats bar
   ===================================================== */
.stat-item {
    transition: transform 0.3s ease;
}
.stat-item:hover {
    transform: scale(1.05);
}
.stat-item:hover .stat-number {
    color: var(--accent);
}
.stat-number {
    transition: color 0.3s ease;
}

/* =====================================================
   HOVER ANIMATIONS - Level cards
   ===================================================== */
.level-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.level-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   HOVER ANIMATIONS - Feature items
   ===================================================== */
.feature-item {
    transition: transform 0.3s ease, color 0.3s ease;
}
.feature-item:hover {
    transform: translateX(8px);
}
.feature-item:hover i {
    transform: scale(1.2);
}
.feature-item i {
    transition: transform 0.3s ease;
}

/* =====================================================
   CTA SECTION ANIMATION
   ===================================================== */
.cta-section {
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: cta-glow 8s linear infinite;
}
@keyframes cta-glow {
    0% { transform: translate(0, 0); }
    50% { transform: translate(30px, 20px); }
    100% { transform: translate(0, 0); }
}

/* =====================================================
   PARALLAX SUPPORT
   ===================================================== */
.video-slider {
    will-change: transform;
}

/* =====================================================
   MOBILE: Réduire les animations
   ===================================================== */
@media (max-width: 768px) {
    .poster-card::after {
        display: none;
    }
    #poster-overlay {
        padding: 15px;
    }
    #poster-overlay-content {
        max-width: 100%;
    }
    .testimonial-card:hover {
        transform: translateY(-4px);
    }
}

/* Animation bouton préinscription header */
@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Réduire les animations si l'utilisateur préfère */
@media (prefers-reduced-motion: reduce) {
    .anim-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .testimonial-card, .specialite-card, .news-card, .course-card,
    .calendar-card, .poster-card, .stat-item, .level-card, .feature-item {
        transition: none !important;
    }
    .poster-card::after {
        display: none !important;
    }
    .cta-section::before {
        animation: none !important;
    }
    @keyframes star-pulse { 0%, 100% { transform: none; } }
}
