/**
 * TASJILONLINE — Premium SaaS Design System
 * Inspired by Stripe, Notion, Framer, Webflow
 * Modern, clean, futuristic, professional
 */

/* =====================================================
   CSS CUSTOM PROPERTIES
   ===================================================== */
:root {
    /* Brand Colors */
    --primary-blue: #1F6DAA;
    --light-blue: #2FA7D9;
    --green: #7BC043;
    --orange: #F59E0B;
    --white: #FFFFFF;
    --dark-text: #0F172A;

    /* Semantic aliases */
    --primary-violet: #1F6DAA;
    --primary-pink: #2FA7D9;
    --primary-rose: #2FA7D9;
    --secondary-blue: #2FA7D9;
    --secondary-violet: #1F6DAA;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1F6DAA 0%, #2FA7D9 100%);
    --gradient-secondary: linear-gradient(135deg, #2FA7D9 0%, #7BC043 100%);
    --gradient-hero: linear-gradient(135deg, #0c3a5e 0%, #1F6DAA 40%, #2FA7D9 100%);
    --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #7BC043 100%);
    --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1e3a5f 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Neutral Scale */
    --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;

    /* Semantic */
    --success: #7BC043;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #2FA7D9;

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows — softer, more modern */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.10), 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 4px 24px rgba(31, 109, 170, 0.20);
    --shadow-glow-green: 0 4px 24px rgba(123, 192, 67, 0.20);
    --shadow-glow-orange: 0 4px 24px rgba(245, 158, 11, 0.20);
    --shadow-glass: 0 8px 32px rgba(15, 23, 42, 0.06);

    /* Radii */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--white);
    color: var(--dark-text);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
}

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

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

/* Selection */
::selection {
    background: rgba(31, 109, 170, 0.15);
    color: var(--primary-blue);
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   HEADER & NAVIGATION — Glassmorphism Navbar
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(31, 109, 170, 0.06);
    transition: var(--transition-normal);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 24px rgba(15, 23, 42, 0.06);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-blue);
    -webkit-text-fill-color: var(--primary-blue);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    -webkit-text-fill-color: white;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-normal);
}

.logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.08);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.nav-link {
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    color: var(--gray-500);
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    background: rgba(31, 109, 170, 0.05);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 50%;
}

.nav-cta {
    padding: 0.6rem 1.5rem;
    background: var(--gradient-primary);
    color: white !important;
    -webkit-text-fill-color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition-normal);
    box-shadow: 0 2px 12px rgba(31, 109, 170, 0.25);
    letter-spacing: -0.01em;
    margin-left: 0.5rem;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(31, 109, 170, 0.35);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2.5px;
    background: var(--dark-text);
    border-radius: 3px;
    transition: var(--transition-normal);
}

/* =====================================================
   HERO SECTION — Modern SaaS Landing
   ===================================================== */
.hero {
    min-height: 100vh;
    background: linear-gradient(165deg, #f0f7ff 0%, #edf5fc 25%, #f5faff 50%, #f0f9ff 75%, #f8fcff 100%);
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 76px;
    overflow: hidden;
}

/* Soft decorative orbs */
.hero::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(47, 167, 217, 0.10) 0%, transparent 65%);
    border-radius: 50%;
    animation: floatOrb 12s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(123, 192, 67, 0.08) 0%, transparent 65%);
    border-radius: 50%;
    animation: floatOrb 15s ease-in-out infinite reverse;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-15px, 15px) scale(0.97);
    }
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 2rem;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.75rem);
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.7s ease both;
}

.hero-content h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .subtitle {
    font-size: 0.875rem;
    color: var(--primary-blue);
    background: rgba(31, 109, 170, 0.07);
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
    animation: fadeInUp 0.7s ease 0.05s both;
    border: 1px solid rgba(31, 109, 170, 0.08);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.7s ease 0.15s both;
    line-height: 1.75;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.7s ease 0.25s both;
    flex-wrap: wrap;
}

/* =====================================================
   BUTTONS — Premium, glassy
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.925rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
    font-family: var(--font-primary);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

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

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 16px rgba(31, 109, 170, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(31, 109, 170, 0.30);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 1.5px solid rgba(31, 109, 170, 0.2);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: rgba(31, 109, 170, 0.04);
    border-color: rgba(31, 109, 170, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 16px rgba(31, 109, 170, 0.25);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(31, 109, 170, 0.30);
}

.btn-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(249, 115, 22, 0.35);
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(249, 115, 22, 0.45);
}

.btn-white {
    background: white;
    color: var(--navy, #1e3a8a);
    border: 1.5px solid rgba(30, 58, 138, 0.15);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.btn-white:hover {
    background: #f8fafc;
    border-color: rgba(30, 58, 138, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.btn-green {
    background: linear-gradient(135deg, #7BC043 0%, #6ab035 100%);
    color: white;
    box-shadow: var(--shadow-glow-green);
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 192, 67, 0.35);
}

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

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

/* Hero Image */
.hero-image {
    position: relative;
    animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-16px);
    }
}

