
@import url('https://fonts.googleapis.com/css2?family=Gilda+Display&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg: #0A0A0A;
    --bg-subtle: #111111;
    --text: #FAFAFA;
    --text-muted: #888888;
    --accent: #D4AF37;
    --accent-light: #F4D03F;
    --card-bg: #151515;
    --border: #2A2A2A;
    --shadow: 0 2px 40px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 60px rgba(212,175,55,0.15);
    --glow: 0 0 40px rgba(212,175,55,0.1);
    --bullshit-low: #4ADE80;
    --bullshit-medium: #FBBF24;
    --bullshit-high: #F87171;
    --bullshit-extreme: #A855F7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =====================================
   NAVBAR DESKTOP
   ===================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.visible {
    transform: translateY(0);
    opacity: 1;
    border-bottom-color: var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar-title {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.navbar-title:hover {
    color: var(--accent);
}

.navbar-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.navbar-by {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.navbar-by:hover {
    opacity: 0.7;
}

.navbar-by span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.navbar-logo-img {
    height: 14px;
    width: auto;
    opacity: 0.7;
}

.navbar-center {
    display: flex;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.navbar-link:hover {
    color: var(--text);
}

.navbar-link:hover::after {
    width: 100%;
}

.navbar-link.active {
    color: var(--accent);
}

.navbar-link.active::after {
    width: 100%;
}

.navbar-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-link-cta {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-link-cta:hover {
    color: var(--accent);
}

.navbar-link-cta.external svg {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.navbar-link-cta.external:hover svg {
    opacity: 1;
}

.navbar-contact-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 100px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.navbar-contact-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.navbar-contact-btn svg {
    transition: transform 0.3s ease;
}

.navbar-contact-btn:hover svg {
    transform: translate(2px, -2px);
}

.button-apl.small {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

/* =====================================
   HAMBURGER MENU
   ===================================== */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.navbar-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
    transform-origin: center;
}

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

.navbar-hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile navbar adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .navbar-center,
    .navbar-cta {
        display: none;
    }

    .navbar-hamburger {
        display: flex;
    }
}

/* =====================================
   MOBILE MENU
   ===================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.mobile-menu-link {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    color: var(--accent);
}

.mobile-menu-link.external {
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-muted);
}

.mobile-menu-link.external:hover {
    color: var(--accent);
}

.mobile-menu-divider {
    width: 60px;
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

/* =====================================
   PARTICULES DE CENDRES
   ===================================== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(200,200,200,0.4) 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float-up linear infinite;
}

.particle.ember {
    background: radial-gradient(circle, rgba(212,175,55,0.9) 0%, rgba(255,140,50,0.5) 40%, transparent 70%);
    box-shadow: 0 0 6px rgba(212,175,55,0.5);
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) translateX(var(--drift)) rotate(360deg);
        opacity: 0;
    }
}

/* Lueur ambiante */
.ambient-glow {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(212,175,55,0.08) 0%, rgba(255,100,50,0.03) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Contenu principal */
.main-content {
    position: relative;
    z-index: 2;
}

/* =====================================
   HERO SECTION
   ===================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50% { opacity: 0.5; box-shadow: 0 0 4px var(--accent); }
}

.hero h1 {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    max-width: 900px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.1s both;
    color: var(--text);
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
    text-shadow: 0 0 30px rgba(212,175,55,0.3);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* =====================================
   GÉNÉRATEUR DE PHRASES
   ===================================== */
.generator-section {
    min-height: 100vh;
    max-height: 100vh;
    padding: 2rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    scroll-margin-top: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Sélecteur de niveau */
.niveau-selector {
    margin-bottom: 2rem;
    text-align: center;
}

.niveau-selector-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.niveau-selector-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.niveau-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.niveau-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.niveau-btn.active {
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(212,175,55,0.2);
}

.niveau-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}

.niveau-dot.filled {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(212,175,55,0.5);
}

.generator-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    max-height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
}

.generator-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* =====================================
   CONVERSATION STYLE
   ===================================== */
.conversation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.message {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.message:hover {
    border-color: rgba(212,175,55,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.message-nephew {
    /* Style par défaut */
}

.message-tonton {
    border-color: rgba(212,175,55,0.2);
    background: linear-gradient(135deg, rgba(212,175,55,0.05) 0%, transparent 100%);
}

/* Styles EXTRA BULLSHIT - Phrases MAX avec effets de flamme */
.message-nephew.max-bullshit {
    position: relative;
    border: 2px solid #ff3300;
    background: linear-gradient(135deg, rgba(255,50,0,0.1) 0%, rgba(255,100,0,0.05) 50%, transparent 100%);
    box-shadow:
        0 0 20px rgba(255,50,0,0.3),
        0 0 40px rgba(255,100,0,0.2),
        inset 0 0 30px rgba(255,50,0,0.1);
    animation: flame-glow 3s ease-in-out infinite;
}

.message-nephew.max-bullshit::before,
.message-nephew.max-bullshit::after {
    content: '🔥';
    position: absolute;
    font-size: 2rem;
    animation: flicker 2s ease-in-out infinite;
    z-index: 1;
}

.message-nephew.max-bullshit::before {
    top: -15px;
    left: 10px;
    animation-delay: 0s;
}

.message-nephew.max-bullshit::after {
    top: -15px;
    right: 10px;
    animation-delay: 0.5s;
}

@keyframes flame-glow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255,50,0,0.3),
            0 0 40px rgba(255,100,0,0.2),
            inset 0 0 30px rgba(255,50,0,0.1);
        border-color: #ff3300;
    }
    50% {
        box-shadow:
            0 0 30px rgba(255,50,0,0.5),
            0 0 60px rgba(255,100,0,0.3),
            inset 0 0 40px rgba(255,50,0,0.15);
        border-color: #ff6600;
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    25% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.1);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(0.95);
    }
    75% {
        opacity: 0.9;
        transform: translateY(-3px) scale(1.05);
    }
}

.message-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* =====================================
   AVATARS DYNAMIQUES
   ===================================== */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border);
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    flex-shrink: 0;
}

.message-tonton .avatar {
    border-color: rgba(212,175,55,0.4);
    background: linear-gradient(135deg, #2a2a1e 0%, #1e1e16 100%);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 1.6rem;
}

.message-meta {
    flex: 1;
}

.message-meta h3 {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
    color: var(--text);
}

.message-tonton .message-meta h3 {
    color: var(--accent);
}

.message-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.category-badge {
    padding: 0.4rem 0.8rem;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-badge.extra-bullshit {
    background: rgba(255,0,0,0.15);
    border: 2px solid #ff0000;
    color: #ff0000;
    font-weight: 800;
    animation: pulse-red 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255,0,0,0.3);
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255,0,0,0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(255,0,0,0.5);
        transform: scale(1.05);
    }
}

/* =====================================
   CONTENU DES MESSAGES
   ===================================== */
.message-content {
    padding: 0.5rem 0 0 0;
}

.message-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: 'Gilda Display', Georgia, serif;
    color: var(--text);
    margin: 0;
}

/* Bullshit Meter */
.bullshit-meter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.bullshit-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    max-width: 200px;
}

.bullshit-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff6b35);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.bullshit-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bullshit-label span {
    color: var(--accent);
}

