/* ========================================
   GESTARO - Style Pages Publiques
   Version 2.1 - Responsive Mobile/iPad Optimisé
   ======================================== */

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

/* Reset et Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    
    /* Neutres */
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    
    /* États */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #06b6d4;
    
    /* Espacements */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Typographie */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Poppins', var(--font-sans);
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Bordures */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Safe areas pour iOS */
    --safe-top: env(safe-area-inset-top);
    --safe-right: env(safe-area-inset-right);
    --safe-bottom: env(safe-area-inset-bottom);
    --safe-left: env(safe-area-inset-left);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

/* Base HTML - OPTIMISÉ MOBILE */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    padding-left: max(0px, var(--safe-left));
    padding-right: max(0px, var(--safe-right));
}

/* Container - RESPONSIVE */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

/* Typography - RESPONSIVE */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: var(--space-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

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

h4 { 
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h5 { 
    font-size: clamp(1rem, 2vw, 1.25rem);
}

h6 { 
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
}

p {
    margin-bottom: var(--space-sm);
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lead {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.8;
    color: var(--gray-700);
    font-weight: 400;
}

.text-muted {
    color: var(--gray-600);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   HEADER & NAVIGATION - OPTIMISÉ MOBILE
   ======================================== */

.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    width: 100%;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--dark);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.brand:hover {
    transform: translateX(3px);
}

.brand img {
    height: clamp(32px, 8vw, 40px);
    width: auto;
}

.brand span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation principale - DESKTOP */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav a {
    padding: var(--space-xs) var(--space-sm);
    color: var(--gray-700);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav a.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Mobile Menu Burger */
.burger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.burger svg {
    width: 24px;
    height: 24px;
    stroke: var(--gray-700);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ========================================
   BUTTONS - OPTIMISÉ TACTILE
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

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

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-ghost:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-icon {
    padding: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* ========================================
   HERO SECTION - RESPONSIVE
   ======================================== */

.hero {
    position: relative;
    padding: clamp(var(--space-xl), 8vw, var(--space-2xl)) 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 40%;
    height: 150%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero h1 {
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease;
}

.hero .lead {
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.2s both;
    padding: 0 var(--space-sm);
}

.hero .btn-group {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
    padding: 0 var(--space-sm);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.1));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-weight: 600;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    margin-bottom: var(--space-sm);
    animation: fadeInUp 0.8s ease;
}

/* ========================================
   CARDS - RESPONSIVE
   ======================================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(var(--space-md), 4vw, var(--space-lg));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.card-description {
    color: var(--gray-600);
    line-height: 1.6;
}

.card-content {
    margin-bottom: var(--space-md);
}

.card-footer {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-200);
}

/* Pricing Card */
.card-pricing {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-pricing.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.card-pricing.featured::before {
    content: 'Populaire';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.price {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    color: var(--dark);
    margin: var(--space-md) 0;
}

.price small {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    color: var(--gray-600);
}

/* ========================================
   GRIDS & LAYOUTS - RESPONSIVE
   ======================================== */

.grid {
    display: grid;
    gap: clamp(var(--space-md), 3vw, var(--space-lg));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

/* Sections */
.section {
    padding: clamp(var(--space-xl), 8vw, var(--space-2xl)) 0;
}

.section-gray {
    background: var(--gray-100);
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto clamp(var(--space-lg), 5vw, var(--space-2xl));
    padding: 0 var(--space-sm);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--gray-600);
    line-height: 1.8;
}

/* ========================================
   LISTS - RESPONSIVE
   ======================================== */

.list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
}

.list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    color: var(--gray-700);
}

.list .check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--success), #059669);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: 2px;
}

/* ========================================
   FORMS - OPTIMISÉ MOBILE
   ======================================== */

.form-group {
    margin-bottom: var(--space-md);
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 16px; /* Empêche le zoom sur iOS */
    font-family: inherit;
    background: var(--white);
    transition: var(--transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-500);
}

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

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ========================================
   FEATURES SECTION - RESPONSIVE
   ======================================== */

.features {
    padding: clamp(var(--space-xl), 8vw, var(--space-2xl)) 0;
}

.feature-card {
    text-align: center;
    padding: clamp(var(--space-md), 4vw, var(--space-lg));
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.feature-title {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ========================================
   CTA SECTION - RESPONSIVE
   ======================================== */

.cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: clamp(var(--space-xl), 8vw, var(--space-2xl)) var(--space-md);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0 var(--space-sm);
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta h2 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.cta p {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    opacity: 0.95;
    margin-bottom: var(--space-lg);
}

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

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

/* ========================================
   TESTIMONIALS - RESPONSIVE
   ======================================== */

.testimonial {
    background: var(--white);
    padding: clamp(var(--space-md), 4vw, var(--space-lg));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: clamp(4rem, 10vw, 6rem);
    color: var(--primary);
    opacity: 0.1;
    font-family: serif;
}

.testimonial-content {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: var(--space-md);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    flex-shrink: 0;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: var(--dark);
}

.testimonial-role {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.testimonial-rating {
    color: var(--warning);
    margin-top: var(--space-xs);
}

/* ========================================
   RESPONSIVE - TABLETTE
   ======================================== */

@media (max-width: 992px) {
    .nav {
        display: none;
        position: fixed;
        top: 72px;
        right: 0;
        width: min(280px, 85vw);
        height: calc(100vh - 72px);
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-md);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-open .nav {
        display: flex;
        transform: translateX(0);
    }
    
    .nav-open .overlay {
        display: block;
        opacity: 1;
    }
    
    .burger {
        display: flex;
    }
    
    .nav a {
        color: black;
        padding: var(--space-sm);
        border-radius: var(--radius-md);
        justify-content: flex-start;
    }

    .nav .btn-primary {
        color: white;
    }
    
    .hero {
        padding: var(--space-xl) 0;
    }
    
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    }
    
    .card-pricing.featured {
        transform: none;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero .btn-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .hero .btn {
        width: 100%;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
    
    .nav {
        width: 100%;
        right: -100%;
    }
    
    .cta {
        border-radius: 0;
        margin: 0;
    }
    
    .features .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE - MOBILE SMALL
   ======================================== */

@media (max-width: 480px) {
    :root {
        --space-xs: 0.375rem;
        --space-sm: 0.75rem;
        --space-md: 1.25rem;
        --space-lg: 1.75rem;
        --space-xl: 2.5rem;
        --space-2xl: 3rem;
    }
    
    .topbar {
        padding: var(--space-xs) 0;
        min-height: 60px;
    }
    
    .brand span {
        display: none;
    }
    
    .card {
        padding: var(--space-md);
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.938rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero .lead {
        padding: 0;
    }
    
    .hero .btn-group {
        padding: 0;
    }
    
    .list li {
        gap: var(--space-xs);
    }
    
    .list .check {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease;
}

/* ========================================
   UTILITIES - RESPONSIVE
   ======================================== */

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--space-xs); }
.pt-2 { padding-top: var(--space-sm); }
.pt-3 { padding-top: var(--space-md); }
.pt-4 { padding-top: var(--space-lg); }
.pt-5 { padding-top: var(--space-xl); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--space-xs); }
.pb-2 { padding-bottom: var(--space-sm); }
.pb-3 { padding-bottom: var(--space-md); }
.pb-4 { padding-bottom: var(--space-lg); }
.pb-5 { padding-bottom: var(--space-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }

/* ========================================
   DARK MODE - RESPONSIVE
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --white: #0f172a;
        --dark: #f8fafc;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
    }
    
    .site-header {
        background: rgba(15, 23, 42, 0.95);
    }
    
    .card {
        background: var(--gray-100);
        border-color: var(--gray-200);
    }
    
    .nav {
        background: var(--gray-100);
    }
}

/* ========================================
   OPTIMISATIONS FINALES
   ======================================== */

/* Images responsive */
img, video, canvas, iframe { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

/* Contenu lisible */
.content { 
    max-width: 70ch; 
    margin: 0 auto; 
}

.content p, .content li { 
    overflow-wrap: anywhere; 
    word-break: break-word; 
}

/* Tables responsive */
.table-responsive { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
}

/* Réduction des mouvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* iOS Specific */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
    
    .site-header {
        position: -webkit-sticky;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    .card {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .site-header,
    .nav,
    .burger,
    .btn,
    .cta,
    .overlay {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
}
