/*
Theme Name: Shemonline
Theme URI: https://shemonline.org
Author: Shemonline
Author URI: https://shemonline.org
Description: Thème magazine éditorial et moderne pour Shemonline.org — grille modulaire à cadres, typographie affirmée, orange signature. Actualités, formation, cuisine, lifestyle et voyage.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shemonline
Tags: blog, news, magazine, education, two-columns, custom-menu, featured-images, translation-ready
*/

/* ====================== TOKENS ====================== */
:root {
  --ink: #14110D;
  --orange: #EC5A16;
  --paper: #F4EFE6;
  --sand: #E9E2D4;
  --muted: #4A443B;
  --grey: #8A8072;
  --line: #D8CFBE;
  --maxw: 1200px;
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-serif: 'Source Serif 4', Georgia, serif;
  --f-ui: 'Public Sans', system-ui, sans-serif;
}

/* ====================== RESET ====================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-ui);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: var(--orange); color: var(--paper); }
h1, h2, h3, h4, h5 { margin: 0; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ====================== TICKER ====================== */
.sm-ticker {
  background: var(--ink); color: var(--paper);
  font-family: var(--f-display); font-size: 12px; font-weight: 500; letter-spacing: .04em;
}
.sm-ticker .container { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.sm-ticker__date { display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.sm-ticker__date::before { content: ""; width: 8px; height: 8px; background: var(--orange); display: inline-block; }
.sm-ticker__tag { text-transform: uppercase; letter-spacing: .12em; color: rgba(244,239,246,.7); }

/* ====================== HEADER ====================== */
.sm-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 3px solid var(--ink); }
.sm-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
.sm-brand { display: inline-flex; align-items: center; gap: 12px; }
.sm-brand__mark {
  width: 44px; height: 44px; background: var(--orange); border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--f-display); font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1; flex: none;
}
.sm-brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.sm-brand__word { font-family: var(--f-display); font-size: 27px; font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; color: var(--ink); line-height: 1; }
.sm-nav { display: flex; align-items: center; gap: 22px; }
.sm-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.sm-nav a { font-family: var(--f-display); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.sm-nav a:hover { color: var(--orange); }
.sm-nav .current-menu-item > a { color: var(--orange); }
.sm-search-btn { width: 36px; height: 36px; border: 2px solid var(--ink); background: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; color: var(--ink); }
.sm-burger { display: none; }

/* category strip */
.sm-catstrip { background: var(--ink); }
.sm-catstrip .container { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; padding-left: 28px; padding-right: 28px; }
.sm-catstrip::-webkit-scrollbar, .sm-nav::-webkit-scrollbar { display: none; }
.sm-catstrip a { white-space: nowrap; font-family: var(--f-display); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--paper); padding: 11px 18px; border-right: 1px solid rgba(244,239,246,.16); }
.sm-catstrip a:hover { background: var(--orange); color: var(--ink); }

/* ====================== BUTTONS / TAGS ====================== */
.sm-tag { display: inline-block; font-family: var(--f-display); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--orange); color: var(--ink); padding: 4px 8px; }
.sm-tag--solid { background: var(--ink); color: var(--paper); padding: 6px 12px; font-size: 11px; letter-spacing: .12em; }
.sm-meta { font-family: var(--f-display); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }

/* ====================== HERO ====================== */
.sm-hero { display: grid; grid-template-columns: 1fr 1fr; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--orange); background: var(--paper); margin: 40px 0 24px; color: var(--ink); }
.sm-hero__media { position: relative; aspect-ratio: 1/1; border-right: 3px solid var(--ink); overflow: hidden; }
.sm-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.sm-hero__body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.sm-hero__body .sm-tag--solid { align-self: flex-start; margin-bottom: 22px; }
.sm-hero h1 { font-family: var(--f-display); font-weight: 700; font-size: 42px; line-height: 1.02; letter-spacing: -.03em; margin-bottom: 20px; }
.sm-hero p { font-family: var(--f-serif); font-size: 18px; line-height: 1.55; color: var(--muted); margin: 0 0 26px; }
.sm-hero__meta { font-family: var(--f-display); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ====================== TRENDING BAND ====================== */
.sm-trending { background: var(--ink); padding: 30px 34px; margin: 24px 0; }
.sm-trending__title { font-family: var(--f-display); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); margin-bottom: 20px; }
.sm-trending__grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.sm-trending__item { color: var(--paper); padding: 0 22px; border-right: 1px solid rgba(244,239,246,.16); }
.sm-trending__item:last-child { border-right: none; }
.sm-trending__rank { font-family: var(--f-display); font-size: 34px; font-weight: 700; color: var(--orange); line-height: 1; margin-bottom: 10px; }
.sm-trending__cat { font-family: var(--f-display); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(244,239,246,.55); margin-bottom: 6px; }
.sm-trending__item h4 { font-family: var(--f-serif); font-weight: 500; font-size: 16px; line-height: 1.24; }
.sm-trending__item h4 a { color: var(--paper); }
.sm-trending__item h4 a:hover { color: var(--orange); }

