/*
Theme Name:   LHLPS Sombre
Theme URI:    https://lesheureslesplussombres.com
Description:  Thème enfant de Kadence — webzine culturel sombre, mise en page magazine pour Les Heures Les Plus Sombres.
Author:       Fabien Pusset
Template:     kadence
Version:      1.0.0
Text Domain:  lhlps-sombre
*/

/* ==========================================================================
   1. Polices (hébergées en local, pas d'appel à Google Fonts)
   ========================================================================== */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/Inter-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:500 900;font-display:swap;src:url(fonts/PlayfairDisplay-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:500 700;font-display:swap;src:url(fonts/PlayfairDisplay-italic.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/SourceSerif4-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:400 600;font-display:swap;src:url(fonts/SourceSerif4-italic.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ==========================================================================
   2. Jetons de design — palette redéfinie sur body pour battre les variables
      Kadence posées sur :root
   ========================================================================== */
body{
  --lh-bg:#0c0c0e;
  --lh-surface:#16161a;
  --lh-surface-2:#1e1e24;
  --lh-line:#2c2c33;
  --lh-text:#d9d5cb;
  --lh-muted:#9b968a;
  --lh-head:#f4f1ea;
  --lh-accent:#d6b537;      /* jaune du logo */
  --lh-accent-hi:#ecd067;
  --lh-blood:#a3201f;       /* rouge sombre, survols et marqueurs */
  --lh-serif-title:'Playfair Display',Georgia,'Times New Roman',serif;
  --lh-serif-text:'Source Serif 4',Georgia,'Times New Roman',serif;
  --lh-sans:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;

  --global-palette1:#d6b537;
  --global-palette2:#a3201f;
  --global-palette3:#f4f1ea;
  --global-palette4:#d9d5cb;
  --global-palette5:#9b968a;
  --global-palette6:#2c2c33;
  --global-palette7:#1e1e24;
  --global-palette8:#16161a;
  --global-palette9:#0c0c0e;
  --global-palette-highlight:#d6b537;
  --global-palette-highlight-alt:#ecd067;
  --global-palette-highlight-alt2:#0c0c0e;
  --global-palette-btn-bg:#d6b537;
  --global-palette-btn-bg-hover:#ecd067;
  --global-palette-btn:#0c0c0e;
  --global-palette-btn-hover:#0c0c0e;
  --global-body-font-family:var(--lh-serif-text);
  --global-heading-font-family:var(--lh-serif-title);
}

/* ==========================================================================
   3. Base
   ========================================================================== */
html{background:var(--lh-bg)}
body,
body.custom-background,
.site,
.content-bg,
.content-area,
#wrapper,
.site-container{background-color:var(--lh-bg)!important;color:var(--lh-text)}
body{font-family:var(--lh-serif-text);font-size:18px;line-height:1.7;-webkit-font-smoothing:antialiased}
::selection{background:var(--lh-accent);color:#0c0c0e}

h1,h2,h3,h4,h5,h6,
.entry-title,
.wp-block-heading{font-family:var(--lh-serif-title);color:var(--lh-head);font-weight:700;letter-spacing:-.01em;line-height:1.2}

a{color:var(--lh-accent);text-decoration-thickness:1px;text-underline-offset:.2em;transition:color .15s ease}
a:hover,a:focus{color:var(--lh-accent-hi)}
hr,.wp-block-separator{border-color:var(--lh-line);opacity:1}

input,textarea,select{background:var(--lh-surface-2)!important;color:var(--lh-text)!important;border:1px solid var(--lh-line)!important;border-radius:2px;font-family:var(--lh-sans)}
input:focus,textarea:focus,select:focus{border-color:var(--lh-accent)!important;outline:none;box-shadow:0 0 0 1px var(--lh-accent)}
.button,button,input[type=submit],.wp-block-button__link,.kb-button{
  background:var(--lh-accent)!important;color:#0c0c0e!important;border-radius:2px;border:0;
  font-family:var(--lh-sans);font-weight:600;letter-spacing:.08em;text-transform:uppercase;font-size:.78rem}
.button:hover,button:hover,input[type=submit]:hover,.wp-block-button__link:hover{background:var(--lh-accent-hi)!important}

/* ==========================================================================
   4. En-tête et navigation
   ========================================================================== */
#masthead,
#main-header .site-header-row-container-inner,
.site-header-wrap,
.site-header-row-container-inner,
.site-main-header-wrap .site-header-row-container-inner{background:var(--lh-bg)!important}
#masthead{border-bottom:1px solid var(--lh-line);position:relative}
#masthead::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;
  background:linear-gradient(90deg,var(--lh-blood) 0,var(--lh-accent) 40%,transparent 100%)}
.site-branding .custom-logo{max-height:96px;width:auto}
.site-branding a.brand{padding:.6rem 0}

#main-header .header-navigation,
.primary-menu-container,
#site-navigation,
.main-navigation .primary-menu-container > ul > li.menu-item > a{background:transparent!important}
.main-navigation .primary-menu-container > ul > li.menu-item > a{
  color:var(--lh-head);font-family:var(--lh-sans);font-size:.78rem;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;padding:.6em 1.1em;position:relative}
.main-navigation .primary-menu-container > ul > li.menu-item > a::after{
  content:"";position:absolute;left:1.1em;right:1.1em;bottom:.2em;height:2px;background:var(--lh-accent);
  transform:scaleX(0);transform-origin:left;transition:transform .2s ease}
.main-navigation .primary-menu-container > ul > li.menu-item:hover > a::after,
.main-navigation .primary-menu-container > ul > li.current-menu-item > a::after,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a::after{transform:scaleX(1)}
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover{color:var(--lh-accent-hi)}
.header-navigation .header-menu-container ul ul.sub-menu{background:var(--lh-surface)!important;border:1px solid var(--lh-line);box-shadow:0 18px 40px rgba(0,0,0,.6)}
.header-navigation .header-menu-container ul ul li.menu-item > a{color:var(--lh-text);font-family:var(--lh-sans);font-size:.82rem;border-bottom:1px solid var(--lh-line)}
.header-navigation .header-menu-container ul ul li.menu-item > a:hover{background:var(--lh-surface-2)!important;color:var(--lh-accent-hi)}
.mobile-toggle-open-container .menu-toggle-open{color:var(--lh-head)}
#mobile-drawer .drawer-inner{background:var(--lh-surface)}
#mobile-drawer a{color:var(--lh-head)}

/* ==========================================================================
   5. Fil d'ariane
   ========================================================================== */
.kadence-breadcrumbs,
.yoast-breadcrumb,
#breadcrumbs,
.entry-hero .kadence-breadcrumbs{
  font-family:var(--lh-sans);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--lh-muted)!important}
.kadence-breadcrumbs a,.yoast-breadcrumb a,#breadcrumbs a{color:var(--lh-accent);text-decoration:none}
.kadence-breadcrumbs a:hover,.yoast-breadcrumb a:hover{color:var(--lh-accent-hi);text-decoration:underline}
.kadence-breadcrumbs .kadence-bread-sep,.kadence-breadcrumbs .bc-delimiter{color:var(--lh-blood);margin:0 .5em}
.kadence-breadcrumbs .kadence-bread-current,.kadence-breadcrumbs [aria-current]{color:var(--lh-muted)}

/* ==========================================================================
   6. Bandeau de titre des archives (catégories) et des articles
   ========================================================================== */
.entry-hero .entry-hero-container-inner,
.entry-hero-container-inner{background:transparent!important}
.entry-hero{border-bottom:1px solid var(--lh-line);margin-bottom:2.5rem}
.archive .entry-hero .hero-section-overlay{background:transparent!important}
.archive .entry-hero .entry-header{text-align:left;padding:2.5rem 0 2rem;min-height:0}
.archive .entry-hero .page-title,
.archive .entry-title{font-size:clamp(2.2rem,5vw,3.6rem);font-weight:800;line-height:1.05;margin:.4rem 0 .6rem;color:var(--lh-head)}
.archive .entry-hero .page-title::before{content:"Rubrique";display:block;font-family:var(--lh-sans);
  font-size:.7rem;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--lh-accent);margin-bottom:.8rem}
.archive .archive-description,
.archive .entry-hero .archive-description{font-family:var(--lh-serif-text);font-style:italic;font-size:1.15rem;
  color:var(--lh-muted);max-width:42em;border-left:3px solid var(--lh-blood);padding-left:1rem;margin-top:1rem}

/* ==========================================================================
   7. Cartes d'articles (archives, résultats de recherche, blocs « Articles »)
   ========================================================================== */
.kadence-posts-list{gap:2rem}
.loop-entry,
.kb-post-list-item .kb-post-list-item-inner,
.wp-block-kadence-posts .kb-post-list-item{
  background:var(--lh-surface)!important;border:1px solid var(--lh-line);border-radius:2px;
  box-shadow:none!important;overflow:hidden;transition:transform .2s ease,border-color .2s ease}
.loop-entry:hover{border-color:var(--lh-accent);transform:translateY(-3px)}
.loop-entry .post-thumbnail{overflow:hidden;margin:0}
.loop-entry .post-thumbnail img{transition:transform .5s ease;filter:saturate(.9) contrast(1.03)}
.loop-entry:hover .post-thumbnail img{transform:scale(1.04)}
.loop-entry .entry-content-wrap{padding:1.3rem 1.4rem 1.5rem;background:transparent!important}
.loop-entry .entry-taxonomies,
.loop-entry .entry-taxonomies a{font-family:var(--lh-sans);font-size:.68rem;font-weight:700;letter-spacing:.18em;
  text-transform:uppercase;color:var(--lh-accent)!important;text-decoration:none}
.loop-entry .entry-title,
.loop-entry h2.entry-title{font-size:1.35rem;line-height:1.25;margin:.55rem 0 .6rem}
.loop-entry .entry-title a{color:var(--lh-head)}
.loop-entry .entry-title a:hover{color:var(--lh-accent-hi)}
.loop-entry .entry-summary,
.loop-entry .entry-summary p{color:var(--lh-text);font-size:.98rem;line-height:1.6}
.loop-entry .entry-meta,
.loop-entry .entry-meta a{font-family:var(--lh-sans);font-size:.72rem;color:var(--lh-muted);letter-spacing:.04em}
.loop-entry .more-link-wrap{display:none}

/* Premier article d'une rubrique : grande une pleine largeur (hors pagination) */
.kadence-posts-list > .entry-list-item{display:flex}
.kadence-posts-list > .entry-list-item > .loop-entry{width:100%}
@media (min-width:900px){
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child{grid-column:1/-1}
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child > .loop-entry{
    display:grid;grid-template-columns:1.3fr 1fr;align-items:stretch}
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child .post-thumbnail{height:100%;min-height:380px}
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child .post-thumbnail-inner,
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child .post-thumbnail img{height:100%;width:100%;object-fit:cover}
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child .entry-content-wrap{
    display:flex;flex-direction:column;justify-content:center;padding:2.4rem 2.6rem}
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child .entry-title{font-size:2.2rem;line-height:1.12}
  body.archive:not(.paged) .kadence-posts-list > .entry-list-item:first-child .entry-summary p{font-size:1.1rem}
}

/* Pagination */
.pagination .nav-links{display:flex;gap:.4rem;justify-content:center;flex-wrap:wrap}
.pagination .page-numbers{font-family:var(--lh-sans);font-size:.8rem;padding:.55rem .95rem;background:var(--lh-surface);
  border:1px solid var(--lh-line);color:var(--lh-text);border-radius:2px}
.pagination .page-numbers.current,.pagination .page-numbers:hover{background:var(--lh-accent);color:#0c0c0e;border-color:var(--lh-accent)}

/* ==========================================================================
   8. Article
   ========================================================================== */
.single-post .entry-header,.single-post .entry-header.title-align-right{text-align:left!important;padding:2rem 0 1.2rem}
.single-post .entry-header .entry-taxonomies,.single-post .entry-header .entry-meta{justify-content:flex-start}
.single-post .article-post-thumbnail .post-thumbnail-inner{max-height:540px;overflow:hidden}
.single-post .article-post-thumbnail img{width:100%;height:540px;max-height:540px;object-fit:cover}
.single-post .kadence-breadcrumbs{margin-bottom:.8rem}
.single-post .entry-title{font-size:clamp(2rem,4.6vw,3.3rem);font-weight:800;line-height:1.1;margin:.5rem 0 1rem}
.single-post .entry-meta,
.single-post .entry-meta a{font-family:var(--lh-sans);font-size:.76rem;letter-spacing:.06em;color:var(--lh-muted);text-transform:uppercase}
.single-post .entry-taxonomies a,
.single-post .category-links a{font-family:var(--lh-sans);font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--lh-accent)}
.single-post .post-thumbnail img,
.single-post .article-post-thumbnail img{border-radius:2px;filter:saturate(.92)}

.single-content{font-family:var(--lh-serif-text);font-size:1.18rem;line-height:1.78;color:var(--lh-text)}
.single-content > p:first-of-type::first-letter{
  float:left;font-family:var(--lh-serif-title);font-weight:800;font-size:4.1rem;line-height:.82;
  padding:.38rem .6rem 0 0;color:var(--lh-accent)}
.single-content h2{font-size:1.9rem;margin:2.6rem 0 1rem;padding-top:1rem;border-top:1px solid var(--lh-line)}
.single-content h3{font-size:1.4rem;margin:2rem 0 .7rem;color:var(--lh-accent)}
.single-content strong{color:var(--lh-head)}
.single-content a{color:var(--lh-accent);text-decoration:underline;text-decoration-color:rgba(214,181,55,.45)}
.single-content a:hover{text-decoration-color:var(--lh-accent-hi)}
.single-content blockquote,
.wp-block-quote{margin:2rem 0;padding:.4rem 0 .4rem 1.6rem;border-left:3px solid var(--lh-blood);
  font-family:var(--lh-serif-title);font-style:italic;font-size:1.3rem;line-height:1.5;color:var(--lh-head);background:transparent}
.single-content blockquote cite,.wp-block-quote cite{font-family:var(--lh-sans);font-style:normal;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:var(--lh-muted)}
.single-content figure figcaption,.wp-element-caption{font-family:var(--lh-sans);font-size:.78rem;color:var(--lh-muted);text-align:left;margin-top:.5rem}
.single-content table{border-collapse:collapse;font-family:var(--lh-sans);font-size:.92rem}
.single-content table th,.single-content table td{border:1px solid var(--lh-line);padding:.6rem .8rem}
.single-content table th{background:var(--lh-surface-2);color:var(--lh-head)}

.entry-tags .tags-links a,.post-tags a{background:var(--lh-surface-2);color:var(--lh-text);font-family:var(--lh-sans);
  font-size:.72rem;letter-spacing:.06em;border:1px solid var(--lh-line);padding:.3rem .7rem;border-radius:2px;text-decoration:none}
.entry-tags .tags-links a:hover{border-color:var(--lh-accent);color:var(--lh-accent-hi)}

.entry-author-box,.author-box,.entry-related,.post-navigation,.comments-area{background:transparent}
.entry-author .entry-author-profile,.author-box{background:var(--lh-surface);border:1px solid var(--lh-line);padding:1.5rem;border-radius:2px}
.entry-related-title,.comments-title,.comment-reply-title,.entry-author-profile .entry-author-name{
  font-family:var(--lh-sans);font-size:.78rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--lh-accent)}
