/* ==========================================================================
   PARKER LARESS — PREMIUM EDITION
   Noir profond & Or · Serif de luxe · Micro-interactions
   ========================================================================== */

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

:root {
    /* Surfaces */
    --bg-void: #050506;
    --bg-deep: #08080a;
    --bg-primary: #0b0b0e;
    --bg-secondary: #111116;
    --bg-card: #14141a;
    --bg-card-hover: #1b1b23;

    /* Or */
    --gold-900: #6b520f;
    --gold-700: #a67c1f;
    --gold: #d4af37;
    --gold-300: #e8cd72;
    --gold-100: #f7edbf;
    --gold-glow: rgba(212, 175, 55, 0.28);
    --gold-glow-soft: rgba(212, 175, 55, 0.10);
    --gold-glow-faint: rgba(212, 175, 55, 0.045);

    /* Texte */
    --text-primary: #f4f1e8;
    --text-secondary: #b4ae9f;
    --text-muted: #77715f;
    --text-faint: #4a463c;

    /* Traits */
    --hairline: rgba(212, 175, 55, 0.13);
    --hairline-strong: rgba(212, 175, 55, 0.30);
    --hairline-bright: rgba(212, 175, 55, 0.55);
    --edge: rgba(255, 255, 255, 0.05);

    --success: #5ecb87;
    --error: #e06c6c;

    /* Géométrie */
    --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 22px; --r-xl: 30px;

    /* Ombres */
    --sh-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
    --sh-2: 0 2px 4px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45);
    --sh-3: 0 4px 8px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
    --sh-gold: 0 8px 40px rgba(212,175,55,.16);

    /* Mouvement */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t: 0.4s var(--ease);
    --t-fast: 0.22s var(--ease);

    /* Typo */
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Dégradés */
    --g-gold: linear-gradient(135deg, #8a6a12 0%, #d4af37 30%, #f7edbf 50%, #d4af37 70%, #8a6a12 100%);
    --g-gold-text: linear-gradient(120deg, #c9a227 0%, #f7edbf 42%, #e8cd72 58%, #b8912a 100%);
    --g-hairline: linear-gradient(90deg, transparent, var(--hairline-bright) 50%, transparent);
    --g-card: linear-gradient(168deg, rgba(255,255,255,.028) 0%, rgba(255,255,255,0) 42%);

    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* ===== THÈME CLAIR — Ivoire & Or ===== */
[data-theme="light"] {
    --bg-void: #fbf9f4;
    --bg-deep: #f6f3ea;
    --bg-primary: #f4f0e6;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fffdf7;

    --gold-900: #5a440c;
    --gold-700: #8a6a12;
    --gold: #96751a;
    --gold-300: #b8912a;
    --gold-100: #d4af37;
    --gold-glow: rgba(150, 117, 26, 0.20);
    --gold-glow-soft: rgba(150, 117, 26, 0.09);
    --gold-glow-faint: rgba(150, 117, 26, 0.04);

    --text-primary: #17140e;
    --text-secondary: #4d463a;
    --text-muted: #8a8172;
    --text-faint: #b3aa9a;

    --hairline: rgba(150, 117, 26, 0.18);
    --hairline-strong: rgba(150, 117, 26, 0.38);
    --hairline-bright: rgba(150, 117, 26, 0.6);
    --edge: rgba(0, 0, 0, 0.06);

    --sh-1: 0 1px 2px rgba(90,68,12,.06), 0 4px 12px rgba(90,68,12,.07);
    --sh-2: 0 2px 4px rgba(90,68,12,.07), 0 12px 32px rgba(90,68,12,.10);
    --sh-3: 0 4px 8px rgba(90,68,12,.08), 0 24px 64px rgba(90,68,12,.13);
    --sh-gold: 0 8px 40px rgba(150,117,26,.14);

    --g-gold: linear-gradient(135deg, #6b520f 0%, #96751a 30%, #d4af37 50%, #96751a 70%, #6b520f 100%);
    --g-gold-text: linear-gradient(120deg, #7a5d12 0%, #b8912a 42%, #96751a 58%, #6b520f 100%);
    --g-card: linear-gradient(168deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 42%);
}

/* ==========================================================================
   BASE
   ========================================================================== */

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

body {
    font-family: var(--font-ui);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--t), color var(--t);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--noise);
    background-size: 200px 200px;
    opacity: 0.032;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--gold-glow-soft) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 85% 85%, var(--gold-glow-faint) 0%, transparent 65%),
        radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(0,0,0,.35) 100%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] body::after {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--gold-glow-soft) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 85% 85%, var(--gold-glow-faint) 0%, transparent 65%);
}

