/* ══════════════════════════════════════════════════════════════
   Provea, Design System
   Style : juridique / sérieux / confiance
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens ───────────────────────────────────────────────── */
:root {
    --navy:        #1a2234;
    --navy-light:  #243049;
    --navy-dark:   #0f1520;
    --blue:        #2d6be4;
    --blue-hover:  #1d5bd6;
    --blue-light:  #eef2fd;
    --gold:        #d4a853;
    --gold-light:  #f5ecd7;
    --gold-dark:   #b8923f;
    --text:        #1a2234;
    --text-muted:  #5a6a82;
    --bg:          #f5f7fa;
    --white:       #ffffff;
    --border:      #dde3ed;
    --success:     #059669;
    --error:       #b91c1c;
    --warning:     #d97706;
    --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-w:       1200px;
    --radius:      8px;
    --radius-lg:   12px;
    --shadow:      0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg:   0 4px 20px rgba(0,0,0,0.12);
    --transition:  0.2s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}
body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-hover); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.5em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; }
p { color: var(--text-muted); margin-bottom: 1em; }
.subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; }
.gold { color: var(--gold); }
small, .small { font-size: 0.85rem; color: var(--text-muted); }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-dark { background: var(--navy); color: var(--white); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-dark p, .section-dark .subtitle { color: rgba(255,255,255,0.75); }
.section-alt { background: var(--bg); }
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.grid-2 > .card { display: flex; flex-direction: column; justify-content: flex-start; height: 100%; box-sizing: border-box; }
.grid-2 > .card h4 { margin: 0 0 12px; }
.grid-2 > .card p { text-align: justify; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(26, 34, 52, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; height: 64px; gap: 32px;
}
.nav-logo { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; color: var(--white); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
    color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500;
    padding: 6px 0; border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); border-color: var(--gold); }
.nav-auth { display: flex; gap: 12px; align-items: center; }
/* Les <a> non-boutons héritent du texte clair de la nav ; les <a>
   stylés comme boutons (.btn*) gardent leur propre color (ex: navy
   sur fond doré pour .btn-gold). Sans le :not(.btn), la règle
   .nav-auth a écrase silencieusement .btn-gold → le texte du bouton
   prénom + « Mon compte » + « Déconnexion » devient blanc translucide. */
.nav-auth a:not(.btn) { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.nav-auth a:not(.btn):hover { color: var(--white); }
.nav-auth .btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.nav-mobile { display: none; cursor: pointer; color: var(--white); font-size: 1.5rem; }
body { padding-top: 64px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border: none; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); color: var(--navy); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,0.1); color: var(--white); }
.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { background: #991b1b; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 32px; box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-highlight { border-color: var(--gold); position: relative; }
.card-highlight::before {
    /* Le libellé du badge est paramétrable via data-badge="…" sur la carte.
       Si l'attribut est absent, on retombe sur le libellé historique « Populaire ». */
    content: attr(data-badge); position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gold); color: var(--navy); padding: 4px 16px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-highlight:not([data-badge])::before { content: 'Populaire'; }
/* Variante bleue pour distinguer Particulier (or) et Professionnel (bleu) */
.card-highlight-pro { border-color: var(--blue); position: relative; }
.card-highlight-pro::before {
    content: attr(data-badge); position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--blue); color: var(--white); padding: 4px 16px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-highlight-pro:not([data-badge])::before { content: 'Pro'; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-sans); font-size: 0.95rem; color: var(--text);
    outline: none; transition: border-color var(--transition);
    height: 44px; background: var(--white);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,107,228,0.1); }
textarea { height: auto; min-height: 100px; resize: vertical; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.form-error { color: var(--error); font-size: 0.85rem; margin-top: 4px; min-height: 20px; }
.form-success { color: var(--success); font-size: 0.85rem; margin-top: 4px; }
.hidden { display: none !important; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px;
}
.badge-gold { background: var(--gold-light); color: var(--gold-dark); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-green { background: #ecfdf5; color: var(--success); }
.badge-red { background: #fef2f2; color: var(--error); }

/* ── Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
th {
    background: var(--bg); color: var(--text-muted); padding: 10px 14px;
    text-align: left; font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}
td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:hover { background: var(--bg); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1e3a5f 100%);
    padding: 60px 0 70px; text-align: center; position: relative; overflow: hidden;
}
.hero::before { display: none; }
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 16px; }
.hero h1 .gold { color: var(--gold); }
.hero .subtitle { color: rgba(255,255,255,0.75); margin: 0 auto 32px; font-size: 1.15rem; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Feature Icons ──────────────────────────────────────────
   Conteneur totalement neutre : aucun background, aucune bordure,
   aucun padding, aucun border-radius. Le SVG s'affiche directement
   dans la carte sans cadre visible autour. */
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: none;
    border: 0;
    padding: 0;
    border-radius: 0;
    width: auto;
    height: auto;
}
.feature-icon svg {
    width: 80px;
    height: 80px;
    display: block;
    background: transparent;
}

/* ── Steps ────────────────────────────────────────────────── */
.step-number {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gold); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem;
    margin-bottom: 16px;
}

/* ── Pricing ──────────────────────────────────────────────── */
.price { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; color: var(--navy); }
.price-period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.price-feature { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0;
    font-size: 0.9rem; color: var(--text-muted); text-align: left; line-height: 1.4; }
.price-feature::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0;
    line-height: 1.4; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--navy-dark); color: rgba(255,255,255,0.6);
    padding: 60px 0 30px; font-size: 0.9rem;
}
.footer h4 { color: var(--white); font-family: var(--font-sans); font-size: 0.95rem; margin-bottom: 16px; }
.footer a { color: rgba(255,255,255,0.6); }
.footer a:hover { color: var(--gold); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 40px; padding-top: 20px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem;
}
.footer-legal { display: flex; gap: 20px; }

/* ── Credit Box ───────────────────────────────────────────── */
.credit-box {
    text-align: center; padding: 24px; background: var(--blue-light);
    border-radius: var(--radius-lg); margin: 16px 0;
}
.credit-count { font-family: var(--font-serif); font-size: 3rem; font-weight: 700; color: var(--blue); }

/* ── Divider ──────────────────────────────────────────────── */
.divider { width: 60px; height: 3px; background: var(--gold); margin: 16px auto 24px; border-radius: 2px; }
.divider-left { margin-left: 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .hero { padding: 60px 0 50px; }
    .container { padding: 0 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .nav-links { display: none; }
    .nav-mobile { display: block; }
    .nav-auth { margin-left: auto; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .hero-cta { flex-direction: column; align-items: center; width: 100%; }
    .hero-cta .btn { width: 100%; max-width: 320px; }
    .subtitle { max-width: 100% !important; font-size: 1rem !important; }
    /* .hero h1 garde son clamp inline (1.4rem → 2rem) */
    /* Forcer tout ce qui pourrait déborder à respecter la largeur */
    section, .card, .hero-content { max-width: 100%; }
    pre, code { overflow-x: auto; max-width: 100%; white-space: pre-wrap; word-wrap: break-word; }
    table { display: block; overflow-x: auto; max-width: 100%; }
    img, svg, video { max-width: 100%; height: auto; }
}
/* Petit mobile (< 400px) */
@media (max-width: 400px) {
    .container { padding: 0 12px; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
    .btn-lg { padding: 12px 20px; font-size: 0.95rem; }
}
