/* =====================================================================
   Feuille de style principale : landing, auth, onboarding, dashboard.
   Direction artistique : fond très sombre, dégradés indigo/cyan,
   typographie Sora (titres) + Inter (texte), rendu "produit premium".
   ===================================================================== */

:root {
    --bg: #05070F;
    --bg-elevated: #0D1220;
    --bg-card: #121829;
    --border: #232B42;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --accent: #6366F1;
    --accent-2: #22D3EE;
    --accent-gradient: linear-gradient(120deg, #6366F1 0%, #8B5CF6 50%, #22D3EE 100%);
    --success: #34D399;
    --danger: #F87171;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.15), 0 20px 60px -20px rgba(99, 102, 241, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, .display {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

p { color: var(--text-muted); line-height: 1.65; margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
}
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(99, 102, 241, 0.75); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
/* Choix du moyen de paiement (renew.php, verification.php) */
.pay-choose { text-align: center; font-weight: 600; margin: 0 0 12px; }
.pay-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.25; padding: 12px 16px; border-radius: 16px; }
.pay-opt span { font-size: 12px; font-weight: 500; opacity: .78; }
.pay-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pay-alt .pay-opt { width: 100%; }
@media (max-width: 360px) { .pay-alt { grid-template-columns: 1fr; } }
/* Boutons / formulaire de carte PayPal (paypal-checkout.php) : fond blanc, lisible dans les deux thèmes */
.pp-panel { background: #fff; border-radius: 16px; padding: 16px; min-height: 60px; }
.pp-panel:empty, .pp-panel:has(#pp-buttons:empty) { display: none; }

/* ---------- Cartes / surfaces ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #A5B4FC;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ---------- Navigation ---------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
}
.logo {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}
.logo span { color: var(--accent-2); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
    padding: 96px 0 64px;
    text-align: center;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(5, 7, 15, 0) 70%);
    z-index: -1;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); max-width: 780px; margin-left: auto; margin-right: auto; }
.hero .lead { font-size: 19px; max-width: 560px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Grilles de fonctionnalités / comparaison ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    font-size: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}
.compare-table th, .compare-table td {
    padding: 18px 22px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.compare-table th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .yes { color: var(--success); font-weight: 700; }
.compare-table .no { color: var(--danger); font-weight: 700; }
.compare-table .highlight { background: rgba(99, 102, 241, 0.06); }

.pricing-card {
    text-align: center;
    max-width: 380px;
    margin: 0 auto;
    position: relative;
    border: 1px solid var(--accent);
    box-shadow: var(--shadow-glow);
}
.price { font-size: 56px; font-weight: 800; font-family: 'Sora', sans-serif; }
.price sup { font-size: 20px; vertical-align: super; }
.price small { font-size: 16px; color: var(--text-muted); font-weight: 500; }
.pricing-list { list-style: none; padding: 0; margin: 24px 0 32px; text-align: left; }
.pricing-list li { padding: 8px 0; color: var(--text-muted); display: flex; gap: 10px; }
.pricing-list li::before { content: '✓'; color: var(--success); font-weight: 700; }

footer.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Auth (login/register/verify) ---------- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
}
.auth-card .logo { display: block; text-align: center; margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.field-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-error { background: rgba(248, 113, 113, 0.12); color: #FCA5A5; border: 1px solid rgba(248, 113, 113, 0.3); }
.alert-success { background: rgba(52, 211, 153, 0.12); color: #6EE7B7; border: 1px solid rgba(52, 211, 153, 0.3); }
.alert-warning { background: rgba(251, 191, 36, 0.12); color: #FCD34D; border: 1px solid rgba(251, 191, 36, 0.3); }

/* ---------- Dashboard layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 24px 18px;
    background: var(--bg-elevated);
}
.sidebar .logo { padding: 0 8px; margin-bottom: 32px; display: block; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14.5px;
    margin-bottom: 4px;
}
.sidebar-nav a:hover { background: var(--bg-card); color: var(--text); }
.sidebar-nav a.active { background: rgba(99, 102, 241, 0.14); color: #C7D2FE; }

.main-content { flex: 1; padding: 32px 40px; max-width: 1100px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.subscription-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.subscription-pill.trial { background: rgba(251, 191, 36, 0.15); color: #FCD34D; }
.subscription-pill.active { background: rgba(52, 211, 153, 0.15); color: #6EE7B7; }
.subscription-pill.expired { background: rgba(248, 113, 113, 0.15); color: #FCA5A5; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.25s ease; }

.link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}
.link-item .platform-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.link-item .link-info { flex: 1; min-width: 0; }
.link-item .link-info strong { display: block; font-size: 14.5px; }
.link-item .link-info span { display: block; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item .link-actions { display: flex; gap: 6px; }
.icon-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }

.phone-preview {
    position: sticky;
    top: 32px;
    background: #000;
    border-radius: 36px;
    padding: 14px;
    box-shadow: var(--shadow-glow);
}
.phone-preview iframe {
    width: 100%;
    height: 560px;
    border: none;
    border-radius: 24px;
    background: #fff;
}

.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.color-swatch {
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Onboarding ---------- */
.onboarding-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.onboarding-progress {
    width: 100%;
    max-width: 460px;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    margin-bottom: 40px;
    overflow: hidden;
}
.onboarding-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.4s ease;
    width: 16%;
}
.onboarding-step {
    width: 100%;
    max-width: 460px;
    display: none;
    text-align: center;
}
.onboarding-step.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.onboarding-step h2 { font-size: 26px; }
.onboarding-step .field { text-align: left; }
.onboarding-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }
.skip-link { display: block; margin-top: 16px; color: var(--text-muted); font-size: 14px; cursor: pointer; }
.skip-link:hover { color: var(--text); }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
}
.upload-zone:hover { border-color: var(--accent); color: var(--text); }
.upload-preview { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; display: block; }