main, nav, footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--bg-void); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.scroll-progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 0%;
    background: var(--g-gold); z-index: 10000;
    box-shadow: 0 0 12px var(--gold-glow);
    transition: width 0.1s linear;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.15rem 3rem;
    background: rgba(8, 8, 10, 0.55);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    border-bottom: 1px solid transparent;
    transition: padding var(--t), background var(--t), border-color var(--t), box-shadow var(--t);
}

[data-theme="light"] .navbar { background: rgba(244, 240, 230, 0.62); }

.navbar.scrolled {
    padding: 0.75rem 3rem;
    background: rgba(8, 8, 10, 0.88);
    border-bottom-color: var(--hairline);
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(244, 240, 230, 0.94);
    box-shadow: 0 12px 40px rgba(90,68,12,.10);
}

.nav-brand {
    display: flex; align-items: center; gap: 0.85rem;
    font-family: var(--font-display); font-weight: 600;
    font-size: 1.5rem; letter-spacing: 0.14em; text-transform: uppercase;
}

.brand-logo {
    width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
    border: 1.5px solid var(--hairline-strong);
    box-shadow: 0 0 22px var(--gold-glow), inset 0 0 12px rgba(0,0,0,.4);
    flex-shrink: 0; transition: all var(--t);
}

.nav-brand:hover .brand-logo {
    border-color: var(--gold);
    box-shadow: 0 0 34px var(--gold-glow), 0 0 10px var(--gold);
    transform: scale(1.06) rotate(-3deg);
}

.brand-text {
    background: var(--g-gold-text);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.8s var(--ease);
}

.nav-brand:hover .brand-text { background-position: 100% 0; }

.brand-ar { font-family: var(--font-arabic); font-size: 1.9rem; color: var(--gold); line-height: 1; }

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

.nav-links a {
    position: relative; padding: 0.6rem 1.15rem; border-radius: var(--r-xs);
    font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--t-fast), background var(--t-fast);
}

.nav-links a::before {
    content: ''; position: absolute; inset: 0; border-radius: var(--r-xs);
    background: var(--gold-glow-faint); opacity: 0; transition: opacity var(--t-fast);
}

.nav-links a::after {
    content: ''; position: absolute; bottom: 0.25rem; left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 55%; height: 1px; background: var(--g-gold);
    transition: transform var(--t);
}

.nav-links a:hover { color: var(--gold-300); }
.nav-links a:hover::before { opacity: 1; }
.nav-links a:hover::after { transform: translateX(-50%) scaleX(1); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::before { opacity: 1; }
.nav-links a.active::after { transform: translateX(-50%) scaleX(1); }

.theme-toggle {
    position: relative;
    background: var(--gold-glow-faint);
    border: 1px solid var(--hairline);
    border-radius: 50%; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem; color: var(--gold);
    transition: all var(--t);
}

.theme-toggle:hover {
    border-color: var(--gold); background: var(--gold-glow-soft);
    box-shadow: 0 0 26px var(--gold-glow);
    transform: rotate(25deg) scale(1.06);
}

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

main { padding-top: 84px; }

section { padding: 6rem 3rem; max-width: 1280px; margin: 0 auto; position: relative; }

section h2 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    font-weight: 600; line-height: 1.12;
    margin-bottom: 0.5rem; text-align: center;
    letter-spacing: 0.005em; color: var(--text-primary);
}

.section-eyebrow {
    display: block; text-align: center;
    font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.34em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1.1rem; opacity: 0.85;
}

.section-desc {
    text-align: center; color: var(--text-secondary);
    margin: 1.3rem auto 3rem; font-weight: 300;
    font-size: 1.05rem; max-width: 640px; line-height: 1.75;
}

.divider {
    display: flex; align-items: center; justify-content: center;
    gap: 1.1rem; margin: 0 auto; max-width: 420px;
    padding: 0 3rem; opacity: 0.6;
}

.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--g-hairline);
}

.divider span {
    font-family: var(--font-arabic); font-size: 1.35rem;
    color: var(--gold); line-height: 1;
    text-shadow: 0 0 18px var(--gold-glow);
}

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

.hero {
    display: grid; grid-template-columns: 1.1fr 0.9fr;
    align-items: center; gap: 5rem;
    padding: 6rem 3rem 5rem; max-width: 1280px; margin: 0 auto;
    min-height: 90vh;
}