.post-navigation .post-navigation-sub,.post-navigation a{font-family:var(--lh-sans);color:var(--lh-text)}
.post-navigation .nav-links{border-top:1px solid var(--lh-line);border-bottom:1px solid var(--lh-line)}

/* ==========================================================================
   9. Barre latérale
   ========================================================================== */
.primary-sidebar .widget,
.sidebar-inner-wrap .widget{background:var(--lh-surface);border:1px solid var(--lh-line);padding:1.4rem;border-radius:2px;margin-bottom:1.8rem}
.widget-title,.widget .widget-title,.widgettitle,
.primary-sidebar h2,.primary-sidebar .wp-block-heading{
  font-family:var(--lh-sans)!important;font-size:.74rem!important;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  color:var(--lh-accent)!important;padding-bottom:.7rem;margin:0 0 1rem;border-bottom:1px solid var(--lh-line)}
.primary-sidebar a{color:var(--lh-text)}
.primary-sidebar a:hover{color:var(--lh-accent-hi)}
.primary-sidebar .kb-post-list-item,
.primary-sidebar .wp-block-kadence-posts .kb-post-list-item{background:transparent!important;border:0;border-bottom:1px solid var(--lh-line);border-radius:0}
.primary-sidebar .kb-post-list-item h3,
.primary-sidebar .kb-post-list-item .entry-title{font-size:1.05rem}

