/* ================================================
   KAETS MENU — style.css (Version Corrigée)
   ================================================ */

/* --- VARIABLES --- */
:root {
    --primary:     #2B2E42;
    --secondary:   #8D9AAE;
    --light:       #EDF2F4;
    --red:         #EE2449;
    --red-dark:    #D80536;
    --vip-col:     #8A2BE2;
    --doc-hover:   #107FB1;
    --green:       #2ecc71;

    --bg:           var(--light);
    --bg-card:      #FFFFFF;
    --text:         var(--primary);
    --nav-bg:       rgba(237, 242, 244, 0.85);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

body.dark-theme {
    --bg:           var(--primary);
    --bg-card:      #36394e;
    --text:         var(--light);
    --nav-bg:       rgba(43, 46, 66, 0.85);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    padding-top: 80px;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(141, 154, 174, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 600; transition: color 0.3s; }
.nav-links a:hover { color: var(--red); }

.theme-switch { cursor: pointer; display: flex; align-items: center; color: var(--text); }
.hidden { display: none !important; }

/* --- HERO --- */
.hero { text-align: center; padding: 100px 20px 80px; }
.accent { color: var(--red); font-weight: 800; }
.cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 25px; }

/* --- SECTIONS & TITRES --- */
section { scroll-margin-top: 100px; }
.section-padding { padding: 60px 0; }

.h2-feat, .h2-doc {
    padding: 0 10% !important;
    margin: 0 0 30px 0 !important;
    text-align: left !important;
    font-size: 2.5rem;
    font-weight: 800;
}

/* --- GRID & CARDS --- */
.grid, .download-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 10% 60px !important;
}

.card, .download-card, .card-ai, .price-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(141, 154, 174, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Card Hovers Spécifiques */
.card:hover {
    transform: translateY(-10px);
    border-color: var(--red);
    box-shadow: 0 20px 40px rgba(238, 36, 73, 0.15);
}

#documentation .card:hover {
    border-color: var(--doc-hover);
    box-shadow: 0 20px 40px rgba(16, 127, 177, 0.2);
}

.card-ai { border-left: 4px solid var(--vip-col); }
.card-ai:hover {
    transform: translateY(-10px);
    border-color: var(--vip-col) !important;
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.2) !important;
}

.download-card:hover {
    border-color: var(--green) !important;
    box-shadow: 0 20px 40px rgba(46, 204, 113, 0.2) !important;
    transform: translateY(-10px);
}

/* --- BOUTONS --- */
.btn, .btn-sub, .btn-download {
    color: white !important;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn { background: var(--red); }
.btn:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(216, 5, 54, 0.4); }