.hero-image img {
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(31, 109, 170, 0.06);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

/* =====================================================
   SEARCH SECTION
   ===================================================== */
.search-section {
    padding: 2.5rem 0;
    background: white;
    position: relative;
    margin-top: -48px;
    z-index: 10;
}

.search-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

.search-box {
    position: relative;
    background: white;
    border-radius: 60px;
    box-shadow: var(--shadow-lg);
    overflow: visible;
    border: 1.5px solid rgba(31, 109, 170, 0.08);
    transition: var(--transition-normal);
}

.search-box:focus-within {
    border-color: rgba(31, 109, 170, 0.2);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(31, 109, 170, 0.06);
}

.search-input {
    width: 100%;
    padding: 1.25rem 4rem 1.25rem 1.75rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font-primary);
    outline: none;
    background: transparent;
    color: var(--dark-text);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.9rem;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: var(--shadow-glow);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(31, 109, 170, 0.03);
}

/* =====================================================
   SERVICES SECTION
   ===================================================== */
.services-section {
    padding: 6rem 0;
    background: var(--white);
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.25rem 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 109, 170, 0.08);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: rgba(31, 109, 170, 0.07);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.4rem;
    color: var(--primary-blue);
    transition: var(--transition-normal);
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.08) rotate(-3deg);
    box-shadow: var(--shadow-glow);
}

.service-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    color: var(--dark-text);
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

/* =====================================================
   HOW IT WORKS SECTION
   ===================================================== */
.how-section {
    padding: 6rem 0;
    background: var(--gray-50);
}

.how-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.how-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.how-step {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid rgba(15, 23, 42, 0.03);
}

.how-step:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(6px);
    border-color: rgba(31, 109, 170, 0.08);
}

.step-number {
    min-width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-glow);
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--dark-text);
}

.step-content p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

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

.how-image img {
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 1.25rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(15, 23, 42, 0.03);
}

.stat-item .stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item .stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.section-header h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =====================================================
   PRICING CAROUSEL
   ===================================================== */
.pricing-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
}

.pricing-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
}

.carousel-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 1.75rem;
    transition: transform var(--transition-slow);
}

.pricing-card {
    flex: 0 0 calc(33.333% - 1.17rem);
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 109, 170, 0.08);
}

.pricing-card.featured {
    transform: scale(1.04);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 109, 170, 0.12);
}

.pricing-card.featured::before {
    opacity: 1;
    height: 4px;
}

.pricing-card.featured:hover {
    transform: scale(1.04) translateY(-8px);
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pricing-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    -webkit-text-fill-color: var(--gray-400);
}

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

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.45rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.pricing-features li i {
    color: var(--green);
    font-size: 0.85rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: white;
    border: 1.5px solid rgba(15, 23, 42, 0.06);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text);
    font-size: 1rem;
    transition: var(--transition-normal);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-50%) scale(1.08);
    box-shadow: var(--shadow-glow);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* =====================================================
   ÉCOLES POPULAIRES
   ===================================================== */
.ecoles-section {
    padding: 6rem 0;
    background: white;
}

.ecoles-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.ecole-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ecole-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    border-color: rgba(31, 109, 170, 0.15);
}

.ecole-card-badge-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(123, 192, 67, 0.15);
    color: #7BC043;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.ecole-card-badge-top.prive {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.ecole-card-badge-top.militaire {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.ecole-card-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, 0.03);
}