/* ==========================================================================
   10. Page d'accueil (page statique : H1 + sections « A lire », « A écouter »…)
   ========================================================================== */
.home .entry-content > .wp-block-group{margin-bottom:3.2rem}
.home .entry-content h1.wp-block-heading,
.home .entry-content > .wp-block-group:first-child > h1{
  font-size:clamp(1.5rem,3vw,2.1rem);font-weight:700;font-style:italic;color:var(--lh-muted);
  margin:0 0 2.4rem;padding-bottom:1.2rem;border-bottom:1px solid var(--lh-line)}
.home .entry-content h2.wp-block-heading{
  display:flex;align-items:center;gap:1rem;font-family:var(--lh-sans);font-size:.85rem;font-weight:700;
  letter-spacing:.24em;text-transform:uppercase;color:var(--lh-head);margin:0 0 1.6rem}
.home .entry-content h2.wp-block-heading::before{content:"";width:2.2rem;height:3px;background:var(--lh-accent);flex:none}
.home .entry-content h2.wp-block-heading::after{content:"";height:1px;background:var(--lh-line);flex:1}
.wp-block-kadence-posts .kb-posts{gap:2rem}
.wp-block-kadence-posts .kb-post-list-item{background:var(--lh-surface)!important;border:1px solid var(--lh-line);border-radius:2px;overflow:hidden}
.wp-block-kadence-posts .kb-post-list-item:hover{border-color:var(--lh-accent)}
.wp-block-kadence-posts .entry-content-wrap,
.wp-block-kadence-posts .kb-post-list-item .entry-content{padding:1.2rem 1.3rem 1.4rem;background:transparent!important}
.wp-block-kadence-posts .entry-title,
.wp-block-kadence-posts h3{font-size:1.25rem;line-height:1.28}
.wp-block-kadence-posts .entry-title a{color:var(--lh-head)}
.wp-block-kadence-posts .entry-title a:hover{color:var(--lh-accent-hi)}
.wp-block-kadence-posts .entry-meta,.wp-block-kadence-posts .entry-meta a{font-family:var(--lh-sans);font-size:.72rem;color:var(--lh-muted)}
.wp-block-kadence-posts .kb-posts img{filter:saturate(.9) contrast(1.03)}

