/* ═══════════════════════════════════════════════════════════════════════════
   NATURE & BOIS — Layout CSS v2.0
   Le CSS de Twenty Twenty est désactivé dans functions.php.
   Ce fichier est la seule base CSS du site.
═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. NORMALIZE global ──────────────────────────────────────────────────
   Minimal normalize inspiré de modern-normalize.
   Source : https://github.com/sindresorhus/modern-normalize
────────────────────────────────────────────────────────────────────────── */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    overflow-x: hidden;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

p { margin: 0; }

a {
    color: inherit;
    text-decoration: none;
}

img, video {
    display: block;
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

li { margin: 0; }

button {
    font-family: inherit;
    cursor: pointer;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* WordPress admin bar */
.admin-bar .nb-topbar {
    margin-top: 32px;
}
.admin-bar .nb-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .nb-topbar  { margin-top: 46px; }
    .admin-bar .nb-header  { top: 46px; }
}

/* ─── 2. TYPOGRAPHIE — échelle cohérente sur tout le site ──────────────────
   H1 : clamp(2.2rem, 5vw, 4rem)   — pages et hero
   H2 : clamp(1.4rem, 2.5vw, 2rem) — sections
   H3 : 1rem uppercase              — labels, cartes
   Corps : 1rem / line-height 1.75 / color #444
────────────────────────────────────────────────────────────────────────── */

/* Variables globales */
:root {
    --color-vert:     #2d6a2d;
    --color-vert-dark: #1a4a1a;
    --color-fond:     #f5f5f0;
    --color-texte:    #1a1a1a;
    --color-gris:     #555;
    --color-gris-clair: #888;
    --color-bordure:  #e5e5e0;

    --font-eyebrow: 0.72rem;
    --font-small:   0.82rem;
    --font-body:    1rem;
    --font-h3:      1rem;
    --font-h2:      clamp(1.4rem, 2.5vw, 2rem);
    --font-h1:      clamp(2.2rem, 5vw, 4rem);
    --font-hero:    clamp(2.5rem, 5.5vw, 4.5rem);

    --max-width: 1100px;
    --padding-x: 1.5rem;
}

/* ─── 3. HEADER ────────────────────────────────────────────────────────── */

.nb-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--color-bordure);
}

.nb-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding-x);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Lien d'accessibilité Twenty Twenty — masqué visuellement */
.skip-link { display: none !important; }

.nb-logo {
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nb-logo-img {
    height: 42px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.nb-logo-texte {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.nb-logo-nom {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-texte);
}

.nb-logo-sous {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-vert);
    letter-spacing: 0.01em;
}

/* Groupe droit header : socials + BoisLocal */
.nb-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nb-header-socials {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nb-header-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #555;
    transition: color 0.15s, background 0.15s;
}

.nb-header-social:hover {
    color: var(--color-vert);
    background: rgba(45,106,45,0.08);
}

/* Badge BoisLocal */
.nb-boislocal {
    flex-shrink: 0;
    display: block;
}

.nb-boislocal img {
    height: 44px;
    width: auto;
    display: block;
    transition: opacity 0.15s;
}

.nb-boislocal:hover img { opacity: 0.8; }

/* Socials footer */
.nb-footer-socials {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.nb-social-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.nb-social-link:hover { color: #fff; }

.nb-social-link svg {
    flex-shrink: 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .nb-boislocal      { display: none; }
    .nb-logo-sous      { display: none; }
    .nb-header-socials { display: none; }
}

.nb-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nb-nav a {
    text-decoration: none;
    color: #333;
    font-size: var(--font-small);
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.nb-nav a:hover,
.nb-nav a.active,
.nb-nav .current-menu-item > a,
.nb-nav .current_page_item > a,
.nb-nav .current-page-ancestor > a {
    color: var(--color-vert);
    border-bottom-color: var(--color-vert);
}

/* Burger mobile */
.nb-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

.nb-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-texte);
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

/* Animation burger → croix */
.nb-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nb-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nb-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── 4. FOOTER ────────────────────────────────────────────────────────── */

.nb-footer {
    background: #1a1a1a;
    color: #ccc;
    margin-top: 5rem;
}

.nb-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem var(--padding-x);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.nb-footer-logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.nb-footer-logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.nb-footer-contact p {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #aaa;
}

.nb-footer-contact a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.15s;
}
.nb-footer-contact a:hover { color: #fff; }

.nb-footer-nav h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    margin-bottom: 1rem;
}

.nb-footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nb-footer-nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s;
}
.nb-footer-nav a:hover { color: #fff; }

.nb-footer-social h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    margin-bottom: 1rem;
}

.nb-footer-social a {
    display: block;
    color: #aaa;
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    transition: color 0.15s;
}
.nb-footer-social a:hover { color: #fff; }

.nb-footer-bottom {
    border-top: 1px solid #2a2a2a;
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: #555;
}

/* ─── 5. UTILITAIRES communs ───────────────────────────────────────────── */

/* Eyebrow — label au-dessus des titres de section */
.nb-eyebrow,
.nb-section-tag {
    display: block;
    font-size: var(--font-eyebrow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-vert);
    margin-bottom: 0.6rem;
}

/* Boutons */
.nb-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 3px;
    font-size: var(--font-small);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.nb-btn--primary {
    background: var(--color-vert);
    color: #fff;
    border-color: var(--color-vert);
}
.nb-btn--primary:hover {
    background: var(--color-vert-dark);
    border-color: var(--color-vert-dark);
    color: #fff;
}

.nb-btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.55);
}
.nb-btn--outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nb-btn--ghost {
    background: transparent;
    color: var(--color-vert);
    border-color: var(--color-vert);
}
.nb-btn--ghost:hover {
    background: var(--color-vert);
    color: #fff;
}

/* Tags taxonomie */
.nb-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-vert);
    background: rgba(45,106,45,0.08);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    text-decoration: none;
    transition: background 0.15s;
}
.nb-tag:hover { background: rgba(45,106,45,0.15); }
.nb-tag--small { font-size: 0.65rem; padding: 0.15rem 0.5rem; }

/* ─── 6. RESPONSIVE ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nb-menu-toggle { display: flex; }

    .nb-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-bordure);
        padding: 1.5rem var(--padding-x) 2rem;
        z-index: 99;
        box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    }

    .nb-nav.open { display: block; }

    .nb-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nb-nav li {
        border-bottom: 1px solid var(--color-bordure);
    }

    .nb-nav li:last-child {
        border-bottom: none;
    }

    .nb-nav a {
        display: block;
        padding: 0.85rem 0;
        font-size: 1rem;
        letter-spacing: 0.03em;
    }

    .nb-footer-inner { grid-template-columns: 1fr 1fr; }
    .nb-footer        { margin-top: 3rem; }
}

@media (max-width: 480px) {
    .nb-footer-inner { grid-template-columns: 1fr; }
}