.ecole-card-image img {
    height: 90px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.ecole-card:hover .ecole-card-image img {
    transform: scale(1.05);
}

.ecole-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ecole-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecole-card-subtitle {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ecole-card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ecole-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ecole-info-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ecole-info-value {
    font-size: 0.9rem;
    color: var(--gray-800);
    font-weight: 600;
}

.ecole-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ecole-tag {
    background: rgba(31, 109, 170, 0.06);
    color: var(--primary-blue);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ecole-card-service-box {
    background: rgba(31, 109, 170, 0.04);
    border: 1px solid rgba(31, 109, 170, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.ecole-card-service-box i {
    color: var(--primary-blue);
    font-size: 1rem;
}

.ecole-card-service-box span {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.ecole-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-ecole-main {
    flex-grow: 1;
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-ecole-main:hover {
    background: #19588b;
    box-shadow: 0 4px 12px rgba(31, 109, 170, 0.25);
}

.btn-ecole-fav {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-ecole-fav:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.view-all-btn {
    text-align: center;
    margin-top: 3rem;
}

/* =====================================================
   FOOTER — Premium Dark
   ===================================================== */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 5rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    color: white;
    letter-spacing: -0.01em;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 2.5px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.footer-section p {
    color: var(--gray-400);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
    color: var(--gray-300);
    font-size: 0.9rem;
}

.footer-contact-item i {
    width: 36px;
    height: 36px;
    background: rgba(47, 167, 217, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-blue);
    font-size: 0.9rem;
    flex-shrink: 0;
}

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

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--light-blue);
    padding-left: 4px;
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    font-family: var(--font-primary);
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.footer-form input:focus,
.footer-form textarea:focus {
    outline: none;
    border-color: rgba(47, 167, 217, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(47, 167, 217, 0.1);
}

.footer-form textarea {
    min-height: 90px;
    resize: vertical;
}

.footer-bottom {
    max-width: 1280px;
    margin: 3rem auto 0;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* =====================================================
   PAGE HEADER (Écoles, Concours, etc.)
   ===================================================== */
.page-header {
    background: var(--gradient-hero);
    padding: 8rem 2rem 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(123, 192, 67, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
    color: white;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

/* Écoles Page */
.ecoles-page {
    padding: 4rem 0;
    background: var(--gray-50);
}

.ecoles-filter {
    max-width: 1280px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    background: white;
    border: 1.5px solid rgba(15, 23, 42, 0.06);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-normal);
    font-weight: 500;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    color: var(--gray-600);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

/* =====================================================
   MODAL / FORMULAIRE — Glassmorphic
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

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

.modal {
    background: white;
    border-radius: var(--border-radius-xl);
    max-width: 600px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.92) translateY(16px);
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.modal-close {
    width: 38px;
    height: 38px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 1.2rem;
    color: var(--gray-500);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

/* Form Controls — Modern, clean */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 0.925rem;
    transition: var(--transition-fast);
    background: white;
    color: var(--dark-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(31, 109, 170, 0.08);
}

.form-control::placeholder {
    color: var(--gray-400);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

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

/* =====================================================
   CONCOURS
   ===================================================== */
.concours-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.concours-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

.concours-card {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 2.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    cursor: pointer;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.concours-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 109, 170, 0.08);
}

.concours-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto 1rem;
}

.concours-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.concours-card p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.pdf-list {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.pdf-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.pdf-item:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(31, 109, 170, 0.06);
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pdf-icon {
    width: 46px;
    height: 46px;
    background: rgba(239, 68, 68, 0.07);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    font-size: 1.3rem;
}

.pdf-meta h4 {
    margin-bottom: 0.15rem;
    font-size: 0.95rem;
}

.pdf-meta span {
    color: var(--gray-400);
    font-size: 0.8rem;
}

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

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 2.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 109, 170, 0.06);
}

.contact-card-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-glow);
}

.contact-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.contact-card p {
    color: var(--gray-500);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: #25D366;
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-normal);
    font-size: 0.9rem;
    box-shadow: 0 3px 16px rgba(37, 211, 102, 0.25);
}

.whatsapp-btn:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.3);
}

.email-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-normal);
    font-size: 0.9rem;
    box-shadow: var(--shadow-glow);
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(31, 109, 170, 0.3);
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(123, 192, 67, 0.08);
    border: 1px solid rgba(123, 192, 67, 0.2);
    color: #3d6b16;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

/* =====================================================
   MOBILE NAVIGATION DRAWER
   ===================================================== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Hamburger → X animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

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

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

/* --- Touch-friendly baseline (applied at all sizes) --- */
.btn,
.filter-btn,
.nav-cta,
.whatsapp-btn,
.email-btn,
.btn-ecole-main,
.declare-btn {
    min-height: 44px;
}

.form-control,
select.form-control,
textarea.form-control {
    min-height: 44px;
}

/* ---------- Tablet Landscape (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        margin: 0 auto 2.5rem;
    }

    .hero-image {
        display: none;
    }

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

    .pricing-card {
        flex: 0 0 calc(50% - 0.875rem);
    }

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

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

    .how-container {
        grid-template-columns: 1fr;
    }

    .how-image {
        order: -1;
    }
}

/* ---------- Tablet Portrait / Large Phones (≤ 768px) ---------- */
@media (max-width: 768px) {
    /* Header */
    .header-container {
        height: 64px;
        padding: 0 1rem;
    }

    .nav-desktop {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        background: white;
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        box-shadow: -8px 0 30px rgba(15, 23, 42, 0.12);
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-desktop.mobile-open {
        display: flex;
        transform: translateX(0);
    }

    .nav-desktop .nav-link {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--gray-100);
        border-radius: 0;
        width: 100%;
    }

    .nav-desktop .nav-link::after {
        display: none;
    }

    .nav-desktop .nav-cta {
        margin: 1rem 0 0;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    /* Hero */
    .hero {
        padding-top: 64px;
        min-height: auto;
    }

    .hero-container {
        padding: 3rem 1.25rem;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    /* Pricing */
    .pricing-card {
        flex: 0 0 100%;
    }

    .pricing-carousel {
        padding: 0 1.25rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn.prev { left: -4px; }
    .carousel-btn.next { right: -4px; }

    /* Page Header */
    .page-header {
        padding: 5.5rem 1.25rem 2.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

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

    /* Modal */
    .modal {
        width: 96%;
        max-height: 92vh;
        border-radius: 16px;
    }

    .modal-header {
        padding: 1.25rem 1.25rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    /* Grids */
    .ecoles-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .concours-grid {
        padding: 0 1rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    /* Section spacing */
    .services-section,
    .how-section,
    .pricing-section,
    .ecoles-section {
        padding: 3.5rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }

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

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1.25rem;
    }

    .footer-bottom {
        padding: 1.25rem 1rem 0;
    }

    /* Search */
    .search-container {
        padding: 0 1rem;
    }

    .search-input {
        padding: 1rem 3.5rem 1rem 1.25rem;
        font-size: 0.925rem;
    }

    .search-btn {
        width: 40px;
        height: 40px;
    }

    /* PDF list */
    .pdf-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Ecoles filter */
    .ecoles-filter {
        padding: 0 1rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Stats row */
    .stats-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem 1.25rem;
        min-width: 120px;
    }
}

/* ---------- Small Tablet (≤ 640px) ---------- */
@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .service-card {
        padding: 1.5rem 1rem;
    }

    .stats-row {
        flex-direction: column;
        align-items: center;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .section-header p {
        font-size: 0.925rem;
    }

    .how-step {
        padding: 1rem;
    }
}

/* ---------- Smartphone (≤ 480px) ---------- */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 1.7rem;
    }

    .hero-content .subtitle {
        font-size: 0.78rem;
    }

    .page-header {
        padding: 5rem 1rem 2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Pricing */
    .pricing-card {
        padding: 1.5rem;
    }

    .pricing-card .price {
        font-size: 2.25rem;
    }

    /* Ecole cards */
    .ecole-card-content {
        padding: 1rem;
    }

    .ecole-card-info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Contact */
    .contact-card {
        padding: 1.5rem;
    }

    .contact-card-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }

    /* Concours */
    .concours-grid {
        grid-template-columns: 1fr;
    }

    .concours-card {
        padding: 1.5rem;
    }

    /* Footer */
    .footer-form input,
    .footer-form textarea {
        font-size: 16px; /* prevent iOS zoom */
    }

    /* Stat items */
    .stat-item .stat-number {
        font-size: 1.5rem;
    }

    .stat-item .stat-label {
        font-size: 0.7rem;
    }

    /* Modal full-screen on small phones */
    .modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    .modal-overlay {
        align-items: flex-end;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease;
}

.animate-slideInUp {
    animation: slideInUp 0.6s ease;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-center {
    text-align: center;
}

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

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    left: -9999px;
}


/* =====================================================
   TASJILONLINE — UI REDESIGN (2026)
   - Hero upgrade
   - Premium directory cards
   - Declare school standalone section
   ===================================================== */

:root {
    --accent-orange: #ff7a18;
}

/* ---------- Navbar CTA (single main CTA) ---------- */
.nav-cta {
    border-radius: 999px;
    padding: 0.85rem 1.1rem;
    font-weight: 700;
    letter-spacing: .2px;
    background: var(--gradient-primary);
    box-shadow: 0 12px 30px rgba(31, 109, 170, .22);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(31, 109, 170, .28);
    filter: brightness(1.05);
}

/* ---------- Hero (startup layout) ---------- */
.hero--startup {
    position: relative;
    overflow: hidden;
}

.hero--startup .hero-container {
    gap: 2.75rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .40rem .78rem;
    border-radius: 999px;

    /* Strong readability on any hero background */
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(15, 23, 42, .14);
    box-shadow: 0 14px 40px rgba(2, 6, 23, .10);
    color: #0f172a !important;

    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .01em;
    backdrop-filter: blur(12px);
}

.hero-badge-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--accent-orange);
    box-shadow: 0 0 0 5px rgba(255, 122, 24, .15);
}

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

.hero-buttons--single .btn-cta {
    border-radius: 999px;
    padding: 1rem 1.25rem;
    box-shadow: 0 18px 42px rgba(37, 99, 235, .28);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.hero-buttons--single .btn-cta:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
    box-shadow: 0 26px 60px rgba(37, 99, 235, .35);
}

.hero-media {
    position: relative;
    width: min(520px, 100%);
    margin-left: auto;
}

.hero-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(2, 6, 23, .45);
    transform: translateZ(0);
}

.hero-media-accent {
    position: absolute;
    inset: -24px -24px auto auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 122, 24, .55), rgba(255, 122, 24, 0) 65%);
    filter: blur(2px);
    pointer-events: none;
}

@media (max-width: 900px) {
    .hero--startup .hero-container {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-media {
        margin: 0;
        order: 2;
    }
}

/* ---------- Premium directory cards (ecoles) ---------- */
.ecole-card {
    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, .08);
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(2, 6, 23, .08);
    transition: transform .22s ease, box-shadow .22s ease;
}

.ecole-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(2, 6, 23, .14);
}

.ecole-card-image {
    position: relative;
    height: 155px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, .92), rgba(56, 189, 248, .92));
    overflow: hidden;
}

