/* ========================================
   VARIABLES CSS - LIGHT & DARK MODE (PREMIUM)
======================================== */
:root {
    /* Light Mode - Élégant et lumineux */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7FAFC;
    --bg-tertiary: #EDF2F7;
    --text-primary: #1A202C;
    --text-secondary: #2D3748;
    --text-muted: #718096;
    --accent-color: #2B6CB0;
    --accent-hover: #2C5282;
    --accent-light: #4299E1;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --overlay: rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

[data-theme="dark"] {
    /* Dark Mode - Profond et élégant */
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --bg-tertiary: #21262D;
    --text-primary: #F0F6FC;
    --text-secondary: #C9D1D9;
    --text-muted: #8B949E;
    --accent-color: #58A6FF;
    --accent-hover: #79C0FF;
    --accent-light: #A5D6FF;
    --border-color: #30363D;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --overlay: rgba(0, 0, 0, 0.7);
}

/* ========================================
   RESET & BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

/* ========================================
   CONTAINER & LAYOUT
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* ========================================
   HEADER
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .header {
    background-color: rgba(13, 17, 23, 0.9);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
    border-radius: 60%;
    -webkit-border-radius: 60%;
    -moz-border-radius: 60%;
    -ms-border-radius: 60%;
    -o-border-radius: 60%;
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

/* Navigation */
.nav {
    display: block;
    position: static;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.theme-toggle:hover::before {
    opacity: 0.1;
}

.theme-icon {
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: scale(0.5) rotate(180deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: scale(0.5) rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-normal);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    margin-right: 0.5rem;
    transition: transform var(--transition-normal);
}

.btn:hover .btn-icon {
    transform: scale(1.1);
}

/* Animation spéciale pour les flèches */
.btn-icon-animated {
    animation: arrowPulse 2s ease-in-out infinite;
}

.btn:hover .btn-icon-animated {
    animation: arrowBounce 0.6s ease-in-out infinite alternate;
    transform: translateX(3px) scale(1.1);
}

@keyframes arrowPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes arrowBounce {
    0% { 
        transform: translateX(0) scale(1.1);
    }
    100% { 
        transform: translateX(5px) scale(1.2);
    }
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(43, 108, 176, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

[data-theme="dark"] .hero::before {
    background: radial-gradient(circle at 20% 50%, rgba(88, 166, 255, 0.15) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-title strong {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Image Container */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-secondary);
    animation: float 6s ease-in-out infinite;
}

/* Mobile responsive styles for hero image */
@media (max-width: 768px) {
    .hero-image-container {
        height: 250px;
        margin: 2rem 0;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        height: 200px;
        border-radius: 12px;
    }
}

.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

.hero-image-container:hover .hero-main-image {
    transform: scale(1.05);
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        var(--accent-color) 0%, 
        transparent 30%, 
        transparent 70%, 
        var(--accent-color) 100%
    );
    opacity: 0.1;
    transition: opacity var(--transition-normal);
}

.hero-image-container:hover .hero-image-overlay {
    opacity: 0.2;
}

/* Backup: Anciens styles placeholder */
.hero-image-placeholder {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-secondary);
    animation: float 6s ease-in-out infinite;
}

.hero-image-placeholder svg {
    width: 100%;
    height: 100%;
} 




/* ========================================
   STATS BAR
======================================== */
.stats-bar {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2.5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: var(--accent-color);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.stat-item:hover .stat-icon {
    animation: pulse 1s ease-in-out;
    background-color: var(--accent-light);
    box-shadow: 0 0 20px rgba(27, 58, 95, 0.5);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   SECTION HEADERS
======================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: expandLine 0.8s ease-out;
}

@keyframes expandLine {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

.section-header.visible .section-title::after {
    animation: expandLine 0.8s ease-out;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* ========================================
   SERVICES SECTION
======================================== */
.services {
    background-color: var(--bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    transform-style: preserve-3d;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-color: var(--accent-color);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--accent-light);
    box-shadow: 0 8px 20px rgba(27, 58, 95, 0.4);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-link {
    color: var(--accent-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.service-link:hover {
    gap: 0.75rem;
    color: var(--accent-light);
}

/* ========================================
   FORMATIONS SECTION
======================================== */
.formations {
    background-color: var(--bg-secondary);
}

.formations-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: #FFFFFF;
    border-color: var(--accent-color);
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.formation-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
}

.formation-card.hidden {
    display: none;
}

.formation-card:hover {
    box-shadow: var(--shadow-md);
}

/* Section Certification Qualiopi */
.qualiopi-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.qualiopi-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.qualiopi-text {
    flex: 1;
}

.qualiopi-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.6;
}

.qualiopi-text strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Call-to-action Qualiopi */
.qualiopi-cta {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.1), rgba(66, 153, 225, 0.05));
    border: 1px solid rgba(43, 108, 176, 0.2);
    border-radius: 8px;
    text-align: center;
}

.qualiopi-highlight {
    display: block;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    animation: shimmer 2s ease-in-out infinite;
}

.qualiopi-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

@keyframes shimmer {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.7; 
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .qualiopi-cta {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(165, 214, 255, 0.05));
    border-color: rgba(88, 166, 255, 0.2);
}

.qualiopi-certificate {
    flex-shrink: 0;
}

.certificate-image {
    width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
    cursor: pointer;
}

.certificate-image:hover {
    transform: scale(1.05);
}

/* Responsive pour la section Qualiopi */
@media (max-width: 768px) {
    .qualiopi-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .certificate-image {
        width: 100px;
    }
}

.formation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.formation-title {
    font-size: 1.125rem;
    color: var(--text-primary);
    flex: 1;
}

.formation-badge {
    background-color: var(--accent-color);
    color: #FFFFFF;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.formation-card:hover .formation-badge {
    transform: scale(1.05);
    background-color: var(--accent-light);
    box-shadow: 0 4px 12px rgba(27, 58, 95, 0.3);
}

.formation-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.formation-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.formation-duration,
.formation-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.formation-btn {
    margin-top: auto;
}

/* ========================================
   ABOUT SECTION
======================================== */
.about {
    background-color: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-heading {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-paragraph {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.value-item svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Carrousel d'images de l'entreprise */
.company-carousel {
    width: 100%;
    height: 400px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.carousel-dot.active {
    background-color: var(--accent-color);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Flèches de navigation - Positionnées à l'extérieur */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 2px solid var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    color: var(--accent-color);
}

.carousel-arrow:hover {
    background-color: var(--accent-color);
    color: #FFFFFF;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel-arrow-left {
    left: 10px;
}

.carousel-arrow-right {
    right: 10px;
}

/* Animation des flèches */
.carousel-arrow svg {
    transition: transform var(--transition-fast);
}

.carousel-arrow:hover svg {
    transform: scale(1.2);
}

/* Bouton d'agrandissement */
.carousel-expand {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all var(--transition-fast);
    color: white;
    opacity: 0;
}

.company-carousel:hover .carousel-expand {
    opacity: 1;
}

.carousel-expand:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

/* Lightbox pour agrandir les images */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    transition: transform var(--transition-fast);
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.lightbox-info {
    margin-top: 1rem;
    text-align: center;
}

.lightbox-info p {
    color: white;
    font-size: 1rem;
    margin: 0;
}

/* Ajustements responsive pour les flèches */
@media (max-width: 768px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-expand {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    
    .lightbox-content {
        padding: 1rem;
    }
    
    .lightbox-close {
        top: -40px;
        right: -10px;
    }
}

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-section .btn-primary {
    background-color: #FFFFFF;
    color: var(--accent-color);
    font-weight: 600;
}

.cta-section .btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact {
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

/* Contact Form */
.contact-form {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
    display: block;
}

.form-message.error {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
    display: block;
}

.form-message.loading {
    background-color: #CCE5FF;
    color: #0056B3;
    border: 1px solid #99D6FF;
    display: block;
    position: relative;
}

.form-message.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #0056B3;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Contact Info */
.contact-info-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.contact-info-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item svg {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-info-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.contact-info-value {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.contact-info-value.secondary-phone {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    position: relative;
    padding-left: 1rem;
}

.contact-info-value.secondary-phone::before {
    content: '📞';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.75rem;
    opacity: 0.7;
}

.contact-info-hours {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.contact-info-transport {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--accent-color);
    color: #FFFFFF;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 8px 16px rgba(44, 95, 141, 0.3);
}

/* ========================================
   SECTION LOCALISATION ET CARTE
======================================== */
.location-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.location-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.location-address h4 {
    color: var(--accent-color);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.transport-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transport-item {
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.transport-item-content {
    flex: 1;
}

.transport-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.transport-item-content ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.transport-item li {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.transport-item-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

.transport-item svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-color);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.transport-item:hover svg {
    fill: var(--text-primary);
    transform: scale(1.1);
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.map-container iframe {
    border-radius: 12px;
    transition: transform var(--transition-normal);
}

.map-container:hover iframe {
    transform: scale(1.02);
}

/* Responsive pour la section localisation */
@media (max-width: 968px) {
    .location-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .map-container {
        order: -1;
    }
}

@media (max-width: 768px) {
    .location-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .location-title {
        font-size: 1.25rem;
    }
    
    .transport-item {
        padding: 0.75rem;
    }
    
    .map-container iframe {
        height: 250px;
    }
}

/* ========================================
   FOOTER
======================================== */
.footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-icon {
    width: 16px;
    height: 16px;
    stroke: var(--accent-color);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.footer-links li:hover .footer-icon {
    stroke: var(--text-primary);
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-bottom p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.footer-legal a:hover .footer-icon {
    stroke: var(--accent-color);
    transform: scale(1.1);
}

.footer-legal a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--accent-color);
}

/* ========================================
   MODAL
======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-primary);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn var(--transition-normal);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 1;
}

.modal-close:hover {
    background-color: var(--bg-tertiary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2.5rem;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-list {
    list-style: none;
    padding-left: 0;
}

.modal-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--text-secondary);
}

.modal-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ========================================
   ANIMATIONS
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation de pulsation pour les icônes */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animation de flottement */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation de rotation douce */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation de gradient */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation d'entrée scale */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation de slide depuis la gauche */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de slide depuis la droite */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .services-grid,
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1.25rem;
    }

    section {
        padding: 3rem 0;
    }

    /* Navigation mobile */
    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0 2rem;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .header-actions .btn-primary {
        display: none;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .services-grid,
    .formations-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .modal-content {
        max-height: 90vh;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ========================================
   UTILITY CLASSES
======================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========================================
   CURSEUR PERSONNALISÉ
======================================== */
.custom-cursor {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    opacity: 0.5;
}

/* Masquer le curseur personnalisé sur mobile */
@media (max-width: 768px) {
    .custom-cursor,
    .cursor-follower {
        display: none;
    }
}

/* ========================================
   PARTICULES FLOTTANTES
======================================== */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 15s infinite ease-in-out;
    pointer-events: none;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    50% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0.5;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ========================================
   EFFET DE BRILLANCE SUR LES BOUTONS
======================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ========================================
   EFFET DE GLITCH SUBTIL SUR LE LOGO
======================================== */
.logo-text {
    position: relative;
}

.logo:hover .logo-text::before,
.logo:hover .logo-text::after {
    content: 'KARAN';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.logo:hover .logo-text::before {
    animation: glitch1 0.3s infinite;
    color: var(--accent-color);
    z-index: -1;
}

.logo:hover .logo-text::after {
    animation: glitch2 0.3s infinite;
    color: var(--accent-color);
    z-index: -2;
}

@keyframes glitch1 {
    0%, 100% {
        transform: translate(0);
        opacity: 0;
    }
    33% {
        transform: translate(-2px, 2px);
        opacity: 0.3;
    }
    66% {
        transform: translate(2px, -2px);
        opacity: 0.3;
    }
}

@keyframes glitch2 {
    0%, 100% {
        transform: translate(0);
        opacity: 0;
    }
    33% {
        transform: translate(2px, -2px);
        opacity: 0.2;
    }
    66% {
        transform: translate(-2px, 2px);
        opacity: 0.2;
    }
}

/* ========================================
   EFFET DE LUEUR SUR LES CARTES
======================================== */
.service-card,
.formation-card {
    position: relative;
}

.service-card::before,
.formation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, var(--accent-color), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.service-card:hover::before,
.formation-card:hover::before {
    opacity: 0.5;
    animation: rotateGlow 3s linear infinite;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   RÉFÉRENCE DE FORMATION - SOUS-CATÉGORIES
======================================== */
.formation-reference {
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 2px dashed var(--accent-color);
    border-radius: 12px;
    opacity: 0.9;
    transition: all var(--transition-normal);
}

.formation-reference:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-style: solid;
    background: linear-gradient(135deg, var(--accent-color)10, var(--accent-color)20);
}

.formation-reference .formation-badge {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.show-subcategory-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    transition: all var(--transition-normal);
}

.show-subcategory-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-light));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Animation pour l'affichage des sous-catégories */
.formation-card[data-subcategory] {
    transition: all var(--transition-normal);
}

.formation-card[data-subcategory].highlighted {
    transform: scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(var(--accent-color-rgb), 0.3);
    background: linear-gradient(135deg, var(--bg-primary), var(--accent-color)05);
}

/* État masqué pour les cartes de sous-catégorie lors du filtrage */
.formation-card[data-subcategory].subcategory-hidden {
    opacity: 0.3;
    pointer-events: none;
    transform: scale(0.98);
}

.formation-card[data-subcategory].subcategory-shown {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    animation: subcategoryReveal 0.5s ease-out;
}

@keyframes subcategoryReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Formations de sous-catégorie masquées par défaut */
.subcategory-formation {
    display: none;
    transition: all var(--transition-normal);
}

.subcategory-formation.subcategory-visible {
    display: block;
    animation: subcategoryReveal 0.6s ease-out;
}

.subcategory-formation.subcategory-shown {
    opacity: 1;
    transform: scale(1);
}

.subcategory-formation.highlighted {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 25px rgba(43, 108, 176, 0.4);
    background: linear-gradient(135deg, var(--bg-primary), rgba(43, 108, 176, 0.05));
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
======================================== */

/* Base styles already mobile-friendly, now adding adjustments */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Header */
    .header-content {
        height: 64px;
    }
    
    .logo-image {
        height: 36px;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .header-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Hero */
    .hero {
        padding: 6rem 0 4rem;
        text-align: center;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9375rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Formations */
    .formations-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-width: auto;
    }
    
    .formations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .formation-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    /* Qualiopi */
    .qualiopi-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .certificate-image {
        max-width: 200px;
    }
    
    /* About */
    .about-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-text {
        order: 2;
    }
    
    .company-carousel {
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .location-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .map-container {
        height: 250px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding: 0 1.5rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Formations */
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* About */
    .company-carousel {
        max-width: 350px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .nav {
        display: block;
    }
    
    .mobile-toggle {
        display: none;
    }
    
    .nav-list {
        gap: 1.5rem;
    }
    
    /* Hero */
    .hero {
        text-align: left;
    }
    
    .hero-content {
        flex-direction: row;
        align-items: center;
    }
    
    .hero-text {
        flex: 1;
    }
    
    .hero-image {
        flex: 0 0 45%;
        order: 2;
        max-width: none;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Formations */
    .formations-filters {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 1rem;
    }
    
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Qualiopi */
    .qualiopi-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    
    /* About */
    .about-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .about-text {
        flex: 1;
        order: 1;
    }
    
    .about-image {
        flex: 0 0 45%;
    }
    
    .company-carousel {
        max-width: none;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .location-content {
        flex-direction: row;
        gap: 2rem;
    }
    
    .location-info {
        flex: 1;
    }
    
    .map-container {
        flex: 1;
        height: 300px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        text-align: left;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Services */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Formations */
    .formations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Formations */
    .formations-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Large screens optimizations */
    .hero-content {
        align-items: center;
    }
    
    .hero-image {
        flex: 0 0 40%;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .formations-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Height-based media queries for better mobile experience */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 4rem 0 2rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Print styles */
@media print {
    .header,
    .mobile-toggle,
    .theme-toggle,
    .carousel-arrow,
    .carousel-expand,
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel-container {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .formation-card,
    .service-card {
        border: 1px solid var(--border-color);
    }
}

/* Touch devices optimizations */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
    }
    
    .nav-link {
        padding: 1.25rem 0;
    }
    
    .filter-btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    .carousel-arrow {
        width: 48px;
        height: 48px;
    }
    
    .carousel-expand {
        width: 44px;
        height: 44px;
    }
    
    .theme-toggle {
        width: 48px;
        height: 48px;
    }
    
    .mobile-toggle {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 374px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .hero-description {
        font-size: 0.875rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .formation-card,
    .service-card {
        padding: 1.25rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
}

/* Improved mobile navigation */
@media (max-width: 767.98px) {
    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition-normal);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem 2rem 2rem;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }

    .nav-link:last-child {
        border-bottom: none;
    }
}

/* Ensure proper stacking for mobile menu */
@media (max-width: 767.98px) {
    .hero {
        position: relative;
        z-index: 1;
    }
    
    .nav {
        z-index: 999;
    }
    
    .mobile-toggle {
        z-index: 1000;
    }
}

/* Landscape phone optimization */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero {
        padding: 4rem 0 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Fix for iOS Safari viewport height */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: calc(100vh - 64px);
        min-height: calc(100dvh - 64px);
    }
}

/* Prevent horizontal scroll on small screens */
@media (max-width: 575.98px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
    }
    
    .hero-actions {
        max-width: 100%;
    }
    
    .formations-filters {
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .formations-filters::-webkit-scrollbar {
        height: 4px;
    }
    
    .formations-filters::-webkit-scrollbar-track {
        background: var(--bg-tertiary);
        border-radius: 2px;
    }
    
    .formations-filters::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 2px;
    }
}

/* ========================================
   SCROLL TO TOP BUTTON
======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top svg {
    transition: transform var(--transition-fast);
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}
