/* ═══════════════════════════════════════════════════════
   BENILAB Digital360 — Design System
   ═══════════════════════════════════════════════════════ */

:root {
    /* ── Colors ── */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a25;
    --bg-card: #14141d;
    --bg-elevated: #1c1c2a;

    --accent: #7fb5a8;
    --accent-light: #a8d4c8;
    --accent-dark: #5a8f82;
    --accent-warm: #c4a882;
    --accent-rose: #b8a9c9;

    --text-primary: #e8e4df;
    --text-secondary: #9a95a0;
    --text-muted: #8a8590;
    --text-inverse: #0a0a0f;

    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #60a5fa;

    --border: rgba(127,181,168,0.1);
    --border-strong: rgba(127,181,168,0.25);
    --glow: rgba(127,181,168,0.15);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 100px;

    --font-display: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    --transition-slow: all 0.6s cubic-bezier(0.16,1,0.3,1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: var(--font-body); font-size: 14px; }

/* ── Noise overlay ── */
.noise {
    position: fixed; inset: 0; pointer-events: none; z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════ */
.display { font-family: var(--font-display); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.heading { font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.label { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); }
.caption { font-size: 12px; color: var(--text-muted); }
.body { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

/* ═══════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 6vw; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 6vw; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 6vw; }
.section { padding: 12vh 6vw; }
.section-alt { background: var(--bg-secondary); }

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border-radius: var(--radius-full);
    font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    transition: var(--transition);
}
.btn-primary {
    background: var(--accent); color: var(--text-inverse);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(127,181,168,0.3);
}
.btn-outline {
    border: 1px solid var(--border-strong); color: var(--accent);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--accent); background: rgba(127,181,168,0.05);
}
.btn-ghost {
    color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--accent); }
.btn-sm { padding: 8px 20px; font-size: 11px; }
.btn-lg { padding: 18px 40px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}
.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.card-press {
    background: linear-gradient(135deg, rgba(127,181,168,0.04), rgba(127,181,168,0.01));
}

/* Metric card */
.metric-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.metric-value {
    font-family: var(--font-display);
    font-size: 3rem; font-weight: 700;
    color: var(--accent); line-height: 1;
    margin-bottom: 0.5rem;
}
.metric-label {
    font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-muted);
}

/* Service card */
.service-card {
    position: relative; overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(127,181,168,0.06) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.4s;
}
.service-card:hover::before { opacity: 1; }
.service-icon {
    width: 52px; height: 52px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(127,181,168,0.15), rgba(127,181,168,0.05));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 1.5rem;
}

/* Pricing card */
.price-card {
    position: relative;
}
.price-card.featured {
    border-color: var(--border-strong);
    background: linear-gradient(135deg, rgba(127,181,168,0.06), rgba(127,181,168,0.02));
}
.price-card.featured::after {
    content: 'Populaire';
    position: absolute; top: -1px; right: 24px;
    background: var(--accent); color: var(--text-inverse);
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 6px 14px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.price-amount {
    font-family: var(--font-display);
    font-size: 2.8rem; font-weight: 700; color: var(--accent);
}
.price-amount span { font-size: 14px; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }
.price-period { font-size: 14px; color: var(--text-muted); margin-bottom: 1.5rem; }
.price-features { list-style: none; margin-bottom: 2rem; }
.price-features li {
    padding: 10px 0; font-size: 14px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.price-features li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.price-features li.disabled { opacity: 0.35; }
.price-features li.disabled::before { content: '—'; }

/* ═══════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
}
.badge-accent { background: rgba(127,181,168,0.12); color: var(--accent); }
.badge-success { background: rgba(74,222,128,0.12); color: var(--success); }
.badge-warning { background: rgba(251,191,36,0.12); color: var(--warning); }
.badge-error { background: rgba(248,113,113,0.12); color: var(--error); }
.badge-info { background: rgba(96,165,250,0.12); color: var(--info); }
.badge-muted { background: rgba(92,87,100,0.2); color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block; font-size: 12px; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 0.5rem;
}
.form-input {
    width: 100%; background: var(--bg-tertiary);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 14px 18px; color: var(--text-primary);
    transition: var(--transition); outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(127,181,168,0.1); }
.form-input::placeholder { color: var(--text-muted); }
.form-input.error { border-color: var(--error); }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a95a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(12px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%; max-width: 640px;
    max-height: 90vh; overflow-y: auto;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-lg { max-width: 900px; }

/* ═══════════════════════════════════════════════════════
   STEPPER / PROGRESS
   ═══════════════════════════════════════════════════════ */
.stepper {
    display: flex; gap: 0; margin-bottom: 3rem;
    position: relative;
}
.stepper::before {
    content: ''; position: absolute;
    top: 16px; left: 0; right: 0; height: 2px;
    background: var(--border); z-index: 0;
}
.step-item {
    flex: 1; text-align: center; position: relative; z-index: 1;
}
.step-dot {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-tertiary); border: 2px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    transition: var(--transition); margin-bottom: 0.5rem;
}
.step-item.active .step-dot {
    border-color: var(--accent); background: var(--accent); color: var(--text-inverse);
}
.step-item.completed .step-dot {
    border-color: var(--accent); background: var(--accent); color: var(--text-inverse);
}
.step-label {
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); transition: color 0.3s;
}
.step-item.active .step-label { color: var(--accent); }

.progress-bar {
    height: 3px; background: var(--border); border-radius: 2px;
    margin-bottom: 2rem; overflow: hidden;
}
.progress-fill {
    height: 100%; background: var(--accent); border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* ═══════════════════════════════════════════════════════
   SCORE RING
   ═══════════════════════════════════════════════════════ */
.score-ring {
    position: relative; width: 180px; height: 180px; margin: 0 auto;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.score-ring-fill {
    fill: none; stroke: var(--accent); stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16,1,0.3,1);
}
.score-ring-text {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.score-ring-value {
    font-family: var(--font-display);
    font-size: 3.5rem; font-weight: 700; color: var(--accent); line-height: 1;
}
.score-ring-label {
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-muted); margin-top: 4px;
}

/* Category score bar */
.cat-score {
    margin-bottom: 1rem;
}
.cat-score-header {
    display: flex; justify-content: space-between;
    font-size: 12px; margin-bottom: 6px;
}
.cat-score-name { color: var(--text-secondary); font-weight: 500; }
.cat-score-val { color: var(--accent); font-weight: 600; }
.cat-score-track {
    height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden;
}
.cat-score-fill {
    height: 100%; border-radius: 3px;
    transition: width 1s cubic-bezier(0.16,1,0.3,1);
}

/* ═══════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 14px 16px; text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
th {
    font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-muted); font-weight: 600;
    background: var(--bg-tertiary);
}
td { color: var(--text-secondary); }
tr:hover td { background: rgba(127,181,168,0.02); }

/* ═══════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════ */
.tab-group {
    display: flex; gap: 0; border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.tab-btn {
    padding: 12px 24px; font-size: 13px; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: var(--transition);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ═══════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════ */
.alert {
    padding: 16px 20px; border-radius: var(--radius-md);
    font-size: 14px; display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 1rem;
}
.alert-accent { background: rgba(127,181,168,0.08); border: 1px solid rgba(127,181,168,0.2); color: var(--accent-light); }
.alert-success { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2); color: var(--success); }
.alert-warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); color: var(--warning); }
.alert-error { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); color: var(--error); }

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════ */
.empty-state {
    text-align: center; padding: 4rem 2rem;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ═══════════════════════════════════════════════════════
   LOADING SKELETON
   ═══════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ═══════════════════════════════════════════════════════
   REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: all 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.92); transition: all 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-scale.active { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(127,181,168,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(127,181,168,0.4); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .container { padding: 0 8vw; }
    .section { padding: 10vh 8vw; }
}
@media (max-width: 768px) {
    .container { padding: 0 6vw; }
    .section { padding: 8vh 6vw; }
    .stepper { overflow-x: auto; gap: 0.5rem; }
    .step-label { font-size: 9px; }
    .score-ring { width: 140px; height: 140px; }
    .score-ring-value { font-size: 2.5rem; }
}
