/* Styles du contenu des pages et des actualités générées.
 * Sortis des <style> en ligne du générateur (core/generator.php) le 2026-10-08
 * pour être lus aussi par l'éditeur de l'admin : on écrit dans le même rendu
 * que celui que verra le visiteur. Chargé après main.css et le thème. */

/* ── Pages (generatePage) ─────────────────────────────────────────── */
.cms-page { max-width: 900px; margin: 0 auto; padding: 80px 24px; }
.cms-page h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1.5rem; }
.cms-page h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2rem 0 1rem; }
.cms-page h3 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
.cms-page p  { line-height: 1.7; margin-bottom: 1rem; }
.cms-page ul, .cms-page ol { margin: 0 0 1rem 1.5rem; }
.cms-page li { margin-bottom: .4rem; line-height: 1.6; }
.cms-page blockquote { border-left: 4px solid var(--violet,#9f72b4); padding: 1rem 1.5rem; margin: 1.5rem 0; background: color-mix(in srgb, var(--violet) 7%, transparent); border-radius: 0 8px 8px 0; font-style: italic; }
.cms-page a { color: var(--violet,#9f72b4); }
.cms-page img { max-width: 100%; border-radius: 8px; }

/* ── Actualités (generateNewsPage) ────────────────────────────────── */
/* ── Hero article ──────────────────────────────────────────────── */
.art-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--black);
}
.art-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.art-hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}
.art-hero-nophoto {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 70% 40%, color-mix(in srgb, var(--violet) 15%, transparent) 0%, transparent 65%),
    var(--black);
}
.art-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 140px 0 60px;
}
.art-cat {
  display: block;          /* sous « ← Retour aux actualités », pas collé à sa suite */
  width: fit-content;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--violet, #9f72b4);
  margin-bottom: 16px;
}
.art-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--white, #fff);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 800px;
  margin: 0 0 20px;
}
.art-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .82rem;
  color: rgb(var(--ink-rgb, 255 255 255) / .5);
}
.art-meta time { color: rgb(var(--ink-rgb, 255 255 255) / .6); }
.art-meta-sep { width: 4px; height: 4px; border-radius: 50%; background: rgb(var(--ink-rgb, 255 255 255) / .3); }

