/* ─────────────────────────────────────────────
   Net-Progress · Charte graphique partagée
   Navy premium + émeraude, cabinet de conseil SI & IA
   ───────────────────────────────────────────── */

:root {
    --ink-900: #070B14;
    --ink-800: #0B1220;
    --ink-700: #0F172A;
    --ink-600: #111A2E;
    --ink-500: #172033;
    --ink-400: #1E293B;
    --brand-emerald: #10B981;
    --brand-emerald-soft: #34D399;
    --brand-emerald-deep: #059669;
    --text: #F8FAFC;
    --muted: #CBD5E1;
    --subtle: #94A3B8;
    /* Tokens sémantiques (valeurs lisibles sur fond sombre ; le bloc
       html.theme-light en fin de fichier les redéfinit pour fond clair).
       À utiliser dans les JS/HTML à la place des couleurs en dur. */
    --warn: #B45309;
    --danger: #B91C1C;
    --info: #1D4ED8;
    --ok: #047857;
    --line: #E2E8F0;
    --surface: #FFFFFF;
    /* NB : depuis le 2026-09-01 toutes les pages sont en thème clair ; les valeurs
       ci-dessus sont donc les défauts sûrs même si une page oublie "theme-light". */
}

html,
body {
    background-color: var(--ink-800);
}

body {
    color: var(--text);
    overflow-x: hidden;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

h1, h2, h3, h4 { letter-spacing: -0.022em; }
h1 { letter-spacing: -0.03em; }

::selection { background: rgba(16, 185, 129, 0.35); color: #fff; }

/* Typewriter cursor */
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }
#tw-cursor, #tw-formations-cursor {
    display: inline-block;
    width: 2px;
    background: var(--brand-emerald);
    margin-left: 4px;
    vertical-align: baseline;
    animation: blink 0.9s step-end infinite;
    border-radius: 1px;
}
#tw-cursor.done, #tw-formations-cursor.done { animation: none; opacity: 0; }

/* Fade-in au scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* Grille subtile — projetée via un pseudo-élément ::before pour que le mask
   n'affecte que la grille elle-même, pas le contenu (texte, boutons, cartes). */
.bg-grid {
    position: relative;
}
.bg-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-size: 48px 48px;
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.bg-grid > * {
    position: relative;
    z-index: 1;
}

/* Cartes */
.card {
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(23, 32, 51, 0.65) 0%, rgba(17, 26, 46, 0.65) 100%);
    border: 1px solid rgba(148, 163, 184, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 10px 24px -18px rgba(0,0,0,0.7);
}
.card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 22px 40px -24px rgba(0,0,0,0.8), 0 0 0 1px rgba(16,185,129,0.08);
}

/* Icon pill */
.icon-pill {
    width: 44px; height: 44px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: var(--brand-emerald-soft);
    transition: transform 0.3s ease, background 0.3s ease;
}
.card:hover .icon-pill {
    background: rgba(16, 185, 129, 0.12);
    transform: translateY(-1px);
}

/* Boutons */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.005em;
    color: #052E22;
    background: var(--brand-emerald);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 24px -14px rgba(16,185,129,0.55);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
}
.btn-primary:hover {
    background: var(--brand-emerald-soft);
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 14px 28px -14px rgba(16,185,129,0.6);
}
.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(148, 163, 184, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    text-decoration: none;
}
.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}
.btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-ghost:hover {
    color: var(--text);
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.04);
}

/* Eyebrow */
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-emerald-soft);
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.22);
}
.eyebrow-dot {
    width: 6px; height: 6px; border-radius: 999px;
    background: var(--brand-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.accent-border-l { border-left: 2px solid var(--brand-emerald); }

/* Inputs */
.input, .select, .textarea {
    width: 100%;
    background: rgba(7, 11, 20, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: #64748B; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand-emerald);
    background: rgba(7, 11, 20, 0.75);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.select option { background: var(--ink-700); color: var(--text); }

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top: 2px solid var(--brand-emerald);
    border-radius: 50%;
    width: 18px; height: 18px;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Stats */
.stat-value {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--brand-emerald-soft);
}
.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--subtle);
}

.metric-card {
    background: rgba(7, 11, 20, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
}

/* Chip */
.chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

/* Nav link */
.nav-link {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s ease;
    text-decoration: none;
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--brand-emerald);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); }

/* Section alt bg */
.bg-section-alt {
    background: linear-gradient(180deg, rgba(17, 26, 46, 0) 0%, rgba(17, 26, 46, 0.5) 50%, rgba(17, 26, 46, 0) 100%);
}

/* Pill dots (testimonials nav) */
.pill-dot { height: 6px; border-radius: 999px; transition: all 0.3s ease; border: 0; cursor: pointer; }
.pill-dot.active { width: 24px; background: var(--brand-emerald); }
.pill-dot.inactive { width: 6px; background: rgba(148, 163, 184, 0.25); }

/* Step circle */
.step-circle {
    width: 44px; height: 44px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    background: var(--ink-700);
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.18);
    position: relative;
    z-index: 1;
}
.step-circle.active {
    color: var(--brand-emerald-soft);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

/* Featured card (plan / formation mise en avant) */
.card-featured {
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, rgba(17, 26, 46, 0.85) 100%) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 50px -24px rgba(16,185,129,0.35) !important;
}

[data-lucide] { width: 1em; height: 1em; }

/* ─────────────────────────────────────────────
   THÈME CLAIR — design system DAF (2026-08-28)
   Activé page par page via <html class="theme-light">. Redéfinit les tokens
   (les composants var-based s'adaptent seuls) + les composants qui portent
   des couleurs sombres en dur. Réf : docs/design/2026-08-28-design-system-daf.md
   et docs/superpowers/plans/2026-09-01-theme-clair-app.md.
   La landing (index.html) reste autonome et ne charge PAS ce fichier.
   ───────────────────────────────────────────── */

