/*
Theme Name: Nilmirum
Theme URI: https://nilmirum.fr/
Author: Gary SOGNON
Author URI: https://nilmirum.fr/
Description: Thème WordPress magazine/actualité haute performance pour Nilmirum.fr. Inspiré de l'architecture éditoriale de TheVoux (Article Layout 3), optimisé Core Web Vitals 2026, E-E-A-T, Schema.org NewsArticle, IndexNow et AI Overviews (SGE).
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: nilmirum
Tags: news, magazine, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready, rtl-language-support
*/

/* ==========================================================================
   1. CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */
:root{
    --nm-color-accent:#c79a4b;          /* doré éditorial */
    --nm-color-accent-dark:#a87f30;
    --nm-color-text:#1a1a1a;
    --nm-color-muted:#6b6b6b;
    --nm-color-line:#e6e6e6;
    --nm-color-bg:#ffffff;
    --nm-color-bg-alt:#f6f4ef;
    --nm-color-meta:#9a9a9a;
    --nm-color-link:#1a1a1a;
    --nm-color-link-hover:var(--nm-color-accent);
    --nm-font-serif:"Playfair Display","Times New Roman",Georgia,serif;
    --nm-font-sans:"Inter","Helvetica Neue",Arial,sans-serif;
    --nm-font-mono:ui-monospace,SFMono-Regular,Menlo,monospace;
    --nm-fs-base:17px;
    --nm-fs-h1:clamp(2rem,4vw,3.4rem);
    --nm-fs-h2:clamp(1.6rem,3vw,2.4rem);
    --nm-lh-base:1.7;
    --nm-container:1240px;
    --nm-container-narrow:760px;
    --nm-radius:2px;
    --nm-transition:.25s ease;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{
    margin:0;
    font-family:var(--nm-font-sans);
    font-size:var(--nm-fs-base);
    line-height:var(--nm-lh-base);
    color:var(--nm-color-text);
    background:var(--nm-color-bg);
    -webkit-font-smoothing:antialiased;
}
img,picture,video,svg{max-width:100%;height:auto;display:block}
a{color:var(--nm-color-link);text-decoration:none;transition:color var(--nm-transition)}
a:hover,a:focus-visible{color:var(--nm-color-link-hover)}
a:focus-visible{outline:2px solid var(--nm-color-accent);outline-offset:2px}
h1,h2,h3,h4,h5,h6{font-family:var(--nm-font-serif);font-weight:700;line-height:1.25;margin:0 0 .6em}
h1{font-size:var(--nm-fs-h1)}
h2{font-size:var(--nm-fs-h2)}
p{margin:0 0 1.2em}
blockquote{border-left:3px solid var(--nm-color-accent);margin:1.5em 0;padding:.5em 1.5em;font-family:var(--nm-font-serif);font-size:1.3em;font-style:italic;color:#333}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);white-space:nowrap}
.skip-link:focus{position:fixed;top:8px;left:8px;background:#000;color:#fff;padding:.6em 1em;z-index:9999;clip:auto;clip-path:none;width:auto;height:auto}

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.nm-container{max-width:var(--nm-container);margin:0 auto;padding:0 24px}
.nm-narrow{max-width:var(--nm-container-narrow);margin:0 auto;padding:0 24px}

/* ==========================================================================
   4. TOP BAR
   ========================================================================== */
.nm-topbar{background:#111;color:#bbb;font-size:12px;letter-spacing:.05em}
.nm-topbar a{color:#bbb}
.nm-topbar a:hover{color:#fff}
.nm-topbar__inner{display:flex;justify-content:space-between;align-items:center;height:38px}
.nm-topbar__social a{margin-left:14px;font-size:13px}

/* ==========================================================================
   5. HEADER & LOGO
   ========================================================================== */
.nm-header{border-bottom:1px solid var(--nm-color-line);background:#fff}
.nm-header__inner{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 0}
.nm-logo{font-family:var(--nm-font-serif);font-size:38px;font-weight:900;letter-spacing:.05em;color:#000}
.nm-logo img{max-height:54px;width:auto}
.nm-header__actions{display:flex;align-items:center;gap:18px}
.nm-search-toggle,.nm-menu-toggle{background:none;border:0;cursor:pointer;font-size:18px;color:#000;padding:6px}

/* ==========================================================================
   6. MAIN NAVIGATION (MEGA MENU READY)
   ========================================================================== */
.nm-nav{border-bottom:1px solid var(--nm-color-line);background:#fff;position:sticky;top:0;z-index:50}
.nm-nav__list{list-style:none;margin:0;padding:0;display:flex;justify-content:center;flex-wrap:wrap;gap:0}
.nm-nav__list>li>a{
    display:block;
    padding:16px 22px;
    font-family:var(--nm-font-serif);
    font-size:14px;
    font-weight:700;
    letter-spacing:.18em;
    text-transform:uppercase;
    color:#000;
}
.nm-nav__list>li>a:hover{color:var(--nm-color-accent)}
.nm-nav__list .current-menu-item>a{color:var(--nm-color-accent)}
.nm-nav__list .sub-menu{
    position:absolute;left:0;right:0;background:#fff;border-top:1px solid var(--nm-color-line);
    display:none;padding:30px 0;list-style:none;margin:0;
    box-shadow:0 8px 24px rgba(0,0,0,.06);
}
.nm-nav__list li:hover>.sub-menu,.nm-nav__list li:focus-within>.sub-menu{display:block}

/* ==========================================================================
   7. ARTICLE — SINGLE (Article Layout 3)
   ========================================================================== */
.nm-article{padding:40px 0 60px}
.nm-article__header{text-align:center;max-width:820px;margin:0 auto 36px}
.nm-article__cat{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:var(--nm-color-accent);margin-bottom:14px}
.nm-article__cat a{color:inherit}
.nm-article__title{font-size:clamp(1.9rem,3.6vw,3rem);line-height:1.15;margin:.2em 0 .6em}
.nm-article__date{font-size:12px;color:var(--nm-color-meta);letter-spacing:.1em;text-transform:uppercase;margin-bottom:8px}
.nm-article__byline{font-size:14px;color:var(--nm-color-muted);font-style:italic}
.nm-article__byline a{color:#000;font-style:normal;font-weight:600}

.nm-article__share{display:flex;gap:8px;justify-content:center;margin:28px 0}
.nm-share-btn{
    display:inline-flex;align-items:center;gap:6px;
    padding:8px 14px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
    border:1px solid var(--nm-color-line);border-radius:var(--nm-radius);background:#fff;color:#000;
}
.nm-share-btn:hover{background:#000;color:#fff;border-color:#000}

.nm-article__featured{margin:0 -24px 40px}
.nm-article__featured img{width:100%;height:auto}

.nm-article__content{max-width:760px;margin:0 auto;font-size:18px;line-height:1.8}
.nm-article__content h2{margin:1.4em 0 .6em;font-size:1.7em}
.nm-article__content h3{margin:1.3em 0 .5em;font-size:1.35em}
.nm-article__content p:first-of-type::first-letter{
    font-family:var(--nm-font-serif);font-size:4.2em;float:left;line-height:.85;
    margin:.08em .12em 0 0;color:var(--nm-color-accent);font-weight:700;
}
.nm-article__content figure{margin:2em 0}
.nm-article__content figcaption{font-size:13px;color:var(--nm-color-muted);text-align:center;margin-top:8px;font-style:italic}

.nm-article__tags{max-width:760px;margin:30px auto 0;padding-top:20px;border-top:1px solid var(--nm-color-line);font-size:14px}
.nm-article__tags a{
    display:inline-block;margin:0 4px 4px 0;padding:4px 10px;
    background:var(--nm-color-bg-alt);border-radius:var(--nm-radius);font-size:12px;
}

/* ==========================================================================
   8. AUTHOR BOX (E-E-A-T)
   ========================================================================== */
.nm-author-box{
    max-width:760px;margin:40px auto;padding:30px;
    background:var(--nm-color-bg-alt);display:grid;grid-template-columns:120px 1fr;gap:24px;align-items:center;
}
.nm-author-box__avatar img{border-radius:50%;width:120px;height:120px;object-fit:cover}
.nm-author-box__name{font-family:var(--nm-font-serif);font-size:22px;margin:0 0 4px}
.nm-author-box__role{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--nm-color-accent);margin-bottom:10px}
.nm-author-box__bio{font-size:15px;color:#444;margin:0 0 12px}
.nm-author-box__social a{margin-right:10px;color:#666}

/* ==========================================================================
   9. POST NAVIGATION
   ========================================================================== */
.nm-post-nav{max-width:760px;margin:40px auto;display:grid;grid-template-columns:1fr 1fr;gap:20px;border-top:1px solid var(--nm-color-line);padding-top:24px}
.nm-post-nav__item{font-size:14px}
.nm-post-nav__label{display:block;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--nm-color-meta);margin-bottom:6px}
.nm-post-nav__item--next{text-align:right}

/* ==========================================================================
   10. RELATED POSTS
   ========================================================================== */
.nm-related{max-width:var(--nm-container);margin:60px auto;padding:40px 24px 0;border-top:1px solid var(--nm-color-line)}
.nm-related__title{text-align:center;font-size:1.6em;margin-bottom:30px}
.nm-related__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:30px}
.nm-card{background:#fff}
.nm-card__thumb{aspect-ratio:16/9;overflow:hidden;background:#eee}
.nm-card__thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.nm-card:hover .nm-card__thumb img{transform:scale(1.05)}
.nm-card__cat{display:block;font-size:10px;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:var(--nm-color-accent);margin:14px 0 6px}
.nm-card__title{font-size:1.05em;line-height:1.35;margin:0 0 6px}
.nm-card__meta{font-size:12px;color:var(--nm-color-meta)}

/* ==========================================================================
   11. INDEX / ARCHIVE GRID
   ========================================================================== */
.nm-archive-header{text-align:center;padding:40px 0 20px;border-bottom:1px solid var(--nm-color-line);margin-bottom:40px}
.nm-archive-header h1{font-size:2.2em;margin:0}
.nm-archive-header p{color:var(--nm-color-muted);font-size:15px;margin:8px 0 0}
.nm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:36px}
.nm-pagination{display:flex;justify-content:center;gap:8px;margin:50px 0}
.nm-pagination a,.nm-pagination span{padding:10px 14px;border:1px solid var(--nm-color-line);font-size:14px}
.nm-pagination .current{background:#000;color:#fff;border-color:#000}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.nm-footer{background:#0e0e0e;color:#bbb;padding:60px 0 0;margin-top:60px}
.nm-footer a{color:#bbb}
.nm-footer a:hover{color:#fff}
.nm-footer__cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:40px;padding-bottom:50px;border-bottom:1px solid #222}
.nm-footer__logo{font-family:var(--nm-font-serif);color:#fff;font-size:28px;margin-bottom:16px;display:inline-block}
.nm-footer__bottom{display:flex;justify-content:space-between;align-items:center;padding:24px 0;font-size:13px;color:#777;flex-wrap:wrap;gap:16px}

/* ==========================================================================
   13. UTILITIES & ACCESSIBILITY
   ========================================================================== */
.nm-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (prefers-reduced-motion:reduce){
    *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* ==========================================================================
   14. RESPONSIVE
   ========================================================================== */
@media (max-width:900px){
    .nm-nav__list{flex-direction:column}
    .nm-nav__list>li>a{padding:14px 20px}
    .nm-author-box{grid-template-columns:1fr;text-align:center}
    .nm-author-box__avatar{margin:0 auto}
    .nm-post-nav{grid-template-columns:1fr}
    .nm-post-nav__item--next{text-align:left}
    .nm-article__featured{margin:0 0 30px}
    .nm-article__content{font-size:16.5px}
}
@media (max-width:600px){
    :root{--nm-fs-base:16px}
    .nm-logo{font-size:30px}
    .nm-topbar{display:none}
}

/* ==========================================================================
   15. PRINT
   ========================================================================== */
@media print{
    .nm-topbar,.nm-nav,.nm-footer,.nm-article__share,.nm-related,.nm-post-nav,.nm-author-box__social{display:none}
    body{font-size:12pt;color:#000}
    a::after{content:" ("attr(href)")";font-size:90%}
}