.hero-content { max-width: 620px; }

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 700; line-height: 0.98; letter-spacing: -0.015em;
    margin-bottom: 1.4rem;
    background: var(--g-gold-text);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 34px var(--gold-glow));
    animation: shimmer 9s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-content h1 .ar {
    display: block; font-family: var(--font-arabic);
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    margin-top: 1rem; color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
    font-weight: 400; letter-spacing: 0; opacity: 0.9;
}

.subtitle {
    font-size: 1.12rem; color: var(--text-secondary);
    margin-bottom: 2.5rem; max-width: 520px;
    font-weight: 300; line-height: 1.8;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-arabic {
    position: relative; display: flex;
    align-items: center; justify-content: center;
    min-height: 440px;
}

.hero-emblem {
    width: 320px; height: 320px; border-radius: 50%; object-fit: cover;
    border: 1.5px solid var(--hairline-strong);
    box-shadow: var(--sh-3), 0 0 90px var(--gold-glow), 0 0 30px rgba(212,175,55,.12);
    animation: emblemFloat 9s ease-in-out infinite;
    position: relative; z-index: 3;
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.hero-emblem:hover { transform: scale(1.035); box-shadow: var(--sh-3), 0 0 120px var(--gold-glow); }

.hero-emblem-ring {
    position: absolute; width: 400px; height: 400px; border-radius: 50%;
    border: 1px solid var(--hairline);
    animation: spinSlow 48s linear infinite; z-index: 2;
}

.hero-emblem-ring::before {
    content: ''; position: absolute; top: -3px; left: 50%;
    width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 18px var(--gold), 0 0 6px var(--gold);
    transform: translateX(-50%);
}

.hero-emblem-ring::after {
    content: ''; position: absolute; bottom: -3px; left: 50%;
    width: 5px; height: 5px; border-radius: 50%; background: var(--gold-300);
    box-shadow: 0 0 14px var(--gold); transform: translateX(-50%);
}

.hero-ring-2 {
    position: absolute; width: 470px; height: 470px; border-radius: 50%;
    border: 1px dashed var(--hairline);
    animation: spinSlow 70s linear infinite reverse;
    opacity: 0.55; z-index: 1;
}

@keyframes emblemFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }

.floating-letter {
    font-family: var(--font-arabic); font-size: 5.5rem;
    color: var(--gold); opacity: 0.07; position: absolute;
    animation: floatLetter 8s ease-in-out infinite;
    z-index: 0; user-select: none;
}

.floating-letter:nth-child(1) { top: 4%; left: 10%; animation-delay: 0s; }
.floating-letter:nth-child(2) { top: 20%; right: 6%; animation-delay: 1.4s; }
.floating-letter:nth-child(3) { bottom: 16%; left: 16%; animation-delay: 2.8s; }
.floating-letter:nth-child(4) { top: 58%; right: 18%; animation-delay: 4.2s; }
.floating-letter:nth-child(5) { bottom: 4%; right: 8%; animation-delay: 5.6s; }

@keyframes floatLetter {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-26px) rotate(7deg); }
}

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

.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding: 1rem 2.2rem; border-radius: var(--r);
    font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    cursor: pointer; border: none; overflow: hidden; isolation: isolate;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t), color var(--t);
}

.btn-primary {
    background: var(--g-gold); background-size: 200% 100%;
    color: #0a0a0c;
    box-shadow: 0 4px 26px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.45);
    transition: transform var(--t), box-shadow var(--t), background-position 0.7s var(--ease);
}

.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.65) 50%, transparent 65%);
    transform: translateX(-140%); transition: transform 0.75s var(--ease); z-index: 1;
}

.btn-primary:hover {
    background-position: 100% 0; transform: translateY(-3px);
    box-shadow: 0 10px 44px var(--gold-glow), 0 0 24px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.5);
}

.btn-primary:hover::after { transform: translateX(140%); }

.btn-secondary {
    background: var(--gold-glow-faint); color: var(--gold-300);
    border: 1px solid var(--hairline-strong);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    border-color: var(--gold); color: var(--gold-100);
    background: var(--gold-glow-soft); transform: translateY(-3px);
    box-shadow: 0 10px 34px var(--gold-glow);
}

.btn-large { padding: 1.2rem 3rem; font-size: 0.82rem; }

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

.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem; padding: 2rem 3rem 5rem;
    max-width: 1160px; margin: 0 auto;
}

.stat-card {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline); border-radius: var(--r-lg);
    padding: 2.4rem 1.5rem; text-align: center; overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--g-gold); transform: scaleX(0); transition: transform var(--t);
}

