/**
 * TerangaExplorer — Critical CSS (Above-the-fold) v12.1
 * Chargé en priorité pour améliorer le LCP (Largest Contentful Paint).
 * Contient uniquement les styles nécessaires pour le premier rendu visible.
 *
 * IMPORTANT : Ce fichier est léger par design. Ne pas y ajouter du CSS non critique.
 */

/* === Variables essentielles === */
/* SYNC V13 : Ces variables DOIVENT correspondre exactement à celles de style.css */
:root {
    --te-color-primary: #f59e0b;       /* Amber vibrant (V13) */
    --te-color-primary-dark: #d97706;
    --te-color-secondary: #0f172a;     /* Slate foncé */
    --te-color-accent: #fcd34d;
    --te-color-accent-dark: #f59e0b;
    --te-color-white: #ffffff;
    --te-color-dark: #0f172a;
    --te-color-light: #f8fafc;
    --te-text-main: #334155;
    --te-text-muted: #64748b;
    --te-font-heading: 'Outfit', sans-serif;
    --te-font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --te-font-base: var(--te-font-body);
    --te-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --te-radius-sm: 4px;
    --te-radius-md: 8px;
    --te-radius-lg: 16px;
    --te-radius-xl: 24px;
    --te-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --te-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --te-shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
    --te-shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    --te-max-width: 1280px;
}


/* === Reset minimal === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    font-family: var(--te-font-body);
    color: var(--te-text-main);
    background: #f9f9f9;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--te-font-heading);
    font-weight: 700;
    color: var(--te-color-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
img, video { max-width: 100%; height: auto; display: block; }

/* === Header critique === */
.site-header {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 6px 24px;
}

/* === Hero Section critique (LCP principal) === */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
}
.hero-section h1 {
    font-family: var(--te-font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.2;
}
.hero-section p {
    font-size: 1.25rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* === Container critique === */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* FIX: Surcharge de sécurité contre les CSS parasites (Customizer/Plugins) 
   qui bloquent la largeur à 800px sur la prod */
html, body, #swup, #swup-main {
    max-width: 100% !important;
    box-shadow: none !important;
}

/* === Top Bar critique === */
.te-topbar {
    background: #09090b;
    color: #a1a1aa;
    font-size: 0.75rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* === Boutons critiques === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--te-transition);
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--te-color-primary), var(--te-color-primary-dark));
    color: #fff;
}
.btn-partner {
    background: linear-gradient(135deg, var(--te-color-primary), var(--te-color-primary-dark));
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
}

/* === Navigation critique === */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}
.main-navigation > ul > li > a {
    font-weight: 600;
    color: var(--te-text-main);
    text-decoration: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Dark mode anti-flash === */
[data-theme="dark"] body { background: #0f172a; color: #f1f5f9; }
[data-theme="dark"] .site-header { background: rgba(15,23,42,0.98); }

/* === Personas swipe critique (visible au premier scroll) === */
.personas-section { margin-top: -40px; position: relative; z-index: 10; }
.te-swipe-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    padding-bottom: 15px;
}
.te-swipe-gallery::-webkit-scrollbar { display: none; }
.te-swipe-gallery > * {
    scroll-snap-align: start;
    flex: 0 0 80%;
}

/* === Skip link accessibilité === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: var(--te-color-primary);
    color: #fff;
    padding: 10px 16px;
    z-index: 9999;
    border-radius: 4px;
    transition: top 0.3s;
}
.skip-link:focus { top: 10px; }

/* Page fade-in */
body { opacity: 0; transition: opacity 0.4s ease; }
body.te-loaded { opacity: 1; }

/* === Responsive critique === */
@media (max-width: 992px) {
    .te-hamburger { display: flex; }
    .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 20px; z-index: 999; }
    .main-navigation.active { display: block; }
}
@media (max-width: 768px) {
    .hero-section { height: 100svh; min-height: 550px; }
    .hero-section h1 { font-size: 2.2rem !important; }
    .container { padding: 0 16px; }
}