.btn-sub { background: var(--vip-col); width: 100%; }
.btn-sub:hover { background: #7a22c7; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4); }

.btn-alt {
    background: transparent;
    color: var(--text) !important;
    border: 2px solid var(--vip-col);
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 800;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-alt:hover { background: var(--vip-col); color: white !important; transform: translateY(-2px); }

/* --- DOWNLOAD & BROWSER LINKS --- */
.browser-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.browser-link {
    display: flex; align-items: center; gap: 12px; text-decoration: none;
    color: var(--text); padding: 10px; background: rgba(141, 154, 174, 0.05);
    border-radius: 10px; font-weight: 600; transition: 0.3s;
}
.browser-link:hover { background: rgba(46, 204, 113, 0.1); }
.browser-link img { width: 24px; height: 24px; filter: none !important; }

.btn-download { width: 100%; margin-bottom: 10px; padding: 14px; }
.btn-download.github { background: #24292e; }
.btn-download.greasy { background: var(--green); }
.btn-download:hover { filter: brightness(1.1); transform: translateY(-3px); }
.btn-download img { width: 20px; filter: brightness(0) invert(1); }
.btn-download img.logo-color { filter: none !important; width: 24px; }

/* --- SÉPARATEURS --- */
.video-separator {
    display: flex; align-items: center; margin: 25px 0 15px;
    color: var(--secondary); font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1.5px;
}
.video-separator hr { flex: 1; border: none; border-top: 1px solid rgba(141, 154, 174, 0.2); }
.video-separator span { padding: 0 15px; }

/* --- CARROUSEL 3D --- */
.pen { width: 100%; margin: 60px 0; }
.stage {
    width: 100%; height: 360px; position: relative;
    display: flex; align-items: center; justify-content: center;
    perspective: 1000px; overflow: visible;
}
.element {
    position: absolute; width: 160px; height: 260px;
    border-radius: 16px; overflow: hidden;
    background-position: center; background-size: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.1s ease; /* Fluidité contrôlée par JS */
}

/* --- PRICING --- */
.price-card { border: 2px solid var(--vip-col); text-align: center; margin: 0 auto; }
.price { font-size: 3rem; font-weight: 800; margin: 20px 0; color: var(--vip-col); }
.price-card ul { list-style: none; text-align: left; margin: 20px 0 30px; }
.price-card li { margin-bottom: 10px; font-weight: 500; }

/* --- FOOTER --- */
footer { padding: 60px 20px; text-align: center; opacity: 0.7; font-size: 0.9rem; border-top: 1px solid rgba(141, 154, 174, 0.1); }

/* --- LOGO link --- */
.logo { text-decoration: none; color: var(--text); font-size: 1.2rem; }

/* --- NAV ACTIONS --- */
.nav-actions { display: flex; align-items: center; gap: 16px; }
.btn-nav, .btn-nav-alt {
    padding: 8px 18px; border-radius: 8px; font-weight: 700; font-size: 0.9rem;
    text-decoration: none; transition: all 0.25s ease; cursor: pointer; border: none;
}
.btn-nav { background: var(--red); color: #fff; }
.btn-nav:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(216, 5, 54, 0.35); }
.btn-nav-alt { background: transparent; color: var(--text); border: 1.5px solid rgba(141, 154, 174, 0.3); }
.btn-nav-alt:hover { border-color: var(--red); color: var(--red); }

/* --- HERO additions --- */
.hero-tag {
    display: inline-block; padding: 6px 14px; margin-bottom: 18px;
    background: rgba(238, 36, 73, 0.08); border: 1px solid rgba(238, 36, 73, 0.2);
    color: var(--red); font-size: 0.78rem; font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase; border-radius: 999px;
}
.hero h1 { font-size: 3rem; line-height: 1.15; max-width: 800px; margin: 0 auto 18px; }
.hero-sub { max-width: 640px; margin: 0 auto 28px; opacity: 0.85; font-size: 1.1rem; line-height: 1.6; }
.hero-meta { margin-top: 30px; opacity: 0.55; font-size: 0.85rem; letter-spacing: 0.5px; }

/* --- DOC list / kbd --- */
.kbd-list { list-style: none; margin-top: 15px; padding: 0; line-height: 2; }
kbd {
    background: rgba(141, 154, 174, 0.15); padding: 2px 8px; border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.85em; font-weight: 700;
    color: var(--red); border: 1px solid rgba(141, 154, 174, 0.2);
}
.check-list { list-style: none; padding: 0; margin: 15px 0; line-height: 1.9; }

/* --- HIGHLIGHT CARD --- */
.highlight-card {
    margin: 30px 10% 0; padding: 2rem;
    border-left: 4px solid var(--red);
    background: var(--bg-card); border-radius: 16px; box-shadow: var(--card-shadow);
}

/* --- PRICING GRID --- */
.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; padding: 0 10%; max-width: 900px; margin: 0 auto;
}
.price-card {
    position: relative; padding: 2.5rem 2rem; text-align: center;
    background: var(--bg-card); border-radius: 16px;
    border: 1.5px solid rgba(141, 154, 174, 0.15);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.price-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.price-card-vip { border-color: var(--vip-col); box-shadow: 0 10px 30px rgba(138, 43, 226, 0.15); }
.price-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--vip-col); color: #fff; padding: 4px 16px;
    border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 1.2px;
}
.price-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.price-amount { font-size: 2.8rem; font-weight: 800; }
.price-period { font-size: 0.95rem; opacity: 0.6; font-weight: 500; }
.price-card .price { color: var(--text); margin: 18px 0 24px; }
.price-card-vip .price-amount { color: var(--vip-col); }
.price-card ul { list-style: none; text-align: left; margin: 0 0 28px; }
.price-card li { padding: 6px 0; font-weight: 500; }

/* --- FOOTER ENHANCED --- */
footer { padding: 50px 10% 30px; opacity: 1; text-align: left; }
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px; margin-bottom: 30px;
}
.footer-grid h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; color: var(--red); }
.footer-grid p, .footer-grid a { font-size: 0.88rem; opacity: 0.75; line-height: 1.6; }
.footer-grid a { display: block; color: var(--text); text-decoration: none; padding: 3px 0; transition: opacity 0.2s; }
.footer-grid a:hover { opacity: 1; color: var(--red); }
.footer-keywords { font-size: 0.78rem !important; opacity: 0.55 !important; }
.footer-copy { text-align: center; padding-top: 25px; border-top: 1px solid rgba(141, 154, 174, 0.1); opacity: 0.5; font-size: 0.85rem; }

/* ════════════════════════════════════════════════════════════════════════
   AUTH PAGE — login / signup
   ════════════════════════════════════════════════════════════════════════ */
