/* ==========================================================================
   CHARTE GRAPHIQUE — Les Simulateurs du Patrimoine
   lessimulateursdupatrimoine.fr
   ========================================================================== */

:root {
    --gold:       #f8d26b;
    --gold-dark:  #f8d26b;
    --gold-light: #fff8d7;
    --ink:        #3b3b3b;
    --ink-light:  #6b6b6b;
    --white:      #ffffff;
    --divider:    #ebebeb;
    --bg-light:   #fafafa;
    --bg-page:    #f5f4f0;
    --red:        #e05c5c;
    --green:      #4caf7d;
    --blue:       #5b8dee;
    --orange:     #e8954a;
    --font:       'Inter', Arial, sans-serif;
    --radius:     4px;
    --shadow:     0 2px 20px rgba(59,59,59,0.08);
    --shadow-sm:  0 1px 6px rgba(59,59,59,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background-color: var(--bg-page);
    color: var(--ink);
    line-height: 1.6;
}

/* ---- Liens ---- */
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-dark); }

/* ---- Container principal ---- */
.page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background-color: var(--white);
    border-bottom: 1px solid var(--divider);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.navbar-brand {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand .brand-accent { color: var(--gold-dark); }
.navbar-brand .brand-dot {
    width: 8px; height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
    display: inline-block;
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.navbar-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-light);
    transition: color 0.2s;
    position: relative;
}
.navbar-links a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: -3px; left: 0;
    background-color: var(--gold);
    transition: width 0.25s;
}
.navbar-links a:hover { color: var(--ink); }
.navbar-links a:hover::after { width: 100%; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* ---- Boutons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.18s;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.btn-primary {
    background-color: var(--white);
    color: var(--ink);
    border: 1.5px solid var(--gold);
    box-shadow: 0 4px 16px rgba(248, 210, 107, 0.25);
}
.btn-primary:hover {
    background-color: rgba(248, 210, 107, 0.08);
    border-color: var(--gold);
    color: var(--ink);
    box-shadow: 0 6px 24px rgba(248, 210, 107, 0.40);
    transform: translateY(-1px);
}
.btn-outline {
    background-color: var(--white);
    color: var(--ink);
    border: 1.5px solid var(--gold);
    box-shadow: 0 4px 16px rgba(248, 210, 107, 0.20);
}
.btn-outline:hover {
    background-color: rgba(248, 210, 107, 0.08);
    color: var(--ink);
    box-shadow: 0 6px 24px rgba(248, 210, 107, 0.35);
    transform: translateY(-1px);
}
.btn-ghost {
    background-color: transparent;
    color: var(--ink-light);
    border-color: var(--divider);
}
.btn-ghost:hover {
    border-color: var(--ink-light);
    color: var(--ink);
}
.btn-danger {
    background-color: var(--white);
    color: var(--red);
    border-color: var(--red);
}
.btn-danger:hover { background-color: var(--red); color: var(--white); }
.btn-lg { padding: 13px 32px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ---- Hero ---- */
.hero {
    padding: 120px 24px 80px;
    text-align: center;
    background-color: var(--white);
    border-bottom: 1px solid var(--divider);
}
.hero-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-dark);
    margin-bottom: 18px;
    padding: 4px 14px;
    border: 1px solid var(--gold);
    border-radius: 2px;
    background-color: var(--gold-light);
}
.hero-title {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--ink);
    margin-bottom: 20px;
}
.hero-title .accent { color: var(--gold-dark); }
.hero-title::after {
    content: '';
    display: block;
    width: 48px; height: 3px;
    background-color: var(--gold);
    margin: 20px auto 0;
}
.hero-subtitle {
    font-size: 16px;
    color: var(--ink-light);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Section titres ---- */
.section { padding: 64px 24px; }
.section-alt { background-color: var(--white); }
.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-light);
    text-align: center;
    margin-bottom: 12px;
}
.section-heading {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-align: center;
    margin-bottom: 8px;
}
.section-heading .accent { color: var(--gold-dark); }
.section-heading::after {
    content: '';
    display: block;
    width: 32px; height: 2px;
    background-color: var(--gold);
    margin: 14px auto 0;
}
.section-sub {
    font-size: 14px;
    color: var(--ink-light);
    text-align: center;
    max-width: 560px;
    margin: 16px auto 48px;
    line-height: 1.7;
}