.link-input-row { display: flex; gap: 10px; margin-bottom: 12px; }
.link-input-row input { flex: 1; }
.added-links-list { text-align: left; margin-top: 16px; }
.added-link-chip {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin-bottom: 8px; font-size: 14px;
}

@media (max-width: 900px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .phone-preview { position: static; margin-top: 24px; }
    .app-shell { flex-direction: column; }
    /* Mobile : barre fixe en haut, menu hamburger qui déroule les onglets */
    .sidebar { position: sticky; top: 0; z-index: 60; width: 100%; display: flex; align-items: center; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--border); padding: 12px 18px; }
    .sidebar .logo { margin-bottom: 0; padding: 0; }
    .nav-toggle { display: inline-flex; }
    .sidebar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        padding: 10px 14px 16px;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.7);
    }
    .sidebar.open .sidebar-nav { display: block; }
    .sidebar-nav a { padding: 13px 14px; font-size: 15.5px; }
    .main-content { padding: 24px 18px; }
}

@media (max-width: 600px) {
    .hero { padding: 64px 0 40px; }
    .nav-links { display: none; }
}

/* ---------- Personnalisation : modèles, galerie ---------- */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.preset-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-height: 104px;
    padding: 12px;
    text-align: left;
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.preset-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.7); }
.preset-card.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.preset-name { font-size: 13px; font-weight: 700; line-height: 1.2; }
.preset-dots { display: flex; gap: 5px; }
.preset-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.preset-btn { align-self: stretch; text-align: center; padding: 6px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.gal-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--bg-elevated); }

.preset-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.preset-filter {
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s ease;
}
.preset-filter:hover { color: var(--text); border-color: var(--accent); }
.preset-filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.gen-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
@media (max-width: 560px) { .gen-options { grid-template-columns: 1fr; } }

