/* ============================================
   PROGRESS THINGS - GLOBAL STYLES
   ============================================ */

:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #4D94FF;
    --secondary: #00D4AA;
    --secondary-dark: #00B894;
    --accent: #6C5CE7;
    --accent-light: #A29BFE;
    
    --bg-dark: #0A0E17;
    --bg-darker: #060911;
    --bg-card: #111827;
    --bg-card-hover: #1F2937;
    
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(0, 102, 255, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--gray-300);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--white);
    line-height: 1.2;
}

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

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

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(0, 102, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 0%, transparent 70%);
}

.bg-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 60%);
    filter: blur(80px);
}

.bg-glow-2 {
    bottom: -20%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.1) 0%, transparent 60%);
    filter: blur(80px);
}

.bg-glow-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 60%);
    filter: blur(100px);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 0.75rem 5%;
    background: rgba(10, 14, 23, 0.95);
    box-shadow: var(--shadow-glow);
}

.nav-logo img {
    height: 89px;
    transform : scale(1.4);
    transform-origin: left center;
    width: auto;
    transition: var(--transition-base);
}

.nav-logo:hover img {
    transform: scale(1.02);
    filter: drop-shadow(0 0 10px rgba(0, 102, 255, 0.5));
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

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

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-dropdown-toggle svg {
    width: 12px;
    height: 12px;
    transition: var(--transition-base);
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-xl);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--gray-400);
}

.nav-dropdown-menu a:hover {
    background: var(--bg-card-hover);
    color: var(--white);
}

/* Nav CTA */
.nav-cta {
    padding: 0.6rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-base);
    border-radius: 2px;
}

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

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

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

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

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

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

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

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    position: relative;
    z-index: 1;
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray-400);
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-base);
}

.card:hover {
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary-light);
    fill: none;
    stroke-width: 1.5;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.card p {
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--secondary);
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s both;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Page Hero (smaller) */
.page-hero {
    padding: 10rem 5% 4rem;
    text-align: center;
    position: relative;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.1s both;
}

/* ============================================
   PARTNERS SECTION
   ============================================ */

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

.partner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.partner-card:hover {
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

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

.partner-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.partner-logo img {
    background: white; /* On crée un fond blanc */
    padding: 15px;      /* On laisse de l'espace autour du logo */
    border-radius: 12px; /* Coins arrondis pour le style */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Un peu d'ombre pour le relief */
    transition: var(--transition-base);
}

.partner-card:hover .partner-logo img {
    transform: scale(1.1);
}

.partner-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.partner-card p {
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.partner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.partner-link:hover {
    color: var(--white);
    gap: 0.75rem;
}

.partner-link svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   SERVICES GRID
   ============================================ */

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-number {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Playfair Display', serif;
    line-height: 1;
    z-index: 0;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    background: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
}

.service-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary-light);
    fill: none;
    stroke-width: 1.5;
    transition: var(--transition-base);
}

.service-card:hover .service-icon svg {
    stroke: var(--white);
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.service-card > p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.service-list {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    list-style: none;
}

.service-list li {
    padding: 0.4rem 0;
    color: var(--gray-500);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.service-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   STATS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

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

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

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 5rem 5% 2rem;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand img {
    height: 55px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--gray-500);
    transition: var(--transition-base);
}

.footer-social a:hover svg {
    fill: var(--white);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--gray-500);
    font-size: 0.95rem;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

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

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 1024px) {
    .partners-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10, 14, 23, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-cta.desktop {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        padding: 0.5rem 0;
        min-width: auto;
    }
    
    .partners-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    section {
        padding: 4rem 5%;
    }
    
    .hero {
        padding: 7rem 5% 3rem;
    }
    
    .page-hero {
        padding: 8rem 5% 3rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.text-primary { color: var(--primary-light); }
.text-secondary { color: var(--secondary); }
.text-white { color: var(--white); }
.text-muted { color: var(--gray-400); }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

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

/* ============================================================
   PATCH DE RÉPARATION MOBILE (Anti-débordement & Alignement)
   ============================================================ */

@media screen and (max-width: 768px) {
    /* 1. Empêche le site de bouger de gauche à droite */
    html, body {
        overflow-x: hidden !important;
        width: 100vw;
        position: relative;
    }

    /* 2. Force TOUTES les grilles à passer en une seule colonne */
    /* Cela répare les services, les stats et le formulaire de contact */
    .services-grid, 
    .stats-grid, 
    .footer-grid, 
    .partners-preview div,
    [style*="display: grid"], 
    [style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 20px !important;
    }

    /* 3. Ajuste la taille des textes pour qu'ils ne soient pas trop gros */
    h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
    }

    /* 4. Répartit l'espace sur les côtés pour éviter que le texte touche les bords */
    section {
        padding: 40px 20px !important;
    }

    /* 5. Empêche les images de dépasser de l'écran */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 6. Cache le menu texte qui crée souvent des bugs d'affichage sur mobile */
    .nav-menu {
        display: none; 
    }
}

/* ============================================
   DESIGN MOBILE RÉPARÉ (LOGO ET MENU)
   ============================================ */
@media screen and (max-width: 768px) {
    /* On met le bouton menu tout en haut de la pile */
    #navToggle {
        z-index: 20000 !important; 
        position: relative !important;
        cursor: pointer !important;
        pointer-events: auto !important; /* Force la zone à être cliquable */
    }

    /* On s'assure que le logo ne déborde pas sur le bouton */
    .nav-logo {
        max-width: 50% !important;
        z-index: 1000 !important;
    }

    /* Cache le menu quand il n'est pas actif */
    #navMenu {
        display: none !important;
    }

    /* Affiche le menu quand il est actif */
    #navMenu.active {
        display: flex !important;
    }
}
@media screen and (max-width: 768px) {
    /* LOGO : Taille forcée */
    .nav-logo img {
        height: 32px !important;
        width: auto !important;
        max-width: 150px !important;
    }

    /* BARRE : On s'assure qu'elle est cliquable */
    .navbar {
        height: 65px !important;
        z-index: 10000 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* MENU : Caché par défaut, plein écran quand ouvert */
    .nav-menu {
        display: none !important;
        position: fixed !important;
        top: 65px !important;
        left: 0;
        width: 100% !important;
        height: calc(100vh - 65px) !important;
        background: #060911 !important;
        flex-direction: column !important;
        padding: 20px !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
    }

    .nav-menu.active { display: flex !important; }

    /* SOUS-MENU SUPPORT IT : Caché par défaut */
    .nav-dropdown-menu {
        display: none !important;
        background: rgba(255, 255, 255, 0.05) !important;
        flex-direction: column !important;
        margin-top: 10px !important;
        border-radius: 8px;
    }

    /* Affiché quand on clique */
    .nav-dropdown.active .nav-dropdown-menu {
        display: flex !important;
    }

    .nav-toggle { cursor: pointer !important; z-index: 11000 !important; }
}
/* --- FIX LOGO --- */
.nav-logo img {
    height: 35px !important; /* On verrouille la taille ici */
    width: auto !important;
}

/* --- GESTION DU SOUS-MENU (SUPPORT IT) --- */

/* 1. On cache le sous-menu par défaut */
.nav-dropdown-menu {
    display: none;
    list-style: none;
    background: #11151f;
    padding: 10px;
    border-radius: 5px;
}

/* 2. On l'affiche au survol (Ordinateur) */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block !important;
    position: absolute;
    z-index: 999;
}

