/* Prépa 40 — design du site (thème GeneratePress)
   Identité : bleu nuit + or (couleurs de vestiaire), police Barlow Condensed / Barlow (sport). */

/* ---------- Polices (hébergées sur le serveur : rien n'est envoyé à Google) ---------- */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: italic; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(/wp-content/uploads/fonts/barlow-latin-700-normal.woff2) format("woff2"); }

/* ---------- Jetons de design ---------- */
:root {
  --p40-nuit: #13233a;
  --p40-nuit-2: #1c3352;
  --p40-or: #f2b705;
  --p40-or-fonce: #d9a300;
  --p40-or-texte: #8a6400;   /* or lisible sur fond clair (contraste 5,6:1) */
  --p40-fond: #f6f4ef;
  --p40-carte: #ffffff;
  --p40-texte: #1b1f27;
  --p40-texte-doux: #4a5361; /* 7,6:1 sur blanc */
  --p40-bord: #e4e0d6;
  --p40-vert: #1f7a4d;
  --p40-rouge: #b42318;
  --p40-bleu-lien: #0b5cad;
  --p40-rayon: 14px;
  --p40-ombre: 0 1px 2px rgba(19,35,58,.06), 0 6px 20px rgba(19,35,58,.08);
  --p40-ombre-forte: 0 2px 4px rgba(19,35,58,.08), 0 14px 34px rgba(19,35,58,.16);
  --p40-titres: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --p40-corps: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --p40-vitesse: 220ms;
}

/* ---------- Base ---------- */
body { background: var(--p40-fond); color: var(--p40-texte); font-family: var(--p40-corps); font-size: 18px; line-height: 1.7; }
h1, h2, h3, h4, .main-title, .entry-title { font-family: var(--p40-titres); color: var(--p40-nuit); line-height: 1.15; letter-spacing: .2px; }
h1, .entry-title { font-weight: 800; font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.2rem); }
h2 { font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-top: 1.6em; }
h3 { font-weight: 700; font-size: 1.4rem; }
a { color: var(--p40-bleu-lien); text-underline-offset: 3px; transition: color var(--p40-vitesse); }
a:hover { color: var(--p40-nuit); }
::selection { background: var(--p40-or); color: var(--p40-nuit); }
:focus-visible { outline: 3px solid var(--p40-or); outline-offset: 3px; border-radius: 4px; }
img { border-radius: 10px; }

