/*
Theme Name: CTT Étampes — Audacieux
Theme URI: https://ctt-etampes.fr/
Author: Key Performance Group
Description: Thème WordPress du Club de Tennis de Table d'Étampes. Direction artistique « Audacieux » : color-block, typographie XXL, mosaïque d'actualités. Polices auto-hébergées, aucun appel à un service tiers.
Version: 1.0.0
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ctt-etampes
Tags: sports, association, custom-colors, custom-menu, custom-logo, featured-images, block-styles, wide-blocks, translation-ready
*/

/* ============================================================
   1. BASE / TOKENS
   ============================================================ */
/* ============================================================
   CTT Étampes — refonte
   Tokens pilotés par les Tweaks via variables CSS sur .site
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

.site {
  /* valeurs par défaut (écrasées en inline par l'app) */
  --primary: #1CA8E1;
  --ink: #26384B;
  --accent: #E63525;
  --bg: #F4F7FA;
  --surface: #FFFFFF;
  --surface-2: #EEF3F8;
  --text: #1E2A37;
  --text-soft: #61707E;
  --border: #E2E9F0;
  --on-primary: #FFFFFF;
  --on-ink: #FFFFFF;
  --radius: 16px;
  --radius-btn: 12px;
  --sp: 1;
  --font-head: "Bricolage Grotesque", sans-serif;
  --font-body: "Mulish", sans-serif;
  --section-pad: calc(104px * var(--sp));
  --shadow-sm: 0 2px 8px rgba(20,40,60,.06);
  --shadow-md: 0 14px 40px rgba(20,40,60,.12);
  --shadow-lg: 0 30px 70px rgba(20,40,60,.18);

  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--base-fs, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

.site h1, .site h2, .site h3, .site h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.05;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site.upper h1, .site.upper h2, .site.upper .sec-title { text-transform: uppercase; letter-spacing: 0.005em; }
.site p { margin: 0; }
.site a { color: inherit; text-decoration: none; }
.site img { display: block; max-width: 100%; }