.stat-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 100% 70% at 50% 0%, var(--gold-glow-soft) 0%, transparent 70%);
    opacity: 0; transition: opacity var(--t); pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-8px); border-color: var(--hairline-strong);
    box-shadow: var(--sh-2), var(--sh-gold);
}

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

.stat-number {
    position: relative; font-family: var(--font-display);
    font-size: 3.4rem; font-weight: 700; line-height: 1;
    background: var(--g-gold-text);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 16px var(--gold-glow));
}

.stat-label {
    position: relative; font-size: 0.7rem; color: var(--text-muted);
    margin-top: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.22em; font-weight: 600;
}

/* ==========================================================================
   FEATURES
   ========================================================================== */

.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
    gap: 1.5rem; margin-top: 3.5rem;
}

.feature-card {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline); border-radius: var(--r-xl);
    padding: 2.6rem 2.1rem; overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.feature-card::before {
    content: ''; position: absolute; top: 14px; right: 14px;
    width: 22px; height: 22px;
    border-top: 1px solid var(--hairline-strong);
    border-right: 1px solid var(--hairline-strong);
    border-radius: 0 6px 0 0;
    opacity: 0; transition: opacity var(--t), transform var(--t);
    transform: translate(-4px, 4px);
}

.feature-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 90% 60% at 50% 0%, var(--gold-glow-soft) 0%, transparent 65%);
    opacity: 0; transition: opacity var(--t); pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-10px); border-color: var(--hairline-strong);
    box-shadow: var(--sh-3), 0 0 50px var(--gold-glow-soft);
}

.feature-card:hover::before { opacity: 1; transform: translate(0, 0); }
.feature-card:hover::after { opacity: 1; }

.feature-icon {
    position: relative; width: 62px; height: 62px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; margin-bottom: 1.6rem; border-radius: var(--r);
    background: var(--gold-glow-faint); border: 1px solid var(--hairline);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.08) rotate(-4deg);
    border-color: var(--hairline-strong);
    box-shadow: 0 0 26px var(--gold-glow-soft);
}

.feature-card h3 {
    position: relative; font-family: var(--font-display);
    font-size: 1.6rem; font-weight: 600; line-height: 1.2;
    margin-bottom: 0.7rem; z-index: 1;
}

.feature-card p {
    position: relative; color: var(--text-secondary);
    font-size: 0.92rem; line-height: 1.75; margin-bottom: 1.5rem;
    font-weight: 300; z-index: 1;
}

.feature-link {
    position: relative; display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--gold); font-weight: 600; font-size: 0.74rem;
    letter-spacing: 0.16em; text-transform: uppercase;
    transition: gap var(--t), color var(--t-fast); z-index: 1;
}

.feature-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 100%; height: 1px; background: var(--g-gold);
    transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}

.feature-card:hover .feature-link { gap: 0.75rem; color: var(--gold-100); }
.feature-card:hover .feature-link::after { transform: scaleX(1); }

/* ==========================================================================
   GRILLE ALPHABET
   ========================================================================== */

.alphabet-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.85rem; margin-top: 3rem;
}

.alphabet-cell {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline); border-radius: var(--r);
    padding: 1.25rem 0.5rem; text-align: center; cursor: pointer;
    overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t), background-color var(--t);
}

.alphabet-cell::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, var(--gold-glow-soft) 0%, transparent 70%);
    opacity: 0; transition: opacity var(--t); pointer-events: none;
}

.alphabet-cell:hover {
    border-color: var(--gold); transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 34px var(--gold-glow), var(--sh-1);
    background-color: var(--bg-card-hover);
}

.alphabet-cell:hover::before { opacity: 1; }
.alphabet-cell:active { transform: translateY(-2px) scale(1.02); }

.alphabet-cell .letter {
    position: relative; font-family: var(--font-arabic);
    font-size: 2.3rem; display: block; line-height: 1.15;
    color: var(--text-primary);
    transition: color var(--t), text-shadow var(--t);
}

.alphabet-cell:hover .letter { color: var(--gold); text-shadow: 0 0 22px var(--gold-glow); }

.alphabet-cell .name {
    position: relative; font-size: 0.62rem; color: var(--text-muted);
    margin-top: 0.4rem; display: block; text-transform: uppercase;
    letter-spacing: 0.12em; font-weight: 500; transition: color var(--t);
}

.alphabet-cell:hover .name { color: var(--text-secondary); }