.ecole-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.ecole-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.ecole-card:hover .ecole-card-image img {
    transform: scale(1.06);
}

.ecole-card-content {
    padding: 1.15rem 1.15rem 1.1rem;
}

.ecole-card-content h3 {
    margin: 0 0 .45rem;
    font-size: 1.08rem;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecole-card-content p {
    margin: 0 0 .9rem;
    color: rgba(15, 23, 42, .74);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecole-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.ecole-card-type {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: rgba(37, 99, 235, .92);
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .3px;
}

.ecole-card-ville {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(15, 23, 42, .72);
    font-weight: 700;
    font-size: .86rem;
}

.ecole-card-ville i {
    color: rgba(15, 23, 42, .55);
}

/* Buttons inside cards */
.ecole-card .btn {
    border-radius: 999px;
}

/* ---------- Declare school standalone section ---------- */

/* ===== Declare School (premium light card) ===== */
.declare-school-section {
    position: relative;
    padding: clamp(64px, 7vw, 110px) 18px;
    overflow: hidden;
    background: radial-gradient(1200px 600px at 15% 10%, rgba(56, 189, 248, .35), transparent 60%),
        radial-gradient(900px 520px at 85% 30%, rgba(37, 99, 235, .28), transparent 60%),
        linear-gradient(135deg, #0b1220, #071023);
}

.declare-school-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.declare-school-bg .declare-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
    opacity: .55;
}

.declare-glow-1 {
    width: 520px;
    height: 520px;
    left: -180px;
    top: -180px;
    background: rgba(56, 189, 248, .55);
}

.declare-glow-2 {
    width: 640px;
    height: 640px;
    right: -240px;
    bottom: -260px;
    background: rgba(37, 99, 235, .50);
}

.declare-school-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.declare-card {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 56px);
    border-radius: 26px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .70);
    box-shadow: 0 30px 120px rgba(2, 6, 23, .45);
}

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