/* ---------- Logo de marque (symbole + nom) ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo .logo-mark { display: block; height: 30px; width: auto; }
.logo .logo-text { color: inherit; }
.auth-card .logo { display: flex; justify-content: center; }
.sidebar .logo { display: flex; }

/* ---------- Galerie : édition en ligne ---------- */
.gal-row { margin-bottom: 10px; }
.gal-row .link-item { margin-bottom: 0; }
.gal-edit { padding: 16px; margin-top: -4px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); background: var(--bg-elevated); }

/* ---------- Complétude de la page ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--accent-gradient); transition: width 0.4s ease; }
.todo-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.todo-list a { color: var(--accent); font-size: 14px; font-weight: 500; }

/* ---------- Pages légales ---------- */
.legal-wrap { max-width: 820px; padding-bottom: 60px; }
.legal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 32px; }
.legal h1 { font-size: 30px; margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--text-muted); line-height: 1.7; font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent); }
.legal-date { font-size: 13px; }
.legal-todo { background: #FDE68A; color: #78350F; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.legal-links { text-align: center; font-size: 13px; margin: 18px 0 0; color: var(--text-muted); }
.legal-links a { color: var(--text-muted); }
.legal-links a:hover { color: var(--text); }
@media (max-width: 560px) { .legal { padding: 24px 18px; } }

/* ---------- Administration ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.admin-stat { padding: 18px; }
.admin-stat-value { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 2px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-actions input { padding: 6px 8px; }

/* ---------- Champs hors ".field" (rangées d'ajout, recherche admin, date...) : même style sombre ---------- */
input[type="text"], input[type="url"], input[type="tel"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"], textarea, select {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    color-scheme: dark;
}
input[type="text"]:focus, input[type="url"]:focus, input[type="tel"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="number"]:focus, input[type="date"]:focus, input[type="search"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.7; }
.link-input-row input, .link-input-row select { min-width: 0; }

/* ---------- Connexion avec Google ---------- */
.oauth-sep { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--text-muted); font-size: 13px; }
.oauth-sep::before, .oauth-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 12px 18px; border-radius: 999px;
    background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
    font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.btn-google:hover { box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.5); transform: translateY(-1px); }

/* ---------- Administration : filtres, cartes cliquables, barre d'outils ---------- */
.admin-stat-link { display: block; color: inherit; text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease; }
.admin-stat-link:hover { transform: translateY(-2px); border-color: var(--accent); }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-filters .preset-filter { text-decoration: none; }
.admin-count { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 11px; font-weight: 700; }
.preset-filter.active .admin-count { background: rgba(0, 0, 0, 0.25); }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }

/* ---------- Numéros : coche WhatsApp ---------- */
.wa-check, .wa-toggle { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; border: 1px solid var(--border); border-radius: 10px; color: var(--text-muted); font-size: 13.5px; font-weight: 600; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease; }
.wa-check { padding: 0 14px; }
.wa-toggle { padding: 5px 10px; }
.wa-check input, .wa-toggle input { width: 16px; height: 16px; margin: 0; accent-color: #25D366; cursor: pointer; }
.wa-check .wa-ic, .wa-toggle .wa-ic { display: inline-flex; color: var(--text-muted); transition: color 0.15s ease; }
.wa-check svg, .wa-toggle svg { width: 18px; height: 18px; }
.wa-check:has(input:checked), .wa-toggle:has(input:checked) { border-color: #25D366; background: rgba(37, 211, 102, 0.12); color: var(--text); }
.wa-check:has(input:checked) .wa-ic, .wa-toggle:has(input:checked) .wa-ic { color: #25D366; }
@media (max-width: 560px) { .wa-toggle .wa-txt { display: none; } .link-input-row:has(.wa-check) { flex-wrap: wrap; } .link-input-row .wa-check { padding: 11px 14px; } }

/* ---------- Bouton hamburger du menu mobile (masqué sur ordinateur) ---------- */
/* (la règle « masqué au-delà de 900 px » est placée après ce bloc, sinon elle serait écrasée) */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    cursor: pointer;
}
@media (min-width: 901px) { .nav-toggle { display: none; } }
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.2s ease, opacity 0.2s ease; }
.sidebar.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar.open .nav-toggle span:nth-child(2) { opacity: 0; }
.sidebar.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Comptes créés par l'admin : bandeaux, verrou, impersonation, VIP ---------- */
.impersonate-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 24px;
    background: linear-gradient(90deg, #7C3AED, #6366F1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.impersonate-bar .btn-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.impersonate-bar .btn-ghost:hover { background: rgba(255, 255, 255, 0.26); }

.claim-banner {
    margin-bottom: 24px;
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
}
.claim-banner-text p { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); }
.claim-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.claim-form input { flex: 1; min-width: 220px; }

.dashboard-editable { position: relative; }
.dashboard-editable.is-locked { pointer-events: none; user-select: none; }
.dashboard-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    background: rgba(10, 12, 24, 0.5);
    backdrop-filter: blur(1.5px);
    border-radius: var(--radius-lg);
}
.dashboard-lock-overlay span {
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.vip-star {
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.3;
    filter: grayscale(1);
    padding: 0 2px;
    vertical-align: middle;
}
.vip-star.is-vip { opacity: 1; filter: none; }

/* ---------- Champ mot de passe : bouton afficher/masquer ---------- */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 46px; }
.pw-toggle {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    padding: 8px 12px;
    color: var(--text-muted);
}
.pw-toggle:hover { color: var(--text); }
.pw-mismatch { display: none; margin-top: 10px; }