/* ====================== SECTION HEADS ====================== */
.sm-sechead { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.sm-sechead h2 { font-family: var(--f-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; }
.sm-sechead__rule { flex: 1; height: 3px; background: var(--ink); }

/* ====================== CARD ====================== */
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.sm-card { display: block; color: inherit; border: 2px solid var(--ink); background: var(--paper); transition: box-shadow .12s ease; }
.sm-card:hover { box-shadow: 6px 6px 0 var(--ink); color: inherit; }
.sm-card__media { aspect-ratio: 3/2; border-bottom: 2px solid var(--ink); overflow: hidden; background: var(--sand); }
.sm-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sm-card__body { padding: 18px 20px 22px; }
.sm-card h3 { font-family: var(--f-display); font-weight: 700; font-size: 20px; line-height: 1.12; letter-spacing: -.01em; margin: 14px 0 10px; }
.sm-card p { font-family: var(--f-serif); font-size: 14.5px; line-height: 1.5; color: var(--muted); margin: 0 0 12px; }

/* ====================== FORMATION SPOTLIGHT ====================== */
.sm-dossier { background: var(--orange); margin-top: 30px; }
.sm-dossier__inner { padding: 60px 0; }
.sm-dossier__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.sm-dossier__head h2 { font-family: var(--f-display); font-weight: 700; font-size: 40px; letter-spacing: -.03em; text-transform: uppercase; color: var(--ink); }
.sm-dossier__more { font-family: var(--f-display); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); border-bottom: 3px solid var(--ink); padding-bottom: 3px; }
.sm-dossier__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.sm-dossier__feat { color: inherit; background: var(--paper); border: 3px solid var(--ink); }
.sm-dossier__feat .sm-card__media { border-bottom: 3px solid var(--ink); aspect-ratio: 16/9; }
.sm-dossier__feat .sm-body { padding: 26px 30px; }
.sm-dossier__feat h3 { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1.08; letter-spacing: -.02em; margin-bottom: 12px; }
.sm-dossier__feat p { font-family: var(--f-serif); font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.sm-dossier__list { display: flex; flex-direction: column; }
.sm-dossier__list a { color: var(--ink); padding: 20px 0; border-top: 2px solid var(--ink); }
.sm-dossier__list .tag { font-family: var(--f-display); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sm-dossier__list h4 { font-family: var(--f-display); font-weight: 700; font-size: 21px; line-height: 1.1; letter-spacing: -.01em; margin-top: 8px; }

/* ====================== ARTICLE ====================== */
.sm-single { background: var(--paper); border-top: 6px solid var(--orange); }
.sm-arthead { background: var(--ink); color: var(--paper); }
.sm-arthead__inner { max-width: 900px; margin: 0 auto; padding: 46px 28px 40px; }
.sm-breadcrumb { font-family: var(--f-display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(244,239,246,.55); margin-bottom: 22px; }
.sm-breadcrumb a { color: rgba(244,239,246,.55); }
.sm-breadcrumb a:hover { color: var(--orange); }
.sm-arthead h1 { font-family: var(--f-display); font-weight: 700; font-size: 46px; line-height: 1.02; letter-spacing: -.03em; margin: 14px 0 18px; }
.sm-arthead__dek { font-family: var(--f-serif); font-size: 20px; line-height: 1.5; color: rgba(244,239,246,.78); margin: 0 0 26px; }
.sm-byline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid rgba(244,239,246,.2); padding-top: 20px; }
.sm-byline__author { display: flex; align-items: center; gap: 14px; }
.sm-byline__avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid var(--orange); flex: none; }
.sm-byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sm-byline__name { font-family: var(--f-display); font-size: 13px; }
.sm-byline__name b { font-weight: 700; }
.sm-byline__name span { display: block; color: rgba(244,239,246,.55); }
.sm-share { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-share a { font-family: var(--f-display); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--paper); border: 1px solid rgba(244,239,246,.4); padding: 7px 13px; }
.sm-share a:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }

.sm-artmedia { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
.sm-artmedia__frame { aspect-ratio: 16/9; border: 3px solid var(--ink); border-top: none; overflow: hidden; background: var(--sand); }
.sm-artmedia__frame img { width: 100%; height: 100%; object-fit: cover; }
.sm-artmedia__cap { font-family: var(--f-serif); font-size: 12.5px; color: var(--grey); font-style: italic; margin: 10px 2px 0; }

.sm-artlayout { max-width: 1040px; margin: 0 auto; padding: 40px 28px 20px; display: grid; grid-template-columns: 230px 1fr; gap: 46px; align-items: start; }
.sm-toc { position: sticky; top: 90px; }
.sm-toc__box { border: 2px solid var(--ink); padding: 20px; }
.sm-toc h4 { font-family: var(--f-display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; color: var(--orange); }
.sm-toc a { display: block; font-family: var(--f-display); font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--ink); padding: 8px 0; border-bottom: 1px solid var(--line); }
.sm-toc a:last-child { border-bottom: none; }
.sm-toc a:hover, .sm-toc a.is-active { color: var(--orange); }

.sm-body { font-family: var(--f-serif); font-size: 19px; line-height: 1.72; color: #26221C; }
.sm-body > p:first-of-type { font-size: 21px; line-height: 1.6; }
.sm-body p { margin: 0 0 24px; }
.sm-body h2 { font-family: var(--f-display); font-weight: 700; font-size: 27px; letter-spacing: -.02em; margin: 40px 0 16px; scroll-margin-top: 90px; }
.sm-body h3 { font-family: var(--f-display); font-weight: 700; font-size: 22px; margin: 32px 0 12px; scroll-margin-top: 90px; }
.sm-body img { margin: 34px 0; border: 3px solid var(--ink); }
.sm-body ul, .sm-body ol { margin: 0 0 24px; padding-left: 22px; }
.sm-body li { margin-bottom: 8px; }
.sm-body a { text-decoration: underline; text-underline-offset: 3px; }
.sm-body blockquote {
  margin: 34px 0; padding: 26px 30px; background: var(--ink); color: var(--paper);
  font-family: var(--f-display); font-weight: 600; font-size: 24px; line-height: 1.3; border-left: 8px solid var(--orange);
}
.sm-body blockquote p { margin: 0; }

/* author bio */
.sm-bio { max-width: 1040px; margin: 0 auto; padding: 20px 28px 44px; }
.sm-bio__box { display: flex; gap: 22px; align-items: center; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--orange); padding: 26px 30px; background: var(--paper); }
.sm-bio__avatar { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid var(--ink); }
.sm-bio__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sm-bio .tag { font-family: var(--f-display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.sm-bio h4 { font-family: var(--f-display); font-weight: 700; font-size: 22px; margin: 4px 0 6px; }
.sm-bio p { font-family: var(--f-serif); font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }

/* related */
.sm-related { background: var(--sand); border-top: 3px solid var(--ink); }
.sm-related__inner { padding: 50px 0; }

/* ====================== ARCHIVE / CATEGORY ====================== */
.sm-archive { background: var(--paper); border-top: 6px solid var(--ink); }
.sm-catbanner { background: var(--ink); color: var(--paper); }
.sm-catbanner__inner { padding: 54px 0; }
.sm-catbanner h1 { font-family: var(--f-display); font-weight: 700; font-size: 72px; letter-spacing: -.04em; text-transform: uppercase; margin: 0 0 16px; color: var(--orange); }
.sm-catbanner p { font-family: var(--f-serif); font-size: 18px; line-height: 1.55; color: rgba(244,239,246,.78); max-width: 56ch; margin: 0 0 24px; }
.sm-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.sm-chips a { font-family: var(--f-display); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--paper); border: 1px solid rgba(244,239,246,.4); padding: 8px 15px; }
.sm-chips a:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }

.sm-catfeat { color: inherit; display: grid; grid-template-columns: 1.3fr 1fr; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--orange); margin: 40px 0 20px; }
.sm-catfeat__media { aspect-ratio: 16/10; border-right: 3px solid var(--ink); overflow: hidden; background: var(--sand); }
.sm-catfeat__media img { width: 100%; height: 100%; object-fit: cover; }
.sm-catfeat__body { padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; }
.sm-catfeat__body .sm-tag--solid { align-self: flex-start; margin-bottom: 18px; }
.sm-catfeat h2 { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1.04; letter-spacing: -.02em; margin-bottom: 14px; }
.sm-catfeat p { font-family: var(--f-serif); font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0 0 16px; }

/* pagination */
.sm-pagination { display: flex; justify-content: center; gap: 0; padding: 30px 0 60px; }
.sm-pagination .page-numbers {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 600; font-size: 15px; border: 2px solid var(--ink); border-left: none; color: var(--ink);
}
.sm-pagination .page-numbers:first-child { border-left: 2px solid var(--ink); }
.sm-pagination .page-numbers.current { background: var(--ink); color: var(--paper); font-weight: 700; }
.sm-pagination a.page-numbers:hover { background: var(--orange); color: var(--ink); }

/* ====================== PAGE (legal) ====================== */
.sm-page { background: var(--paper); border-top: 6px solid var(--orange); min-height: 60vh; }
.sm-page__inner { max-width: 780px; margin: 0 auto; padding: 56px 28px 64px; }
.sm-page h1 { font-family: var(--f-display); font-weight: 700; font-size: 44px; letter-spacing: -.03em; text-transform: uppercase; margin-bottom: 28px; }
.sm-page .sm-body { font-size: 17px; }

/* ====================== FOOTER ====================== */
.sm-footer { background: var(--ink); color: var(--paper); }
.sm-footer__cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding: 54px 0 30px; }
.sm-footer__brand .sm-brand { margin-bottom: 18px; }
.sm-footer__brand .sm-brand__mark { box-shadow: none; }
.sm-footer__brand .sm-brand__word { color: var(--paper); }
.sm-footer__brand p { font-family: var(--f-serif); font-size: 14px; line-height: 1.6; color: rgba(244,239,246,.65); margin: 0; max-width: 34ch; }
.sm-footer h5 { font-family: var(--f-display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.sm-footer__cols a { display: block; font-size: 13.5px; color: rgba(244,239,246,.8); padding: 5px 0; }
.sm-footer__cols a:hover { color: var(--orange); }
.sm-footer__cols ul { list-style: none; margin: 0; padding: 0; }
.sm-footer__bar { border-top: 1px solid rgba(244,239,246,.16); }
.sm-footer__bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 18px; padding-bottom: 18px; font-family: var(--f-display); font-size: 12px; letter-spacing: .04em; color: rgba(244,239,246,.5); }
.sm-footer__bar .social { display: flex; gap: 18px; text-transform: uppercase; }
.sm-footer__bar .social a { color: rgba(244,239,246,.8); }

/* ====================== SEARCH OVERLAY ====================== */
.sm-searchbox { display: none; background: var(--ink); }
.sm-searchbox.is-open { display: block; }
.sm-searchbox .container { padding-top: 20px; padding-bottom: 20px; }
.sm-searchbox form { display: flex; gap: 10px; }
.sm-searchbox input[type=search] { flex: 1; font-family: var(--f-serif); font-size: 18px; padding: 14px 16px; border: 2px solid var(--orange); background: var(--paper); color: var(--ink); }
.sm-searchbox button { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--orange); color: var(--ink); border: none; padding: 0 24px; cursor: pointer; }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 900px) {
  .sm-header .container { flex-wrap: wrap; }
  .sm-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--ink); background: transparent; cursor: pointer; }
  .sm-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 3px solid var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: 0; display: none; }
  .sm-nav.is-open { display: flex; }
  .sm-nav ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .sm-nav li { border-top: 1px solid var(--line); }
  .sm-nav a { display: block; padding: 14px 28px; }
  .sm-nav .sm-search-btn { display: none; }
  .sm-hero, .sm-dossier__grid, .sm-catfeat { grid-template-columns: 1fr; }
  .sm-hero__media, .sm-catfeat__media { border-right: none; border-bottom: 3px solid var(--ink); }
  .sm-hero h1 { font-size: 32px; }
  .sm-trending__grid { grid-template-columns: 1fr 1fr; gap: 20px 0; }
  .sm-grid { grid-template-columns: 1fr 1fr; }
  .sm-artlayout { grid-template-columns: 1fr; }
  .sm-toc { position: static; }
  .sm-arthead h1 { font-size: 34px; }
  .sm-catbanner h1 { font-size: 46px; }
  .sm-footer__cols { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .sm-grid, .sm-trending__grid { grid-template-columns: 1fr; }
  .sm-hero__body { padding: 26px; }
  .sm-footer__cols { grid-template-columns: 1fr; }
  .sm-ticker__tag { display: none; }
}
