/*
Theme Name: Hellobat
Author: Kheper / Hermes
Description: Theme custom sur-mesure — maison, decoration, travaux. Zero dependance, zero page builder.
Version: 3.0.0
*/

/* ===== Variables DA ===== */
:root {
    --hb-bleu: #1e3a5f;
    --hb-bleu-fonce: #14283f;
    --hb-bleu-clair: #2c5480;
    --hb-terracotta: #c0563f;
    --hb-terracotta-fonce: #a04633;
    --hb-terracotta-clair: #e8a08a;
    --hb-blanc: #faf7f2;
    --hb-papier: #f4efe7;
    --hb-encre: #2b2b2b;
    --hb-gris: #6b6b6b;
    --hb-ligne: #d8d2c8;
    --hb-ombre: rgba(20, 40, 63, 0.08);
    --hb-ombre-forte: rgba(20, 40, 63, 0.16);
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--hb-blanc);
    color: var(--hb-encre);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hb-terracotta); text-decoration: none; }
a:hover { color: var(--hb-bleu); }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    color: var(--hb-bleu);
    letter-spacing: -0.01em;
    line-height: 1.22;
}
h1 { font-size: 2.15em; font-weight: 700; margin: 0 0 1rem; }
h2 { font-size: 1.5em; font-weight: 600; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.18em; font-weight: 600; margin: 1.5em 0 0.5em; }
p { margin: 0 0 1.25rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
    background: var(--hb-blanc);
    border-bottom: 1px solid var(--hb-ligne);
    padding: 1.05rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.brand {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--hb-bleu);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.brand span { color: var(--hb-terracotta); }
.main-nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { color: var(--hb-bleu); font-weight: 600; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 0.95rem; }
.main-nav a:hover { color: var(--hb-terracotta); text-decoration: none; }
.main-nav a.nav-tool { background: var(--hb-terracotta); color: #fff; padding: 0.35rem 0.9rem; border-radius: 999px; font-weight: 700; }
.main-nav a.nav-tool:hover { background: #a8442f; color: #fff; }

/* ===== Boutons ===== */
.hb-btn {
    display: inline-block;
    background: var(--hb-terracotta);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    text-decoration: none;
    font-size: 0.98rem;
    border: 2px solid var(--hb-terracotta);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hb-btn:hover { background: var(--hb-terracotta-fonce); border-color: var(--hb-terracotta-fonce); color: #fff; text-decoration: none; }
.hb-btn-ghost {
    background: transparent;
    color: var(--hb-bleu);
    border-color: var(--hb-bleu);
}
.hb-btn-ghost:hover { background: var(--hb-bleu); color: #fff; }

/* ===== Hero (homepage) ===== */
.hb-hero {
    background:
        linear-gradient(rgba(30,58,95,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,58,95,0.045) 1px, transparent 1px),
        var(--hb-blanc);
    background-size: 26px 26px;
    border-bottom: 1px solid var(--hb-ligne);
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
}
.hb-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 320px;
    height: 320px;
    border: 2px solid var(--hb-ligne);
    border-radius: 50%;
    opacity: 0.6;
}
.hb-hero .container { position: relative; z-index: 1; max-width: 760px; }
.hb-kicker {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--hb-terracotta);
    margin: 0 0 1rem;
}
.hb-hero h1 { font-size: 3em; line-height: 1.08; margin: 0 0 1.1rem; }
.hb-hero .hb-sub { font-size: 1.18rem; color: var(--hb-gris); max-width: 560px; margin: 0 0 1.9rem; }
.hb-hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* ===== Sections ===== */
.hb-section { padding: 3.75rem 0; }
.hb-section-alt { background: #fff; border-top: 1px solid var(--hb-ligne); border-bottom: 1px solid var(--hb-ligne); }
.hb-section-title {
    font-size: 1.65em;
    font-weight: 700;
    margin: 0 0 1.9rem;
    position: relative;
    padding-left: 1rem;
}
.hb-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    bottom: 0.12em;
    width: 4px;
    background: var(--hb-terracotta);
    border-radius: 2px;
}

/* ===== Grille de cartes articles ===== */
.hb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.hb-card {
    background: #fff;
    border: 1px solid var(--hb-ligne);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.hb-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px var(--hb-ombre); }
.hb-card-img {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        linear-gradient(rgba(30,58,95,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,58,95,0.05) 1px, transparent 1px),
        var(--hb-papier);
    background-size: 22px 22px;
}
.hb-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.hb-card:hover .hb-card-img img { transform: scale(1.05); }
.hb-card-body { padding: 1.15rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.hb-card-cat {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hb-terracotta);
    font-weight: 700;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}
.hb-card h3 { margin: 0; font-size: 1.18em; line-height: 1.3; }
.hb-card h3 a { color: var(--hb-bleu); }
.hb-card h3 a:hover { color: var(--hb-terracotta); text-decoration: none; }
.hb-card .hb-card-excerpt { margin: 0; color: var(--hb-gris); font-size: 0.93rem; line-height: 1.6; flex: 1; }

/* ===== Tuiles catégories ===== */
.hb-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.hb-cat-tile {
    background: #fff;
    border: 1px solid var(--hb-ligne);
    border-radius: 8px;
    padding: 1.5rem 1.6rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.hb-cat-tile::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--hb-terracotta);
    transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.hb-cat-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px var(--hb-ombre); }
.hb-cat-tile:hover::before { transform: scaleX(1); }
.hb-cat-tile h3 { color: var(--hb-bleu); margin: 0 0 0.35rem; font-size: 1.2em; }
.hb-cat-tile span { color: var(--hb-gris); font-size: 0.88rem; }
.hb-cat-tile:hover h3 { color: var(--hb-terracotta); }

/* ===== Pages piliers (guides essentiels) ===== */
.hb-piliers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.hb-pilier {
    background: var(--hb-bleu);
    color: #fff;
    border-radius: 8px;
    padding: 1.7rem 1.7rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.16s ease, background 0.16s ease;
    position: relative;
    overflow: hidden;
}
.hb-pilier::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 110px;
    height: 110px;
    border: 1.5px solid rgba(232,160,138,0.35);
    border-radius: 50%;
}
.hb-pilier:hover { transform: translateY(-4px); background: var(--hb-bleu-clair); }
.hb-pilier h3 { color: #fff; margin: 0; font-size: 1.28em; }
.hb-pilier p { color: #d8d2c8; margin: 0; font-size: 0.92rem; line-height: 1.6; }
.hb-pilier .hb-pilier-arrow { color: var(--hb-terracotta-clair); font-weight: 700; font-family: 'Space Grotesk', system-ui, sans-serif; margin-top: 0.25rem; }

/* ===== Glossaire bandeau ===== */
.hb-glossaire-band {
    background: var(--hb-papier);
    border: 1px solid var(--hb-ligne);
    border-left: 5px solid var(--hb-terracotta);
    border-radius: 0 8px 8px 0;
    padding: 1.6rem 1.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.hb-glossaire-band h3 { margin: 0 0 0.3rem; }
.hb-glossaire-band p { margin: 0; color: var(--hb-gris); }
.hb-termes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hb-terme {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--hb-ligne);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    color: var(--hb-bleu);
    text-decoration: none;
}
.hb-terme:hover { border-color: var(--hb-terracotta); color: var(--hb-terracotta); }

/* ===== Archive / grille listes ===== */
.hb-archive-head { padding: 2.5rem 0 0.5rem; }
.hb-archive-head h1 { margin-bottom: 0.3rem; }
.hb-archive-desc { color: var(--hb-gris); }

/* ===== Article ===== */
.entry { max-width: 780px; }
.entry-header { margin-bottom: 1.6rem; }
.entry-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--hb-gris);
    margin-bottom: 0.85rem;
}
.entry-meta .sep { color: var(--hb-ligne); }
.entry-cat {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hb-terracotta);
    font-weight: 700;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}
.entry-thumb {
    margin: 0 0 2rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--hb-ligne);
}
.entry-thumb img { width: 100%; height: auto; }
.entry-content { font-size: 1.06rem; }
.entry-content > p:first-of-type { font-size: 1.16rem; color: var(--hb-bleu-fonce); }
.entry-content ul, .entry-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.entry-content li { margin-bottom: 0.45rem; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--hb-terracotta-clair); text-underline-offset: 2px; }
.entry-content a:hover { color: var(--hb-bleu); text-decoration-color: var(--hb-bleu); }

