/* ===== VARIABLES CSS ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --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-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* ===== UTILITIES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.highlight {
    color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-800);
    border-color: var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--white);
    border-bottom-color: var(--gray-200);
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text strong {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-title .highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== FORMATIONS SECTION ===== */
.formations {
    padding: 6rem 0;
    background: var(--gray-50);
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.formation-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.formation-card.featured {
    border-color: var(--primary);
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.03), var(--white));
}

.formation-card .badge {
    position: absolute;
    top: -12px;
    right: 1.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.formation-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.formation-card.featured .formation-icon {
    background: rgba(37, 99, 235, 0.1);
}

.formation-card h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.formation-card > p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.formation-features {
    margin-bottom: 2rem;
}

.formation-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.formation-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 600;
}

/* ===== AVANTAGES SECTION ===== */
.avantages {
    padding: 4rem 0;
    background: var(--primary);
}

.avantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.avantage-item {
    text-align: center;
    padding: 1.5rem;
}

.avantage-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.avantage-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.avantage-item p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ===== TARIFS SECTION ===== */
.tarifs {
    padding: 6rem 0;
    background: var(--white);
}

.tarifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tarif-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.tarif-card:hover {
    border-color: var(--gray-300);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tarif-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
}

.tarif-card.featured:hover {
    transform: scale(1.02) translateY(-4px);
}

.tarif-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--gray-900);
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tarif-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.tarif-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.tarif-price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
}

.tarif-price .price {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.tarif-price .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.tarif-features {
    margin-bottom: 2rem;
}

.tarif-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}

.tarif-features li:last-child {
    border-bottom: none;
}

.tarif-features .check {
    color: var(--success);
    font-weight: 600;
}