/* 3. Ajustement spécial pour le Mobile */
@media screen and (max-width: 768px) {
    .nav-dropdown-menu {
        position: static !important; /* Il pousse le contenu vers le bas au lieu de flotter */
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
    }

    /* ICI : On force l'apparition quand on clique/touche */
    .nav-dropdown:active .nav-dropdown-menu,
    .nav-dropdown:focus .nav-dropdown-menu {
        display: block !important;
    }
}

/* FIX BOUTONS ET TEXTES COUPÉS SUR MOBILE */
@media screen and (max-width: 768px) {
    /* On s'assure que les conteneurs ne dépassent jamais 100% de la largeur */
    .nos-produits, .container, .bouton-container {
        width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
    }

    /* On rend le bouton flexible */
    .bouton-bleu, .logiciel-btn { 
        max-width: 100% !important; /* Ne dépasse jamais l'écran */
        white-space: normal !important; /* Autorise le texte à aller sur 2 lignes si besoin */
        height: auto !important; /* La hauteur s'adapte au texte */
        padding: 10px 15px !important;
        font-size: 14px !important; /* On réduit un peu la police sur mobile */
        display: inline-block !important;
        text-align: center !important;
    }
}
/* --- FIX UNIVERSEL POUR TOUTES LES PAGES --- */
@media screen and (max-width: 768px) {
    
    /* 1. Force le logo à rester petit */
    .nav-logo img {
        height: 32px !important;
        width: auto !important;
    }

    /* 2. Fix pour les boutons arrondis (ceux de tes photos) */
    /* On cible toutes les classes de boutons possibles */
    .logiciel-btn, .btn-blue, .formula-btn, .international-btn, .partenaire-btn {
        width: 90% !important; /* Prend presque toute la largeur */
        max-width: 320px !important;
        display: block !important;
        margin: 15px auto !important; /* Centre le bouton */
        white-space: normal !important; /* Permet au texte de revenir à la ligne */
        height: auto !important;
        padding: 15px 10px !important;
        font-size: 14px !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }

    /* 3. Pour les pages M365 et Abonnement (Tableaux/Grilles) */
    .pricing-grid, .services-container, .m365-content {
        display: flex !important;
        flex-direction: column !important; /* Aligne les éléments les uns sous les autres */
        align-items: center !important;
    }

    /* 4. Empêche le défilement horizontal bizarre */
    body, html {
        overflow-x: hidden !important;
        width: 100%;
    }
}
/* --- FIX UNIVERSEL BOUTONS COUPÉS --- */
@media screen and (max-width: 768px) {
    
    /* On cible tous tes types de boutons (ceux des photos) */
    .logiciel-btn, 
    .btn-blue, 
    .formula-btn, 
    .international-btn, 
    .partenaire-btn,
    .hero-btn,
    [class*="btn"], [class*="button"] {
        width: 90% !important;        /* Prend 90% de la largeur du téléphone */
        max-width: 320px !important;  /* Sécurité pour ne pas être trop géant */
        display: block !important;    /* Force le bouton à être seul sur sa ligne */
        margin: 15px auto !important; /* Centre le bouton horizontalement */
        
        /* LA MAGIE EST ICI : */
        white-space: normal !important; /* Permet au texte de s'écrire sur 2 lignes */
        height: auto !important;        /* Le bouton grandit en hauteur si le texte double */
        padding: 15px 10px !important;  /* Espace intérieur confortable */
        font-size: 14px !important;     /* Taille de texte adaptée mobile */
        line-height: 1.4 !important;    /* Espace entre les lignes du bouton */
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Fix pour le texte "Logiciel Propriétaire" pour qu'il ne touche pas les bords */
    .logiciel-btn {
        letter-spacing: 0.5px !important; 
    }
}