blockquote {
    border-left: 4px solid var(--hb-terracotta);
    background: #fff;
    padding: 1rem 1.3rem;
    margin: 1.6rem 0;
    font-style: italic;
    color: var(--hb-bleu-fonce);
    border-radius: 0 6px 6px 0;
}

/* Encadré « fiche chantier » */
.hb-fiche {
    background: #fff;
    border: 1px solid var(--hb-ligne);
    border-left: 4px solid var(--hb-terracotta);
    padding: 1.1rem 1.35rem;
    margin: 1.6rem 0;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 10px var(--hb-ombre);
}
.hb-fiche::before {
    content: "FICHE CHANTIER";
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    color: var(--hb-terracotta);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* Trait de cote */
.hb-cote { border-top: 1px solid var(--hb-ligne); margin: 2.4rem 0; position: relative; }
.hb-cote::after { content: ""; position: absolute; top: -3px; left: 0; width: 44px; height: 5px; background: var(--hb-terracotta); }

/* ===== Glossaire ===== */
.glossaire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.glossaire-item { background: #fff; border: 1px solid var(--hb-ligne); border-radius: 6px; padding: 1.1rem 1.25rem; }
.glossaire-item a { font-family: 'Space Grotesk', system-ui, sans-serif; color: var(--hb-bleu); font-weight: 600; }
.glossaire-item a:hover { color: var(--hb-terracotta); }

/* ===== Pagination ===== */
.pagination { margin: 2.5rem 0 0; display: flex; gap: 0.5rem; }
.pagination .page-numbers { padding: 0.45rem 0.9rem; border: 1px solid var(--hb-ligne); border-radius: 3px; color: var(--hb-bleu); }
.pagination .page-numbers.current { background: var(--hb-bleu); color: #fff; border-color: var(--hb-bleu); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--hb-terracotta); color: var(--hb-terracotta); }

/* ===== Footer ===== */
.site-footer { background: var(--hb-bleu-fonce); color: #d8d2c8; padding: 3rem 0 0; margin-top: 3rem; }
.site-footer a { color: var(--hb-terracotta-clair); }
.site-footer a:hover { color: #fff; }
.site-footer .cols { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: space-between; }
.site-footer .cols > div { flex: 1; min-width: 200px; }
.site-footer h4 { color: #fff; margin-top: 0; font-size: 1.02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2rem; padding: 1.2rem 0; font-size: 0.85rem; color: #a89f93; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .hb-grid { grid-template-columns: repeat(2, 1fr); }
    .hb-cats { grid-template-columns: repeat(2, 1fr); }
    .hb-piliers { grid-template-columns: 1fr; }
    .hb-hero h1 { font-size: 2.3em; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .site-header .container { flex-direction: column; align-items: flex-start; }
    .main-nav ul { gap: 0.9rem; }
    h1 { font-size: 1.75em; }
    .hb-grid { grid-template-columns: 1fr; }
    .hb-cats { grid-template-columns: 1fr; }
    .hb-hero { padding: 3rem 0; }
    .hb-hero h1 { font-size: 2em; }
    .hb-hero .hb-sub { font-size: 1.05rem; }
    .hb-section { padding: 2.75rem 0; }
}