/* Extra bullshit (100%) */
.message-nephew.max-bullshit .bullshit-fill {
    background: linear-gradient(90deg, #ff3300, #ff0000);
    animation: bullshit-pulse 1s ease-in-out infinite;
}

@keyframes bullshit-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =====================================
   TERMES CLIQUABLES - STYLE VISIBLE
   ===================================== */
.message-content term {
    color: var(--accent);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 1px dashed rgba(212,175,55,0.6);
    padding-bottom: 2px;
    font-weight: 500;
}

.message-content term:hover {
    color: #e6c44a;
    border-bottom-color: var(--accent);
    border-bottom-style: solid;
    text-shadow: 0 0 20px rgba(212,175,55,0.4);
}

/* =====================================
   TOOLTIP
   ===================================== */
.tooltip {
    position: fixed;
    background: var(--text);
    color: var(--bg);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 320px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-family: 'DM Sans', sans-serif;
    pointer-events: none;
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-term {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.tooltip-definition {
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.tooltip-trad {
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ddd;
}

.tooltip-trad strong {
    color: var(--bg);
    font-style: normal;
}

.tooltip-cta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ddd;
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


/* =====================================
   BOUTONS
   ===================================== */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button-apl {
    padding: 1rem 2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.button-apl.primary {
    background: var(--text);
    color: var(--bg);
}

.button-apl.primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,255,255,0.2);
}

.button-apl.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.button-apl.secondary:hover {
    border-color: var(--text);
    background: var(--card-bg);
}

.button-apl.external-link svg {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.button-apl.external-link:hover svg {
    opacity: 1;
    transform: translate(2px, -2px);
}

.button-apl svg {
    width: 18px;
    height: 18px;
}

/* =====================================
   LEXIQUE COMPLET
   ===================================== */
.lexique-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-header h2 .gold {
    color: var(--accent);
}

.section-header p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Filtres catégories */
.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Séparateur de niveau */
.niveau-separator {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0 2rem 0;
    position: relative;
}

.niveau-separator:first-child {
    margin-top: 0;
}

.niveau-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    padding-right: 2rem;
    position: relative;
}

.niveau-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.3;
}

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

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

@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.card:hover::before {
    opacity: 1;
}

.card-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-term {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    color: white;
}

.card:hover .card-term {
    color: var(--accent);
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-bullshit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-bullshit-dots {
    display: flex;
    gap: 4px;
}

.card-bullshit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}

.card-bullshit-dot.filled {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(212,175,55,0.5);
}

.card-bullshit-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.card.active .card-content {
    max-height: 500px;
    opacity: 1;
}

.card-definition {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text);
}

.card-definition strong {
    color: var(--accent);
}

.card-traduction {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.card:hover .card-toggle {
    color: var(--text);
}

.card-toggle svg {
    transition: transform 0.3s ease;
}

.card.active .card-toggle svg {
    transform: rotate(45deg);
}

.card.hidden {
    display: none;
}

/* Highlight quand on clique sur un terme */
.card.highlighted {
    border-color: var(--accent) !important;
    box-shadow: 
        0 0 0 1px var(--accent),
        0 0 30px rgba(212, 175, 55, 0.3),
        0 8px 40px rgba(212, 175, 55, 0.2);
    transform: translateY(-4px);
    animation: highlight-pulse 1s ease-in-out 2;
}

.card.highlighted::before {
    opacity: 1 !important;
}

.card.highlighted .card-term {
    color: var(--accent);
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: 0 0 0 1px var(--accent), 0 0 30px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 0 2px var(--accent), 0 0 50px rgba(212, 175, 55, 0.5); }
}

/* =====================================
   BANDEAU DE TRANSITION
   ===================================== */
.transition-banner {
    background: var(--bg);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(212,175,55,0.15);
    border-bottom: 1px solid rgba(212,175,55,0.15);
}

.transition-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

.transition-banner p {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1.75rem;
    color: var(--accent);
    margin: 0;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* =====================================
   SECTION NIVEAUX D'IA - TIMELINE
   ===================================== */
.ai-levels-section {
    padding: 6rem 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.timeline-container {
    position: relative;
    margin: 5rem auto 2rem;
    padding: 2rem 0;
}

/* Ligne verticale centrale - base sombre */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: -4rem;
    width: 3px;
    background: rgba(212,175,55,0.15);
    transform: translateX(-50%);
}

/* Ligne lumineuse qui s'anime au scroll */
.timeline-line-glow {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg,
        rgba(212,175,55,1) 0%,
        rgba(212,175,55,0.9) 80%,
        rgba(212,175,55,0.6) 100%
    );
    transform: translateX(-50%);
    transition: height 0.15s ease-out;
    box-shadow:
        0 0 10px rgba(212,175,55,0.6),
        0 0 20px rgba(212,175,55,0.4),
        0 0 40px rgba(212,175,55,0.2);
    z-index: 1;
}

/* Items de la timeline */
.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 6rem;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:last-of-type {
    margin-bottom: 0;
}

.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }
.timeline-item:nth-child(4) { animation-delay: 0.3s; }
.timeline-item:nth-child(5) { animation-delay: 0.4s; }
.timeline-item:nth-child(6) { animation-delay: 0.5s; }
.timeline-item:nth-child(7) { animation-delay: 0.6s; }

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

