/* =========================================================================
   PURE CSS THEME - ZERO FRAMEWORK (Lightweight, Semantic, Fast)
   ========================================================================= */

:root {
    /* Colors - Dynamic fallback (will be injected via Python depending on Niche) */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --bg-base: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;

    --text-main: #334155;
    --text-dark: #0f172a;
    --text-light: #94a3b8;

    --border-color: #e2e8f0;

    /* Typography */
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Layout */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Helpers */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --transition: 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

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

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

ul,
ol {
    list-style: none;
}

p {
    margin-bottom: var(--spacing-sm);
}

/* =========================================================================
   LAYOUT UTILITIES
   ========================================================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section.bg-alt {
    background-color: var(--bg-alt);
}

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

.section.bg-primary h2,
.section.bg-primary p {
    color: white;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

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

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

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

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

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-between {
    justify-content: space-between;
}

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

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

.hidden {
    display: none !important;
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
}

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

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

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

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

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

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

/* Icons SVG */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
}

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

.icon-light {
    color: var(--text-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition);
    background-color: var(--bg-alt);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
}

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

/* Cards */
.card {
    background-color: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.card-text {
    color: var(--text-main);
    flex-grow: 1;
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */
.header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

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

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.brand span {
    color: var(--primary);
}

.nav-list {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

@media (max-width: 767px) {
    .nav {
        display: none;
    }

    .header-cta {
        display: none;
    }
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hamburger Menu (Mobile) */
.mobile-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 767px) {
    .mobile-btn {
        display: block;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    z-index: 1001;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    display: flex;
    flex-direction: column;
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.mobile-nav-link {
    font-size: 1.125rem;
    display: block;
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-weight: 500;
}

/* =========================================================================
   HERO / BANNER
   ========================================================================= */
.hero {
    padding: 8rem 0 4rem 0;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-main);
    margin-bottom: var(--spacing-md);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.footer p {
    font-size: 0.95rem;
}

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

.footer a {
    color: var(--text-light);
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    text-align: center;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =========================================================================
   ANIMATIONS & EFFECTS
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   ZONES GRID
   ========================================================================= */
.zones-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.zone-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    color: var(--text-main);
    transition: all var(--transition);
    text-decoration: none;
}

.zone-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* =========================================================================
   FAQ ACCORDION
   ========================================================================= */
.faq {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
}

.faq-question {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    cursor: pointer;
    gap: 1rem;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 1.5rem 1.25rem 1.5rem;
    color: var(--text-main);
    line-height: 1.7;
}

/* =========================================================================
   RESPONSIVE FIXES
   ========================================================================= */
@media (max-width: 767px) {
    .header-cta {
        display: none;
    }

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

    [style*="direction: rtl"] {
        direction: ltr;
    }
}

/* =========================================================================
   PARTNER LINKS (Réseau)
   ========================================================================= */
.partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.partner-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-dark);
    transition: all var(--transition);
    min-width: 160px;
    text-align: center;
}

.partner-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.partner-link strong {
    font-size: 0.95rem;
    color: var(--primary);
}

.partner-link span {
    font-size: 0.8rem;
    color: var(--text-main);
}