/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
    position: relative; text-align: center; padding: 5.5rem 3rem;
    background:
        radial-gradient(ellipse 70% 100% at 50% 0%, var(--gold-glow-soft) 0%, transparent 70%),
        linear-gradient(170deg, var(--bg-card) 0%, var(--bg-void) 100%);
    border: 1px solid var(--hairline-strong); border-radius: var(--r-xl);
    margin: 4rem auto; max-width: 900px; overflow: hidden;
    box-shadow: var(--sh-3), inset 0 1px 0 rgba(255,255,255,.05);
}

.cta::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--g-gold);
}

.cta .corner {
    position: absolute; font-family: var(--font-arabic);
    font-size: 1.6rem; color: var(--gold); opacity: 0.28; line-height: 1;
}

.cta .corner.tl { top: 1.6rem; left: 1.9rem; }
.cta .corner.tr { top: 1.6rem; right: 1.9rem; }
.cta .corner.bl { bottom: 1.6rem; left: 1.9rem; }
.cta .corner.br { bottom: 1.6rem; right: 1.9rem; }

.cta h2 { margin-bottom: 0.4rem; }

.cta p {
    color: var(--text-secondary); margin: 1.3rem auto 2.4rem;
    font-weight: 300; font-size: 1.05rem; max-width: 480px;
}

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

footer {
    position: relative; border-top: 1px solid var(--hairline);
    padding: 4rem 2rem 3rem; text-align: center; margin-top: 6rem;
    background: linear-gradient(180deg, transparent 0%, var(--bg-void) 100%);
}

footer::before {
    content: ''; position: absolute; top: -1px; left: 50%;
    transform: translateX(-50%); width: 180px; height: 1px;
    background: var(--g-gold); box-shadow: 0 0 16px var(--gold-glow);
}

.footer-brand {
    display: flex; align-items: center; justify-content: center; gap: 0.8rem;
    font-family: var(--font-display); font-weight: 600;
    font-size: 1.35rem; letter-spacing: 0.16em; text-transform: uppercase;
    margin-bottom: 1rem;
    background: var(--g-gold-text);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand .brand-logo { -webkit-text-fill-color: initial; width: 32px; height: 32px; }

.footer-copy { color: var(--text-muted); font-size: 0.78rem; letter-spacing: 0.06em; font-weight: 300; }

/* ==========================================================================
   EN-TÊTE DE PAGE
   ========================================================================== */

.page-header { position: relative; text-align: center; padding: 5rem 3rem 3rem; }

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.5vw, 4rem);
    font-weight: 700; line-height: 1.05; letter-spacing: -0.015em;
    margin-bottom: 0.7rem;
    background: var(--g-gold-text);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 30px var(--gold-glow));
    animation: shimmer 9s ease-in-out infinite;
}

.page-header .ar-sub {
    display: block; font-family: var(--font-arabic);
    font-size: 1.9rem; color: var(--text-secondary);
    margin-top: 0.7rem; font-weight: 400; opacity: 0.85;
}

.page-header p {
    color: var(--text-secondary); max-width: 680px;
    margin: 1.5rem auto 0; font-weight: 300;
    font-size: 1.02rem; line-height: 1.8;
}

/* ==========================================================================
   PAGE ALPHABET
   ========================================================================== */

.alphabet-full-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem; margin-top: 3rem;
}

.alphabet-card {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline); border-radius: var(--r-xl);
    padding: 2rem; cursor: pointer; overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.alphabet-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: var(--g-gold);
    transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}

.alphabet-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 50% at 100% 0%, var(--gold-glow-soft) 0%, transparent 60%);
    opacity: 0; transition: opacity var(--t); pointer-events: none;
}

.alphabet-card:hover {
    border-color: var(--hairline-strong);
    box-shadow: var(--sh-2), var(--sh-gold);
    transform: translateY(-5px);
}

.alphabet-card:hover::before { transform: scaleX(1); }
.alphabet-card:hover::after { opacity: 1; }

.alphabet-card .card-header {
    position: relative; display: flex; align-items: center;
    gap: 1.3rem; margin-bottom: 1.5rem; z-index: 1;
}

.alphabet-card .big-letter {
    font-family: var(--font-arabic); font-size: 3.6rem; line-height: 1;
    color: var(--gold); text-shadow: 0 0 34px var(--gold-glow);
    transition: transform var(--t), text-shadow var(--t);
}

.alphabet-card:hover .big-letter {
    transform: scale(1.06);
    text-shadow: 0 0 48px var(--gold-glow), 0 0 16px var(--gold-glow);
}

.alphabet-card .letter-info h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }

