/**
 * AIHT Design System — Version Sombre Spatiale LUXE
 * Design adaptatif avec contrastes renforcés et effets de néon
 * 
 * Inspiré de aiht.online
 * Thème : Dark spatial luxe, glass-plate amélioré, effets de lueur
 * Typographie : Outfit (titres) + Inter (corps)
 * 
 * @package AIHT_Core
 * @since 2.1.0
 */

/* ============================================================
   GOOGLE FONTS — Outfit + Inter
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (VARIABLES) — THÈME SOMBRE LUXE
   ============================================================ */

:root {
    /* ==========================================================
       PALETTE SPATIALE — Fond avec dégradé subtil
       ========================================================== */
    --aiht-bg-spatial: #0A0A14;
    --aiht-bg-spatial-gradient: radial-gradient(ellipse at 50% 0%, #141430 0%, #0A0A14 70%);
    --aiht-bg-surface: #0F0F22;
    --aiht-bg-card: linear-gradient(145deg, rgba(26, 26, 46, 0.92) 0%, rgba(18, 18, 30, 0.96) 100%);
    --aiht-bg-card-hover: linear-gradient(145deg, rgba(32, 32, 58, 0.92) 0%, rgba(22, 22, 38, 0.96) 100%);
    
    /* ==========================================================
       COULEURS D'ACCENT — Plus vibrantes pour meilleure visibilité
       ========================================================== */
    --aiht-cobalt: #4F8CF7;
    --aiht-cobalt-dark: #3B6FD4;
    --aiht-cobalt-glow: rgba(79, 140, 247, 0.25);
    --aiht-violet: #9B7CF7;
    --aiht-violet-dark: #7B5FD4;
    --aiht-violet-glow: rgba(155, 124, 247, 0.25);
    --aiht-emerald: #4ADE8B;
    --aiht-emerald-glow: rgba(74, 222, 139, 0.2);
    --aiht-red: #F87171;
    --aiht-red-glow: rgba(248, 113, 113, 0.15);
    --aiht-yellow: #FBBF24;
    --aiht-yellow-glow: rgba(251, 191, 36, 0.2);
    --aiht-rose: #F472B6;
    --aiht-rose-glow: rgba(244, 114, 182, 0.15);
    
    /* ==========================================================
       DÉGRADÉS — Plus riches
       ========================================================== */
    --aiht-gradient-primary: linear-gradient(135deg, var(--aiht-cobalt) 0%, var(--aiht-violet) 100%);
    --aiht-gradient-primary-hover: linear-gradient(135deg, var(--aiht-cobalt-dark) 0%, var(--aiht-violet-dark) 100%);
    --aiht-gradient-text: linear-gradient(135deg, var(--aiht-cobalt) 0%, var(--aiht-violet) 50%, var(--aiht-cobalt) 100%);
    --aiht-gradient-emerald: linear-gradient(135deg, #34D399 0%, var(--aiht-emerald) 100%);
    
    /* ==========================================================
       TEXTE — Opacités renforcées
       ========================================================== */
    --aiht-text-primary: #FFFFFF;
    --aiht-text-secondary: rgba(255, 255, 255, 0.78);
    --aiht-text-muted: rgba(255, 255, 255, 0.5);
    --aiht-text-inverse: #0A0A14;
    
    /* ==========================================================
       BORDURES — Plus visibles
       ========================================================== */
    --aiht-border-subtle: rgba(255, 255, 255, 0.08);
    --aiht-border-medium: rgba(255, 255, 255, 0.12);
    --aiht-border-strong: rgba(255, 255, 255, 0.18);
    --aiht-border-violet: rgba(155, 124, 247, 0.3);
    --aiht-border-cobalt: rgba(79, 140, 247, 0.3);
    --aiht-border-emerald: rgba(74, 222, 139, 0.3);
    
    /* ==========================================================
       OMBRES ET LUEURS — Effet néon/luxe
       ========================================================== */
    --aiht-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
    --aiht-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --aiht-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --aiht-shadow-xl: 0 20px 80px rgba(0, 0, 0, 0.7);
    
    /* Glow internes (effet de lueur sur les cartes) */
    --aiht-border-glow: inset 0 1px 1px rgba(255, 255, 255, 0.06), 0 4px 30px rgba(0, 0, 0, 0.5);
    --aiht-border-glow-hover: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 4px 40px rgba(0, 0, 0, 0.6);
    
    /* Glow externes (effet de néon) */
    --aiht-shadow-glow-cobalt: 0 0 50px rgba(79, 140, 247, 0.12);
    --aiht-shadow-glow-violet: 0 0 50px rgba(155, 124, 247, 0.12);
    --aiht-shadow-glow-emerald: 0 0 50px rgba(74, 222, 139, 0.1);
    --aiht-shadow-glow-gold: 0 0 50px rgba(251, 191, 36, 0.1);
    
    /* ==========================================================
       BORDER RADIUS
       ========================================================== */
    --aiht-radius-sm: 8px;
    --aiht-radius-md: 12px;
    --aiht-radius-lg: 16px;
    --aiht-radius-xl: 20px;
    --aiht-radius-2xl: 24px;
    --aiht-radius-3xl: 32px;
    --aiht-radius-full: 9999px;
    
    /* ==========================================================
       TYPOGRAPHIE
       ========================================================== */
    --aiht-font-heading: 'Outfit', sans-serif;
    --aiht-font-body: 'Inter', sans-serif;
    --aiht-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --aiht-text-xs: 0.75rem;
    --aiht-text-sm: 0.875rem;
    --aiht-text-base: 1rem;
    --aiht-text-lg: 1.125rem;
    --aiht-text-xl: 1.25rem;
    --aiht-text-2xl: 1.5rem;
    --aiht-text-3xl: 1.875rem;
    --aiht-text-4xl: 2.25rem;
    --aiht-text-5xl: 3rem;
    --aiht-text-6xl: 3.75rem;
    
    --aiht-weight-light: 300;
    --aiht-weight-normal: 400;
    --aiht-weight-medium: 500;
    --aiht-weight-semibold: 600;
    --aiht-weight-bold: 700;
    --aiht-weight-extrabold: 800;
    --aiht-weight-black: 900;
    
    --aiht-leading-tight: 1.1;
    --aiht-leading-normal: 1.5;
    --aiht-leading-relaxed: 1.7;
    
    /* ==========================================================
       ESPACEMENTS
       ========================================================== */
    --aiht-space-xs: 0.5rem;
    --aiht-space-sm: 0.75rem;
    --aiht-space-md: 1rem;
    --aiht-space-lg: 1.5rem;
    --aiht-space-xl: 2rem;
    --aiht-space-2xl: 3rem;
    --aiht-space-3xl: 4rem;
    --aiht-space-4xl: 6rem;
    --aiht-space-5xl: 8rem;
    
    /* ==========================================================
       TRANSITIONS
       ========================================================== */
    --aiht-ease-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --aiht-ease-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --aiht-ease-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --aiht-ease-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* ==========================================================
       Z-INDEX
       ========================================================== */
    --aiht-z-base: 1;
    --aiht-z-dropdown: 10;
    --aiht-z-sticky: 100;
    --aiht-z-modal-overlay: 1000;
    --aiht-z-modal: 1001;
    --aiht-z-tooltip: 1100;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.aiht-page {
    font-family: var(--aiht-font-body);
    font-size: var(--aiht-text-base);
    line-height: var(--aiht-leading-normal);
    color: var(--aiht-text-primary);
    background: var(--aiht-bg-spatial-gradient);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

.aiht-heading-1,
.aiht-heading-2,
.aiht-heading-3,
.aiht-heading-4 {
    font-family: var(--aiht-font-heading);
    font-weight: var(--aiht-weight-bold);
    line-height: var(--aiht-leading-tight);
    letter-spacing: -0.02em;
    color: var(--aiht-text-primary);
}

.aiht-heading-1 { font-size: var(--aiht-text-5xl); }
.aiht-heading-2 { font-size: var(--aiht-text-4xl); }
.aiht-heading-3 { font-size: var(--aiht-text-2xl); }
.aiht-heading-4 { font-size: var(--aiht-text-xl); }

.aiht-text-body {
    font-size: var(--aiht-text-base);
    line-height: var(--aiht-leading-relaxed);
    color: var(--aiht-text-secondary);
}

.aiht-text-small {
    font-size: var(--aiht-text-sm);
    color: var(--aiht-text-muted);
}

.aiht-text-gradient {
    background: var(--aiht-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: aiht-gradient-shift 4s ease infinite;
}

@keyframes aiht-gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ============================================================
   LAYOUT
   ============================================================ */

.aiht-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--aiht-space-lg);
}

.aiht-container--narrow {
    max-width: 800px;
}

.aiht-section {
    padding: var(--aiht-space-4xl) 0;
}

.aiht-section__header {
    text-align: center;
    margin-bottom: var(--aiht-space-3xl);
}

.aiht-section__subtitle {
    font-size: var(--aiht-text-sm);
    color: var(--aiht-text-secondary);
    font-weight: var(--aiht-weight-light);
    max-width: 560px;
    margin: var(--aiht-space-md) auto 0;
    line-height: var(--aiht-leading-relaxed);
}

/* ============================================================
   GLASS-PLATE LUXE (CARTES EN VERRE DÉPOLI AVEC EFFET DE LUEUR)
   ============================================================ */

.aiht-glass {
    position: relative;
    background: var(--aiht-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-xl);
    box-shadow: var(--aiht-border-glow);
    transition: all var(--aiht-ease-normal);
    overflow: hidden;
}

/* Effet de grain (texture luxueuse) */
.aiht-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 0;
}

.aiht-glass>* {
    position: relative;
    z-index: 1;
}

.aiht-glass:hover {
    background: var(--aiht-bg-card-hover);
    border-color: var(--aiht-border-medium);
    box-shadow: var(--aiht-border-glow-hover);
    transform: translateY(-2px);
}

.aiht-glass--violet {
    border-color: var(--aiht-border-violet);
}

.aiht-glass--violet:hover {
    border-color: rgba(155, 124, 247, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-violet);
}

.aiht-glass--emerald {
    border-color: var(--aiht-border-emerald);
}

.aiht-glass--emerald:hover {
    border-color: rgba(74, 222, 139, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-emerald);
}

.aiht-glass--cobalt {
    border-color: var(--aiht-border-cobalt);
}

.aiht-glass--cobalt:hover {
    border-color: rgba(79, 140, 247, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-cobalt);
}

/* ============================================================
   BOUTONS LUXE
   ============================================================ */

.aiht-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--aiht-space-sm);
    padding: var(--aiht-space-md) var(--aiht-space-xl);
    font-family: var(--aiht-font-body);
    font-size: var(--aiht-text-sm);
    font-weight: var(--aiht-weight-semibold);
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--aiht-radius-full);
    cursor: pointer;
    transition: all var(--aiht-ease-fast);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.aiht-btn:hover {
    transform: translateY(-2px);
}

