/*
Theme Name: Budget Salle de Bain
Theme URI: https://budget-salle-de-bain.fr
Description: Theme maison pour Budget Salle de Bain - estimateur et guides de prix
Version: 1.1
Author: La Redaction Budget SDB
Text Domain: budget-sdb
*/

/* ===== POLICES ===== */
@font-face {
    font-family: 'Source Serif 4';
    src: url('fonts/source-serif/serif-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('fonts/source-sans/sans-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
    --bg:         #F4F8FB;
    --bg-white:   #FFFFFF;
    --text:       #14284B;
    --text-mid:   #3A5068;
    --text-muted: #6B84A0;
    --accent:     #1F6FB0;
    --accent-dk:  #155590;
    --navy:       #14284B;
    --border:     #D5DCE8;
    --font-title: 'Source Serif 4', Georgia, serif;
    --font-body:  'Source Sans 3', system-ui, sans-serif;
    --radius:     8px;
    --max-w:      1168px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0;
    width: calc(100% - 48px);
    box-sizing: border-box;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    position: static;
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-logo {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.01em;
}
.site-logo span { color: var(--accent); }
.site-logo:hover { text-decoration: none; color: var(--navy); }

.main-nav ul { display: flex; gap: 1.6rem; }
.main-nav a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-mid);
    transition: color 0.2s;
}
.main-nav a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.3rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

/* ===== HERO + ESTIMATEUR ===== */
.hero {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 40px 0 56px;
}
.hero .container { max-width: var(--max-w); }
.hero .inner-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-text h1 {
    font-family: var(--font-title);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 0.75rem;
}
.hero .intro { font-size: 1.05rem; color: var(--text-mid); margin-bottom: 1.5rem; }

/* Formulaire estimateur */
.estimateur {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 28px rgba(20,40,75,.08);
}
.estimateur h2 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.2rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 0.35rem;
}
.form-group select, .form-group input[type="number"] {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-white);
    appearance: none;
}
.form-group select:focus, .form-group input:focus {
    outline: 2px solid var(--accent);
    border-color: var(--accent);
}
.btn-estimate {
    width: 100%;
    padding: 0.85rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-estimate:hover { background: var(--accent-dk); }

.estimate-result {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
}
.estimate-result .notice {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 0.4rem;
}

/* ===== SECTION TITRES ===== */
.section-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.4rem;
}
.section-sub { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ===== OU PART LE BUDGET ===== */
.budget-section {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 56px 0 0;
}
.budget-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.budget-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    box-shadow: none;
}
.budget-card:hover { border-color: var(--accent); }
.budget-card .icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.budget-card h3 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.4rem;
}
.budget-card p { font-size: 0.88rem; color: var(--text-muted); }
.budget-card .range {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

/* ===== GUIDES ===== */
.guides-section {
    background: transparent;
    padding: 72px 0 0;
}
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.guide-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-white);
    transition: box-shadow 0.2s, transform 0.2s;
}
.guide-card:hover { box-shadow: 0 4px 16px rgba(31,111,176,0.1); transform: translateY(-2px); }
.guide-card .thumb {
    aspect-ratio: 16/9;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 2rem;
    border-radius: 12px;
    overflow: hidden;
}
.guide-card .thumb img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }
.guide-card .body { padding: 1.2rem; }
.guide-card .cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.4rem;
    display: block;
}
.guide-card h3 {
    font-family: var(--font-title);
    font-size: 23px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.guide-card p { font-size: 0.87rem; color: var(--text-muted); }
.guide-card .lire {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}
.guides-grid a { color: var(--navy); text-decoration: none; }
.guides-grid a:hover { color: var(--accent); }

/* ===== CTA RESOBAIN ===== */
.cta-resobain {
    background: transparent;
    padding: 72px 0 64px;
}
.cta-resobain .container {
    background: var(--navy);
    color: #fff;
    border-radius: 20px;
    padding: 48px;
    max-width: var(--max-w);
    width: calc(100% - 48px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    box-sizing: border-box;
}
.cta-resobain h2 {
    flex: 1 1 100%;
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.15;
    text-align: left;
}
.cta-resobain p {
    flex: 1 1 420px;
    color: #D3DBEA;
    margin: 0;
    text-align: left;
    max-width: 560px;
}
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.btn-white { background: #fff; color: var(--navy); border-radius: 8px; padding: 16px 28px; }
.btn-white:hover { background: var(--bg); color: var(--navy); text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dk); color: #fff; text-decoration: none; }

/* ===== ENCADRE ARTICLE ===== */
.article-cta-box {
    background: #EBF4FB;
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2.5rem 0;
}

/* ===== CONTENU ===== */
.post-header { background: var(--bg-white); padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--border); }
.post-header .cat { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 0.5rem; display: block; }
.post-header h1 { font-family: var(--font-title); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; color: var(--navy); }
.post-meta { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.entry-content { max-width: 720px; margin: 2rem auto; padding: 0 1.25rem; }
.entry-content h2 { font-family: var(--font-title); font-size: 1.35rem; margin: 2rem 0 0.75rem; color: var(--navy); }
.entry-content h3 { font-family: var(--font-title); font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.entry-content p { margin-bottom: 1.2rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.entry-content li { margin-bottom: 0.4rem; list-style: disc; }

/* ===== PAGE ===== */
.page-content { padding: 3rem 0; max-width: 780px; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.page-content h1 { font-family: var(--font-title); font-size: 1.8rem; margin-bottom: 1.5rem; color: var(--navy); }

/* ===== FOOTER ===== */
.site-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    color: var(--navy);
    padding: 36px 0;
    font-size: 0.88rem;
}
.site-footer .container { padding: 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: var(--navy); font-weight: 600; text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { color: #5B6B88; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero .inner-hero { grid-template-columns: 1fr; }
    .budget-cards { grid-template-columns: repeat(2, 1fr); }
    .guides-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; z-index: 200; }
    .main-nav.open ul { flex-direction: column; gap: 0.75rem; }
    .nav-toggle { display: block; }
    .site-header { position: relative; }
    .budget-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .cta-resobain .container { padding: 32px 24px; }
    .container { width: calc(100% - 32px); }
}