.tarifs-note {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.tarifs-note p {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.tarifs-note p + p {
    margin-top: 0.5rem;
}

/* ===== TEMOIGNAGES SECTION ===== */
.temoignages {
    padding: 6rem 0;
    background: var(--gray-50);
    overflow: hidden;
}

.temoignages-slider {
    position: relative;
    max-width: 100%;
}

.temoignages-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
}

.temoignage-card {
    flex: 0 0 calc(33.333% - 1.33rem);
    min-width: 320px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.temoignage-stars {
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.temoignage-text {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.temoignage-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 50%;
}

.author-info strong {
    display: block;
    color: var(--gray-900);
    font-size: 1rem;
}

.author-info span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.slider-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    background: var(--gray-300);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 9999px;
}

/* ===== GALERIE SECTION ===== */
.galerie {
    padding: 6rem 0;
    background: var(--white);
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 1rem;
}

.galerie-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.galerie-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.galerie-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.galerie-placeholder:hover {
    transform: scale(1.02);
}

.galerie-placeholder span {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.galerie-placeholder p {
    font-size: 1rem;
    font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 6rem 0;
    background: var(--gray-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
}

.contact-info > p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius);
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}

.contact-item strong {
    display: block;
    color: var(--gray-900);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

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

.contact-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== MAP SECTION ===== */
.map-section {
    height: 400px;
    background: var(--gray-200);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.map-content {
    text-align: center;
    padding: 2rem;
}

.map-content span {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.map-content p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.map-content .btn {
    margin-top: 1rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-800);
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand > p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

.footer-bottom p + p {
    margin-top: 0.5rem;
}

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

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* Desktop (1200px - 1400px) */
@media (max-width: 1200px) {
    .tarifs-grid {
        gap: 1.5rem;
    }

    .tarif-card.featured {
        transform: scale(1);
    }

    .tarif-card.featured:hover {
        transform: translateY(-4px);
    }
}

/* Small Desktop / Large Tablet (1024px) */
@media (max-width: 1024px) {
    .hero-stats {
        gap: 2.5rem;
    }

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

    .galerie-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 180px);
    }

    .galerie-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

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

/* Tablet (768px - 1024px) */
@media (max-width: 900px) {
    .tarifs-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }

    .tarif-card {
        padding: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .contact-info .section-title {
        text-align: center;
    }

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

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Mobile Landscape / Small Tablet (768px) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: var(--shadow-xl);
        transition: var(--transition);
        overflow-y: auto;
    }

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

    .nav-link {
        width: 100%;
        padding: 1rem;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero */
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Sections */
    .section-header {
        margin-bottom: 3rem;
    }

    .section-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Formations */
    .formations-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .formation-card {
        padding: 2rem 1.5rem;
    }

    /* Avantages */
    .avantages-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .avantage-item {
        padding: 1rem;
    }

    .avantage-item h4 {
        font-size: 0.9375rem;
    }

    .avantage-item p {
        font-size: 0.8125rem;
    }

    /* Témoignages */
    .temoignage-card {
        flex: 0 0 100%;
        min-width: 100%;
        padding: 1.5rem;
    }

    .temoignage-text {
        font-size: 0.9375rem;
    }

    .slider-controls {
        gap: 1rem;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Galerie */
    .galerie-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 150px);
        gap: 0.75rem;
    }

    .galerie-item.large {
        grid-column: span 2;
        grid-row: span 1;
        height: 150px;
    }

    .galerie-item {
        height: 150px;
    }

    .galerie-overlay {
        opacity: 1;
        background: rgba(15, 23, 42, 0.4);
    }

    .galerie-icon {
        font-size: 1.5rem;
    }

    .galerie-count {
        font-size: 0.75rem;
    }

    /* Contact */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Map */
    .map-section {
        height: 300px;
    }

    .map-content span {
        font-size: 3rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand {
        margin-bottom: 1rem;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    .footer-links {
        padding: 0 1rem;
    }

    .footer-links h4 {
        margin-bottom: 1rem;
    }

    .footer-links ul {
        gap: 0.5rem;
    }
}

/* Mobile Portrait (576px) */
@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    /* Hero */
    .hero-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .stat {
        flex: 0 0 calc(50% - 0.5rem);
        padding: 0.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Sections padding */
    .formations,
    .tarifs,
    .temoignages,
    .galerie,
    .contact {
        padding: 3rem 0;
    }

    .avantages {
        padding: 2.5rem 0;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    /* Cards */
    .formation-card,
    .tarif-card {
        padding: 1.5rem 1.25rem;
    }

    .tarif-price .price {
        font-size: 2.5rem;
    }

    .tarif-price .currency {
        font-size: 1.25rem;
    }

    /* Contact form */
    .contact-form-wrapper {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Tarifs note */
    .tarifs-note {
        padding: 1.25rem;
    }

    .tarifs-note p {
        font-size: 0.8125rem;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    /* Typography */
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9375rem;
    }

    /* Hero stats - vertical on very small screens */
    .hero-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        text-align: left;
        margin-top: 0;
    }

    /* Galerie - single column */
    .galerie-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .galerie-item,
    .galerie-item.large {
        grid-column: span 1;
        grid-row: span 1;
        height: 180px;
    }

    /* Avantages - single column */
    .avantages-grid {
        grid-template-columns: 1fr;
    }

    .avantage-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        padding: 1rem;
    }

    .avantage-icon {
        margin: 0;
        flex-shrink: 0;
    }

    .avantage-item h4 {
        margin-bottom: 0.25rem;
    }

    /* Footer */
    .footer-bottom {
        font-size: 0.75rem;
    }

    .footer-bottom p + p {
        margin-top: 0.25rem;
    }
}

/* Extra Small Mobile (360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .formation-card,
    .tarif-card {
        padding: 1.25rem 1rem;
    }

    .tarif-header h3 {
        font-size: 1.125rem;
    }

    .tarif-price .price {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.25rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .slider-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Show gallery overlay on touch devices */
    .galerie-overlay {
        opacity: 1;
        background: rgba(15, 23, 42, 0.3);
    }

    /* Remove hover effects that don't work on touch */
    .formation-card:hover,
    .tarif-card:hover {
        transform: none;
    }

    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-outline:hover {
        transform: none;
    }

    /* Active states for touch */
    .btn:active {
        transform: scale(0.98);
    }

    .formation-card:active,
    .tarif-card:active {
        transform: scale(0.99);
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 0 3rem;
    }

    .hero-stats {
        margin-bottom: 1.5rem;
    }

    .scroll-indicator {
        display: none;
    }

    .modal {
        max-height: 95vh;
    }

    .lightbox-image-container {
        max-height: 50vh;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .slider-controls,
    .contact-form,
    .map-section,
    .galerie-overlay {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem;
        background: var(--gray-100) !important;
        color: var(--gray-900) !important;
    }

    .hero-title,
    .hero-title .highlight {
        color: var(--gray-900) !important;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Reduced motion preference */
@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;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Form success state */
.contact-form.success {
    position: relative;
}

.contact-form.success::after {
    content: '✓ Message envoyé avec succès !';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--success);
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
}

/* ===== TARIF INFO BUTTON ===== */
.tarif-info-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.tarif-info-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.tarif-card.featured .tarif-info-btn {
    background: rgba(37, 99, 235, 0.15);
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

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

.modal {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.05), transparent);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-body {
    padding: 2rem;
}

.modal-intro {
    font-size: 1.0625rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.modal-list li .icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.modal-list li strong {
    color: var(--gray-900);
}

.modal-steps {
    display: flex;
    gap: 1rem;
}

.modal-steps .step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.modal-steps .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.modal-steps .step p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.modal-steps .step strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.modal-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.modal-features .feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.modal-features .feature span {
    font-size: 1.5rem;
}

.modal-features .feature p {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.modal-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.modal-benefits .benefit {
    text-align: center;
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.modal-benefits .benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.modal-benefits .benefit h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.modal-benefits .benefit p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.modal-conditions {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius);
}

.modal-conditions li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.modal-conditions li:last-child {
    margin-bottom: 0;
}

.modal-conditions li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.modal-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius);
}

.modal-info.highlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border-color: rgba(245, 158, 11, 0.3);
}

.modal-info .info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-info p {
    font-size: 0.9375rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
}

/* ===== GALERIE OVERLAY ===== */
.galerie-item {
    cursor: pointer;
}

.galerie-placeholder {
    position: relative;
}

.galerie-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.galerie-item:hover .galerie-overlay {
    opacity: 1;
}

.galerie-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.galerie-count {
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* ===== LIGHTBOX STYLES ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 1rem;
    gap: 1rem;
}

.lightbox-nav {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

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

.lightbox-main {
    flex: 1;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lightbox-image-container {
    width: 100%;
    aspect-ratio: 16/10;
    max-height: 60vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 4rem;
}

.lightbox-image p {
    font-size: 1.25rem;
    margin-top: 1rem;
    font-weight: 500;
}

.lightbox-info {
    text-align: center;
    color: var(--white);
}

.lightbox-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    font-size: 1rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.lightbox-counter {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.lightbox-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
    flex-shrink: 0;
    border: 2px solid transparent;
}

.lightbox-thumb:hover {
    opacity: 0.8;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

.lightbox-thumb-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== MODAL & LIGHTBOX RESPONSIVE ===== */

/* Tablet */
@media (max-width: 900px) {
    .modal {
        max-width: 95%;
    }

    .modal-benefits {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .modal-benefits .benefit {
        padding: 1rem 0.75rem;
    }

    .modal-benefits .benefit-icon {
        font-size: 1.5rem;
    }

    .modal-benefits .benefit h5 {
        font-size: 0.8125rem;
    }

    .modal-benefits .benefit p {
        font-size: 0.75rem;
    }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .modal {
        max-height: 90vh;
        max-height: 90dvh;
        margin: 0;
        border-radius: var(--radius-lg);
    }

    .modal-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .modal-icon {
        font-size: 2.5rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-price {
        font-size: 1.75rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-intro {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .modal-section {
        margin-bottom: 1.5rem;
    }

    .modal-section h4 {
        font-size: 1rem;
    }

    .modal-list li {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .modal-list li .icon {
        font-size: 1.125rem;
    }

    .modal-steps {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-steps .step {
        padding: 0.875rem;
    }

    .modal-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-features .feature {
        padding: 0.875rem;
    }

    .modal-benefits {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-benefits .benefit {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        padding: 1rem;
    }

    .modal-benefits .benefit-icon {
        font-size: 2rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .modal-conditions {
        padding: 1rem;
    }

    .modal-conditions li {
        font-size: 0.875rem;
    }

    .modal-info {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-info p {
        font-size: 0.875rem;
    }

    .modal-footer {
        padding: 1rem 1.5rem 1.5rem;
    }

    /* Lightbox */
    .lightbox-close {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .lightbox-content {
        padding: 4rem 0.5rem 0.5rem;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .lightbox-main {
        gap: 1rem;
    }

    .lightbox-image-container {
        aspect-ratio: 4/3;
        max-height: 50vh;
    }

    .lightbox-image {
        font-size: 3rem;
    }

    .lightbox-image p {
        font-size: 1rem;
    }

    .lightbox-info h3 {
        font-size: 1.25rem;
    }

    .lightbox-info p {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .lightbox-thumbnails {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .lightbox-thumb {
        width: 60px;
        height: 45px;
    }

    .lightbox-thumb-inner {
        font-size: 1.25rem;
    }
}

/* Mobile Portrait */
@media (max-width: 576px) {
    .modal-overlay {
        padding: 0;
        align-items: stretch;
    }

    .modal {
        max-height: 100vh;
        max-height: 100dvh;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .modal-header {
        padding: 1.5rem 1rem 1rem;
    }

    .modal-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 1px solid var(--gray-200);
    }

    /* Lightbox */
    .lightbox-content {
        flex-direction: column;
        padding: 3.5rem 0.5rem 0.5rem;
        gap: 0.5rem;
    }

    .lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.6);
        font-size: 1rem;
        z-index: 5;
    }

    .lightbox-nav.prev {
        left: 0.5rem;
    }

    .lightbox-nav.next {
        right: 0.5rem;
    }

    .lightbox-main {
        width: 100%;
        padding: 0 2.5rem;
        gap: 0.75rem;
    }

    .lightbox-image-container {
        aspect-ratio: 1/1;
        max-height: 45vh;
    }

    .lightbox-image {
        font-size: 2.5rem;
    }

    .lightbox-image p {
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }

    .lightbox-info {
        padding: 0 1rem;
    }

    .lightbox-info h3 {
        font-size: 1.125rem;
    }

    .lightbox-info p {
        font-size: 0.8125rem;
    }

    .lightbox-counter {
        font-size: 0.75rem;
    }

    .lightbox-thumbnails {
        padding: 0.5rem;
        gap: 0.375rem;
    }

    .lightbox-thumb {
        width: 50px;
        height: 38px;
    }

    .lightbox-thumb-inner {
        font-size: 1rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .modal-header h3 {
        font-size: 1.125rem;
    }

    .modal-price {
        font-size: 1.5rem;
    }

    .modal-list li {
        flex-direction: column;
        gap: 0.5rem;
    }

    .lightbox-main {
        padding: 0 2rem;
    }

    .lightbox-thumb {
        width: 44px;
        height: 33px;
    }
}

/* Touch devices - modal & lightbox */
@media (hover: none) and (pointer: coarse) {
    .modal-close,
    .lightbox-close,
    .lightbox-nav {
        min-width: 44px;
        min-height: 44px;
    }

    .lightbox-thumb {
        min-width: 50px;
        min-height: 40px;
    }
}

/* Landscape on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-overlay {
        padding: 0.5rem;
    }

    .modal {
        max-height: 95vh;
        max-height: 95dvh;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .modal-body {
        padding: 1rem 1.5rem;
    }

    .lightbox-content {
        padding: 1rem;
    }

    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .lightbox-image-container {
        max-height: 55vh;
    }

    .lightbox-thumbnails {
        display: none;
    }

    .lightbox-info {
        display: none;
    }
}
