/* ════════════════════════════════
   VULTA — Socle visuel
   Chargé après style.css. Trois rôles :
   1. retinter les valeurs codées en dur du moule (accent bleu d'origine)
   2. poser le grain : ombres, bordures, survol, équilibre des titres
   3. fournir le système de composants Vulta

   Règle de direction artistique : le dégradé de marque est réservé au
   logotype, à l'action principale et à UN seul élément fort par page.
════════════════════════════════ */

/* ─────────────────────────────
   1. LE GRAIN
   Ce qui distingue un rendu soigné d'un rendu approximatif tient à quelques
   règles appliquées partout, pas à des effets spectaculaires.
   ───────────────────────────── */

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-stretch: 110%;
    letter-spacing: -0.022em;
    line-height: 1.1;
    color: var(--text);
    /* Sans cette ligne, les titres de deux lignes se coupent mal et
       l'ensemble paraît amateur. Un gain visible partout pour une règle. */
    text-wrap: balance;
}

/* L'ellipse ne fonctionne pas dans un conteneur flex sans ceci. */
.nav-logo, .nav-dropdown-header, .footer-brand,
.ws-item__body, .ws-item__meta, .ed__stage-bar {
    min-width: 0;
}

/* Les compteurs qui changent ne doivent pas faire trembler la ligne. */
.ws-quota__label b, .gen__count, #edStats, .lp-plan__price b {
    font-variant-numeric: tabular-nums;
}

main { padding-top: var(--nav-h); }

/* Les blobs deviennent des lavis de marque, à peine perceptibles. */
.blob { filter: blur(120px); opacity: 0.30; }
.blob-1 {
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(255, 31, 122, 0.55), transparent 70%);
    top: -240px; left: -180px;
}
.blob-2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(255, 193, 60, 0.45), transparent 70%);
    bottom: 40px; right: -170px;
}
.blob-3 {
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(255, 61, 31, 0.35), transparent 70%);
    top: 54%; left: 44%;
    opacity: 0.18;
}

/* ─────────────────────────────
   2. RETINTE DU MOULE
   Le moule est né avec un accent bleu #7C9EFF écrit en dur à une soixantaine
   d'endroits. On le ramène sur le rose lave.
   ───────────────────────────── */

.navbar {
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.nav-logo-icon {
    background: var(--gradient-accent);
    box-shadow: var(--shadow-accent);
}
.nav-logo-name {
    font-family: var(--font-display);
    font-stretch: 116%;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 600; }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(11, 10, 13, 0.04); }
.btn-ghost.active { color: var(--text); background: rgba(11, 10, 13, 0.06); }

.btn-nav-cta {
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: none;
}
.btn-nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-accent); }

.nav-sep { background: var(--border-neutral); }
.nav-avatar {
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 700;
    /* Détache l'avatar du fond translucide. */
    border: 2px solid rgba(255, 255, 255, 0.8);
}
.nav-burger:hover { background: var(--accent-soft); }
.nav-burger span { background: var(--text); }

.nav-dropdown {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), var(--edge-top);
}
.nav-dropdown-header { border-color: var(--border-neutral); }
.nav-dropdown-name { color: var(--text); }
.nav-dropdown-email { color: var(--text-dim); }
.nav-dropdown-divider { background: var(--border-neutral); }
.nav-dropdown-item { color: var(--muted); }
.nav-dropdown-item:hover { background: var(--accent-soft); color: var(--text); }
.nav-dropdown-item--logout:hover { background: rgba(229, 72, 77, 0.10); color: var(--red); }
.nav-mobile-overlay { background: rgba(11, 10, 13, 0.35); backdrop-filter: blur(2px); }

/* ── Pied de page ── */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border-neutral);
}
.footer-logo-icon { background: var(--gradient-accent); }
.footer-logo-name { font-family: var(--font-display); font-stretch: 116%; font-weight: 800; }
.footer-col h4 { color: var(--text); font-family: var(--font-display); font-stretch: 108%; }
.footer-col a, .footer-tagline, .footer-copy { color: var(--muted); }
.footer-col a:hover { color: var(--accent-dark); }
.footer-divider { background: var(--border-neutral); }
.social-btn { background: var(--surface-2); border: 1px solid var(--border-neutral); }
.social-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ─────────────────────────────
   3. SYSTÈME DE COMPOSANTS
   ───────────────────────────── */