.container { width: min(1200px, 92vw); margin: 0 auto; }
.container-wide { width: min(1340px, 94vw); margin: 0 auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-weight: 800; font-size: .98rem;
  padding: .9em 1.5em; border-radius: var(--radius-btn);
  border: 2px solid transparent; cursor: pointer; line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  letter-spacing: .005em; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 22px -8px var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px var(--primary); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px -8px var(--accent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px var(--accent); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-lg { padding: 1.05em 1.9em; font-size: 1.05rem; }

.sec-kicker {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary);
}
.sec-title { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.sec-lead { color: var(--text-soft); font-size: 1.1rem; max-width: 46ch; }

/* tonalités d'accent (icônes horaires) */
.tone-rose { --tone: #EC4368; }
.tone-cyan { --tone: #1BBBDF; }
.tone-vert { --tone: #57B947; }
.tone-violet { --tone: #9B59C9; }

/* ===========================================================
   NAV (base commune, variantes par proposition)
   =========================================================== */
.nav { position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 800; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 800; flex-shrink: 0; position: relative;
  font-family: var(--font-head); font-size: 1.05rem; box-shadow: var(--shadow-sm);
}
.brand-mark::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt b { font-size: 1.08rem; color: var(--ink); letter-spacing: -.01em; }
.brand-txt span { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 700; font-size: .96rem; color: var(--text); transition: color .15s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 920px) { .nav-links { display: none; } }

/* ===========================================================
   SECTION HEADERS génériques
   =========================================================== */
.sec { padding: var(--section-pad) 0; }
.sec-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: calc(52px * var(--sp)); }
.sec-head.center { align-items: center; text-align: center; }
.sec-head.center .sec-lead { text-align: center; }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* news : tag catégorie */
.cat-tag {
  display: inline-flex; align-items: center; gap: .4em; font-weight: 800; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--primary);
}
.cat-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cat-Administratif { color: var(--accent); }
.cat-Sportif { color: var(--primary); }
.cat-Vie\ du\ club { color: #9B59C9; }

/* avatar monogramme */
.avatar { display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: #fff; background: var(--ink); }
.avatar.a1 { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #000)); }

/* image-slot reset pour s'intégrer */
image-slot { display: block; width: 100%; height: 100%; }

footer.foot { background: var(--ink); color: rgba(255,255,255,.7); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 34px 0; }
.foot a:hover { color: #fff; }
.foot-links { display: flex; gap: 22px; font-weight: 700; font-size: .92rem; }

/* ============================================================
   2. DIRECTION ARTISTIQUE « AUDACIEUX »
   ============================================================ */
/* ===========================================================
   PROPOSITION 3 — AUDACIEUX / GRAPHIQUE
   Color-block, formes géométriques, type XXL, mosaïque
   =========================================================== */
.p3 { --section-pad: calc(110px * var(--sp)); }
.p3 .nav { background: var(--ink); }
.p3 .nav-inner { padding: 16px 0; }
.p3 .brand-txt b { color: #fff; }
.p3 .brand-txt span { color: rgba(255,255,255,.55); }
.p3 .brand-mark { background: var(--accent); }
.p3 .brand-mark::after { background: var(--primary); }
.p3 .nav-links a { color: rgba(255,255,255,.82); }
.p3 .nav-links a:hover { color: #fff; }
.p3 .nav-ins { background: var(--accent); color: #fff; border-radius: var(--radius-btn); font-weight: 800; }
.p3 .nav-ins:hover { transform: translateY(-2px); }

/* HERO color-block */
.p3-hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.p3-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; min-height: clamp(520px, 62vw, 720px); }
.p3-hero-left { padding: clamp(48px, 6vw, 92px) clamp(36px, 5vw, 70px) clamp(48px, 6vw, 92px) 0; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 3; }
.p3-hero .tagline { display: inline-flex; align-items: center; gap: .6em; font-weight: 800; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
.p3-hero .tagline i { width: 26px; height: 4px; background: var(--accent); border-radius: 2px; }
.p3-hero h1 { color: #fff; font-size: clamp(3rem, 8vw, 7rem); line-height: .92; letter-spacing: -.03em; font-weight: 800; margin-top: 22px; text-transform: uppercase; }
.p3-hero h1 .o { color: var(--primary); }
.p3-hero h1 .stroke { color: transparent; -webkit-text-stroke: 2px var(--accent); }
.p3-hero p.lead { color: rgba(255,255,255,.8); font-size: 1.18rem; max-width: 42ch; margin-top: 28px; }
.p3-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.p3-hero-right { position: relative; background: var(--primary); overflow: hidden; }
.p3-hero-right .photo { position: absolute; inset: 0; }
.p3-hero-right .bigball { position: absolute; width: clamp(220px, 30vw, 360px); height: clamp(220px, 30vw, 360px); border-radius: 50%; background: #fff; left: -16%; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; box-shadow: 0 30px 80px rgba(0,0,0,.34); }
.p3-hero-right .bigball b { font-family: var(--font-head); font-weight: 800; color: var(--ink); font-size: clamp(1.4rem, 3vw, 2.4rem); text-align: center; line-height: .9; text-transform: uppercase; }
.p3-hero-right .bigball b span { display: block; color: var(--accent); font-size: .5em; letter-spacing: .1em; }
.p3-hero-badges { position: absolute; left: 0; bottom: 0; right: 0; z-index: 4; display: flex; }
.p3-hero-badges div { flex: 1; padding: 22px clamp(20px, 4vw, 44px); border-top: 2px solid rgba(255,255,255,.12); }
.p3-hero-badges div + div { border-left: 2px solid rgba(255,255,255,.12); }
.p3-hero-badges .n { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); color: #fff; line-height: 1; }
.p3-hero-badges .l { color: rgba(255,255,255,.6); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }

/* NEWS mosaic */
.p3-news { background: var(--bg); }
.p3-news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.p3-news-head h2 { font-size: clamp(2.4rem, 5vw, 4rem); text-transform: uppercase; font-weight: 800; letter-spacing: -.02em; }
.p3-mosaic { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.p3-mosaic .col { display: flex; flex-direction: column; gap: 22px; }
.p3-narticle { background: var(--surface); border-radius: var(--radius); overflow: hidden; position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.p3-narticle:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.p3-narticle.big .img { aspect-ratio: 16/10; }
.p3-narticle .img { position: relative; background: var(--surface-2); aspect-ratio: 16/8; }
.p3-narticle .catlab { position: absolute; left: 0; top: 18px; z-index: 2; background: var(--ink); color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; }
.p3-narticle.cat-on-accent .catlab { background: var(--accent); }
.p3-narticle.cat-on-primary .catlab { background: var(--primary); }
.p3-narticle .body { padding: 24px clamp(22px, 2.4vw, 30px) 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.p3-narticle.big h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.p3-narticle h3 { font-size: 1.4rem; text-transform: none; font-weight: 800; }
.p3-narticle p { color: var(--text-soft); }
.p3-narticle .meta { margin-top: auto; font-weight: 800; font-size: .82rem; color: var(--text-soft); display: flex; align-items: center; gap: .5em; }
.p3-narticle .meta .read { color: var(--primary); margin-left: auto; display: inline-flex; align-items: center; gap: .4em; }

/* HORAIRES blocks */
.p3-horaires { background: var(--ink); color: #fff; }
.p3-horaires .sec-title { color: #fff; }
.p3-horaires .sec-lead { color: rgba(255,255,255,.7); }
.p3-hgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.p3-hblock { background: var(--tone); border-radius: var(--radius); padding: 28px 24px 30px; color: #fff; position: relative; overflow: hidden; min-height: 230px; display: flex; flex-direction: column; transition: transform .2s; }
.p3-hblock::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.16); }
.p3-hblock:hover { transform: translateY(-6px); }
.p3-hblock .idx { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; line-height: 1; opacity: .9; }
.p3-hblock .day { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; margin-top: 14px; text-transform: uppercase; }
.p3-hblock .time { font-weight: 800; font-size: 1rem; margin-top: 4px; }
.p3-hblock .desc { font-size: .9rem; color: rgba(255,255,255,.92); margin-top: 12px; position: relative; z-index: 2; }

/* BUREAU */
.p3-bureau { background: var(--bg); }
.p3-bgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.p3-bcard { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s; }
.p3-bcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.p3-bphoto { aspect-ratio: 1/1; position: relative; background: var(--ink); }
.p3-bphoto .num { position: absolute; left: 16px; bottom: 12px; z-index: 2; font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: #fff; mix-blend-mode: difference; }
.p3-bcard .body { padding: 18px 22px 24px; }
.p3-bcard .role { display: inline-block; background: var(--primary); color: #fff; font-weight: 800; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 6px; }
.p3-bcard h3 { font-size: 1.22rem; margin-top: 12px; }
.p3-bcard p { color: var(--text-soft); font-size: .9rem; margin-top: 8px; }

/* INSCRIPTION giant */
.p3-ins { background: var(--accent); color: #fff; position: relative; overflow: hidden; }
.p3-ins::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 40px solid rgba(255,255,255,.12); right: -120px; top: -120px; }
.p3-ins::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.1); left: -60px; bottom: -80px; }
.p3-ins-inner { position: relative; z-index: 2; text-align: center; padding: calc(96px * var(--sp)) 0; display: flex; flex-direction: column; align-items: center; }
.p3-ins .tagline { font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: .84rem; color: rgba(255,255,255,.85); }
.p3-ins h2 { color: #fff; font-size: clamp(2.6rem, 6vw, 5rem); text-transform: uppercase; font-weight: 800; letter-spacing: -.02em; margin-top: 16px; }
.p3-ins p { color: rgba(255,255,255,.92); font-size: 1.2rem; max-width: 50ch; margin: 22px auto 0; }
.p3-ins-pts { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 30px 0 36px; }
.p3-ins-pts span { background: rgba(255,255,255,.16); border-radius: 999px; padding: 11px 20px; font-weight: 800; font-size: .92rem; }
.p3-ins .btn { background: #fff; color: var(--accent); }
.p3-ins .btn:hover { transform: translateY(-2px); }

/* PARTENAIRES + CONTACT */
.p3-part { background: var(--surface); }
.p3-part-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.p3-pblock { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 34px; display: flex; gap: 22px; align-items: center; position: relative; overflow: hidden; }
.p3-pblock .lg { width: 78px; height: 78px; border-radius: 16px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; flex-shrink: 0; }
.p3-pblock h3 { color: #fff; font-size: 1.3rem; }
.p3-pblock p { color: rgba(255,255,255,.7); margin-top: 8px; font-size: .95rem; }

.p3-contact { background: var(--bg); }
.p3-contact-grid { display: grid; grid-template-columns: 1fr 1fr; }
.p3-contact-left { background: var(--ink); color: #fff; border-radius: var(--radius) 0 0 var(--radius); padding: clamp(40px, 5vw, 64px); }
.p3-contact-left h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; }
.p3-contact-left .sub { color: rgba(255,255,255,.72); margin-top: 14px; font-size: 1.05rem; }
.p3-cinfo { margin-top: 30px; display: flex; flex-direction: column; gap: 16px; }
.p3-cinfo .row { display: flex; gap: 14px; align-items: flex-start; }
.p3-cinfo .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.p3-cinfo b { display: block; color: #fff; }
.p3-cinfo span { color: rgba(255,255,255,.72); font-size: .94rem; }
.p3-cform { background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: clamp(40px, 5vw, 64px); box-shadow: var(--shadow-md); }
.p3-cform h3 { font-size: 1.6rem; text-transform: uppercase; }
.p3-cform .f { width: 100%; margin-top: 14px; border: 2px solid var(--border); border-radius: var(--radius-btn); padding: 13px 15px; font: inherit; background: var(--bg); color: var(--text); }
.p3-cform .f:focus { outline: none; border-color: var(--primary); }
.p3-cform textarea.f { min-height: 96px; resize: vertical; }
.p3-cform .btn { width: 100%; justify-content: center; margin-top: 16px; }

@media (max-width: 940px) {
  .p3-hero-grid, .p3-mosaic, .p3-part-grid, .p3-contact-grid { grid-template-columns: 1fr; }
  .p3-hero-right { min-height: 320px; }
  .p3-hgrid, .p3-bgrid { grid-template-columns: 1fr 1fr; }
  .p3-contact-left { border-radius: var(--radius) var(--radius) 0 0; }
  .p3-cform { border-radius: 0 0 var(--radius) var(--radius); }
  .p3-hero-left { padding-right: 0; padding-left: 0; }
}
@media (max-width: 600px) { .p3-hgrid, .p3-bgrid { grid-template-columns: 1fr; } .p3-hero-badges { flex-wrap: wrap; } .p3-hero-badges div { flex: 1 1 50%; } }

/* ============================================================
   3. INTÉGRATION WORDPRESS
   (ajouts hors maquette : navigation mobile, pages d'articles,
    commentaires, accessibilité, blocs Gutenberg)
   ============================================================ */

/* --- Accessibilité --- */
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip-path: none; height: auto; width: auto; margin: 0; padding: 14px 22px;
  left: 12px; top: 12px; z-index: 100000; background: #fff; color: var(--ink);
  border-radius: var(--radius-btn); font-weight: 800; box-shadow: var(--shadow-md);
}
.site :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.p3 .nav a:focus-visible, .p3-hero a:focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site *, .site *::before, .site *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .p3-narticle:hover, .p3-bcard:hover, .p3-hblock:hover, .btn:hover { transform: none; }
}

/* La barre d'admin ne doit pas masquer la nav sticky */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }

/* --- Navigation mobile (burger) --- */
.nav-toggle {
  display: none; appearance: none; background: transparent; border: 2px solid rgba(255,255,255,.28);
  border-radius: var(--radius-btn); width: 46px; height: 46px; cursor: pointer;
  padding: 0; place-items: center; color: #fff; flex-shrink: 0;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 20px; height: 2.5px; background: currentColor; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: grid; }
  .p3 .nav-ins { display: none; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-top: 2px solid rgba(255,255,255,.12);
    padding: 8px 0 18px; box-shadow: var(--shadow-lg);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px clamp(16px, 4vw, 32px); font-size: 1.05rem; }
  .nav-links .nav-ins-mobile { display: inline-flex; margin: 14px clamp(16px, 4vw, 32px) 0; justify-content: center; }
  .p3 .nav-inner { position: relative; }
}
.nav-inner { position: relative; }
.nav-ins-mobile { display: none; }

/* Sous-menus (menu WordPress à 2 niveaux) */
.nav-links li { position: relative; list-style: none; }
.nav-links ul, .foot-links ul { list-style: none; margin: 0; padding: 0; }
.nav-links > li > .sub-menu {
  display: none; position: absolute; top: 100%; left: -14px; min-width: 220px;
  background: var(--surface); border-radius: var(--radius); padding: 10px;
  box-shadow: var(--shadow-md); z-index: 20;
}
.nav-links > li:hover > .sub-menu, .nav-links > li:focus-within > .sub-menu { display: block; }
.nav-links .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.nav-links .sub-menu a:hover { background: var(--surface-2); color: var(--primary); }
.nav-links .current-menu-item > a { color: var(--primary); }
@media (max-width: 920px) {
  .nav-links > li > .sub-menu {
    display: block; position: static; background: transparent; box-shadow: none; padding: 0 0 0 14px;
  }
  .nav-links .sub-menu a { color: rgba(255,255,255,.7); }
}
.nav-links, .foot-links { list-style: none; margin: 0; padding: 0; }

/* --- Bandeau de page interne --- */
.page-hero { background: var(--ink); color: #fff; padding: calc(78px * var(--sp)) 0 calc(64px * var(--sp)); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -90px; top: -90px; width: 300px; height: 300px;
  border-radius: 50%; border: 34px solid rgba(255,255,255,.07);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5.4vw, 4.2rem); text-transform: uppercase; font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.page-hero .sub { color: rgba(255,255,255,.72); margin-top: 16px; font-size: 1.08rem; max-width: 60ch; }
.breadcrumb { font-size: .84rem; font-weight: 700; color: rgba(255,255,255,.55); }
.breadcrumb a:hover { color: #fff; }

/* --- Grille d'archive --- */
.archive-main { background: var(--bg); padding: var(--section-pad) 0; }
.p3-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 940px) { .p3-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .p3-grid-3 { grid-template-columns: 1fr; } }
.p3-narticle .img img { width: 100%; height: 100%; object-fit: cover; }
.p3-narticle .img { overflow: hidden; }
.p3-narticle .img .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-soft);
  font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; letter-spacing: .1em;
}
.p3-narticle h3 a:hover { color: var(--primary); }

/* --- Filtres catégories --- */
.cat-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.cat-filters a {
  font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 2px solid var(--border); color: var(--text-soft);
}
.cat-filters a:hover, .cat-filters a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --- Pagination --- */
.p3-pagination { margin-top: 46px; display: flex; justify-content: center; }
.p3-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; position: static; background: none; padding: 0; border: 0; box-shadow: none; }
.p3-pagination .page-numbers {
  display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px;
  border-radius: var(--radius-btn); background: var(--surface); border: 2px solid var(--border);
  font-weight: 800; color: var(--text);
}
.p3-pagination .page-numbers:hover { border-color: var(--ink); }
.p3-pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- Article --- */
.single-main { background: var(--bg); padding: var(--section-pad) 0; }
.article-wrap { width: min(760px, 92vw); margin: 0 auto; }
.article-cover { width: min(1040px, 94vw); margin: calc(-1 * var(--section-pad) / 1.6) auto 46px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; z-index: 5; }
.article-cover img { width: 100%; height: auto; }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 800; font-size: .86rem; color: var(--text-soft); margin-bottom: 26px; }
.article-meta .cat { background: var(--accent); color: #fff; padding: 6px 12px; border-radius: 6px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }

.entry-content { font-size: 1.08rem; color: var(--text); }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 1.8em; }
.entry-content h3 { font-size: 1.35rem; margin-top: 1.6em; }
.entry-content p { line-height: 1.75; }
.entry-content a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--accent); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .45em; }
.entry-content blockquote {
  border-left: 6px solid var(--accent); background: var(--surface); padding: 22px 26px;
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.12rem; box-shadow: var(--shadow-sm);
}
.entry-content blockquote p + p { margin-top: .8em; }
.entry-content img, .entry-content figure img { border-radius: var(--radius); }
.entry-content figcaption { font-size: .86rem; color: var(--text-soft); margin-top: .6em; text-align: center; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--surface-2); font-family: var(--font-head); }
.entry-content pre { background: var(--ink); color: #fff; padding: 20px; border-radius: var(--radius); overflow-x: auto; font-size: .92rem; }
.entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.entry-content :not(pre) > code { background: var(--surface-2); padding: .15em .4em; border-radius: 5px; }
.entry-content hr { border: 0; border-top: 2px solid var(--border); margin: 2.4em 0; }

.alignwide { width: min(1040px, 94vw); margin-left: 50%; transform: translateX(-50%); max-width: none; }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: none; }
.alignfull img { border-radius: 0; }
.alignleft { float: left; margin: .4em 1.6em 1.2em 0; }
.alignright { float: right; margin: .4em 0 1.2em 1.6em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }

.entry-tags { margin-top: 40px; display: flex; gap: 10px; flex-wrap: wrap; }
.entry-tags a {
  font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px; padding: 7px 14px; color: var(--text-soft);
}
.entry-tags a:hover { border-color: var(--primary); color: var(--primary); }

.post-nav { margin-top: 54px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a { background: var(--surface); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); display: block; }
.post-nav a:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-nav .lbl { font-weight: 800; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.post-nav .ttl { font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; color: var(--ink); margin-top: 8px; display: block; }
.post-nav .next { text-align: right; }

/* --- Commentaires --- */
.comments-area { margin-top: 62px; }
.comments-area h2, .comment-reply-title { font-size: 1.7rem; text-transform: uppercase; margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { list-style: none; }
.comment-body { background: var(--surface); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.comment-list .children { margin-left: clamp(14px, 4vw, 42px); padding-left: 0; }
.comment-author { font-family: var(--font-head); font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .82rem; color: var(--text-soft); margin: 4px 0 12px; }
.comment-form label { display: block; font-weight: 800; font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); margin-top: 16px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; margin-top: 8px; border: 2px solid var(--border); border-radius: var(--radius-btn);
  padding: 13px 15px; font: inherit; background: var(--surface); color: var(--text);
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--primary); }
.comment-form .submit {
  margin-top: 18px; background: var(--accent); color: #fff; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: .98rem; padding: .95em 1.7em; border-radius: var(--radius-btn);
}
.comment-form .comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; }
.comment-form .comment-form-cookies-consent label { margin-top: 0; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .9rem; }

/* --- Formulaire de contact : messages --- */
.form-note { border-radius: var(--radius-btn); padding: 13px 16px; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.form-note.ok { background: #E8F7EC; color: #1E6B33; border: 2px solid #57B947; }
.form-note.ko { background: #FDECEA; color: #96261B; border: 2px solid var(--accent); }
.hp-field { position: absolute !important; left: -9999px; }

/* --- État vide --- */
.empty-state { background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); padding: 48px; text-align: center; }
.empty-state h3 { font-size: 1.4rem; }
.empty-state p { color: var(--text-soft); margin-top: 10px; }

/* --- Recherche --- */
.search-form { display: flex; gap: 10px; max-width: 460px; }
.search-form input[type="search"] {
  flex: 1; border: 2px solid var(--border); border-radius: var(--radius-btn);
  padding: 13px 15px; font: inherit; background: var(--surface); color: var(--text);
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--primary); }
.search-form .btn { border: 0; cursor: pointer; }

/* --- 404 --- */
.err-404 { background: var(--ink); color: #fff; min-height: 66vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.err-404 .code { font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 18vw, 12rem); line-height: .85; color: transparent; -webkit-text-stroke: 3px var(--accent); }
.err-404 h1 { color: #fff; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3rem); margin-top: 18px; }
.err-404 p { color: rgba(255,255,255,.7); margin-top: 14px; }
.err-404 .btn { margin-top: 28px; }

/* --- Logo personnalisé --- */
.custom-logo-link img { max-height: 52px; width: auto; }

/* --- Pied de page --- */
.foot-links a { color: rgba(255,255,255,.7); }

/* ============================================================
   4. AJUSTEMENTS D'INTÉGRATION DES MÉDIAS
   ============================================================ */

/* Carte d'article entièrement cliquable via le seul lien du titre */
.p3-narticle h3 a { position: static; }
.p3-narticle h3 a::after { content: ""; position: absolute; inset: 0; z-index: 4; }

/* Photo du bandeau */
.p3-hero-right .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p3-hero-right .photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(38,56,75,.10), rgba(38,56,75,.45)); }

/* Portraits du bureau */
.p3-bphoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p3-bphoto .mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 3rem; color: rgba(255,255,255,.9);
  background: linear-gradient(135deg, var(--primary), var(--ink));
}

/* Partenaires cliquables */
.p3-pblock a.pl { position: absolute; inset: 0; z-index: 3; }
.p3-pblock:hover { transform: translateY(-4px); transition: transform .2s ease; }

/* Formulaire de contact : espace pour les messages de retour */
.p3-cform .form-note { margin-top: 14px; }