/* ---- Catalogue simulateurs : onglets + grille cartes ---- */

/* ================================================================
   SECTION SIMULATEURS — ANCIENS STYLES (conservés pour compatibilité
   dashboard) — classes non utilisées sur index.html remplacées.
   Les nouveaux styles .domain-block, .sim-card-v2 etc. sont dans
   le <style> inline de index.html.
================================================================ */

/* Panneaux simulateurs (dashboard) */
.sim-panel { display: none; }
.sim-panel.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    animation: panelFadeIn 0.3s ease;
}
@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Cartes simulateurs (dashboard et ancienne version) */
.sim-card-new {
    position: relative;
    background: var(--white);
    border: 1.5px solid var(--divider);
    border-radius: 8px;
    padding: 24px 22px 20px;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
    overflow: hidden;
}
.sim-card-new::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.22s;
}
.sim-card-new:hover {
    border-color: var(--gold);
    box-shadow: 0 6px 28px rgba(248,210,107,0.22);
    transform: translateY(-3px);
}
.sim-card-new:hover::before { opacity: 1; }

.sim-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.sim-card-emoji {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}
.sim-card-lock {
    font-size: 12px;
    color: var(--ink-light);
    opacity: 0.5;
    flex-shrink: 0;
    margin-top: 2px;
}
.sim-card-title-new {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.sim-card-desc-new {
    font-size: 12px;
    color: var(--ink-light);
    line-height: 1.6;
    flex: 1;
}
.sim-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
}
.sim-card-cta-new {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s;
}
.sim-card-new:hover .sim-card-cta-new { gap: 8px; }
.sim-card-tag {
    font-size: 10px;
    font-weight: 600;
    background: var(--gold-light);
    color: var(--ink);
    border-radius: 3px;
    padding: 2px 7px;
    border: 1px solid rgba(248,210,107,0.4);
}

@media (max-width: 768px) {
    .sim-panel.active { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .sim-panel.active { grid-template-columns: 1fr; }
}


/* ---- Pricing ---- */
.pricing-card {
    background-color: var(--white);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 40px 36px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 4px 24px rgba(248,210,107,0.15);
}
.pricing-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink);
    background-color: var(--gold);
    padding: 3px 12px;
    border-radius: 2px;
    margin-bottom: 20px;
}
.pricing-price {
    font-size: 52px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.04em;
    line-height: 1;
}
.pricing-price sup { font-size: 24px; vertical-align: top; margin-top: 10px; }
.pricing-period { font-size: 14px; color: var(--ink-light); margin: 8px 0 24px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 32px; }
.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ink);
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li .check {
    color: var(--green);
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}
.pricing-note { font-size: 11px; color: var(--ink-light); margin-top: 16px; font-style: italic; }