/* ==========================================================================
   11. Pied de page
   ========================================================================== */
#colophon,.site-footer-wrap .site-footer-row-container-inner,
.site-top-footer-wrap .site-footer-row-container-inner,
.site-middle-footer-wrap .site-footer-row-container-inner,
.site-bottom-footer-wrap .site-footer-row-container-inner{background:var(--lh-surface)!important;color:var(--lh-muted)}
#colophon{border-top:1px solid var(--lh-line)}
#colophon a{color:var(--lh-text)}
#colophon a:hover{color:var(--lh-accent-hi)}
#colophon .widget-title{color:var(--lh-accent)!important}
.site-footer .footer-html,.footer-html-inner{font-family:var(--lh-sans);font-size:.78rem;color:var(--lh-muted)}

/* ==========================================================================
   12. Divers
   ========================================================================== */
#kt-scroll-up,#kt-scroll-up-reader{background:var(--lh-accent)!important;color:#0c0c0e!important;border-radius:2px}
.cli-bar-container,#cookie-law-info-bar{font-family:var(--lh-sans)}
.wp-block-search__input{background:var(--lh-surface-2)!important}
.search-form .search-submit{background:var(--lh-accent)!important;color:#0c0c0e!important}

@media (max-width:768px){
  body{font-size:17px}
  .single-content{font-size:1.08rem}
  .single-content > p:first-of-type::first-letter{font-size:3.4rem}
  .site-branding .custom-logo{max-height:64px}
}

/* Accueil : les colonnes colorées héritées de l'ancien thème (olive, bleu…) passent en cartes sombres,
   avec un filet jaune en tête pour garder un repère par rubrique */
.home .entry-content .kt-row-column-wrap > .wp-block-kadence-column > .kt-inside-inner-col{
  background-color:var(--lh-surface)!important;border:1px solid var(--lh-line);border-top:3px solid var(--lh-accent);border-radius:2px}
.home .entry-content .wp-block-kadence-column .wp-block-kadence-posts .kb-post-list-item{background:var(--lh-surface-2)!important}
.home .entry-content .kt-row-column-wrap{background:transparent!important}
.home .entry-content .wp-block-kadence-rowlayout > .kt-row-column-wrap,
.home .entry-content .kt-row-layout-inner{background-color:transparent!important}
.home .entry-content .kt-inside-inner-col h2,.home .entry-content .kt-inside-inner-col h3{color:var(--lh-head)}
.home .entry-content .kt-inside-inner-col p{color:var(--lh-text)!important}
.home .entry-content .kt-inside-inner-col p.has-text-color,.home .entry-content .kt-inside-inner-col p[style*="color"]{color:var(--lh-text)!important}
