/* ==========================================================================
   Wild Fractal Toolbox — feuille de style partagée (SITE_V2)
   Thème sombre, accents violet/bleu/rose. Reprend l'ADN visuel de l'ancien
   site mais en CSS externe partagé par toutes les pages et toutes les langues.
   ========================================================================== */

:root {
    --bg-deep:   #0a0a14;
    --bg-card:   #14142a;
    --bg-elev:   #1c1c38;
    --accent-1:  #8a4fff;   /* violet */
    --accent-2:  #4fc3ff;   /* bleu    */
    --accent-3:  #ff4f8a;   /* rose    */
    --text-main: #f0f0fa;
    --text-dim:  #b0b0c5;
    --border:    rgba(255, 255, 255, 0.08);
    --maxw:      1200px;
    --radius:    12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-1); }

img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ========== Barre de navigation ========== */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 20, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.nav-brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-brand:hover { color: var(--text-main); }
.nav-links {
    display: flex;
    gap: 22px;
    margin-left: auto;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text-main); }
.nav-cta {
    padding: 9px 20px !important;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff !important;
    font-weight: 600;
}
.nav-cta:hover { color: #fff !important; transform: translateY(-1px); }
@media (max-width: 760px) {
    .nav-links { gap: 14px; font-size: 0.85rem; }
    .nav-links .nav-hide-mobile { display: none; }
}

/* ========== Boutons ========== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    box-shadow: 0 8px 24px rgba(138, 79, 255, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(138, 79, 255, 0.55);
    color: #fff;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    color: var(--text-main);
}
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }

/* ========== Hero ========== */
.hero {
    position: relative;
    padding: 70px 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(138, 79, 255, 0.18), transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(79, 195, 255, 0.16), transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 79, 138, 0.10), transparent 60%),
        var(--bg-deep);
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.42;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}
.hero-content {
    position: relative;
    text-align: center;
    padding: 80px 24px;
    max-width: 900px;
    z-index: 1;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-2) 50%, var(--accent-1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .tagline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-dim);
    margin: 0 auto 2.5rem;
    max-width: 700px;
}
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.platforms {
    margin-top: 2.5rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.platforms span::before { content: "✓ "; color: var(--accent-2); }

/* ========== Fenêtre d'application (capture produit encadrée) ========== */
.app-window {
    max-width: 920px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(138, 79, 255, 0.12);
    background: #1a1a2e;
}
.app-window .titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: #12121f;
    border-bottom: 1px solid var(--border);
}
.app-window .titlebar .dot { width: 12px; height: 12px; border-radius: 50%; }
.app-window .titlebar .dot.r { background: #ff5f57; }
.app-window .titlebar .dot.y { background: #febc2e; }
.app-window .titlebar .dot.g { background: #28c840; }
.app-window .titlebar .name {
    margin-left: 10px;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 500;
}
.app-window img { width: 100%; display: block; }

/* ========== Étapes (comment ça marche) ========== */
.steps { background: var(--bg-deep); }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px 26px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}
.step h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.96rem; }

/* ========== Sections ========== */
section { padding: 100px 0; }
.section-title { text-align: center; margin-bottom: 64px; }
.section-title .eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 12px;
}
.section-title h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.section-title p { color: var(--text-dim); font-size: 1.15rem; max-width: 700px; margin: 0 auto; }

/* ========== Pitch ========== */
.pitch { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pitch p {
    font-size: 1.25rem;
    line-height: 1.7;
    text-align: center;
    color: var(--text-dim);
    max-width: 820px;
    margin: 0 auto;
}
.pitch p strong { color: var(--text-main); font-weight: 600; }

/* ========== Grille fonctionnalités ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 79, 255, 0.4);
    box-shadow: 0 16px 40px rgba(138, 79, 255, 0.15);
}
.feature .icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(138, 79, 255, 0.18), rgba(79, 195, 255, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.6rem;
}
.feature h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; color: var(--text-main); }
.feature p { color: var(--text-dim); font-size: 0.98rem; line-height: 1.6; }

/* ========== Galerie ========== */
.gallery { background: var(--bg-deep); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
    background: #05050d;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 14px 16px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    background: linear-gradient(to top, rgba(5,5,13,0.85), transparent);
}

/* ========== Audience ========== */
.audience { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.audience-card { background: var(--bg-elev); border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); }
.audience-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.audience-card p { color: var(--text-dim); font-size: 0.95rem; }

/* ========== Bloc prix ========== */
.pricing { background: var(--bg-deep); }
.price-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid rgba(138, 79, 255, 0.3);
    border-radius: 18px;
    padding: 44px 40px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(138, 79, 255, 0.12);
}
.price-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(79, 195, 255, 0.1);
    border: 1px solid rgba(79, 195, 255, 0.25);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
}
.price-amount { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.02em; }
.price-amount .cur { font-size: 1.6rem; vertical-align: super; color: var(--text-dim); }
.price-sub { color: var(--text-dim); margin-bottom: 26px; }
.price-list { text-align: left; margin: 0 auto 30px; max-width: 340px; }
.price-list li { list-style: none; padding: 8px 0 8px 30px; position: relative; color: var(--text-main); }
.price-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-2);
    font-weight: 700;
}