.alphabet-card .letter-info .transliteration {
    color: var(--gold-300); font-size: 0.85rem; font-style: italic;
    letter-spacing: 0.04em; opacity: 0.85;
}

.alphabet-card .forms {
    position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem; margin-bottom: 1.3rem; z-index: 1;
}

.alphabet-card .form {
    text-align: center; padding: 0.65rem 0.3rem;
    background: var(--bg-void); border: 1px solid var(--edge);
    border-radius: var(--r-xs);
    transition: border-color var(--t), background var(--t);
}

.alphabet-card:hover .form { border-color: var(--hairline); background: var(--bg-deep); }

.alphabet-card .form .label {
    display: block; font-size: 0.55rem; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}

.alphabet-card .form .char {
    display: block; font-family: var(--font-arabic); font-size: 1.65rem;
    margin-top: 0.3rem; color: var(--text-primary);
}

.alphabet-card .example {
    position: relative; font-size: 0.86rem; color: var(--text-secondary);
    border-top: 1px solid var(--hairline); padding-top: 1.1rem;
    font-weight: 300; z-index: 1;
}

.alphabet-card .example .ar { font-family: var(--font-arabic); color: var(--gold); font-size: 1.3rem; }

/* ==========================================================================
   PAGE PHRASES
   ========================================================================== */

.phrases-container { max-width: 900px; margin: 3rem auto; }
.phrase-category { margin-bottom: 3rem; }

.phrase-category h3 {
    display: inline-block; font-family: var(--font-display);
    font-size: 1.7rem; font-weight: 600; letter-spacing: 0.01em;
    color: var(--gold-300); margin-bottom: 1.3rem; padding-bottom: 0.6rem;
    position: relative;
}

.phrase-category h3::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, var(--hairline-bright), transparent);
}

.phrase-list { display: flex; flex-direction: column; gap: 0.85rem; }

.phrase-item {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline); border-radius: var(--r);
    padding: 1.4rem 1.7rem;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.4rem; overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t), background-color var(--t);
}

.phrase-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
    background: var(--g-gold); transform: scaleY(0); transform-origin: top;
    transition: transform var(--t);
}

.phrase-item:hover {
    border-color: var(--hairline-strong); transform: translateX(8px);
    box-shadow: var(--sh-2), var(--sh-gold); background-color: var(--bg-card-hover);
}

.phrase-item:hover::before { transform: scaleY(1); }

.phrase-item .phrase-main {
    flex: 1; display: flex; flex-direction: column;
    align-items: flex-end; gap: 0.3rem; min-width: 0;
}

.phrase-item .phrase-ar {
    font-family: var(--font-arabic); font-size: 1.6rem; line-height: 1.4;
    color: var(--gold); direction: rtl; text-align: right;
    transition: text-shadow var(--t);
}

.phrase-item:hover .phrase-ar { text-shadow: 0 0 24px var(--gold-glow); }

.phrase-item .phrase-translit {
    font-size: 0.82rem; color: var(--text-muted); font-style: italic;
    letter-spacing: 0.03em; direction: ltr; text-align: right;
}

.phrase-item .phrase-fr {
    flex: 1; color: var(--text-secondary); font-size: 0.94rem;
    font-weight: 300; line-height: 1.6;
}

.phrase-item .play-btn {
    flex-shrink: 0; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gold-glow-faint); border: 1px solid var(--hairline-strong);
    border-radius: 50%; cursor: pointer; font-size: 0.95rem;
    transition: all var(--t);
}

.phrase-item .play-btn:hover {
    border-color: var(--gold); background: var(--g-gold);
    box-shadow: 0 0 26px var(--gold-glow); transform: scale(1.12);
}

.phrase-item .play-btn:active { transform: scale(0.96); }

/* ==========================================================================
   PAGE VOCABULAIRE
   ========================================================================== */

.vocab-categories {
    display: flex; flex-wrap: wrap; gap: 0.6rem;
    justify-content: center; margin: 3rem 0 0;
}

.vocab-cat-btn {
    position: relative; padding: 0.65rem 1.5rem; border-radius: 100px;
    border: 1px solid var(--hairline); background: var(--bg-card);
    color: var(--text-secondary); cursor: pointer;
    font-family: var(--font-ui); font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase; overflow: hidden;
    transition: transform var(--t), border-color var(--t), color var(--t), box-shadow var(--t), background var(--t);
}