.auth-main {
    min-height: calc(100vh - 80px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-card); border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(141, 154, 174, 0.1);
    overflow: hidden;
}
.auth-tabs { display: flex; background: rgba(141, 154, 174, 0.05); }
.auth-tab {
    flex: 1; padding: 18px; border: none; background: transparent;
    color: var(--text); font-family: inherit; font-size: 0.95rem; font-weight: 700;
    cursor: pointer; opacity: 0.5; transition: all 0.3s; position: relative;
}
.auth-tab.active { opacity: 1; background: var(--bg-card); }
.auth-tab.active::after {
    content: ""; position: absolute; bottom: 0; left: 20%; right: 20%;
    height: 3px; background: var(--red); border-radius: 3px 3px 0 0;
}
.auth-form { display: none; padding: 36px 32px 32px; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }
.auth-form h2 { font-size: 1.6rem; margin-bottom: 4px; }
.auth-sub { opacity: 0.65; font-size: 0.92rem; margin-bottom: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: 0.82rem; font-weight: 700; opacity: 0.8; }
.auth-field span small { font-weight: 400; opacity: 0.6; }
.auth-field input {
    padding: 12px 14px; border-radius: 10px;
    border: 1.5px solid rgba(141, 154, 174, 0.25);
    background: var(--bg); color: var(--text);
    font-family: inherit; font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(238, 36, 73, 0.1); }
.auth-status { min-height: 20px; font-size: 0.85rem; padding: 2px 0; }
.auth-status.error { color: var(--red); }
.auth-status.success { color: var(--green); }
.btn-full { width: 100%; padding: 14px; font-size: 0.95rem; }
.auth-switch { text-align: center; font-size: 0.88rem; opacity: 0.75; margin-top: 8px; }
.auth-switch a { color: var(--red); text-decoration: none; font-weight: 700; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════════════════ */
.dash-main { max-width: 1100px; margin: 0 auto; padding: 40px 5% 80px; }
.dash-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    flex-wrap: wrap; gap: 20px; margin-bottom: 36px;
    padding-bottom: 24px; border-bottom: 1px solid rgba(141, 154, 174, 0.15);
}
.dash-greet { font-size: 0.9rem; opacity: 0.6; margin-bottom: 4px; letter-spacing: 0.5px; }
.dash-header h1 { font-size: 2.2rem; margin: 0; }
.dash-email { font-size: 0.88rem; opacity: 0.55; margin-top: 4px; }
.dash-status {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--green);
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2); }
    50%      { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
}
.dash-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.dash-card {
    background: var(--bg-card); padding: 28px; border-radius: 16px;
    border: 1px solid rgba(141, 154, 174, 0.12);
    box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 14px;
    transition: transform 0.25s, border-color 0.25s;
}
.dash-card:hover { transform: translateY(-3px); border-color: rgba(141, 154, 174, 0.3); }
.dash-card h3 { font-size: 1.05rem; }
.dash-card-sub { opacity: 0.7; font-size: 0.88rem; line-height: 1.55; }
.dash-card-wide { grid-column: 1 / -1; text-align: center; align-items: center; }

.token-card { border-left: 4px solid var(--red); }
.token-display {
    display: flex; align-items: center; gap: 8px;
    background: rgba(141, 154, 174, 0.08);
    border: 1.5px solid rgba(141, 154, 174, 0.2);
    border-radius: 10px; padding: 12px 14px;
}
.token-display code {
    flex: 1; font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.92rem; font-weight: 700; color: var(--red);
    overflow-x: auto; white-space: nowrap;
}
.btn-icon {
    background: var(--red); color: #fff; border: none; cursor: pointer;
    padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 0.82rem;
    font-family: inherit; transition: all 0.2s;
}
.btn-icon:hover { background: var(--red-dark); }
.dash-warn { font-size: 0.78rem; opacity: 0.65; margin-top: 4px; }

.dash-stats { list-style: none; padding: 0; margin: 0; }
.dash-stats li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid rgba(141, 154, 174, 0.1); font-size: 0.92rem;
}
.dash-stats li:last-child { border-bottom: none; }
.dash-stats span { opacity: 0.65; }
.dash-stats strong { color: var(--red); }

.btn-alt-full { display: inline-block; width: 100%; padding: 12px; text-align: center; }

/* Bouton "lien" discret (régénérer token) */
.btn-link {
    background: none; border: none; padding: 6px 0; margin-top: 4px;
    color: var(--text); opacity: 0.6; font-family: inherit; font-size: 0.82rem;
    text-decoration: underline; cursor: pointer; align-self: flex-start;
    transition: opacity 0.2s, color 0.2s;
}
.btn-link:hover { opacity: 1; color: var(--red); }

/* Bloc téléchargement dashboard */
.dl-block { margin-top: 14px; }
.dl-block h4 {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px;
    opacity: 0.65; margin-bottom: 10px;
}
.dl-block .browser-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    flex-direction: initial;
}
.dl-script-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .h2-feat, .h2-doc { font-size: 2rem; }
    .hero h1 { font-size: 2.1rem; }
    .stage { height: 280px; }
    .element { width: 130px; height: 210px; }
    .grid, .download-container { padding: 0 5% 40px !important; }
    .nav-links { display: none; }
    .nav-container { padding: 0.8rem 1rem; }
    .pricing-grid { padding: 0 5%; }
    .auth-form { padding: 28px 22px 24px; }
    .dash-header { align-items: flex-start; }
    .footer-grid { gap: 24px; }
    footer { padding: 40px 5% 24px; }
}