/* ============================================================================
   dodofacile — « Nuit & sérénité »
   Feuille de style complète : polices locales + châssis (header, hero, home,
   archives, footer) + composants éditoriaux ns-*. Portée de la maquette.
   Le thème enfant fournit ses propres templates (header/footer/front-page/…),
   donc ce CSS est autonome et n'a pas besoin de surcharger les variables Kadence.
   ============================================================================ */

/* ---------- Polices auto-hébergées (RGPD + perf, pas de Google Fonts) -------- */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 600; font-display: swap;
  src: url("fonts/fraunces-600-italic.woff2") format("woff2");
}
@font-face {
  font-family: "InterNS"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "InterNS"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "InterNS"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "InterNS"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/inter-700.woff2") format("woff2");
}

:root {
  --night:    #131C36;
  --night-2:  #1B2A4E;
  --ground:   #F6F2E9;
  --surface:  #FFFFFF;
  --text:     #1B2240;
  --muted:    #5A6178;
  --accent:   #C9A24B;
  --accent-d: #8a6d28;
  --accent-2: #8E9BC0;
  --line:     #E2DBCB;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "InterNS", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --read: 720px;
  --radius: 14px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.nuit-serenite {
  margin: 0; background: var(--ground); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.nuit-serenite img { max-width: 100%; height: auto; display: block; }
body.nuit-serenite a { color: var(--accent-d); }
.ns-skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #20180a; padding: 10px 16px; z-index: 999; }
.ns-skip:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
/* Titres en serif Fraunces — !important pour battre la CSS dynamique de Kadence */
body.nuit-serenite h1, body.nuit-serenite h2, body.nuit-serenite h3, body.nuit-serenite h4,
body.nuit-serenite .ns-brand b, body.nuit-serenite .ns-feature h3, body.nuit-serenite .ns-card h3,
body.nuit-serenite .ns-pcard h3, body.nuit-serenite .entry-content h2, body.nuit-serenite .entry-content h3 {
  font-family: var(--serif) !important; font-weight: 600; letter-spacing: -.01em;
}
body.nuit-serenite, body.nuit-serenite p, body.nuit-serenite li, body.nuit-serenite .eyebrow,
body.nuit-serenite .ns-nav, body.nuit-serenite .badge, body.nuit-serenite .meta {
  font-family: var(--sans);
}

.eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }

/* ---------- Header / topbar ---------- */
.ns-topbar { background: var(--night); color: #EDEAF2; position: sticky; top: 0; z-index: 100; }
.ns-topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.ns-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
.ns-brand .moon { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #FBEFCB 0%, var(--accent) 55%, #9b7a2f 100%); box-shadow: 0 0 18px rgba(201,162,75,.45); flex: none; }
.ns-brand img { max-height: 34px; width: auto; }
.ns-brand b { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.ns-brand b span { color: var(--accent); }
.ns-nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.ns-nav a { text-decoration: none; color: #C8CCDD; font-size: 14.5px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .18s, border-color .18s; }
.ns-nav a:hover, .ns-nav a:focus-visible, .ns-nav .current-menu-item > a { color: #fff; border-color: var(--accent); outline: none; }
.ns-burger { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; }

/* ---------- Hero ---------- */
.ns-hero { position: relative; background: var(--night); color: #F2EFE6; overflow: hidden; }
.ns-hero #sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ns-hero-glow { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(to top, rgba(201,162,75,.30), rgba(201,162,75,.06) 55%, transparent); pointer-events: none; }
.ns-hero .wrap { position: relative; padding: 84px 24px 92px; }
.ns-hero-inner { max-width: 660px; }
.ns-hero h1 { font-size: clamp(38px, 6.2vw, 68px); line-height: 1.04; margin: 0 0 22px; color: #FCF8EE; }
.ns-hero h1 em { font-style: italic; color: var(--accent); }
.ns-hero p { font-size: clamp(17px, 2.4vw, 20px); color: #C9CDDD; margin: 0 0 30px; max-width: 540px; }

/* ---------- Boutons ---------- */
.ns-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--accent); color: #20180a; text-decoration: none; font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.ns-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(201,162,75,.35); }
.ns-btn .arr { transition: transform .15s; }
.ns-btn:hover .arr { transform: translateX(3px); }
.ns-btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* ---------- Sections & entêtes ---------- */
.ns-section { padding: 72px 0; }
.ns-section.tight { padding: 52px 0; }
.ns-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.ns-sec-head h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 0; }
.ns-sec-head a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ns-sec-head a:hover { color: var(--text); }

/* ---------- À la une ---------- */
.ns-feature { display: grid; grid-template-columns: 1.15fr .85fr; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.ns-feature .ns-ph, .ns-feature .ns-fimg { min-height: 340px; width: 100%; object-fit: cover; }
.ns-feature .fbody { padding: 40px 42px; display: flex; flex-direction: column; justify-content: center; }
.ns-feature h3 { font-size: clamp(25px, 3vw, 34px); line-height: 1.12; margin: 0 0 16px; }
.ns-feature h3 a { color: inherit; text-decoration: none; }
.ns-feature p { color: var(--muted); margin: 0 0 22px; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.byline .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--night-2), var(--accent-2)); flex: none; object-fit: cover; }
.byline b { color: var(--text); font-weight: 600; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); display: inline-block; }

/* ---------- Piliers ---------- */
.ns-pillars { background: var(--night); color: #ECEAF3; }
.ns-pillars .eyebrow { color: var(--accent); }
.ns-pillars h2 { color: #F8F4EA; }
.ns-pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.ns-pcard { text-decoration: none; color: #EDEBF4; background: var(--night-2); border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 24px 22px 22px; transition: border-color .18s, transform .18s, background .18s; display: block; }
.ns-pcard:hover { border-color: var(--accent); transform: translateY(-3px); background: #21315a; }
.ns-pcard .ic { width: 38px; height: 38px; margin-bottom: 16px; color: var(--accent); }
.ns-pcard h3 { font-size: 19px; margin: 0 0 7px; color: #FBF7EE; }
.ns-pcard span { font-size: 13.5px; color: #A7AEC6; }

/* ---------- Grille d'articles ---------- */
.ns-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ns-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.ns-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27,34,64,.10); }
.ns-card .ns-ph, .ns-card .ns-thumb { height: 184px; width: 100%; object-fit: cover; }
.ns-card .cbody { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.ns-card .cat { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; text-decoration: none; }
.ns-card h3 { font-size: 20px; line-height: 1.2; margin: 0 0 14px; }
.ns-card h3 a { color: inherit; text-decoration: none; }
.ns-card h3 a:hover { color: var(--accent-d); }
.ns-card .meta { margin-top: auto; font-size: 13px; color: var(--muted); }

/* ---------- Placeholders dégradés (filet quand pas d'image) ---------- */
.ns-ph { position: relative; background: var(--night); }
.ns-ph[data-label]::after { content: attr(data-label); position: absolute; left: 14px; bottom: 12px; font-family: var(--sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.ns-ph.p1 { background: linear-gradient(135deg, #1B2A4E 0%, #2E4577 60%, #C9A24B 130%); }
.ns-ph.p2 { background: linear-gradient(150deg, #20305A 0%, #4C5C86 100%); }
.ns-ph.p3 { background: linear-gradient(135deg, #2A2140 0%, #5E4C7A 100%); }
.ns-ph.p4 { background: linear-gradient(135deg, #14233F 0%, #3C6E82 100%); }
.ns-ph.p5 { background: linear-gradient(160deg, #3A2C1A 0%, #C9A24B 120%); }
.ns-ph.p6 { background: linear-gradient(135deg, #122038 0%, #243a66 55%, #d8b25c 135%); }

/* ---------- Bande crédibilité ---------- */
.ns-trust { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ns-trust .wrap { display: flex; align-items: center; gap: 40px; padding: 40px 24px; flex-wrap: wrap; }
.ns-trust .av-lg { width: 78px; height: 78px; border-radius: 50%; background: linear-gradient(135deg, var(--night-2), var(--accent-2)); flex: none; object-fit: cover; }
.ns-trust .ttxt { flex: 1; min-width: 280px; }
.ns-trust h3 { font-size: 22px; margin: 0 0 8px; }
.ns-trust p { margin: 0; color: var(--muted); font-size: 15px; }
.ns-trust .badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.badge { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; }

/* ---------- Fil d'Ariane ---------- */
.ns-breadcrumb { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.ns-breadcrumb a { color: var(--muted); text-decoration: none; }
.ns-breadcrumb a:hover { color: var(--accent-d); }
.ns-breadcrumb .sep { margin: 0 8px; color: var(--line); }

/* ---------- Article (single) ---------- */
.ns-art-hero { background: var(--night); color: #F3F0E7; }
.ns-art-hero .wrap { padding: 44px 24px 0; max-width: 860px; }
.ns-art-hero .cat { color: var(--accent); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.ns-art-hero h1 { font-size: clamp(30px, 4.8vw, 50px); line-height: 1.08; margin: 16px 0 22px; color: #FCF8EE; }
.ns-art-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #B9BFD4; flex-wrap: wrap; padding-bottom: 34px; }
.ns-art-meta b { color: #fff; font-weight: 600; }
.ns-art-meta .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--night-2),var(--accent-2)); display: inline-block; object-fit: cover; }
.ns-art-cover { height: clamp(220px, 38vw, 380px); width: 100%; object-fit: cover; }

.ns-article { max-width: var(--read); margin: 0 auto; padding: 0 24px; }
.entry-content, .ns-article-flow { padding: 44px 0 20px; }
.entry-content > *:first-child { margin-top: 0; }
.ns-article .lead, .entry-content .lead { font-size: 20px; line-height: 1.55; color: #2c3350; font-family: var(--serif); margin: 0 0 30px; }
.entry-content h2 { font-size: 28px; margin: 40px 0 14px; }
.entry-content h3 { font-size: 22px; margin: 30px 0 12px; }
.entry-content p { margin: 0 0 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 22px; }
.entry-content li { margin: 0 0 8px; }
.entry-content a { color: var(--accent-d); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.entry-content img { border-radius: 12px; margin: 24px 0; }
.entry-content blockquote { border-left: 4px solid var(--accent); margin: 24px 0; padding: 6px 0 6px 20px; color: var(--muted); font-style: italic; }

/* Composants éditoriaux ns-* (présents dans le contenu des 118 articles) */
.ns-keybox { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 22px 24px; margin: 28px 0; }
.ns-keybox h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.ns-keybox ul { margin: 0; padding-left: 20px; }
.ns-keybox li { margin: 0 0 7px; }

.ns-adslot { border: 1px dashed #C9C0AC; border-radius: 10px; min-height: 96px; display: flex; align-items: center; justify-content: center; color: #9a916f; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 30px 0; background: repeating-linear-gradient(45deg, #faf7ef, #faf7ef 10px, #f4efe2 10px, #f4efe2 20px); }

.ns-faq { border-top: 1px solid var(--line); margin: 36px 0; }
.ns-faq h2 { font-size: 26px; margin: 24px 0 4px; }
.ns-faq details { border-bottom: 1px solid var(--line); }
.ns-faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--serif); font-size: 19px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.ns-faq summary::-webkit-details-marker { display: none; }
.ns-faq summary::after { content: "+"; color: var(--accent); font-family: var(--sans); font-size: 24px; line-height: 1; }
.ns-faq details[open] summary::after { content: "\2013"; }
.ns-faq .ns-answer { padding: 0 0 18px; color: var(--muted); }

.ns-sources { background: #20305A; color: #DCE0EE; border-radius: 14px; padding: 24px 26px; margin: 30px 0; }
.ns-sources h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.ns-sources ol { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.ns-sources a { color: #EBD9A8; }

.ns-disclaimer { font-size: 13px; color: var(--muted); font-style: italic; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 30px; }

.ns-author { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin: 34px 0; }
.ns-author .ns-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--night-2), var(--accent-2)); flex: none; object-fit: cover; }
.ns-author h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 19px; }
.ns-author .ns-role { font-size: 13px; color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.ns-author p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Articles connexes ---------- */
.ns-related { max-width: var(--read); margin: 40px auto; padding: 0 24px; }
.ns-related h2 { font-size: 22px; margin: 0 0 18px; }
.ns-related .ns-grid3 { grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------- Archives / listes ---------- */
.ns-arch-hero { background: var(--night); color: #F3F0E7; }
.ns-arch-hero .wrap { padding: 48px 24px; }
.ns-arch-hero h1 { font-size: clamp(28px, 4.2vw, 44px); margin: 0 0 10px; color: #FCF8EE; }
.ns-arch-hero p { color: #C9CDDD; margin: 0; max-width: 640px; }

/* ---------- Pagination ---------- */
.ns-pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 40px 0; }
.ns-pagination a, .ns-pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); font-size: 14px; }
.ns-pagination .current { background: var(--night); color: #fff; border-color: var(--night); }
.ns-pagination a:hover { border-color: var(--accent); }

/* ---------- 404 / recherche ---------- */
.ns-center { max-width: 620px; margin: 0 auto; padding: 90px 24px; text-align: center; }
.ns-center h1 { font-size: clamp(40px, 8vw, 90px); margin: 0 0 10px; color: var(--night); }
.ns-search-form { display: flex; gap: 8px; max-width: 440px; margin: 22px auto 0; }
.ns-search-form input[type=search] { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }

/* ---------- Footer ---------- */
.ns-footer { background: var(--night); color: #AEB4CC; padding: 54px 0 30px; }
.ns-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.ns-footer h5 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 14px; }
.ns-footer a { display: block; color: #AEB4CC; text-decoration: none; font-size: 14px; margin: 0 0 9px; }
.ns-footer a:hover { color: var(--accent); }
.ns-footer .fdesc { font-size: 14px; color: #9098b4; max-width: 280px; margin: 0; }
.ns-footer ul { list-style: none; margin: 0; padding: 0; }
.ns-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; font-size: 12.5px; color: #818aa6; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ns-pgrid, .ns-grid3, .ns-related .ns-grid3 { grid-template-columns: repeat(2, 1fr); }
  .ns-feature { grid-template-columns: 1fr; }
  .ns-feature .ns-ph, .ns-feature .ns-fimg { min-height: 220px; }
  .ns-footer .cols { grid-template-columns: 1fr 1fr; }
  .ns-nav { position: fixed; inset: 72px 0 auto 0; background: var(--night); flex-direction: column; gap: 0; padding: 8px 24px 20px; display: none; border-top: 1px solid rgba(255,255,255,.08); }
  .ns-nav.open { display: flex; }
  .ns-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); width: 100%; }
  .ns-burger { display: block; }
}
@media (max-width: 580px) {
  .ns-pgrid, .ns-grid3, .ns-related .ns-grid3 { grid-template-columns: 1fr; }
  .ns-footer .cols { grid-template-columns: 1fr; }
  .ns-sec-head { flex-direction: column; gap: 4px; }
  .ns-hero .wrap { padding: 60px 24px 66px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ns-btn, .ns-card, .ns-pcard { transition: none; }
}