.vocab-cat-btn:hover {
    border-color: var(--hairline-strong); color: var(--gold-300);
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.vocab-cat-btn.active {
    background: var(--g-gold); background-size: 200% 100%;
    color: #0a0a0c; border-color: transparent; font-weight: 700;
    box-shadow: 0 6px 26px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.4);
}

.vocab-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 1rem; margin-top: 3rem;
}

.vocab-card {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline); border-radius: var(--r);
    padding: 1.4rem; display: flex; align-items: center; gap: 1.2rem;
    cursor: pointer; overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t), background-color var(--t);
}

.vocab-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
    background: var(--g-gold); transform: scaleY(0); transform-origin: top;
    transition: transform var(--t);
}

.vocab-card:hover {
    border-color: var(--hairline-strong); transform: translateY(-4px);
    box-shadow: var(--sh-2), var(--sh-gold); background-color: var(--bg-card-hover);
}

.vocab-card:hover::before { transform: scaleY(1); }

.vocab-card .vocab-ar {
    flex-shrink: 0; min-width: 58px; text-align: center;
    font-family: var(--font-arabic); font-size: 2.1rem; line-height: 1.3;
    color: var(--gold); text-shadow: 0 0 22px var(--gold-glow);
    transition: transform var(--t);
}

.vocab-card:hover .vocab-ar { transform: scale(1.08); }

.vocab-card .vocab-info { flex: 1; min-width: 0; }

.vocab-card .vocab-fr { font-weight: 600; font-size: 0.96rem; color: var(--text-primary); line-height: 1.3; }

.vocab-card .vocab-translit {
    font-size: 0.78rem; color: var(--text-muted); font-style: italic; letter-spacing: 0.02em;
}

/* ==========================================================================
   PAGE QUIZ
   ========================================================================== */

.quiz-container { max-width: 740px; margin: 3rem auto; }

.quiz-progress { display: flex; align-items: center; gap: 1.3rem; margin-bottom: 2.5rem; }

.quiz-progress .progress-bar {
    flex: 1; height: 4px; background: var(--bg-card);
    border: 1px solid var(--edge); border-radius: 100px; overflow: hidden;
}

.quiz-progress .progress-fill {
    height: 100%; background: var(--g-gold); border-radius: 100px;
    box-shadow: 0 0 14px var(--gold-glow);
    transition: width 0.55s var(--ease);
}

.quiz-progress .progress-text {
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
    letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
}

.quiz-card {
    position: relative; background: var(--bg-card);
    background-image: var(--g-card);
    border: 1px solid var(--hairline-strong); border-radius: var(--r-xl);
    padding: 3.2rem 2.8rem; text-align: center; overflow: hidden;
    box-shadow: var(--sh-3);
}

.quiz-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--g-gold);
}

.quiz-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--gold-glow-soft) 0%, transparent 65%);
    pointer-events: none;
}

.quiz-card .quiz-question {
    position: relative; font-size: 0.76rem; font-weight: 600;
    color: var(--text-muted); letter-spacing: 0.2em;
    text-transform: uppercase; z-index: 1;
}

.quiz-card .quiz-arabic {
    position: relative; font-family: var(--font-arabic);
    font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1.25;
    color: var(--gold); direction: rtl; margin: 1.9rem 0 0.9rem;
    text-shadow: 0 0 46px var(--gold-glow); z-index: 1;
}

.quiz-card .quiz-translit {
    position: relative; font-size: 1rem; font-style: italic;
    color: var(--text-muted); letter-spacing: 0.04em;
    margin-bottom: 0.4rem; z-index: 1;
}

.quiz-card .quiz-play {
    display: inline-flex; align-items: center; gap: 0.45rem;
    margin: 0.9rem 0 0.2rem; padding: 0.5rem 1.1rem;
    border: 1px solid var(--hairline-strong); border-radius: 100px;
    background: var(--gold-glow-faint); color: var(--gold-300);
    font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    cursor: pointer; transition: all var(--t);
    position: relative; z-index: 1;
}

.quiz-card .quiz-play:hover {
    border-color: var(--gold); background: var(--gold-glow-soft);
    color: var(--gold-100); box-shadow: 0 0 24px var(--gold-glow);
    transform: translateY(-2px);
}

.quiz-options {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    gap: 1rem; margin-top: 2.4rem; z-index: 1;
}

.quiz-option {
    padding: 1.15rem 1.5rem; border: 1.5px solid var(--hairline);
    border-radius: var(--r); background: var(--bg-void);
    color: var(--text-primary); font-family: var(--font-ui);
    font-size: 0.94rem; font-weight: 500; cursor: pointer;
    transition: transform var(--t), border-color var(--t), background var(--t), box-shadow var(--t), color var(--t);
}