/* ---------- Onglets de l'administration (session 11) ---------- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.admin-tab { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.admin-tab:hover { color: var(--text); border-color: var(--accent); }
.admin-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.admin-tab-count { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 12px; text-align: center; }
.status-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-chip.todo { background: rgba(148,163,184,.15); color: #CBD5E1; }
.status-chip.wait { background: rgba(251,191,36,.15); color: #FCD34D; }
.status-chip.ok { background: rgba(16,185,129,.16); color: #34D399; }
.status-chip.ko { background: rgba(239,68,68,.15); color: #FCA5A5; }
.cert-item { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cert-item:last-child { border-bottom: 0; }
.cert-item .ci-main { flex: 1; min-width: 220px; }
.cert-item .ci-title { font-weight: 700; }
.cert-item .ci-value { color: var(--text-muted); font-size: 14px; word-break: break-all; }
.cert-item .ci-help { font-size: 14px; margin-top: 6px; color: var(--text-muted); }
.cert-code { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 18px; font-weight: 800; letter-spacing: 2px; padding: 4px 10px; border-radius: 8px; background: rgba(124,92,255,.18); color: #fff; }
.cert-progress { height: 8px; border-radius: 999px; background: rgba(148,163,184,.18); overflow: hidden; }
.cert-progress > span { display: block; height: 100%; background: linear-gradient(90deg, #7C5CFF, #22D3EE); }
.cond-list { list-style: none; padding: 0; margin: 0; }
.cond-list li { padding: 8px 0; display: flex; gap: 10px; align-items: flex-start; }
.cert-badge { display: inline-flex; vertical-align: middle; line-height: 0; }

/* Sélecteur de langue FR · EN (session 14) */
.lang-switch{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);font:600 12px/1 'Inter',sans-serif;letter-spacing:.3px}
.lang-switch a,.lang-switch span{padding:6px 9px;border-radius:999px;color:var(--muted,#94a3b8);text-decoration:none}
.lang-switch a:hover{color:#fff}
.lang-switch span[aria-current]{background:rgba(124,92,255,.35);color:#fff}
.auth-lang{display:flex;justify-content:center;margin:0 0 14px}

/* =====================================================================
   THÈME CLAIR (optionnel) — session 14
   Le sombre reste le thème par défaut. Le clair s'active avec
   <html data-theme="light"> (choix du visiteur, voir includes/ui_theme.php).
   Toutes les règles claires sont préfixées html[data-theme="light"] :
   le thème sombre (et l'administration, qui ne pose jamais l'attribut)
   n'est pas modifié, à l'exception du bouton .theme-toggle ci-dessous.
   ===================================================================== */

/* ---------- Bouton clair / sombre (commun : appli, accueil) ---------- */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0; margin-left: 8px; vertical-align: middle;
    border-radius: 50%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
    color: #CBD5E1; cursor: pointer; flex: none;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.theme-toggle:focus-visible { outline: 2px solid #818CF8; outline-offset: 2px; }
.theme-toggle svg { display: block; }
.theme-toggle .tt-moon { display: none; }
.lang-switch { vertical-align: middle; }
.auth-lang { align-items: center; gap: 8px; }
.auth-lang .theme-toggle { margin-left: 0; }
/* 34 px à côté d'un sélecteur de 32 px : marges négatives pour ne pas grandir la ligne */
.lang-switch + .theme-toggle { margin-top: -1px; margin-bottom: -1px; }
.navbar > .lang-switch { margin-left: auto; }

html[data-theme="light"] .theme-toggle { background: #FFFFFF; border-color: rgba(15, 23, 42, .14); color: #334155; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
html[data-theme="light"] .theme-toggle:hover { color: #0B1020; border-color: rgba(79, 70, 229, .45); background: #FFFFFF; }
html[data-theme="light"] .theme-toggle:focus-visible { outline-color: #4F46E5; }
html[data-theme="light"] .theme-toggle .tt-sun { display: none; }
html[data-theme="light"] .theme-toggle .tt-moon { display: block; }

html[data-theme="light"] .lang-switch { background: #FFFFFF; border-color: rgba(15, 23, 42, .14); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
html[data-theme="light"] .lang-switch a, html[data-theme="light"] .lang-switch span { color: #5B6478; }
html[data-theme="light"] .lang-switch a:hover { color: #0B1020; }
html[data-theme="light"] .lang-switch span[aria-current] { background: rgba(79, 70, 229, .14); color: #3730A3; }

/* ---------- Jetons ---------- */
html[data-theme="light"] {
    --bg: #F6F7FB;
    --bg-elevated: #EEF1F8;
    --bg-card: #FFFFFF;
    --border: rgba(15, 23, 42, .10);
    --text: #0B1020;
    --text-muted: #5B6478;
    --accent: #4F46E5;
    --accent-2: #0E7490;
    --accent-gradient: linear-gradient(120deg, #4F46E5 0%, #7C3AED 50%, #0E7490 100%);
    --success: #047857;
    --danger: #B91C1C;
    --shadow-glow: 0 0 0 1px rgba(79, 70, 229, .10), 0 18px 50px -24px rgba(15, 23, 42, .25);
    --l-body: #334155;
    --l-line-strong: rgba(15, 23, 42, .16);
    --l-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 50px -24px rgba(15, 23, 42, .25);
    color-scheme: light;
}
html[data-theme="light"], html[data-theme="light"] body { background: var(--bg); color: var(--text); }
html[data-theme="light"] body {
    background:
        radial-gradient(900px 420px at 50% -160px, rgba(79, 70, 229, .07), rgba(79, 70, 229, 0) 70%),
        var(--bg);
    background-repeat: no-repeat;
}
html[data-theme="light"] ::selection { background: rgba(79, 70, 229, .18); }

/* ---------- Boutons, cartes, badges ---------- */
html[data-theme="light"] .btn-primary { color: #fff; box-shadow: 0 10px 24px -12px rgba(79, 70, 229, .55); }
html[data-theme="light"] .btn-primary:hover { box-shadow: 0 14px 30px -12px rgba(79, 70, 229, .65); }
html[data-theme="light"] .btn-ghost { background: #FFFFFF; color: #0B1020; border-color: var(--l-line-strong); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
html[data-theme="light"] .btn-ghost:hover { border-color: #4F46E5; color: #3730A3; }
html[data-theme="light"] .card { box-shadow: var(--l-shadow); }
html[data-theme="light"] .badge { background: rgba(79, 70, 229, .10); color: #3730A3; border-color: rgba(79, 70, 229, .25); }
html[data-theme="light"] .btn-google { border-color: var(--l-line-strong); }
html[data-theme="light"] .btn-google:hover { box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .3); }
html[data-theme="light"] .oauth-sep::before, html[data-theme="light"] .oauth-sep::after { background: rgba(15, 23, 42, .12); }

/* ---------- Champs ---------- */
html[data-theme="light"] .field label { color: #334155; }
html[data-theme="light"] .field input, html[data-theme="light"] .field textarea, html[data-theme="light"] .field select,
html[data-theme="light"] input[type="text"], html[data-theme="light"] input[type="url"], html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="email"], html[data-theme="light"] input[type="password"], html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="date"], html[data-theme="light"] input[type="search"], html[data-theme="light"] textarea, html[data-theme="light"] select {
    background: #FFFFFF; border-color: var(--l-line-strong); color: #0B1020; color-scheme: light;
}
html[data-theme="light"] .field input:focus, html[data-theme="light"] .field textarea:focus, html[data-theme="light"] .field select:focus,
html[data-theme="light"] input[type="text"]:focus, html[data-theme="light"] input[type="url"]:focus, html[data-theme="light"] input[type="tel"]:focus,
html[data-theme="light"] input[type="email"]:focus, html[data-theme="light"] input[type="password"]:focus, html[data-theme="light"] input[type="number"]:focus,
html[data-theme="light"] input[type="date"]:focus, html[data-theme="light"] input[type="search"]:focus, html[data-theme="light"] textarea:focus, html[data-theme="light"] select:focus {
    border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .35);
}
html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: #6B7280; opacity: 1; }
html[data-theme="light"] .pw-toggle:hover { color: #0B1020; }

/* ---------- Alertes ---------- */
html[data-theme="light"] .alert-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
html[data-theme="light"] .alert-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
html[data-theme="light"] .alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
html[data-theme="light"] .alert a { color: inherit; text-decoration: underline; }

/* ---------- Tableau de bord : barre latérale, barre du haut ---------- */
html[data-theme="light"] .sidebar { background: #FFFFFF; border-right-color: rgba(15, 23, 42, .10); }
html[data-theme="light"] .sidebar-nav a { color: #5B6478; }
html[data-theme="light"] .sidebar-nav a:hover { background: #F3F5FA; color: #0B1020; }
html[data-theme="light"] .sidebar-nav a.active { background: rgba(79, 70, 229, .10); color: #3730A3; font-weight: 600; }
html[data-theme="light"] .subscription-pill.trial { background: #FEF3C7; color: #92400E; }
html[data-theme="light"] .subscription-pill.active { background: #D1FAE5; color: #065F46; }
html[data-theme="light"] .subscription-pill.expired { background: #FEE2E2; color: #991B1B; }
html[data-theme="light"] .nav-toggle { background: #FFFFFF; border-color: var(--l-line-strong); }
@media (max-width: 900px) {
    html[data-theme="light"] .sidebar { border-bottom-color: rgba(15, 23, 42, .10); box-shadow: 0 1px 0 rgba(15, 23, 42, .02), 0 8px 24px -18px rgba(15, 23, 42, .3); }
    html[data-theme="light"] .sidebar-nav { background: #FFFFFF; border-bottom-color: rgba(15, 23, 42, .10); box-shadow: 0 24px 40px -20px rgba(15, 23, 42, .3); }
}

/* ---------- Listes éditables (liens, numéros, emails, galerie) ---------- */
html[data-theme="light"] .link-item, html[data-theme="light"] .added-link-chip { background: #F8F9FC; border-color: rgba(15, 23, 42, .10); }
html[data-theme="light"] .link-item .platform-icon { background: #FFFFFF; border: 1px solid rgba(15, 23, 42, .08); }
html[data-theme="light"] .icon-btn { background: #FFFFFF; border-color: rgba(15, 23, 42, .14); color: #5B6478; }
html[data-theme="light"] .icon-btn:hover { color: #3730A3; border-color: #4F46E5; }
html[data-theme="light"] .gal-edit { background: #F8F9FC; }
html[data-theme="light"] .gal-thumb { background: #EEF1F8; }
html[data-theme="light"] .wa-check, html[data-theme="light"] .wa-toggle { border-color: var(--l-line-strong); background: #FFFFFF; }
html[data-theme="light"] .wa-check:has(input:checked), html[data-theme="light"] .wa-toggle:has(input:checked) { border-color: #16A34A; background: #F0FDF4; color: #0B1020; }
html[data-theme="light"] .wa-check:has(input:checked) .wa-ic, html[data-theme="light"] .wa-toggle:has(input:checked) .wa-ic { color: #15803D; }

/* ---------- Aperçu téléphone (le cadre reste noir : c'est un appareil) ---------- */
html[data-theme="light"] .phone-preview { background: #0B1020; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 30px 60px -28px rgba(15, 23, 42, .45); }

/* ---------- Personnalisation ---------- */
html[data-theme="light"] .preset-card { border-color: rgba(15, 23, 42, .10); }
html[data-theme="light"] .preset-card:hover { border-color: #4F46E5; box-shadow: 0 14px 30px -16px rgba(15, 23, 42, .3); }
html[data-theme="light"] .preset-card.selected { border-color: #FFFFFF; box-shadow: 0 0 0 2px #4F46E5, 0 10px 24px -14px rgba(79, 70, 229, .5); }
html[data-theme="light"] .color-swatch { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); }
html[data-theme="light"] .color-swatch.selected { border-color: #FFFFFF; box-shadow: 0 0 0 2px #4F46E5; }
html[data-theme="light"] .preset-filter { background: #FFFFFF; border-color: var(--l-line-strong); color: #5B6478; }
html[data-theme="light"] .preset-filter:hover { color: #0B1020; border-color: #4F46E5; }
html[data-theme="light"] .preset-filter.active { background: #4F46E5; border-color: #4F46E5; color: #fff; }
html[data-theme="light"] .upload-zone { border-color: rgba(15, 23, 42, .18); background: #FFFFFF; }
html[data-theme="light"] .upload-zone:hover { border-color: #4F46E5; color: #0B1020; background: #FAFAFF; }
html[data-theme="light"] .progress { background: #E7EAF3; }
html[data-theme="light"] .todo-list a { color: #4F46E5; }
/* Pastilles de contraste écrites en JS (couleurs pensées pour le sombre) */
html[data-theme="light"] .contrast-badge[style*="52, 211, 153"] { color: #047857 !important; }
html[data-theme="light"] .contrast-badge[style*="252, 211, 77"] { color: #B45309 !important; }
html[data-theme="light"] .contrast-badge[style*="248, 113, 113"] { color: #B91C1C !important; }

/* ---------- Comptes créés par l'admin : bandeaux, verrou ---------- */
html[data-theme="light"] .claim-banner { background: #FFFBEB; border-color: #FDE68A; }
html[data-theme="light"] .dashboard-lock-overlay { background: rgba(246, 247, 251, .62); }
html[data-theme="light"] .dashboard-lock-overlay span { background: #FFFFFF; border-color: var(--l-line-strong); color: #0B1020; box-shadow: 0 12px 30px -12px rgba(15, 23, 42, .3); }

/* ---------- Onboarding ---------- */
html[data-theme="light"] .onboarding-progress { background: #E2E6F0; }
html[data-theme="light"] .skip-link:hover { color: #0B1020; }

/* ---------- Pages légales ---------- */
html[data-theme="light"] .legal { box-shadow: var(--l-shadow); }
html[data-theme="light"] .legal p, html[data-theme="light"] .legal li { color: var(--l-body); }
html[data-theme="light"] .legal-links a:hover { color: #0B1020; }

/* ---------- Certification (verification.php) ---------- */
html[data-theme="light"] .status-chip.todo { background: #F1F5F9; color: #475569; }
html[data-theme="light"] .status-chip.wait { background: #FEF3C7; color: #92400E; }
html[data-theme="light"] .status-chip.ok { background: #D1FAE5; color: #065F46; }
html[data-theme="light"] .status-chip.ko { background: #FEE2E2; color: #991B1B; }
html[data-theme="light"] .cert-code { background: rgba(79, 70, 229, .10); color: #3730A3; }
html[data-theme="light"] .cert-progress { background: #E7EAF3; }
html[data-theme="light"] .cert-progress > span { background: linear-gradient(90deg, #4F46E5, #0E7490); }
html[data-theme="light"] .admin-count { background: rgba(15, 23, 42, .07); }

/* ---------- Vérifier un compte (verifier.php : styles de la page) ---------- */
html[data-theme="light"] .vf-form { box-shadow: var(--l-shadow); border-color: var(--l-line-strong); }
html[data-theme="light"] .vf-form input { background: transparent; border: 0; box-shadow: none; }
html[data-theme="light"] .vf-form input:focus { box-shadow: none; }
html[data-theme="light"] .vf-form:focus-within { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .25), var(--l-shadow); }
html[data-theme="light"] .vf-ok { background: #ECFDF5; border-color: #A7F3D0; }
html[data-theme="light"] .vf-ok .vf-v-title { color: #047857; }
html[data-theme="light"] .vf-info { background: #EEF2FF; border-color: #C7D2FE; }
html[data-theme="light"] .vf-info .vf-v-title { color: #4338CA; }
html[data-theme="light"] .vf-none { background: #FFFFFF; }
html[data-theme="light"] .vf-cert { border-color: rgba(29, 155, 240, .45); box-shadow: 0 0 0 1px rgba(29, 155, 240, .10), 0 20px 50px -24px rgba(29, 155, 240, .40); }
html[data-theme="light"] .vf-card { box-shadow: var(--l-shadow); }
html[data-theme="light"] .vf-ava { background: #E7EAF3; }
html[data-theme="light"] .vf-cert-rows div { background: #F8F9FC; }
html[data-theme="light"] .vf-sub, html[data-theme="light"] .vf-official a { color: #047857; }
html[data-theme="light"] .vf-sub-muted { color: #5B6478; }
html[data-theme="light"] .vf-check { color: #059669; }
html[data-theme="light"] .vf-items a { border-bottom-color: rgba(15, 23, 42, .25); }
html[data-theme="light"] .vf-guarantee { background: #F0F7FF; border-color: rgba(29, 155, 240, .28); color: #334155; }
html[data-theme="light"] .vf-report:hover { color: #B91C1C; }

/* ---------- Styles en ligne de certaines pages (couleurs pensées pour le sombre) ---------- */
/* account.php : zone « Supprimer mon compte » */
html[data-theme="light"] .card[style*="#7F1D1D"] { border-color: #FECACA !important; background: #FFFBFB; }
html[data-theme="light"] .card h3[style*="#F87171"] { color: #B91C1C !important; }
/* dashboard.php (page en pause) : pastille de l'icône */
html[data-theme="light"] .auth-card .card > div[style*="border-radius:50%"] { background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(14, 116, 144, .10)) !important; border-color: rgba(79, 70, 229, .30) !important; }
html[data-theme="light"] .auth-card .card > div[style*="border-radius:50%"] svg { stroke: #4F46E5; }
/* QR codes (fond blanc en ligne) : un liseré pour les détacher de la carte blanche */
html[data-theme="light"] [style*="background:#fff;border-radius:16px"], html[data-theme="light"] [style*="border-radius:16px;background:#fff"] { box-shadow: 0 0 0 1px rgba(15, 23, 42, .10); }
/* ===================== fin du thème clair ===================== */