/* ---------- En-tête : compact, collant, logo + menu sur une ligne ---------- */
.site-header { background: var(--p40-nuit); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 14px rgba(0,0,0,.18); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.inside-header { padding-top: 12px; padding-bottom: 12px; align-items: center; }
.site-branding { display: flex; flex-direction: column; }
.main-title { margin: 0; font-size: 2rem; font-weight: 800; text-transform: uppercase; line-height: 1; }
.main-title a, .main-title a:hover { color: #fff; text-decoration: none; letter-spacing: 1px; }
.p40-logo-40 { display: inline-block; margin-left: .18em; padding: 0 .22em; background: var(--p40-or); color: var(--p40-nuit); border-radius: 6px; transform: skewX(-8deg); }
.site-description { color: var(--p40-or); font-size: .82rem; font-weight: 500; margin: 4px 0 0; letter-spacing: .3px; }
.main-navigation, .main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a { color: #fff; font-family: var(--p40-titres); font-weight: 600; font-size: 1.08rem; letter-spacing: .4px; text-transform: uppercase; padding-left: 14px; padding-right: 14px; line-height: 52px; position: relative; transition: color var(--p40-vitesse); }
.main-navigation .main-nav ul li a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 3px; border-radius: 2px; background: var(--p40-or); transform: scaleX(0); transform-origin: left; transition: transform var(--p40-vitesse) ease-out; }
.main-navigation .main-nav ul li:hover > a, .main-navigation .main-nav ul li.current-menu-item > a, .main-navigation .main-nav ul li.current-post-ancestor > a, .main-navigation .main-nav ul li.current-category-ancestor > a { color: var(--p40-or); background: transparent; }
.main-navigation .main-nav ul li:hover > a::after, .main-navigation .main-nav ul li.current-menu-item > a::after { transform: scaleX(1); }
.menu-toggle, .main-navigation .menu-toggle { color: #fff; font-family: var(--p40-titres); font-weight: 700; text-transform: uppercase; min-height: 48px; }
.main-navigation.toggled .main-nav ul ul, .main-navigation.toggled .main-nav > ul { background: var(--p40-nuit); }
@media (max-width: 1100px) and (min-width: 769px) { .main-navigation .main-nav ul li a { padding-left: 9px; padding-right: 9px; font-size: 1rem; } }

/* Barre de progression de lecture (articles) */
.p40-progression { position: fixed; top: 0; left: 0; height: 4px; width: 100%; background: var(--p40-or); transform-origin: left; transform: scaleX(0); z-index: 1000; pointer-events: none; }

/* ---------- Mise en page générale ---------- */
.site-content { padding-top: 32px; }
.separate-containers .inside-article, .separate-containers .page-header { border-radius: var(--p40-rayon); box-shadow: var(--p40-ombre); }
body.single .entry-content, body.page:not(.home) .entry-content, body.single .entry-header, body.page:not(.home) .entry-header { max-width: 760px; margin-left: auto; margin-right: auto; }
.single .featured-image img, .single .post-image img { border-radius: var(--p40-rayon); width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.single .featured-image figcaption, .single .post-image figcaption, .wp-caption-text { font-size: .8rem; color: var(--p40-texte-doux); text-align: right; }
.entry-meta { font-size: .9rem; color: var(--p40-texte-doux); }
.home .entry-header { display: none; }
.home.separate-containers .inside-article { background: transparent; box-shadow: none; padding: 0; }

/* ---------- Boutons ---------- */
.p40-bouton, .p40-bouton:visited { display: inline-flex; align-items: center; gap: .5em; min-height: 48px; padding: .7em 1.5em; border-radius: 10px; background: var(--p40-or); color: var(--p40-nuit); font-family: var(--p40-titres); font-weight: 700; font-size: 1.15rem; letter-spacing: .5px; text-transform: uppercase; text-decoration: none; border: 2px solid var(--p40-or); cursor: pointer; transition: transform var(--p40-vitesse), box-shadow var(--p40-vitesse), background var(--p40-vitesse); }
.p40-bouton:hover { background: var(--p40-or-fonce); border-color: var(--p40-or-fonce); color: var(--p40-nuit); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(242,183,5,.35); }
.p40-bouton:active { transform: translateY(0); }
.p40-bouton-ghost, .p40-bouton-ghost:visited { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.p40-bouton-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; box-shadow: none; }
.p40-bouton svg, .p40-ico { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* ---------- Accueil ---------- */
.p40-hero2 { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; background: radial-gradient(1200px 500px at 85% -10%, var(--p40-nuit-2), transparent 60%), var(--p40-nuit); color: #fff; border-radius: 20px; padding: clamp(28px, 5vw, 64px); margin-bottom: 56px; }
.p40-hero2::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border: 26px solid rgba(242,183,5,.12); border-radius: 50%; pointer-events: none; }
.p40-surtitre { display: inline-block; font-family: var(--p40-titres); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: .95rem; color: var(--p40-or); border: 1px solid rgba(242,183,5,.45); border-radius: 30px; padding: .25em .9em; margin-bottom: 1em; }
.p40-hero2 h1 { color: #fff; font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem); text-transform: uppercase; margin: 0 0 .35em; }
.p40-hero2 h1 span { color: var(--p40-or); }
.p40-hero2-intro { color: #dbe2ec; font-size: 1.12rem; max-width: 36em; }
.p40-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.p40-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.p40-stats li { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--p40-rayon); padding: 16px 20px; display: flex; align-items: center; gap: 16px; transition: transform var(--p40-vitesse), background var(--p40-vitesse); }
.p40-stats li:hover { transform: translateX(-4px); background: rgba(255,255,255,.1); }
.p40-stats strong { font-family: var(--p40-titres); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--p40-or); min-width: 2.4ch; }
.p40-stats span { color: #e6ebf2; font-size: 1rem; line-height: 1.35; }

.p40-section { margin: 0 0 56px; }
.p40-section-titre { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.p40-section-titre h2 { margin: 0; text-transform: uppercase; }
.p40-section-titre h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--p40-or); border-radius: 2px; margin-top: 8px; }
.p40-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.p40-carte { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--p40-carte); border: 1px solid var(--p40-bord); border-radius: var(--p40-rayon); padding: 22px; text-decoration: none; color: var(--p40-texte); box-shadow: var(--p40-ombre); transition: transform var(--p40-vitesse), box-shadow var(--p40-vitesse), border-color var(--p40-vitesse); }
.p40-carte:hover { transform: translateY(-4px); box-shadow: var(--p40-ombre-forte); border-color: var(--p40-or); color: var(--p40-texte); }
.p40-carte-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--p40-nuit); color: var(--p40-or); margin-bottom: 6px; transition: transform var(--p40-vitesse); }
.p40-carte:hover .p40-carte-ico { transform: rotate(-6deg) scale(1.06); }
.p40-carte-ico svg { width: 26px; height: 26px; }
.p40-carte strong { font-family: var(--p40-titres); font-size: 1.45rem; font-weight: 700; color: var(--p40-nuit); text-transform: uppercase; }
.p40-carte span { color: var(--p40-texte-doux); font-size: 1rem; line-height: 1.5; }
.p40-carte em { font-style: normal; margin-top: auto; padding-top: 8px; font-family: var(--p40-titres); font-weight: 700; color: var(--p40-or-texte); text-transform: uppercase; letter-spacing: .5px; }

/* Derniers articles en cartes avec photo */
.entry-content ul.wp-block-latest-posts.is-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 0 0 56px; padding: 0; }
.wp-block-latest-posts.is-grid li { margin: 0 !important; width: auto !important; background: var(--p40-carte); border: 1px solid var(--p40-bord); border-radius: var(--p40-rayon); overflow: hidden; box-shadow: var(--p40-ombre); display: flex; flex-direction: column; transition: transform var(--p40-vitesse), box-shadow var(--p40-vitesse); }
.wp-block-latest-posts.is-grid li:hover { transform: translateY(-4px); box-shadow: var(--p40-ombre-forte); }
.wp-block-latest-posts__featured-image { margin: 0 !important; overflow: hidden; }
.wp-block-latest-posts__featured-image img { border-radius: 0; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 500ms ease-out; }
.wp-block-latest-posts.is-grid li:hover .wp-block-latest-posts__featured-image img { transform: scale(1.05); }
.wp-block-latest-posts__post-title { display: block; padding: 18px 20px 4px; font-family: var(--p40-titres); font-weight: 700; font-size: 1.35rem; line-height: 1.2; color: var(--p40-nuit); text-decoration: none; }
.wp-block-latest-posts__post-title::after { content: ""; position: absolute; inset: 0; }
.wp-block-latest-posts.is-grid li { position: relative; }
.wp-block-latest-posts__post-date { padding: 0 20px; font-size: .85rem; color: var(--p40-texte-doux); }
.wp-block-latest-posts__post-excerpt { padding: 6px 20px 20px; margin: 0; font-size: .98rem; color: var(--p40-texte-doux); }
@media (min-width: 600px) { .entry-content ul.wp-block-latest-posts.columns-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .entry-content ul.wp-block-latest-posts.columns-3 { grid-template-columns: repeat(3, 1fr); } }

/* Bandeau auteur + bandeau vidéo */
.p40-bandeau { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--p40-carte); border: 1px solid var(--p40-bord); border-left: 6px solid var(--p40-or); border-radius: var(--p40-rayon); padding: clamp(22px, 4vw, 40px); box-shadow: var(--p40-ombre); margin-bottom: 56px; }
.p40-bandeau-medaillon { width: 120px; height: 120px; border-radius: 50%; background: var(--p40-nuit); color: var(--p40-or); display: grid; place-items: center; font-family: var(--p40-titres); font-weight: 800; font-size: 2.6rem; box-shadow: 0 0 0 6px rgba(242,183,5,.25); }
.p40-bandeau h2 { margin: 0 0 .3em; text-transform: uppercase; }
.p40-bandeau blockquote { margin: 0 0 1em; padding: 0 0 0 1em; border-left: 3px solid var(--p40-bord); font-style: italic; color: var(--p40-texte-doux); }
.p40-bandeau-video { background: linear-gradient(120deg, var(--p40-nuit), var(--p40-nuit-2)); color: #fff; border: 0; border-left: 6px solid var(--p40-or); }
.p40-bandeau-video h2 { color: #fff; }
.p40-bandeau-video p { color: #dbe2ec; }
.p40-bandeau-video .p40-bandeau-medaillon { background: var(--p40-or); color: var(--p40-nuit); }
.p40-bandeau-video .p40-bandeau-medaillon svg { width: 52px; height: 52px; }
.p40-mention-pied { font-size: .9rem; color: var(--p40-texte-doux); text-align: center; }

/* ---------- Archives et catégories : grille de cartes ---------- */
.blog .site-main, .archive .site-main, .search .site-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.blog .site-main > :not(article), .archive .site-main > :not(article), .search .site-main > :not(article) { grid-column: 1 / -1; }
.blog .site-main article, .archive .site-main article, .search .site-main article { margin: 0; }
.blog .inside-article, .archive .inside-article, .search .inside-article { display: flex; flex-direction: column; height: 100%; padding: 0 !important; overflow: hidden; transition: transform var(--p40-vitesse), box-shadow var(--p40-vitesse); }
.blog .inside-article:hover, .archive .inside-article:hover, .search .inside-article:hover { transform: translateY(-4px); box-shadow: var(--p40-ombre-forte); }
.blog .post-image, .archive .post-image, .search .post-image { order: -1; margin: 0 !important; }
.blog .post-image img, .archive .post-image img, .search .post-image img { border-radius: 0; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.blog .entry-header, .archive .entry-header, .search .entry-header, .blog .entry-summary, .archive .entry-summary, .search .entry-summary { padding: 0 22px; }
.blog .entry-header, .archive .entry-header, .search .entry-header { padding-top: 18px; }
.blog .entry-title, .archive .entry-title, .search .entry-title { font-size: 1.45rem; }
.blog .entry-title a, .archive .entry-title a, .search .entry-title a { color: var(--p40-nuit); text-decoration: none; }
.blog footer.entry-meta, .archive footer.entry-meta, .search footer.entry-meta { margin-top: auto; padding: 0 22px 18px; }
.archive .page-header { background: var(--p40-nuit); color: #dbe2ec; padding: 28px 32px; }
.archive .page-header h1 { color: #fff; text-transform: uppercase; margin: 0; }
.archive .taxonomy-description { color: #dbe2ec; margin-top: 8px; }

/* ---------- Composants des articles ---------- */
.p40-mention { background: #fff8dc; border-left: 4px solid var(--p40-or); padding: .7em 1em; font-size: .9em; border-radius: 0 8px 8px 0; }
.p40-sante { background: #eef4fa; border-left: 4px solid var(--p40-bleu-lien); padding: .7em 1em; font-size: .9em; border-radius: 0 8px 8px 0; }

.p40-sommaire { background: var(--p40-carte); border: 1px solid var(--p40-bord); border-radius: var(--p40-rayon); padding: 1.1em 1.4em; margin: 1.6em 0; box-shadow: var(--p40-ombre); }
.p40-sommaire-titre { font-family: var(--p40-titres); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--p40-nuit); margin-bottom: .4em; }
.p40-sommaire ol { margin-bottom: 0; }
.p40-sommaire a { text-decoration: none; }
.p40-sommaire a:hover { text-decoration: underline; }
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 110px; }

.p40-encadre { border-radius: var(--p40-rayon); padding: 1.1em 1.4em; margin: 1.6em 0; border-left: 6px solid; }
.p40-encadre > :last-child { margin-bottom: 0; }
.p40-encadre-titre { display: flex; align-items: center; gap: .5em; font-family: var(--p40-titres); font-weight: 700; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .8px; margin-bottom: .4em; }
.p40-encadre-titre::before { content: ""; width: 1.3em; height: 1.3em; flex-shrink: 0; background: currentColor; -webkit-mask: var(--p40-icone) no-repeat center / contain; mask: var(--p40-icone) no-repeat center / contain; }
.p40-retenir { background: #fff8dc; border-color: var(--p40-or); }
.p40-retenir .p40-encadre-titre { color: var(--p40-or-texte); --p40-icone: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z'/></svg>"); }
.p40-astuce { background: #eaf6ee; border-color: var(--p40-vert); }
.p40-astuce .p40-encadre-titre { color: var(--p40-vert); --p40-icone: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/><path d='M9 18h6'/><path d='M10 22h4'/></svg>"); }
.p40-attention { background: #fdecea; border-color: var(--p40-rouge); }
.p40-attention .p40-encadre-titre { color: var(--p40-rouge); --p40-icone: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>"); }
.p40-vestiaire { background: linear-gradient(120deg, var(--p40-nuit), var(--p40-nuit-2)); color: #e6ebf2; border-color: var(--p40-or); }
.p40-vestiaire .p40-encadre-titre { color: var(--p40-or); --p40-icone: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/></svg>"); }
.p40-vestiaire a { color: var(--p40-or); }

.p40-exercice { border: 1px solid var(--p40-bord); border-top: 4px solid var(--p40-nuit); border-radius: var(--p40-rayon); padding: 1.3em 1.5em; margin: 1.6em 0; background: var(--p40-carte); box-shadow: var(--p40-ombre); transition: box-shadow var(--p40-vitesse), border-color var(--p40-vitesse); }
.p40-exercice:hover { box-shadow: var(--p40-ombre-forte); border-top-color: var(--p40-or); }
.p40-exercice h3 { margin-top: 0; }
.p40-exercice-infos { display: flex; flex-wrap: wrap; gap: .5em; margin: .3em 0 1em; }
.p40-badge { display: inline-block; background: var(--p40-fond); color: var(--p40-nuit); border: 1px solid var(--p40-bord); border-radius: 30px; padding: .2em .85em; font-size: .85em; font-weight: 700; white-space: nowrap; }

.p40-etapes { counter-reset: etape; list-style: none; margin-left: 0; padding-left: 0; }
.p40-etapes > li { counter-increment: etape; position: relative; padding-left: 3em; margin-bottom: .9em; }
.p40-etapes > li::before { content: counter(etape); position: absolute; left: 0; top: 0; width: 2em; height: 2em; border-radius: 50%; background: var(--p40-or); color: var(--p40-nuit); font-family: var(--p40-titres); font-weight: 800; display: flex; align-items: center; justify-content: center; }

.p40-pour-contre { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin: 1em 0; }
.p40-pour, .p40-contre { border-radius: var(--p40-rayon); padding: 1em 1.2em; }
.p40-pour { background: #eaf6ee; } .p40-contre { background: #fdecea; }
.p40-pour ul, .p40-contre ul { margin-bottom: 0; }

.entry-content table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 1.6em 0; border-radius: var(--p40-rayon); overflow: hidden; box-shadow: var(--p40-ombre); background: var(--p40-carte); }
.entry-content th { background: var(--p40-nuit); color: #fff; text-align: left; padding: .8em 1em; font-family: var(--p40-titres); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.entry-content td { padding: .75em 1em; border-bottom: 1px solid var(--p40-bord); vertical-align: top; }
.entry-content tr:nth-child(even) td { background: #faf9f6; }
.entry-content tbody tr { transition: background var(--p40-vitesse); }
.entry-content tbody tr:hover td { background: #fff8dc; }
.p40-table-scroll { overflow-x: auto; }

.p40-produit { border: 2px solid var(--p40-or); border-radius: var(--p40-rayon); padding: 1.3em 1.5em; margin: 1.6em 0; background: var(--p40-carte); box-shadow: var(--p40-ombre); }
.p40-produit-titre { text-transform: uppercase; font-family: var(--p40-titres); font-size: .95rem; font-weight: 700; color: var(--p40-or-texte); margin-bottom: .2em; letter-spacing: 1px; }
.p40-produit-nom { font-family: var(--p40-titres); font-size: 1.5rem; font-weight: 800; color: var(--p40-nuit); margin-bottom: .5em; }

.wp-block-embed.is-type-video { margin: 1.6em 0; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper { border-radius: var(--p40-rayon); overflow: hidden; box-shadow: var(--p40-ombre-forte); }

/* Boîte auteur */
.p40-auteur { display: flex; gap: 1.2em; align-items: flex-start; background: var(--p40-carte); border: 1px solid var(--p40-bord); border-left: 6px solid var(--p40-or); border-radius: var(--p40-rayon); padding: 1.4em; margin-top: 2.5em; box-shadow: var(--p40-ombre); }
.p40-auteur img, .p40-auteur-initiales { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.p40-auteur-initiales { display: flex; align-items: center; justify-content: center; background: var(--p40-nuit); color: var(--p40-or); font-family: var(--p40-titres); font-weight: 800; font-size: 1.9em; }
.p40-auteur p { margin-bottom: .4em; font-size: .97em; }
.p40-auteur-nom { font-family: var(--p40-titres); font-weight: 800; font-size: 1.3rem; color: var(--p40-nuit); text-transform: uppercase; }

/* Ancien bandeau d'accueil (pages modifiées à la main) */
.p40-hero { background: var(--p40-nuit); color: #fff; padding: 2.5em 1.5em; border-radius: 16px; }
.p40-hero h1, .p40-hero h2 { color: #fff; }
.p40-hero .p40-accent { color: var(--p40-or); }

/* Formulaire de contact */
.p40-contact label { font-weight: 600; color: var(--p40-nuit); }
.p40-contact input[type=text], .p40-contact input[type=email], .p40-contact textarea { width: 100%; max-width: 560px; min-height: 48px; padding: .65em .85em; border: 1px solid #c9c2b2; border-radius: 10px; font-size: 1rem; font-family: var(--p40-corps); background: #fff; transition: border-color var(--p40-vitesse), box-shadow var(--p40-vitesse); }
.p40-contact input:focus, .p40-contact textarea:focus { border-color: var(--p40-or-fonce); box-shadow: 0 0 0 3px rgba(242,183,5,.3); outline: none; }

/* ---------- Colonne latérale et pied de page ---------- */
.sidebar .widget { border-radius: var(--p40-rayon); box-shadow: var(--p40-ombre); }
.widget-title { font-family: var(--p40-titres); text-transform: uppercase; letter-spacing: .5px; }
.site-footer, .site-info { background: var(--p40-nuit); color: #cfd6df; }
.site-info { padding: 26px 20px; font-size: .92rem; }
.site-info a { color: #fff; text-decoration: none; }
.site-info a:hover { color: var(--p40-or); }
a.generate-back-to-top, a.generate-back-to-top:visited { position: fixed; right: 22px; bottom: 22px; z-index: 99; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--p40-or); color: var(--p40-nuit); box-shadow: var(--p40-ombre-forte); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity var(--p40-vitesse), transform var(--p40-vitesse), visibility var(--p40-vitesse); }
a.generate-back-to-top.generate-back-to-top__show { opacity: 1; visibility: visible; transform: none; }
a.generate-back-to-top:hover, a.generate-back-to-top:focus { background: var(--p40-or-fonce); color: var(--p40-nuit); }

/* ---------- Apparition au défilement (désactivée si « réduire les animations ») ---------- */
@media (prefers-reduced-motion: no-preference) {
  .p40-js .p40-apparait { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease-out, transform 500ms cubic-bezier(.2,.7,.2,1); transition-delay: var(--p40-delai, 0ms); }
  .p40-js .p40-apparait.p40-vu { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
  .p40-progression { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .p40-hero2 { grid-template-columns: 1fr; gap: 28px; }
  .p40-stats { grid-template-columns: repeat(3, 1fr); }
  .p40-stats li { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; }
  .p40-stats strong { font-size: 2.1rem; }
  .p40-stats span { font-size: .9rem; }
  .p40-cartes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body { font-size: 17px; }
  .main-title { font-size: 1.6rem; }
  .site-description { display: none; }
  .site-content { padding-top: 16px; }
  .p40-cartes { grid-template-columns: 1fr; }
  .p40-stats { grid-template-columns: 1fr; }
  .p40-stats li { flex-direction: row; align-items: center; }
  .p40-bandeau { grid-template-columns: 1fr; text-align: left; }
  .p40-bandeau-medaillon { width: 84px; height: 84px; font-size: 1.9rem; }
  .p40-ctas .p40-bouton { flex: 1 1 100%; justify-content: center; }
  .p40-pour-contre { grid-template-columns: 1fr; }
  .p40-auteur { flex-direction: column; }
}

/* Photo de l'article : sous le titre, dans la largeur du texte */
body.single .featured-image, body.single .page-header-image-single { max-width: 760px; margin: 0 auto 1.6em; }
body.single .inside-article { display: flex; flex-direction: column; }
body.single .inside-article > .entry-header { order: -1; margin-bottom: 1.2em; }

/* En-tête mobile : logo à gauche, bouton Menu à droite, sur une seule ligne */
@media (max-width: 768px) {
  .inside-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 16px; }
  .site-branding { text-align: left; margin: 0; }
  .inside-header .main-navigation { width: auto; margin: 0; }
  .inside-header .main-navigation.toggled { flex-basis: 100%; width: 100%; }
  .main-navigation .menu-toggle { padding: 0 6px 0 14px; }
  .site-content { padding-left: 12px; padding-right: 12px; }
  .p40-surtitre { font-size: .78rem; letter-spacing: 1px; }
  .p40-hero2 { border-radius: 16px; }
}

/* Photo de Dimitri dans le bandeau d'accueil, chiffres en surimpression */
.p40-hero2-visuel { position: relative; z-index: 1; }
.p40-hero2-visuel img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: 50% 0%; border-radius: 18px; border: 4px solid var(--p40-or); box-shadow: 0 24px 50px rgba(0,0,0,.35); }
.p40-hero2-visuel .p40-stats { position: relative; margin: -46px 14px 0; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p40-hero2-visuel .p40-stats li { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; background: rgba(19,35,58,.92); border-color: rgba(242,183,5,.35); backdrop-filter: blur(6px); }
.p40-hero2-visuel .p40-stats li:hover { transform: translateY(-3px); }
.p40-hero2-visuel .p40-stats strong { font-size: 2rem; }
.p40-hero2-visuel .p40-stats span { font-size: .88rem; }
img.p40-bandeau-medaillon { object-fit: cover; padding: 0; border: 0; }
@media (max-width: 960px) {
  .p40-hero2-visuel { max-width: 460px; margin: 0 auto; width: 100%; }
}
@media (max-width: 768px) {
  .p40-hero2-visuel img { max-height: 380px; }
  .p40-hero2-visuel .p40-stats { grid-template-columns: repeat(3, 1fr); margin: -38px 8px 0; }
  .p40-hero2-visuel .p40-stats li { flex-direction: column; align-items: flex-start; padding: 10px; }
  .p40-hero2-visuel .p40-stats strong { font-size: 1.6rem; }
  .p40-hero2-visuel .p40-stats span { font-size: .78rem; }
}

/* Page À propos : photo en action à droite du texte */
.p40-photo-apropos { float: right; width: 300px; margin: 0 0 1.2em 1.6em; }
.p40-photo-apropos img { width: 100%; height: auto; border-radius: var(--p40-rayon); border: 4px solid var(--p40-or); box-shadow: var(--p40-ombre-forte); }
.p40-photo-apropos figcaption { font-size: .85rem; color: var(--p40-texte-doux); text-align: center; margin-top: .4em; }
@media (max-width: 640px) { .p40-photo-apropos { float: none; width: 100%; max-width: 360px; margin: 0 auto 1.4em; } }