.v-wrap {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}
.v-wrap--narrow { max-width: var(--reading); }

/* ── Boutons ── */
.v-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--t-fast), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
}
.v-btn:disabled, .v-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.v-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* Le seul usage du dégradé dans l'interface : l'action principale. */
.v-btn--primary {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
/* Le survol soulève d'exactement un pixel, jamais deux, toujours avec un
   renforcement de l'ombre. */
.v-btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-accent); }

.v-btn--outline {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.v-btn--outline:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--shadow-md); }

.v-btn--ghost { background: transparent; color: var(--muted); }
.v-btn--ghost:hover { color: var(--text); background: rgba(11, 10, 13, 0.04); }

.v-btn--danger { background: rgba(229, 72, 77, 0.08); color: var(--red); border-color: rgba(229, 72, 77, 0.24); }
.v-btn--danger:hover { background: rgba(229, 72, 77, 0.14); }

.v-btn--lg { padding: 15px 32px; font-size: 1rem; }
.v-btn--sm { padding: 8px 15px; font-size: var(--fs-xs); }
.v-btn--block { width: 100%; }

/* ── Cartes ──
   Carte blanche sur fond teinté, bordure très translucide, ombre large et
   douce. Jamais de bordure épaisse. */
.v-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm), var(--edge-top);
    transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
/* Le voile diagonal qui s'éteint à mi-hauteur : c'est ce détail, plus que le
   flou, qui donne l'impression de verre. */
.v-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}
.v-card--hover:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), var(--edge-top);
}

/* ── Champs ── */
.v-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.v-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.v-hint { font-size: var(--fs-xs); color: var(--text-dim); line-height: 1.5; }

.v-input, .v-select, .v-textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.v-input::placeholder, .v-textarea::placeholder { color: var(--text-dim); }
.v-input:focus, .v-select:focus, .v-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 31, 122, 0.12);
}
.v-textarea { resize: vertical; min-height: 108px; line-height: 1.6; }
.v-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6873' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 17px;
    padding-right: 42px;
}

/* Choix segmentés — remplace un select quand les options sont peu nombreuses */
.v-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.v-choice input { position: absolute; opacity: 0; pointer-events: none; }
.v-choice span {
    display: block;
    padding: 9px 16px;
    background: var(--surface);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    color: var(--muted);
    cursor: pointer;
    transition: all var(--t-fast);
}
.v-choice span:hover { border-color: var(--border-strong); color: var(--text); }
.v-choice input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 600;
}
.v-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 31, 122, 0.18); }

/* ── Badges ── */
.v-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: 600;
    /* Un badge épouse son contenu, y compris à l'intérieur d'un conteneur
       flex en colonne où il s'étirerait par défaut. */
    align-self: flex-start;
}
.v-badge--muted { background: rgba(11, 10, 13, 0.05); color: var(--muted); }
.v-badge--accent { background: var(--accent-soft); color: var(--accent-dark); }
.v-badge--ok { background: rgba(31, 169, 124, 0.10); color: var(--green); }
.v-badge--warn { background: rgba(199, 122, 10, 0.10); color: var(--orange); }
.v-badge--err { background: rgba(229, 72, 77, 0.10); color: var(--red); }

.v-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.v-dot--pulse { animation: vPulse 1.4s ease-in-out infinite; }
@keyframes vPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── Titres de section ── */
.v-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}
.v-eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.v-title { font-size: var(--fs-h1); margin-bottom: 14px; }
.v-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.65; max-width: 62ch; }

/* Le seul texte en dégradé autorisé : un fragment de titre, une fois par page. */
.v-flame {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── État vide ── */
.v-empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}
.v-empty svg { width: 38px; height: 38px; stroke: var(--text-dim); margin-bottom: 16px; }
.v-empty h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.v-empty p { color: var(--muted); margin-bottom: 22px; }

/* ── Barre de progression ── */
.v-progress {
    height: 6px;
    background: rgba(11, 10, 13, 0.07);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.v-progress span {
    display: block;
    height: 100%;
    background: var(--gradient-accent);
    border-radius: var(--radius-pill);
    transition: width 0.5s var(--ease);
}

/* ── Accessibilité ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

@media (max-width: 720px) {
    .v-wrap { padding: 0 18px; }
    .v-card { padding: 20px; }
}