.aiht-btn:active {
    transform: translateY(0px);
}

.aiht-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Bouton primaire — Dégradé Cobalt → Violet avec effet de lueur */
.aiht-btn--primary {
    background: var(--aiht-gradient-primary);
    color: var(--aiht-text-primary);
    border: none;
    box-shadow: 0 4px 25px var(--aiht-cobalt-glow);
    font-weight: var(--aiht-weight-bold);
}

.aiht-btn--primary:hover {
    background: var(--aiht-gradient-primary-hover);
    box-shadow: 0 8px 40px var(--aiht-cobalt-glow);
}

.aiht-btn--primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Bouton glow blanc */
.aiht-btn--glow {
    background: var(--aiht-text-primary);
    color: var(--aiht-text-inverse);
    border: none;
    font-weight: var(--aiht-weight-bold);
    box-shadow: 0 4px 25px rgba(255, 255, 255, 0.15);
}

.aiht-btn--glow:hover {
    background: #E5E7EB;
    box-shadow: 0 8px 40px rgba(255, 255, 255, 0.2);
}

/* Bouton outline avec effet de lueur */
.aiht-btn--outline {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--aiht-border-medium);
    color: var(--aiht-text-primary);
}

.aiht-btn--outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--aiht-border-strong);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}

/* Bouton émeraude */
.aiht-btn--emerald {
    background: var(--aiht-gradient-emerald);
    color: var(--aiht-text-primary);
    border: none;
    box-shadow: 0 4px 25px var(--aiht-emerald-glow);
}