/* ── Corps de l'article ─────────────────────────────────────────── */
.art-body-wrap {
  background: var(--black);
  padding: 60px 0 100px;
}
.art-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}
.art-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgb(var(--ink-rgb, 255 255 255) / .82);
}
.art-content h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--white, #fff);
  text-transform: uppercase;
  margin: 48px 0 16px;
  letter-spacing: .01em;
}
.art-content h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white, #fff);
  margin: 32px 0 12px;
}
.art-content p  { margin: 0 0 20px; }
.art-content ul, .art-content ol { margin: 0 0 20px 24px; }
.art-content li { margin-bottom: 8px; }
.art-content a  { color: var(--violet, #9f72b4); text-underline-offset: 3px; }
.art-content img { max-width: 100%; border-radius: 6px; margin: 24px 0; }
.art-content blockquote {
  border-left: 3px solid var(--violet, #9f72b4);
  padding: 16px 24px;
  margin: 28px 0;
  background: color-mix(in srgb, var(--violet) 6%, transparent);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: rgb(var(--ink-rgb, 255 255 255) / .7);
}
.art-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--gray, #888);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s;
}
.art-back:hover { color: var(--white, #fff); }

/* Sidebar */
.art-sidebar { position: static; }
.art-sidebar-card {
  background: var(--black2, #141414);
  border: 1px solid rgb(var(--ink-rgb, 255 255 255) / .07);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.art-sidebar-title {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--violet, #9f72b4);
  margin-bottom: 16px;
}
.art-share-links { display: flex; flex-direction: column; gap: 10px; }
.art-share-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgb(var(--ink-rgb, 255 255 255) / .08);
  color: var(--gray, #888);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  transition: all .2s;
}
.art-share-link:hover { border-color: var(--violet, #9f72b4); color: var(--white, #fff); }

@media (max-width: 860px) {
  .art-layout { grid-template-columns: 1fr; }
  .art-sidebar { position: static; }
  .art-hero { min-height: 50vh; }
}

/* ── Blocs de mise en page (menu « Bloc » de l'éditeur) ───────────── */
/* Catalogue fermé, repris par l'éditeur (admin/assets/pe-editor.js) et par
 * l'IA : aucune couleur libre, tout vient des variables du thème (--violet =
 * couleur d'accent, --black2/--black3 = fonds, --white = texte, --radius). */
.pe-lead { font-size: 1.25rem; line-height: 1.6; color: var(--white, #fff); font-weight: 300; margin: 0 0 2rem; }

.pe-callout {
  border-left: 4px solid var(--violet, #9f72b4);
  background: color-mix(in srgb, var(--violet, #9f72b4) 9%, transparent);
  border-radius: 0 var(--radius, 0) var(--radius, 0) 0;
  padding: 1.25rem 1.5rem; margin: 2rem 0;
}
.pe-callout--accent { border-left: 0; background: var(--violet, #9f72b4); color: var(--white, #fff); border-radius: var(--radius, 0); }
.pe-callout--accent a { color: inherit; }
.pe-callout > :last-child, .pe-card > :last-child, .pe-col > :last-child,
.pe-media-text > :last-child, .pe-cta > :last-child { margin-bottom: 0; }
.pe-callout > :first-child, .pe-card > :first-child, .pe-col > :first-child,
.pe-media-text > :first-child, .pe-cta > :first-child { margin-top: 0; }

ul.pe-checks { list-style: none; margin-left: 0; padding: 0; }
ul.pe-checks > li { position: relative; padding-left: 1.9rem; }
ul.pe-checks > li::before {
  content: '\2713'; position: absolute; left: 0; top: .25em; width: 1.2rem; height: 1.2rem;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; line-height: 1;
  border-radius: 50%; background: var(--violet, #9f72b4); color: var(--white, #fff);
}

ol.pe-steps { list-style: none; counter-reset: pe-step; margin: 2rem 0; padding: 0; }
ol.pe-steps > li {
  counter-increment: pe-step; position: relative;
  padding: 0 0 1.5rem 3.6rem; margin: 0; min-height: 2.6rem;
}
ol.pe-steps > li::before {
  content: counter(pe-step); position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.15rem;
  background: var(--violet, #9f72b4); color: var(--white, #fff); border-radius: var(--radius-btn, 0);
}
ol.pe-steps > li:not(:last-child)::after {
  content: ''; position: absolute; left: 1.25rem; top: 2.8rem; bottom: .3rem; width: 2px;
  background: color-mix(in srgb, var(--violet, #9f72b4) 35%, transparent);
}
ol.pe-steps > li > strong:first-child { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--white, #fff); margin-bottom: .2rem; }

.pe-cols { display: grid; gap: 2rem; margin: 2rem 0; }
.pe-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pe-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pe-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.pe-card {
  background: var(--black2, #141414); border: 1px solid color-mix(in srgb, var(--white, #fff) 8%, transparent);
  border-top: 3px solid var(--violet, #9f72b4); border-radius: var(--radius, 0); padding: 1.5rem;
}
.pe-card h3 { font-family: var(--font-head); color: var(--white, #fff); margin: 0 0 .6rem; }

.pe-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; margin: 2.5rem 0; }
.pe-media--reverse .pe-media-img { order: 2; }
.pe-media-img img { display: block; width: 100%; height: auto; margin: 0; border-radius: var(--radius, 0); }
.pe-media-img > p { margin: 0; }

.pe-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.pe-figure { border-left: 2px solid var(--violet, #9f72b4); padding: .25rem 0 .25rem 1.1rem; }
.pe-figure-n { display: block; font-family: var(--font-head); font-weight: 900; font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.05; color: var(--violet, #9f72b4); margin-bottom: .35rem; overflow-wrap: anywhere; }
.pe-figure > span:not(.pe-figure-n) { color: var(--gray, #888); font-size: .92rem; line-height: 1.4; }

.pe-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.cms-page a.pe-btn, .art-content a.pe-btn, a.pe-btn {
  display: inline-flex; align-items: center; font-family: var(--font-head); font-weight: 700;
  font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  padding: 13px 28px; border-radius: var(--radius-btn, 0); border: 1.5px solid var(--violet, #9f72b4);
  background: var(--violet, #9f72b4); color: var(--white, #fff); transition: background .2s, color .2s, border-color .2s;
}
.cms-page a.pe-btn:hover, .art-content a.pe-btn:hover, a.pe-btn:hover { background: var(--white, #fff); border-color: var(--white, #fff); color: var(--black, #0a0a0a); }
.cms-page a.pe-btn--outline, .art-content a.pe-btn--outline, a.pe-btn--outline { background: transparent; border-color: color-mix(in srgb, var(--white, #fff) 35%, transparent); color: var(--white, #fff); }
.cms-page a.pe-btn--outline:hover, .art-content a.pe-btn--outline:hover, a.pe-btn--outline:hover { background: color-mix(in srgb, var(--white, #fff) 8%, transparent); border-color: var(--white, #fff); color: var(--white, #fff); }

.pe-cta {
  margin: 3rem 0; padding: 2.5rem 2rem; text-align: center; border-radius: var(--radius, 0);
  background: linear-gradient(135deg, color-mix(in srgb, var(--violet, #9f72b4) 22%, var(--black2, #141414)), var(--black2, #141414));
  border: 1px solid color-mix(in srgb, var(--violet, #9f72b4) 35%, transparent);
}
.cms-page .pe-cta h2, .art-content .pe-cta h2 { margin: 0 0 .6rem; }
.pe-cta .pe-actions { justify-content: center; margin-bottom: 0; }

@media (max-width: 760px) {
  .pe-cols-2, .pe-cols-3, .pe-media { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .pe-media--reverse .pe-media-img { order: 0; }
  .pe-cta { padding: 2rem 1.25rem; }
}

/* ════════════════════════════════════════════════════════════════════
   Pages et articles — refonte du 2026-10-09
   Signature : le marquage d'un terrain (ligne médiane + rond central) sous
   le titre, tracé à l'ouverture ; un trait de touche avant chaque intertitre.
   Couleurs et polices : celles du thème actif (variables), rien en dur.
   ════════════════════════════════════════════════════════════════════ */

/* ── Marquage de terrain ─────────────────────────────────────────── */
.court-line {
  position: relative; height: 1px; margin: 0 40px;
  background: color-mix(in srgb, var(--white, #fff) 24%, transparent);
  transform-origin: left center;
  animation: court-draw 1.1s var(--ease, ease) .15s both;
}
.court-line-circle {
  position: absolute; left: 50%; top: 50%;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border: 1px solid color-mix(in srgb, var(--white, #fff) 24%, transparent);
  border-radius: 50%;
  animation: court-circle .6s var(--ease, ease) 1.1s both;
}
.court-line-circle::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--violet, #9f72b4);
}
@keyframes court-draw   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes court-circle { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .court-line, .court-line-circle { animation: none; } }

/* ── En-tête de page ─────────────────────────────────────────────── */
.pg-head { background: var(--black, #0a0a0a); padding: calc(var(--nav-h, 68px) + 56px) 0 52px; }
.pg-crumb {
  display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 22px;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gray, #888);
}
.pg-crumb a { color: var(--violet, #9f72b4); text-decoration: none; }
.pg-crumb a:hover { color: var(--white, #fff); }
.pg-crumb [aria-current] { min-width: 0; max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-title {
  font-family: var(--font-head); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.2rem, 5.6vw, 5rem); line-height: .98;
  letter-spacing: var(--heading-ls, -.01em); color: var(--white, #fff);
  max-width: 980px; margin: 0 0 56px; text-wrap: balance; overflow-wrap: break-word; hyphens: auto;
}
.pg-figure { margin: 48px auto 0; }
.pg-figure img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius, 0); }

/* ── Corps : colonne de lecture + carte « Votre projet » ─────────── */
.pg-body { background: var(--black, #0a0a0a); padding: 64px 0 110px; }
.pg-layout {
  display: grid; grid-template-columns: minmax(0, 46rem) 300px;
  justify-content: space-between; gap: clamp(40px, 6vw, 96px); align-items: start;
}
.pg-layout--solo { grid-template-columns: minmax(0, 46rem); }
.pg-layout > .cms-page { max-width: none; margin: 0; padding: 0; }
.pg-aside, .art-side { position: sticky; top: calc(var(--nav-h, 68px) + 32px); display: flex; flex-direction: column; gap: 20px; }
.pg-aside-card {
  background: var(--black2, #141414);
  border: 1px solid color-mix(in srgb, var(--white, #fff) 11%, transparent);
  border-top: 3px solid var(--violet, #9f72b4);
  border-radius: var(--radius, 0); padding: 26px 24px 22px;
}
.pg-aside-kicker { margin: 0 0 10px; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--violet, #9f72b4); }
.pg-aside-text { margin: 0 0 20px; font-size: .95rem; line-height: 1.55; color: color-mix(in srgb, var(--white, #fff) 82%, transparent); }
a.pe-btn.pg-aside-btn { display: flex; justify-content: center; width: 100%; box-sizing: border-box; }
.pg-aside-tel { display: block; margin-top: 14px; text-align: center; font-size: .88rem; color: color-mix(in srgb, var(--white, #fff) 70%, transparent); text-decoration: none; }
.pg-aside-tel:hover { color: var(--white, #fff); }
.art-side .art-sidebar-card { margin: 0; }

/* ── Typographie commune du contenu (pages, articles, éditeur) ───── */
.cms-content, .art-content { font-size: 1.075rem; line-height: 1.75; color: color-mix(in srgb, var(--white, #fff) 84%, transparent); }
.cms-content > p:first-child, .art-content > p:first-child { font-size: 1.24rem; line-height: 1.6; color: var(--white, #fff); }
.cms-content > h2, .art-content > h2 {
  font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.6rem, 3.1vw, 2.25rem); line-height: 1.05; letter-spacing: .005em;
  color: var(--white, #fff); margin: 3.2rem 0 1.1rem;
}
.cms-content > h2::before, .art-content > h2::before {
  content: ''; display: block; width: 32px; height: 3px; margin-bottom: 16px;
  background: var(--violet, #9f72b4);
}
.cms-content > h2:first-child, .art-content > h2:first-child { margin-top: 0; }
.cms-content > h3, .art-content > h3 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  font-size: 1.3rem; line-height: 1.15; color: var(--white, #fff); margin: 2.1rem 0 .6rem;
}
.cms-content > ul, .art-content > ul { list-style: square; }
.cms-content li::marker, .art-content li::marker { color: var(--violet, #9f72b4); }
.cms-content a:not(.pe-btn), .art-content a:not(.pe-btn) { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cms-content table, .art-content table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: .95rem; }
.cms-content th, .cms-content td, .art-content th, .art-content td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid color-mix(in srgb, var(--white, #fff) 12%, transparent); }
.cms-content th, .art-content th { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; color: var(--white, #fff); }

@media (max-width: 960px) {
  .pg-layout { grid-template-columns: minmax(0, 1fr); }
  .pg-aside, .art-side { position: static; }
}
@media (max-width: 768px) {
  .court-line { margin: 0 16px; }
  .court-line-circle { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .pg-head { padding: calc(var(--nav-h, 68px) + 36px) 0 40px; }
  .pg-title { margin-bottom: 40px; }
  .pg-figure { margin-top: 32px; }
  .pg-figure img { aspect-ratio: 16 / 9; }
  .pg-body { padding: 44px 0 80px; }
}

/* Article : le marquage sur la limite photo / texte, le rond à cheval sur les deux. */
.art-body-wrap { padding-top: 0; }
.art-body-wrap > .court-line { margin: 0 40px 64px; z-index: 2; }
@media (max-width: 768px) { .art-body-wrap > .court-line { margin: 0 16px 44px; } }
/* Photo plus sombre en haut aussi : « Retour aux actualités » et la catégorie
   restaient illisibles sur une photo claire. */
.art-hero-img::after { background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.5) 55%, rgba(0,0,0,.42) 100%); }
.art-back { color: color-mix(in srgb, var(--white, #fff) 80%, transparent); }