.declare-header h2 {
    margin: 0;
    color: #0b1220;
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: .2px;
}

.declare-accent-line {
    width: 74px;
    height: 5px;
    border-radius: 999px;
    margin: 14px auto 16px;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    opacity: .95;
}

.declare-header p {
    margin: 0 0 30px;
    color: rgba(11, 18, 32, .75);
    line-height: 1.7;
    font-weight: 600;
}

.declare-form {
    margin-top: 10px;
}

.declare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.declare-form .field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.declare-form label {
    color: rgba(11, 18, 32, .82);
    font-weight: 800;
    font-size: .95rem;
}

.declare-form input,
.declare-form textarea {
    width: 100%;
    height: 60px;
    border-radius: 14px;
    padding: 0 18px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: #f3f4f6;
    color: #0b1220;
    outline: none;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease, background .18s ease;
}

.declare-form textarea {
    height: 160px;
    padding: 16px 18px;
    resize: vertical;
}

.declare-form input::placeholder,
.declare-form textarea::placeholder {
    color: rgba(11, 18, 32, .45);
    font-weight: 600;
}

.declare-form input:focus,
.declare-form textarea:focus {
    background: #ffffff;
    border-color: rgba(37, 99, 235, .40);
    box-shadow: 0 0 0 6px rgba(56, 189, 248, .18);
}

.declare-btn {
    width: 100%;
    height: 60px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: .2px;
    box-shadow: 0 22px 70px rgba(37, 99, 235, .35);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.declare-btn i {
    margin-right: 10px;
}

.declare-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.03);
    box-shadow: 0 30px 90px rgba(37, 99, 235, .48);
}

@media (max-width: 860px) {
    .declare-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero-badge {
        font-size: .72rem;
        padding: .36rem .7rem;
    }
}

@media (max-width: 480px) {
    .declare-school-section {
        padding: 56px 14px;
    }

    .declare-card {
        padding: 26px 18px;
        border-radius: 22px;
    }

    .declare-header p {
        font-size: .95rem;
        margin-bottom: 22px;
    }

    .declare-form input {
        height: 56px;
    }

    .declare-form textarea {
        min-height: 150px;
    }

    .declare-btn {
        height: 56px;
    }
}

/* =====================================================
   ECOLES PAGE (Sky-Blue Theme matches index.php)
   ===================================================== */
:root {
    --page-ecoles-primary: #2FA7D9;
    --page-ecoles-primary-600: #1F6DAA;
    --page-ecoles-primary-100: #e0f2fe;
    --page-ecoles-bg: #f8fbff;
    --page-ecoles-card: #ffffff;
    --page-ecoles-text: #0f172a;
    --page-ecoles-muted: #64748b;
    --page-ecoles-border: #e6eef8;
    --page-ecoles-gradient-sky: linear-gradient(135deg, var(--page-ecoles-primary-600) 0%, var(--page-ecoles-primary) 100%);
}

.page-ecoles {
    background-color: var(--page-ecoles-bg);
    color: var(--page-ecoles-text);
}

.page-ecoles .page-header {
    background: var(--page-ecoles-gradient-sky);
}

.page-ecoles .filter-btn {
    border-color: var(--page-ecoles-border);
    color: var(--page-ecoles-muted);
}

.page-ecoles .filter-btn.active,
.page-ecoles .filter-btn:hover {
    background: var(--page-ecoles-gradient-sky);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(47, 167, 217, 0.25);
}

.page-ecoles .btn-gradient,
.page-ecoles .btn-ecole-main {
    background: var(--page-ecoles-gradient-sky);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(47, 167, 217, 0.25);
}