/* ========== CTA final ========== */
.cta-final {
    background:
        radial-gradient(circle at 30% 30%, rgba(138, 79, 255, 0.22), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(79, 195, 255, 0.18), transparent 60%),
        var(--bg-deep);
    text-align: center;
}
.cta-final h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cta-final p { color: var(--text-dim); font-size: 1.2rem; margin: 0 auto 36px; max-width: 600px; }

/* ========== FAQ ========== */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 22px;
    margin-bottom: 14px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 18px 0;
    font-size: 1.05rem;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent-2); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-dim); padding: 0 0 18px; }

/* ========== Footer ========== */
footer { background: #060610; padding: 48px 0 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-grid h5 {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 14px;
}
.footer-grid p, .footer-grid a { color: var(--text-dim); font-size: 0.95rem; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-bottom { text-align: center; color: var(--text-dim); font-size: 0.85rem; padding-top: 24px; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ========== Sélecteur de langue ========== */
.lang-switch {
    display: flex;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.lang-switch a {
    color: var(--text-dim);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.lang-switch a:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.06); }
.lang-switch a.active { color: var(--text-main); background: rgba(255, 255, 255, 0.08); }

/* ========== Divers ========== */
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
@media (max-width: 720px) {
    section { padding: 64px 0; }
    .section-title { margin-bottom: 40px; }
}

/* ========== Prise en main (vidéos + guide pas à pas) ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame.soon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elev);
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.04em;
}
.video-card .video-info { padding: 18px 22px 22px; }
.video-card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.video-card p { color: var(--text-dim); font-size: 0.94rem; }

.guide { counter-reset: guide; }
.guide-step {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 72px;
}
.guide-step:nth-child(even) .guide-text { order: 2; }
.guide-text h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 12px; }
.guide-text h3::before {
    counter-increment: guide;
    content: counter(guide) ". ";
    color: var(--accent-2);
}
.guide-text p, .guide-text li { color: var(--text-dim); }
.guide-text p + p { margin-top: 10px; }
.guide-text ul { margin: 10px 0 0 20px; }
.guide-text li { margin-bottom: 6px; }
.guide-text strong { color: var(--text-main); }
.guide-step .app-window { max-width: none; }
.guide-step .app-window img { height: auto; }
.ui {
    display: inline-block;
    padding: 0 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.92em;
    white-space: nowrap;
}
@media (max-width: 860px) {
    .guide-step { grid-template-columns: 1fr; gap: 22px; margin-bottom: 56px; }
    .guide-step:nth-child(even) .guide-text { order: 0; }
}

/* ========== Prise en main : installation ========== */
.install-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.install-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 26px;
}
.install-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.install-card ol { margin-left: 20px; color: var(--text-dim); }
.install-card li { margin-bottom: 12px; }
.install-card li strong { color: var(--text-main); }
.install-card p { color: var(--text-dim); font-size: 0.94rem; margin-top: 10px; }
.code-block { position: relative; margin: 8px 0 4px; }
.code-block .code { margin: 0; padding-right: 48px; }
.copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.copy-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.14); }
.copy-btn .ico-ok { display: none; }
.copy-btn.copied { color: #b8f5c8; }
.copy-btn.copied .ico-copy { display: none; }
.copy-btn.copied .ico-ok { display: block; }
.copy-btn.copied::after {
    content: attr(data-ok);
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.78rem;
    white-space: nowrap;
}
.code {
    display: block;
    margin: 8px 0 4px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #05050c;
    border: 1px solid var(--border);
    color: #b8f5c8;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.86rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* RTL : pour les langues droite-à-gauche (phase 2) */
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .price-list li { padding: 8px 30px 8px 0; }
[dir="rtl"] .price-list li::before { left: auto; right: 0; }
[dir="rtl"] .faq summary::after { float: left; }