/* Items à gauche */
.timeline-item.left {
    flex-direction: row;
    justify-content: flex-end;
}

.timeline-item.left .timeline-content {
    text-align: right;
    margin-right: 3rem;
}

/* Items à droite */
.timeline-item.right {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.timeline-item.right .timeline-content {
    text-align: left;
    margin-left: 3rem;
}

/* Contenu des items */
.timeline-content {
    max-width: 450px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(212,175,55,0.1);
}

/* Numéro de niveau */
.level-number {
    font-size: 5rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 2px rgba(212,175,55,0.2);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'DM Sans', sans-serif;
}

.timeline-item.highlighted .level-number {
    -webkit-text-stroke: 2px rgba(212,175,55,0.5);
    animation: glow-number 2s ease-in-out infinite;
}

@keyframes glow-number {
    0%, 100% {
        -webkit-text-stroke: 2px rgba(212,175,55,0.5);
        filter: drop-shadow(0 0 10px rgba(212,175,55,0.3));
    }
    50% {
        -webkit-text-stroke: 2px rgba(212,175,55,0.8);
        filter: drop-shadow(0 0 20px rgba(212,175,55,0.5));
    }
}

/* Titres */
.timeline-content h3 {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Description */
.timeline-content p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1rem;
}

/* Points sur la timeline */
.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--bg);
    border: 3px solid rgba(212,175,55,0.5);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(212,175,55,0.5);
    transform: translateX(-50%) scale(1.3);
}