.quiz-option:hover:not(:disabled) {
    border-color: var(--gold); background: var(--gold-glow-soft);
    transform: translateY(-3px); box-shadow: 0 8px 26px var(--gold-glow);
    color: var(--gold-100);
}

.quiz-option:active:not(:disabled) { transform: translateY(-1px); }

.quiz-option.correct {
    border-color: var(--success); background: rgba(94, 203, 135, 0.12);
    color: var(--success); box-shadow: 0 0 28px rgba(94, 203, 135, 0.22);
}

.quiz-option.wrong {
    border-color: var(--error); background: rgba(224, 108, 108, 0.12);
    color: var(--error);
}

.quiz-option:disabled { cursor: not-allowed; opacity: 0.6; }

.quiz-result { position: relative; text-align: center; padding: 2rem; z-index: 1; }

.quiz-result .score {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 6rem);
    font-weight: 700; line-height: 1;
    background: var(--g-gold-text);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 34px var(--gold-glow));
}

.quiz-result .score-label {
    color: var(--text-secondary); font-size: 1.1rem;
    font-weight: 300; margin-bottom: 2.5rem;
}

.quiz-actions {
    display: flex; gap: 1rem; justify-content: center;
    margin-top: 2.2rem; flex-wrap: wrap;
}

/* ==========================================================================
   RETOUR EN HAUT
   ========================================================================== */

.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--hairline-strong);
    border-radius: 50%; color: var(--gold); font-size: 1.2rem;
    cursor: pointer; z-index: 900; opacity: 0; visibility: hidden;
    transform: translateY(16px); box-shadow: var(--sh-2);
    transition: all var(--t);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.back-to-top:hover {
    border-color: var(--gold); background: var(--gold-glow-soft);
    box-shadow: 0 0 30px var(--gold-glow); transform: translateY(-4px);
}

/* ==========================================================================
   RÉVÉLATION AU SCROLL
   ========================================================================== */

.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    will-change: opacity, transform;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

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

@media (max-width: 1080px) {
    .hero { gap: 3.5rem; }
    .hero-emblem { width: 270px; height: 270px; }
    .hero-emblem-ring { width: 340px; height: 340px; }
    .hero-ring-2 { width: 400px; height: 400px; }
}

@media (max-width: 900px) {
    .navbar { padding: 0.9rem 1.5rem; }
    .navbar.scrolled { padding: 0.7rem 1.5rem; }
    .nav-links { display: none; }

    .hero {
        grid-template-columns: 1fr; text-align: center;
        gap: 3rem; padding: 3rem 1.5rem; min-height: auto;
    }

    .hero-content { max-width: 100%; }
    .subtitle { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }

    .hero-emblem { width: 230px; height: 230px; }
    .hero-emblem-ring { width: 290px; height: 290px; }
    .hero-ring-2 { width: 340px; height: 340px; }

    .stats { grid-template-columns: repeat(2, 1fr); padding: 2rem 1.5rem 3.5rem; }
    .alphabet-full-grid { grid-template-columns: 1fr; }
    .quiz-options { grid-template-columns: 1fr; }
    .quiz-card { padding: 2.4rem 1.6rem; }

    section { padding: 4rem 1.5rem; }
    .divider { padding: 0 1.5rem; }
    .cta { padding: 4rem 1.8rem; }
}

@media (max-width: 560px) {
    .brand-text { font-size: 1.05rem; letter-spacing: 0.1em; }
    .brand-logo { width: 38px; height: 38px; }
    .theme-toggle { width: 40px; height: 40px; }

    .stats { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .stat-card { padding: 1.8rem 1rem; }
    .stat-number { font-size: 2.6rem; }

    .alphabet-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0.6rem; }
    .alphabet-cell { padding: 1rem 0.3rem; }
    .alphabet-cell .letter { font-size: 1.9rem; }

    .phrase-item {
        flex-direction: column; align-items: stretch;
        text-align: center; gap: 0.9rem;
    }

    .phrase-item .phrase-main { align-items: center; }
    .phrase-item .phrase-ar { text-align: center; }
    .phrase-item .phrase-translit { text-align: center; }
    .phrase-item .play-btn { align-self: center; }

    .back-to-top { bottom: 1.2rem; right: 1.2rem; width: 44px; height: 44px; }
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-700), var(--gold));
    border-radius: 100px; border: 3px solid var(--bg-void);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #a67c1f 0%, #e8cd72 50%, #a67c1f 100%); }