.aiht-btn--emerald:hover {
    box-shadow: 0 8px 40px var(--aiht-emerald-glow);
}

/* Tailles */
.aiht-btn--lg {
    padding: var(--aiht-space-lg) var(--aiht-space-2xl);
    font-size: var(--aiht-text-base);
}

.aiht-btn--block {
    width: 100%;
}

/* ============================================================
   BADGES LUXE
   ============================================================ */

.aiht-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--aiht-space-xs);
    padding: var(--aiht-space-xs) var(--aiht-space-lg);
    font-size: var(--aiht-text-xs);
    font-weight: var(--aiht-weight-semibold);
    border-radius: var(--aiht-radius-full);
    letter-spacing: 0.02em;
}

.aiht-badge--violet {
    background: rgba(155, 124, 247, 0.15);
    border: 1px solid rgba(155, 124, 247, 0.25);
    color: var(--aiht-violet);
}

.aiht-badge--cobalt {
    background: rgba(79, 140, 247, 0.15);
    border: 1px solid rgba(79, 140, 247, 0.25);
    color: var(--aiht-cobalt);
}

.aiht-badge--emerald {
    background: rgba(74, 222, 139, 0.15);
    border: 1px solid rgba(74, 222, 139, 0.25);
    color: var(--aiht-emerald);
}