.page-ecoles .btn-gradient:hover,
.page-ecoles .btn-ecole-main:hover {
    box-shadow: 0 8px 24px rgba(47, 167, 217, 0.35);
    background: linear-gradient(135deg, #19588b 0%, #1F6DAA 100%);
    transform: translateY(-2px);
}

.page-ecoles .form-control:focus {
    border-color: var(--page-ecoles-primary);
    box-shadow: 0 0 0 4px var(--page-ecoles-primary-100);
}

.page-ecoles .ecole-card {
    background: var(--page-ecoles-card);
    border-color: var(--page-ecoles-border);
}

.page-ecoles .ecole-card:hover {
    border-color: rgba(47, 167, 217, 0.2);
    box-shadow: 0 16px 32px rgba(47, 167, 217, 0.08);
}

.page-ecoles .modal .form-control:focus {
    border-color: var(--page-ecoles-primary);
    box-shadow: 0 0 0 4px var(--page-ecoles-primary-100);
}

/* Overriding any elements hardcoded in style inline like fa-edit primary-blue */
.page-ecoles .fa-edit {
    color: var(--page-ecoles-primary) !important;
}

/* ===================================================================
 * ============== MOBILE FIXES PATCH — TASJILONLINE ================
 * ===================================================================
 * Bloc de corrections responsive ajouté à la fin de style.css.
 * Résout les déformations mobile/smartphone identifiées en audit.
 * Compatible : Chrome Android, Safari iOS, Samsung Internet, Firefox Mobile.
 * Date du patch : 2026
 * Variables utilisées : --topbar-height, --transition-normal, --border-radius
 * Breakpoints : 768px, 640px, 480px, 380px (déjà en place)
 * =================================================================== */

/* ===========================================================
 * FIX #1 — LOGO + HAMBURGER : empêcher chevauchement
 * ===========================================================
 * Problème : .logo-img sans max-height déborde du header 64px,
 * écrase le bouton hamburger sur ≤ 480px.
 * Solution : contraindre la hauteur du logo + protéger le bouton hamburger
 * avec flex-shrink: 0 et zone tactile minimum 44x44 (Apple HIG / Material).
 * =========================================================== */
@media (max-width: 768px) {
    .logo-img {
        max-height: 44px;
        width: auto;
        height: auto;
        flex-shrink: 0;
    }

    .mobile-menu-btn {
        flex-shrink: 0;
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        z-index: 1002;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .header-inner,
    .header-container {
        gap: 0.75rem !important;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .logo-img {
        max-height: 40px;
    }

    .logo {
        min-width: 0;
        max-width: calc(100% - 60px);
        overflow: hidden;
    }

    .logo-text {
        font-size: 0.92rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-tagline {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .logo-img {
        max-height: 36px;
    }

    .logo-text {
        font-size: 0.85rem !important;
    }

    .header-inner,
    .header-container {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
        gap: 0.5rem !important;
    }
}


/* ===========================================================
 * FIX #2 — CONTENU MASQUÉ SOUS LE HEADER FIXE
 * ===========================================================
 * Problème : header (64px) + topbar (38px) = 102px, mais le
 * padding-top du .hero et .page-header ne compense pas.
 * Solution : ajouter un padding-top calculé sur mobile uniquement,
 * en utilisant la variable --topbar-height (avec fallback 38px).
 * =========================================================== */
@media (max-width: 768px) {
    .hero {
        padding-top: calc(64px + var(--topbar-height, 38px) + 1rem);
    }

    .page-header,
    .hero-tawjihi,
    .hero-duke,
    .hero-conztru,
    .hero-section {
        padding-top: calc(64px + 2.5rem);
    }

    /* Quand la topbar est cachée sur mobile (cas e-tawjihi),
       réduire le padding-top */
    body.no-topbar .hero,
    body.no-topbar .page-header {
        padding-top: calc(64px + 1.5rem);
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: calc(64px + 1.5rem);
    }

    .page-header,
    .hero-tawjihi,
    .hero-duke {
        padding-top: calc(64px + 2rem);
    }
}


/* ===========================================================
 * FIX #3 — MENU DRAWER DERRIÈRE LE HEADER (z-index conflict)
 * ===========================================================
 * Problème : .nav-desktop avait z-index: 1000 identique au .header.
 * Solution : drawer mobile au-dessus du header (1001), bouton hamburger
 * au-dessus du drawer (1002), backdrop juste en dessous du drawer (998).
 * =========================================================== */
@media (max-width: 768px) {
    .site-header,
    .header {
        z-index: 1000;
    }

    .nav-desktop {
        z-index: 1001;
    }

    .mobile-menu-btn {
        z-index: 1002;
    }

    .mobile-backdrop,
    .mobile-nav-overlay {
        z-index: 998;
    }

    /* Body lock quand menu ouvert (anti scroll-bleed) */
    body.menu-open,
    body[style*="overflow: hidden"] {
        position: relative;
        overflow: hidden !important;
        touch-action: none;
    }
}


/* ===========================================================
 * FIX #4 — OVERLAY MENU QUI CLIGNOTE SUR iOS SAFARI
 * ===========================================================
 * Problème : .mobile-nav-overlay créé en JS sans état CSS initial,
 * iOS Safari fait flicker à chaque toggle.
 * Solution : état initial avec opacity + pointer-events + transform
 * pour forcer la composition GPU et éviter le repaint.
 * =========================================================== */
.mobile-nav-overlay,
.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--transition-normal, ease);
    will-change: opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.mobile-nav-overlay.active,
.mobile-backdrop.active {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

/* Drawer lui-même : transition smooth avec GPU compositing */
.nav-desktop {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}


/* ===========================================================
 * FIX #5 — ZOOM AUTOMATIQUE iOS SUR LES INPUTS
 * ===========================================================
 * Problème : iOS Safari zoome automatiquement quand on focus un input
 * dont le font-size < 16px. Très perturbant pour l'UX.
 * Solution : forcer 16px sur tous les champs en mobile.
 * =========================================================== */
@media (max-width: 768px) {
    input,
    select,
    textarea,
    .form-control,
    .field input,
    .field textarea,
    .input-field,
    .select-field,
    .search-input {
        font-size: 16px !important;
    }

    /* Conserver l'apparence visuelle malgré font-size 16px : pas de zoom mais design préservé */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="password"],
    input[type="url"],
    input[type="date"],
    textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        font-size: 16px !important;
    }

    /* Empêcher iOS de styler les boutons par défaut */
    button,
    input[type="submit"],
    input[type="button"] {
        -webkit-appearance: none;
        appearance: none;
    }
}


/* ===========================================================
 * FIX #6 — SCROLL HORIZONTAL INDÉSIRABLE
 * ===========================================================
 * Problème : .ecoles-grid, .pricing-carousel et autres conteneurs
 * débordent en largeur sur petits écrans (élément avec width fixe
 * ou padding qui pousse la grille au-delà du viewport).
 * Solution : overflow-x: hidden sur les conteneurs concernés +
 * box-sizing border-box global + max-width: 100vw sur html/body.
 * =========================================================== */
html,
body {
    max-width: 100vw;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .ecoles-grid,
    .pricing-grid,
    .services-grid,
    .how-grid,
    .news-grid,
    .footer-grid,
    .container,
    .container-wide,
    main,
    section {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Forcer toutes les images SVG/PNG à rester contenues */
    img,
    svg,
    video,
    iframe,
    canvas,
    picture {
        max-width: 100% !important;
        height: auto;
    }

    /* Cards : empêcher tout débordement */
    .ecole-card,
    .pricing-card,
    .service-card,
    .service-card-light,
    .service-card-dark,
    .service-card-photo,
    .news-card,
    .hero-card {
        max-width: 100% !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .container,
    .container-wide {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}


/* ===========================================================
 * FIX #7 — ZONE TACTILE BOUTON HAMBURGER (déjà partiellement
 * couvert par FIX #1, ici on renforce et on couvre les autres
 * boutons / liens cliquables pour respecter le minimum 44x44).
 * =========================================================== */
@media (max-width: 768px) {
    /* Tous les boutons et liens cliquables : zone tactile minimum */
    button,
    .btn,
    a.btn,
    [role="button"],
    input[type="submit"],
    input[type="button"],
    .nav-link,
    .btn-icon-circle {
        min-height: 44px;
    }

    /* Liens dans le footer : padding pour zone cliquable */
    .footer-links a,
    .topbar a {
        padding: 0.25rem 0;
        display: inline-flex;
        align-items: center;
        min-height: 32px;
    }

    /* Icônes sociales : zone tactile 40x40 minimum */
    .footer-social a,
    .topbar-social a,
    .social-icon {
        min-width: 40px;
        min-height: 40px;
    }

    /* Tap highlight aux couleurs de la marque */
    a, button, [role="button"] {
        -webkit-tap-highlight-color: rgba(249, 115, 22, 0.2);
    }
}


/* ===========================================================
 * BONUS — SCROLL TACTILE NATIF SUR CAROUSELS (.carousel-track)
 * ===========================================================
 * Permet aux carousels (pricing, écoles, etc.) d'être swipables
 * naturellement avec snap aux cards, sur mobile.
 * Touch-action et scroll-snap-type sont les standards modernes.
 * =========================================================== */
@media (max-width: 768px) {
    .carousel-track,
    .pricing-carousel .carousel-container,
    .ecoles-carousel,
    [class*="carousel-track"] {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .carousel-track::-webkit-scrollbar,
    .pricing-carousel .carousel-container::-webkit-scrollbar {
        display: none;
    }

    .carousel-track > *,
    .pricing-card,
    .ecole-card {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    /* Boutons carousel desktop cachés sur mobile (swipe natif suffit) */
    .pricing-carousel .carousel-btn,
    .carousel-arrow {
        display: none !important;
    }

    /* Filter tabs scrollable horizontalement */
    .filter-tabs {
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        flex-wrap: nowrap !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
    }

    .filter-tabs::-webkit-scrollbar { display: none; }

    .filter-tabs > * {
        flex-shrink: 0;
        scroll-snap-align: start;
    }
}


/* ===========================================================
 * BONUS — SAFARI iOS SPÉCIFIQUE (notch / safe-area / 100vh bug)
 * ===========================================================
 * Safari mobile a un bug avec 100vh qui inclut la barre d'URL.
 * On utilise -webkit-fill-available et env(safe-area-inset-*) pour
 * gérer les iPhones avec notch (X et plus récents).
 * =========================================================== */
@supports (-webkit-touch-callout: none) {
    /* iOS uniquement */
    .hero,
    .hero-tawjihi,
    .hero-duke,
    .hero-conztru {
        min-height: -webkit-fill-available;
    }

    /* Safe area pour iPhones avec notch */
    .site-header {
        padding-top: env(safe-area-inset-top, 0);
    }

    .footer-bottom {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
    }

    .nav-desktop {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0));
    }
}


/* ===========================================================
 * BONUS — FORMS & MODALS sur très petits écrans
 * ===========================================================
 * Les modals doivent rester scrollables et ne jamais déborder.
 * =========================================================== */
@media (max-width: 640px) {
    .modal {
        max-width: calc(100vw - 1rem) !important;
        max-height: calc(100vh - 2rem);
        max-height: calc(100dvh - 2rem); /* unité dynamique mobile */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-overlay {
        padding: 0.5rem !important;
        align-items: flex-start !important;
        padding-top: 2rem !important;
    }

    .modal-body {
        padding: 1.25rem !important;
    }

    .form-row,
    .declare-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}


/* ===========================================================
 * BONUS — TYPOGRAPHIE FLUIDE & TRONCATURE PROPRE
 * ===========================================================
 * Empêche les textes longs (sémas d'écoles, descriptions) de casser
 * la mise en page. Wrap propre sur tout texte.
 * =========================================================== */
@media (max-width: 768px) {
    h1, h2, h3, h4, h5, h6,
    p, span, a, li, label, button {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
        -webkit-hyphens: auto;
    }

    /* Empêcher les titres trop longs de déborder */
    .hero h1,
    .hero-tawjihi h1,
    .section-header h2,
    .ecole-card h3,
    .pricing-card h3 {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}


/* ===========================================================
 * BONUS — DÉSACTIVATION DU PULL-TO-REFRESH SUR LE HEADER
 * ===========================================================
 * Empêche le rebound iOS / pull-to-refresh Android sur les zones
 * qui ne devraient pas le déclencher (ex : drawer ouvert).
 * =========================================================== */
body.menu-open {
    overscroll-behavior-y: contain;
}

/* ===========================================================
 * BONUS — IMAGES RESPONSIVES PARTOUT (anti déformation)
 * ===========================================================
 * Empêche les logos d'écoles, photos, illustrations de déformer
 * leur container. Garde le ratio d'origine.
 * =========================================================== */
.ecole-card-image img,
.service-card-photo img,
.hero-illu-wrap img,
.who-image-wrap img,
.how-image-wrap img,
.portrait-image-wrap img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 480px) {
    .ecole-card-image {
        height: auto !important;
        min-height: 140px;
        max-height: 180px;
    }

    .hero-illu-wrap img,
    .hero-illu-wrap svg {
        max-width: 280px !important;
        margin: 0 auto !important;
    }
}


/* ===========================================================
 * BONUS — SAMSUNG INTERNET / FIREFOX MOBILE
 * ===========================================================
 * Spécifiquement testé sur Samsung Internet (Galaxy) qui a parfois
 * des bugs de rendu sur backdrop-filter et sticky.
 * =========================================================== */
@media (max-width: 768px) {
    /* Fallback sticky → fixed si nécessaire (Samsung Internet ancien) */
    @supports not (position: sticky) {
        .site-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
        }

        body {
            padding-top: 64px;
        }
    }

    /* Fallback backdrop-filter → fond opaque */
    @supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
        .site-header,
        .site-header.scrolled,
        .modal-overlay,
        .mobile-backdrop {
            background-color: rgba(255, 255, 255, 0.98) !important;
        }

        .modal-overlay,
        .mobile-backdrop {
            background-color: rgba(15, 23, 42, 0.85) !important;
        }
    }
}


/* ===========================================================
 * FINAL — RÈGLES DE SÉCURITÉ ULTIMES (anti-déformation finale)
 * ===========================================================
 * Filets de sécurité contre les rares cas où une page spécifique
 * aurait du CSS qui contourne les règles précédentes.
 * =========================================================== */
@media (max-width: 768px) {
    /* Tout élément qui aurait un width fixe trop grand → ajusté */
    [style*="width: 500px"],
    [style*="width: 600px"],
    [style*="width: 700px"],
    [style*="width: 800px"],
    [style*="width: 1000px"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Empêcher les marges négatives qui causent des débordements */
    [style*="margin-left: -"],
    [style*="margin-right: -"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Forcer toute table à être responsive */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        width: 100%;
    }

    /* Pre / code : ne pas casser la mise en page */
    pre, code {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}

/* ===================================================================
 * ============== FIN DU PATCH MOBILE FIXES ==========================
 * =================================================================== */