html.theme-light {
    /* L'échelle --ink-* passe de "surfaces sombres" à "surfaces claires" :
       tout ce qui s'affichait sur ink (modales, step-circles, options) suit. */
    --ink-900: #EEF2F7;
    --ink-800: #F8FAFC;   /* fond de page */
    --ink-700: #FFFFFF;   /* surfaces : modales, step-circle, options de select */
    --ink-600: #F8FAFC;
    --ink-500: #F1F5F9;
    --ink-400: #E2E8F0;
    /* Émeraude assombrie pour tenir le contraste AA sur fond clair */
    --brand-emerald: #047857;
    --brand-emerald-soft: #047857;
    --brand-emerald-deep: #065F46;
    --text: #0F172A;
    --muted: #475569;
    --subtle: #64748B;
    /* Tokens sémantiques du design system (à préférer aux couleurs en dur) */
    --line: #E2E8F0;
    --warn: #B45309;
    --danger: #B91C1C;
    --info: #1D4ED8;
    --ok: #047857;
    --surface: #FFFFFF;
}

html.theme-light body { font-weight: 450; }

/* Composants qui portaient l'émeraude-500 (thème sombre) en dur */
html.theme-light .eyebrow { color: var(--brand-emerald); background: rgba(4, 120, 87, 0.06); border-color: rgba(4, 120, 87, 0.25); }
html.theme-light .eyebrow-dot { background: var(--brand-emerald); box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15); }
html.theme-light .icon-pill { background: rgba(4, 120, 87, 0.08); border-color: rgba(4, 120, 87, 0.22); color: var(--brand-emerald); }

/* ── Cartes de pack (js/pack-cards.js) — partagées landing (copie autonome) et compte ── */
html.theme-light .pack-card { background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 24px 20px; display: flex; flex-direction: column; gap: 4px; position: relative; }
html.theme-light .pack-featured { border-color: var(--brand-emerald); }
html.theme-light .pack-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--brand-emerald); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; white-space: nowrap; }
html.theme-light .pack-name { font-size: 13px; font-weight: 600; color: var(--subtle); }
html.theme-light .pack-credits { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
html.theme-light .pack-credits .unit { font-size: 13px; font-weight: 450; color: var(--subtle); }
html.theme-light .pack-price { font-size: 15px; font-weight: 600; color: var(--brand-emerald); font-variant-numeric: tabular-nums; }
html.theme-light .pack-hint { font-size: 12px; color: var(--subtle); font-variant-numeric: tabular-nums; }
html.theme-light .buy-btn { margin-top: 12px; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 0; border: 1px solid var(--brand-emerald); color: var(--brand-emerald); background: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; }
html.theme-light .buy-btn:hover { background: var(--accent-soft, #ECFDF5); }
html.theme-light .buy-btn:disabled { opacity: 0.6; cursor: default; }
html.theme-light .qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: #fff; }
html.theme-light .qty-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; line-height: 1; color: var(--subtle); background: transparent; border: none;
  cursor: pointer; user-select: none; }
html.theme-light .qty-btn:hover { background: #ECFDF5; color: var(--brand-emerald); }
html.theme-light .qty-input { width: 2.4rem; height: 28px; text-align: center; border: none; background: transparent;
  color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; -moz-appearance: textfield; }
html.theme-light .qty-input:focus { outline: none; }

html.theme-light ::selection { background: rgba(4, 120, 87, 0.18); color: var(--text); }

html.theme-light .bg-grid::before {
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
}


html.theme-light .card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
html.theme-light .card:hover {
    border-color: rgba(4, 120, 87, 0.45);
    box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.15);
}
html.theme-light .card-featured {
    border: 1px solid rgba(4, 120, 87, 0.55) !important;
    background: linear-gradient(180deg, rgba(4, 120, 87, 0.04) 0%, #FFFFFF 45%) !important;
    box-shadow: 0 10px 30px -18px rgba(4, 120, 87, 0.35) !important;
}

html.theme-light .btn-primary {
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}
html.theme-light .btn-primary:hover {
    background: var(--brand-emerald-deep);
    box-shadow: 0 6px 16px -8px rgba(4, 120, 87, 0.5);
}
html.theme-light .btn-secondary {
    background: #FFFFFF;
    border-color: var(--line);
}
html.theme-light .btn-secondary:hover {
    background: #F8FAFC;
    border-color: rgba(4, 120, 87, 0.45);
}

html.theme-light .input,
html.theme-light .select,
html.theme-light .textarea {
    background: #FFFFFF;
    border-color: var(--line);
}
html.theme-light .input:focus,
html.theme-light .select:focus,
html.theme-light .textarea:focus {
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
}
html.theme-light .input::placeholder,
html.theme-light .textarea::placeholder { color: #94A3B8; }

html.theme-light .loader {
    border-color: var(--line);
    border-top-color: var(--brand-emerald);
}

html.theme-light .metric-card {
    background: #F8FAFC;
    border-color: var(--line);
}

html.theme-light .chip {
    background: #FFFFFF;
    border-color: var(--line);
}

html.theme-light .bg-section-alt {
    background: #FFFFFF;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

html.theme-light .sirenity-modal-backdrop { background: rgba(15, 23, 42, 0.45); }
html.theme-light .sirenity-modal { box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15); }

html.theme-light .step-circle { border-color: var(--line); }
html.theme-light .step-circle.active { box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.10); }