.timeline-dot::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-item:hover .timeline-dot::before {
    opacity: 1;
}

/* Item highlighted (niveau 4) */
.timeline-item.highlighted .timeline-content {
    background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, transparent 100%);
    border-color: rgba(212,175,55,0.5);
    border-width: 2px;
}

.timeline-item.highlighted .timeline-dot {
    border-width: 4px;
    border-color: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

.timeline-item.highlighted .timeline-dot::before {
    opacity: 1;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212,175,55,0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(212,175,55,0);
    }
}

/* Scroll-based animation states */
.timeline-item {
    opacity: 0.3;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.scroll-active {
    opacity: 1;
}

.timeline-item.scroll-active .timeline-content {
    border-color: rgba(212,175,55,0.4);
    box-shadow:
        0 10px 40px rgba(0,0,0,0.5),
        0 0 40px rgba(212,175,55,0.15),
        inset 0 1px 0 rgba(212,175,55,0.1);
    background: linear-gradient(135deg, rgba(212,175,55,0.05) 0%, transparent 50%);
}

.timeline-item.scroll-active .level-number {
    -webkit-text-stroke: 2px rgba(212,175,55,0.6);
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.3));
}

.timeline-item.scroll-active .timeline-content h3 {
    color: var(--accent);
}

.timeline-dot {
    transition: all 0.4s ease;
    z-index: 2;
}

.timeline-dot.active {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow:
        0 0 15px rgba(212,175,55,0.8),
        0 0 30px rgba(212,175,55,0.5),
        0 0 45px rgba(212,175,55,0.3);
    transform: translateX(-50%) scale(1.3);
}

.timeline-dot.active::before {
    opacity: 1;
    background: #fff;
}

/* Timeline Finale - Transition vers CTA */
.timeline-finale {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem 3rem;
    position: relative;
    margin-top: 0;
}

.timeline-finale .finale-dot {
    position: relative;
    left: auto;
    transform: none;
    width: 24px;
    height: 24px;
    margin-bottom: 1.5rem;
    z-index: 2;
}

.timeline-finale .finale-dot::before {
    width: 14px;
    height: 14px;
}

.timeline-finale.scroll-active .finale-dot {
    background: var(--accent);
    box-shadow: 0 0 30px rgba(212,175,55,0.6);
}

.timeline-finale.scroll-active .finale-dot::before {
    background: #fff;
    opacity: 1;
}