/* ---- Formulaires auth ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-page);
    padding: 40px 20px;
}
.auth-card {
    background-color: var(--white);
    border: 1px solid var(--divider);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 40px 36px;
    width: 100%;
    max-width: 440px;
}
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.auth-brand {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.auth-brand .accent { color: var(--gold-dark); }
.auth-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-bottom: 6px;
}
.auth-sub {
    font-size: 13px;
    color: var(--ink-light);
    text-align: center;
    margin-bottom: 28px;
}
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-light);
    margin-bottom: 6px;
}
.form-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    color: var(--ink);
    background-color: var(--white);
    transition: border-color 0.2s;
}
.form-field input:focus {
    outline: none;
    border-color: var(--gold);
}
.form-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 5px;
    display: none;
}
.form-error.visible { display: block; }
.form-submit { width: 100%; margin-top: 8px; justify-content: center; padding: 12px; font-size: 14px; }
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--ink-light);
}
.auth-footer a { color: var(--gold-dark); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ---- Dashboard ---- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 68px;
}
.dashboard-sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: var(--white);
    border-right: 1px solid var(--divider);
    padding: 28px 0;
    position: fixed;
    top: 68px;
    bottom: 0;
    overflow-y: auto;
}
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-light);
    padding: 16px 20px 8px;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-light);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    text-decoration: none;
    border-left: 2px solid transparent;
}
.sidebar-item:hover { background-color: var(--bg-light); color: var(--ink); }
.sidebar-item.active {
    background-color: var(--gold-light);
    color: var(--ink);
    border-left-color: var(--gold-dark);
    font-weight: 600;
}
.sidebar-item .icon { width: 16px; text-align: center; font-size: 13px; }
.dashboard-main {
    flex: 1;
    margin-left: 240px;
    padding: 36px 40px;
    background-color: var(--bg-page);
    min-height: calc(100vh - 68px);
}
.dashboard-welcome {
    margin-bottom: 32px;
}
.dashboard-welcome h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.dashboard-welcome p { font-size: 13px; color: var(--ink-light); }

/* ---- Cards simulateurs dans dashboard ---- */
.sim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}
.sim-card {
    background-color: var(--white);
    border: 1.5px solid var(--divider);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.sim-card:hover {
    border-color: var(--gold);
    box-shadow: 0 3px 16px rgba(248,210,107,0.18);
}
.sim-card-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    background-color: var(--gold-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.sim-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
}
.sim-card-desc {
    font-size: 12px;
    color: var(--ink-light);
    line-height: 1.5;
    flex: 1;
}
.sim-card-cta {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---- Stripe container ---- */
#stripe-element-container {
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 12px 14px;
    background-color: var(--white);
    margin-bottom: 18px;
}
#stripe-element-container.focused { border-color: var(--gold); }

/* ---- Alertes ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-info { background-color: #eff6ff; border-left: 3px solid var(--blue); color: #1d4ed8; }
.alert-success { background-color: #f0faf4; border-left: 3px solid var(--green); color: #166534; }
.alert-error { background-color: #fef5f5; border-left: 3px solid var(--red); color: var(--red); }
.alert-warning { background-color: var(--gold-light); border-left: 3px solid var(--gold-dark); color: var(--ink); }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.badge-gold { background-color: var(--gold); color: var(--ink); }
.badge-green { background-color: #dcfce7; color: #166534; }
.badge-blue { background-color: #dbeafe; color: #1d4ed8; }

/* ---- Pages légales ---- */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 24px 60px;
}
.legal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.legal-title::after {
    content: '';
    display: block;
    width: 32px; height: 2px;
    background-color: var(--gold);
    margin-top: 14px;
}
.legal-updated {
    font-size: 12px;
    color: var(--ink-light);
    font-style: italic;
    margin: 16px 0 36px;
}
.legal-section { margin-bottom: 32px; }
.legal-section h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-light);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--divider);
}
.legal-section p, .legal-section li {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.75;
    margin-bottom: 8px;
}
.legal-section ul { padding-left: 20px; }
.legal-section a { color: var(--gold-dark); text-decoration: underline; }

/* ---- Footer ---- */
.site-footer {
    background-color: var(--white);
    border-top: 1px solid var(--divider);
    padding: 36px 24px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-brand {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 6px;
}
.footer-brand .accent { color: var(--gold-dark); }
.footer-tagline { font-size: 12px; color: var(--ink-light); max-width: 260px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { font-size: 12px; color: var(--ink-light); }
.footer-links a:hover { color: var(--gold-dark); }
.footer-bottom {
    max-width: 1100px;
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
    font-size: 11px;
    color: var(--ink-light);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---- Divider décoratif ---- */
.gold-bar {
    width: 40px; height: 2px;
    background-color: var(--gold);
    margin: 0 auto;
}

/* ---- Spinner ---- */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--divider);
    border-top-color: var(--gold-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Mobile menu ---- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--ink);
    cursor: pointer;
    padding: 4px;
}
.mobile-menu {
    display: none;
    background-color: var(--white);
    border-top: 1px solid var(--divider);
    padding: 16px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    border-bottom: 1px solid var(--divider);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .dashboard-sidebar { display: none; }
    .dashboard-main { margin-left: 0; padding: 24px 20px; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 30px; }
    .section-heading { font-size: 22px; }
    .navbar-links, .navbar-actions { display: none; }
    .mobile-menu-btn { display: block; }
    .categories-grid { grid-template-columns: 1fr; }
    .sim-grid { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 28px 22px; }
    .pricing-card { padding: 28px 22px; }
    .legal-page { padding: 90px 16px 40px; }
    .footer-inner { flex-direction: column; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
    .sim-grid { grid-template-columns: 1fr; }
    .hero { padding: 100px 16px 60px; }
}

@media print {
    .navbar, .site-footer { display: none !important; }
}