.aiht-badge--gold {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--aiht-yellow);
}

.aiht-badge--inactive {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: var(--aiht-text-secondary);
}

/* Badge avec dot pulsé */
.aiht-badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: aiht-pulse-dot 2s infinite;
}

@keyframes aiht-pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.6; box-shadow: 0 0 0 8px transparent; }
}

/* ============================================================
   ORBES D'ARRIÈRE-PLAN — Plus vibrantes
   ============================================================ */

.aiht-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.aiht-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.12;
}

.aiht-orb--cobalt {
    background: var(--aiht-cobalt);
    width: 700px;
    height: 700px;
    top: -30%;
    left: -15%;
    animation: aiht-orb-float-1 20s ease-in-out infinite alternate;
}

.aiht-orb--violet {
    background: var(--aiht-violet);
    width: 600px;
    height: 600px;
    bottom: -30%;
    right: -15%;
    opacity: 0.08;
    animation: aiht-orb-float-2 15s ease-in-out 3s infinite alternate-reverse;
}

.aiht-orb--emerald {
    background: var(--aiht-emerald);
    width: 400px;
    height: 400px;
    top: 40%;
    left: 50%;
    opacity: 0.05;
    animation: aiht-orb-float-3 18s ease-in-out 5s infinite alternate;
}

@keyframes aiht-orb-float-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 60px) scale(1.3); }
}

@keyframes aiht-orb-float-2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -50px) scale(1.2); }
}

@keyframes aiht-orb-float-3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, -30px) scale(1.5); }
}

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

@keyframes aiht-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes aiht-fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes aiht-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes aiht-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes aiht-pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--aiht-cobalt-glow); }
    50% { box-shadow: 0 0 40px var(--aiht-cobalt-glow), 0 0 60px var(--aiht-violet-glow); }
}

.aiht-animate-fade-in {
    animation: aiht-fade-in var(--aiht-ease-normal) ease-out;
}

.aiht-animate-fade-in-up {
    animation: aiht-fade-in-up var(--aiht-ease-slow) ease-out;
}

.aiht-animate-scale-in {
    animation: aiht-scale-in var(--aiht-ease-normal) ease-out;
}

.aiht-animate-pulse-glow {
    animation: aiht-pulse-glow 3s ease-in-out infinite;
}

/* ============================================================
   UTILITIES
   ============================================================ */

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

.aiht-mt-1 { margin-top: var(--aiht-space-md); }
.aiht-mt-2 { margin-top: var(--aiht-space-xl); }
.aiht-mt-3 { margin-top: var(--aiht-space-2xl); }
.aiht-mb-1 { margin-bottom: var(--aiht-space-md); }
.aiht-mb-2 { margin-bottom: var(--aiht-space-xl); }
.aiht-mb-3 { margin-bottom: var(--aiht-space-2xl); }

.aiht-hidden { display: none !important; }

.aiht-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip link */
.aiht-skip-link:focus {
    position: fixed;
    top: var(--aiht-space-md);
    left: var(--aiht-space-md);
    z-index: 9999;
    padding: var(--aiht-space-md) var(--aiht-space-lg);
    background: var(--aiht-text-primary);
    color: var(--aiht-text-inverse);
    border-radius: var(--aiht-radius-md);
    font-weight: var(--aiht-weight-bold);
    clip: auto;
    width: auto;
    height: auto;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.aiht-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--aiht-text-primary);
    border-radius: 50%;
    animation: aiht-spin 0.6s linear infinite;
}

.aiht-spinner--violet {
    border-color: rgba(155, 124, 247, 0.2);
    border-top-color: var(--aiht-violet);
}

/* ============================================================
   SCROLLBAR STYLISÉE
   ============================================================ */

body.aiht-page::-webkit-scrollbar {
    width: 6px;
}

body.aiht-page::-webkit-scrollbar-track {
    background: var(--aiht-bg-spatial);
}

body.aiht-page::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

body.aiht-page::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   ANIMATION FADE-IN-UP (pour FAQ et autres)
   ============================================================ */
@keyframes aiht-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}