.finale-content {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.timeline-finale.scroll-active .finale-content {
    opacity: 1;
    transform: translateY(0);
}

.finale-question {
    display: block;
    font-family: 'Gilda Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(212,175,55,0.4);
}

.finale-subtext {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-line {
        left: 30px;
    }

    .timeline-line-glow {
        left: 30px;
        transform: none;
    }

    .timeline-item.left,
    .timeline-item.right {
        flex-direction: row;
        justify-content: flex-start;
        padding-left: 70px;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        text-align: left;
        margin: 0;
    }

    .timeline-dot {
        position: absolute;
        left: 20px;
        transform: none;
    }

    .timeline-dot.active {
        transform: scale(1.2);
    }

    .level-number {
        font-size: 3rem;
    }

    .timeline-content {
        padding: 1.5rem;
        max-width: none;
    }

    .timeline-content h3 {
        font-size: 1.3rem;
    }

    /* Timeline Finale mobile */
    .timeline-finale {
        align-items: flex-start;
        padding-left: 70px;
    }

    .timeline-finale .finale-dot {
        position: absolute;
        left: 20px;
    }

    .finale-content {
        text-align: left;
    }

    .timeline-content p {
        font-size: 0.9rem;
    }

    .timeline-item {
        margin-bottom: 3rem;
    }

    .timeline-cta-transition {
        padding: 3rem 1.5rem 1rem;
    }
}

/* =====================================
   SECTION CTA LEAD MAGNET
   ===================================== */
.cta-section {
    padding: 4rem 2rem 6rem;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.02) 30%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 80px;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(212,175,55,0.08) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.cta-section.illuminated::before {
    opacity: 1;
}

/* Glowing line that connects to CTA */
.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, var(--accent), transparent);
    transition: height 0.8s ease;
}

.cta-section.illuminated::after {
    height: 80px;
}

.cta-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.cta-content h2 {
    font-family: 'Gilda Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.cta-content h2 .gold {
    color: var(--accent);
}

.cta-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cta-features li {
    font-size: 1rem;
    color: var(--text);
    padding-left: 1.5rem;
    position: relative;
}

.cta-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cta-reassurance {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* CTA Visual / Card */
.cta-visual {
    display: flex;
    justify-content: center;
}

.cta-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), rgba(212, 175, 55, 0.3));
    z-index: 1;
}

.cta-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg);
}

.cta-team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: transform 0.4s ease;
}

.cta-card:hover .cta-team-photo {
    transform: scale(1.03);
}

.cta-card-content {
    padding: 1.5rem;
}

.cta-card-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.cta-stat-mini {
    text-align: center;
}

