/* calcul-notaire.fr - CSS */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --danger: #dc2626;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.header { background: var(--primary-dark); color: #fff; padding: .75rem 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
.logo small { font-weight: 400; opacity: .7; }
.logo i { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%); color: #fff; padding: 3rem 1rem 2.5rem; margin-bottom: 2rem; }
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.hero .subtitle { font-size: 1.05rem; opacity: .9; margin-bottom: 1.5rem; }

/* Calculator card */
.calc-card { background: var(--card); border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,.08); padding: 2rem; margin-bottom: 2rem; border: 1px solid var(--border); }
.calc-card h2 { font-size: 1.3rem; margin-bottom: 1rem; }

/* Form elements */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-group input, .form-group select {
    width: 100%; padding: .7rem 1rem; border: 2px solid var(--border); border-radius: 8px;
    font-size: 1rem; transition: border-color .2s; background: #fff;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); outline: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }

.btn { display: inline-block; padding: .8rem 2rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: all .2s; }
.btn-primary { background: var(--accent); color: var(--text); }
.btn-primary:hover { background: #e89200; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.3); }
.btn-blue { background: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-dark); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Results */
.results { margin-top: 2rem; }
.result-total { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: var(--radius); padding: 1.5rem; text-align: center; margin-bottom: 1.5rem; }
.result-total .amount { font-size: 2.5rem; font-weight: 800; }
.result-total .percentage { font-size: 1.1rem; opacity: .85; margin-top: .25rem; }

.result-breakdown { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); }
.result-row:last-child { border-bottom: none; }
.result-row.header { background: #f1f5f9; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.result-row .label { font-size: .9rem; }
.result-row .label small { color: var(--text-muted); display: block; font-size: .8rem; font-weight: 400; }
.result-row .value { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.result-row.subtotal { background: #f8fafc; font-weight: 600; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: box-shadow .2s; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .9rem; line-height: 1.5; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }

/* Info cards with icons */
.info-card { text-align: center; padding: 1.5rem 1rem; }
.info-card .icon { font-size: 2rem; color: var(--primary); margin-bottom: .75rem; }
.info-card h3 { font-size: 1rem; margin-bottom: .5rem; }

/* Dept list */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.dept-link { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: var(--card); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); font-size: .9rem; transition: all .15s; }
.dept-link:hover { border-color: var(--primary); background: #eff6ff; }
.dept-link .code { background: var(--primary); color: #fff; padding: .15rem .4rem; border-radius: 4px; font-size: .75rem; font-weight: 700; min-width: 28px; text-align: center; }

/* Section */
.section { margin-bottom: 2.5rem; }
.section h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.section-muted { background: #f1f5f9; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }

/* FAQ */
.faq { margin-bottom: 2rem; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: .5rem; }
.faq summary { font-weight: 600; cursor: pointer; font-size: .95rem; }
.faq details p { margin-top: .75rem; color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* Breadcrumb */
.breadcrumb { font-size: .82rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

/* Table */
.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: #f1f5f9; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); }
td { color: var(--text); }
tr:hover td { background: #f8fafc; }

/* CTA */
.cta-box { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: var(--radius); padding: 2rem; text-align: center; margin-bottom: 2rem; }
.cta-box h2 { color: #fff; margin-bottom: .75rem; font-size: 1.3rem; }
.cta-box p { opacity: .9; margin-bottom: 1.25rem; }
.cta-box .btn { background: var(--accent); color: var(--text); }

/* Alert */
.alert { border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: .9rem; line-height: 1.5; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warning { background: var(--accent-light); border: 1px solid #fde68a; color: #92400e; }

/* Badge */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge-blue { background: #eff6ff; color: var(--primary); }
.badge-green { background: #f0fdf4; color: var(--success); }
.badge-amber { background: var(--accent-light); color: #92400e; }

/* Footer */
.footer { background: var(--primary-dark); color: rgba(255,255,255,.8); padding: 2.5rem 0 1.5rem; margin-top: 3rem; }
.footer h4 { color: #fff; margin-bottom: .75rem; font-size: .95rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: .4rem; }
.footer ul a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .85rem; }
.footer ul a:hover { color: #fff; }
.footer p { font-size: .85rem; line-height: 1.5; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; text-align: center; font-size: .8rem; opacity: .7; }

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 1rem; gap: .75rem; }
    .nav-links.open { display: flex; }
    .hero h1 { font-size: 1.5rem; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .card-grid-3, .card-grid-4 { grid-template-columns: 1fr 1fr; }
    .result-total .amount { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .calc-card { padding: 1.25rem; }
}
@media (max-width: 480px) {
    .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
}