.cta-stat-number {
    display: block;
    font-family: 'Gilda Display', Georgia, serif;
    font-size: 1.75rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.cta-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-card-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Client logos band */
.cta-clients {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.cta-clients-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cta-clients-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.cta-clients-logos:hover {
    opacity: 1;
}

.cta-clients-logos img {
    height: 28px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cta-clients-logos img:hover {
    transform: scale(1.1);
    opacity: 1;
}

@media (max-width: 900px) {
    .cta-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-description {
        max-width: none;
    }

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

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

    .cta-visual {
        order: -1;
    }

    .cta-card {
        max-width: 350px;
    }

    .cta-clients {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .cta-clients-logos {
        gap: 2rem;
    }

    .cta-clients-logos img {
        height: 22px;
    }
}

@media (max-width: 640px) {
    .cta-section {
        padding: 4rem 1.5rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-description {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .button-apl {
        width: 100%;
        justify-content: center;
    }

    .cta-card {
        max-width: 100%;
    }

    .cta-card-image {
        height: 200px;
    }

    .cta-clients-logos {
        gap: 1.5rem;
    }

    .cta-clients-logos img {
        height: 18px;
    }
}

@media (max-width: 480px) {
    .cta-section {
        padding: 3rem 1rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-description {
        font-size: 0.95rem;
    }

    .cta-features li {
        font-size: 0.9rem;
    }

    .cta-card-content {
        padding: 1rem;
    }

    .cta-card-tagline {
        font-size: 0.8rem;
    }

    .cta-clients-logos {
        gap: 1rem;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
    }

    .cta-clients-logos img {
        height: 18px;
    }

    .cta-reassurance {
        font-size: 0.75rem;
    }
}

/* =====================================
   FOOTER
   ===================================== */
footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: block;
    transition: opacity 0.3s ease;
}

.footer-brand:hover {
    opacity: 0.7;
}

.footer-logo {
    height: 32px;
    width: auto;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer p a {
    color: var(--accent);
    text-decoration: none;
}

footer p a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* =====================================
   ANIMATIONS
   ===================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-1deg); }
    75% { transform: translateX(5px) rotate(1deg); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* =====================================
   TOAST NOTIFICATION
   ===================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: var(--bg);
    padding: 1rem 1.5rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* =====================================
   RESPONSIVE
   ===================================== */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
        min-height: 100svh;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .generator-section {
        padding: 1.5rem 1rem;
        min-height: 100svh;
        max-height: 100svh;
    }

    .generator-box {
        padding: 1rem;
        border-radius: 16px;
        max-height: calc(100svh - 4rem);
    }

    .message {
        padding: 1rem;
        border-radius: 12px;
    }

    .message-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .button-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .button-apl {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
    }

    .message-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .category-badge {
        order: 3;
        margin-top: 0.25rem;
        width: auto;
        text-align: center;
    }

    .lexique-section {
        padding: 4rem 1.5rem;
    }

    .section-header h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .ai-levels-section {
        padding: 4rem 1rem;
    }

    .timeline-container {
        margin: 3rem auto;
    }

    .niveau-selector-buttons {
        gap: 0.5rem;
    }

    .niveau-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .transition-banner {
        padding: 2rem 1.5rem;
    }

    .transition-banner p {
        font-size: 1.1rem;
    }
}

@media (max-width: 640px) {
    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 0.4rem;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }

    .scroll-indicator {
        bottom: 1.5rem;
        font-size: 0.75rem;
    }

    .avatar {
        width: 40px;
        height: 40px;
    }

    .message-meta h3 {
        font-size: 0.9rem;
    }

    .message-subtitle {
        font-size: 0.7rem;
    }

    .transition-banner p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-term {
        font-size: 1.4rem;
    }

    .card-definition {
        font-size: 0.9rem;
    }

    .tooltip {
        max-width: 280px;
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1rem;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 9vw, 2.2rem);
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .generator-section {
        padding: 1rem;
        min-height: 100svh;
        max-height: 100svh;
    }

    .generator-box {
        padding: 0.85rem;
        border-radius: 12px;
        max-height: calc(100svh - 3rem);
    }

    .message {
        padding: 0.85rem;
        border-radius: 10px;
    }

    .message-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .conversation {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .message-header {
        gap: 0.5rem;
    }

    .category-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .button-apl {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }

    .button-group {
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .lexique-section {
        padding: 3rem 1rem;
    }

    .ai-levels-section {
        padding: 3rem 1rem;
    }

    .timeline-item.left,
    .timeline-item.right {
        padding-left: 55px;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-line-glow {
        left: 20px;
    }

    .timeline-dot {
        left: 12px;
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .level-number {
        font-size: 2.5rem;
    }

    .timeline-content h3 {
        font-size: 1.15rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    .timeline-cta-transition {
        padding: 2rem 1rem 1rem;
    }

    .niveau-selector-buttons {
        flex-direction: column;
        align-items: stretch;
    }

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

    .section-header h2 {
        font-size: 1.4rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .mobile-menu-link {
        font-size: 1.25rem;
    }

    .mobile-menu-content {
        gap: 1.25rem;
    }
}

/* =====================================
   STORY MODAL
   ===================================== */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
}

.story-modal.visible {
    visibility: visible;
    pointer-events: auto;
}

.story-modal.visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: -1;
}

.story-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    cursor: pointer;
}

.story-modal-content {
    position: relative;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 95vw;
    max-width: 1400px;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.story-modal.visible .story-modal-content {
    transform: translateY(0) scale(1);
}

.story-modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.story-modal-close-btn:hover {
    background: var(--border);
    color: var(--text);
}

/* Preview zone - left side on desktop */
.story-preview-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: #080808;
    border-radius: 20px 0 0 20px;
    flex: 1;
    min-height: 400px;
}

#story-canvas {
    width: 100%;
    max-width: 550px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* Controls - right side on desktop */
.story-controls {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #0a0a0a;
    border-radius: 0 20px 20px 0;
    width: 500px;
    border-left: 1px solid var(--border);
}

/* Character Tabs */
.story-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.story-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.story-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s ease;
}

.story-tab:hover {
    color: var(--text);
    background: rgba(255,255,255,0.03);
}

.story-tab.active {
    color: var(--accent);
}

.story-tab.active::after {
    background: var(--accent);
}

.tab-emoji {
    font-size: 1.1rem;
}

.tab-label {
    font-family: inherit;
}

/* Panels */
.story-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.story-panel.active {
    display: flex;
}

.story-panel-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.story-field-name {
    flex: 1;
}

.story-field-name input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.story-field-name input:focus {
    outline: none;
    border-color: var(--accent);
}

.story-field-name input::placeholder {
    color: var(--text-muted);
}

/* Emoji picker */
.emoji-picker {
    display: flex;
    gap: 0.4rem;
}

.emoji-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    border-color: var(--text-muted);
    background: rgba(255,255,255,0.05);
}

.emoji-btn.active {
    border-color: var(--accent);
    background: rgba(212,175,55,0.15);
}

/* Panel Textarea */
.story-panel textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    line-height: 1.5;
    transition: all 0.2s ease;
    min-height: 120px;
    flex: 1;
}

.story-panel textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.story-panel textarea::placeholder {
    color: var(--text-muted);
}

/* Footer */
.story-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
    border-radius: 0 0 20px 0;
}

.story-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toggle-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.toggle-switch {
    width: 44px;
    height: 26px;
    border-radius: 13px;
    background: var(--border);
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: var(--accent);
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-switch.active .toggle-knob {
    left: 21px;
}

/* Download button */
.story-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-download-btn:hover {
    background: #e6c44a;
    transform: translateY(-1px);
}

.story-download-btn svg {
    width: 16px;
    height: 16px;
}

/* Animation du bouton Story */
.button-apl.generating {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Story modal responsive - Tablet */
@media (max-width: 1024px) {
    .story-modal-content {
        max-width: 95vw;
    }

    .story-controls {
        width: 400px;
    }

    #story-canvas {
        max-width: 450px;
    }
}

/* Story modal responsive - Mobile */
@media (max-width: 768px) {
    .story-modal-content {
        flex-direction: column;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100svh;
        max-height: 100vh;
        max-height: 100svh;
        border-radius: 0;
    }

    .story-preview-zone {
        padding: 1rem;
        border-radius: 0;
        min-height: auto;
        flex: 1;
    }

    #story-canvas {
        max-width: 350px;
    }

    .story-controls {
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-top: 1px solid var(--border);
        flex: 0;
    }

    .story-tab {
        padding: 0.7rem 0.5rem;
        font-size: 0.85rem;
    }

    .tab-emoji {
        font-size: 1.1rem;
    }

    .story-panel {
        padding: 1rem;
    }

    .story-panel textarea {
        min-height: 80px;
    }

    .emoji-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .story-footer {
        padding: 1rem;
        border-radius: 0;
    }

    .story-modal-close-btn {
        top: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .story-modal-content {
        border-radius: 0;
    }

    .story-modal-close-btn {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .story-preview-zone {
        padding: 0.75rem;
    }

    #story-canvas {
        max-width: 280px;
    }

    .story-tab {
        padding: 0.6rem 0.4rem;
        font-size: 0.75rem;
        gap: 0.3rem;
    }

    .tab-emoji {
        font-size: 0.9rem;
    }

    .story-panel {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .story-panel-row {
        gap: 0.5rem;
    }

    .story-field-name input {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    .emoji-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        border-radius: 5px;
    }

    .emoji-picker {
        gap: 0.2rem;
    }

    .story-panel textarea {
        font-size: 0.75rem;
        padding: 0.5rem 0.65rem;
        min-height: 40px;
        max-height: 55px;
    }

    .story-footer {
        padding: 0.6rem 0.75rem;
    }

    .toggle-label {
        font-size: 0.7rem;
    }

    .toggle-switch {
        width: 38px;
        height: 24px;
    }

    .toggle-knob {
        width: 18px;
        height: 18px;
    }

    .toggle-switch.active .toggle-knob {
        left: 19px;
    }

    .story-download-btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
}
