/* Pages du site (accueil, compte). Le client de chat aura sa propre feuille. */

/* Charte graphique : voir docs/charte-graphique.md */
@font-face {
  font-family: "Nunito";
  src: url("/static/fonts/nunito-var-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --text: #2b2438;
  --muted: #5a5d72;
  --border: #e4e1dc;
  --accent: #8a3ffc;
  --accent-text: #ffffff;
  --accent-hover: #6f2be0;
  --accent-soft: #f1e9ff;
  --brand-ink: #3a2459;
  --brand-orange: #ff9f0a;
  --brand-orange-text: #8a4b00;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok: #1e7b43;
  --ok-bg: #e7f5ec;
  --radius: 12px;
  --shadow: 0 2px 12px rgb(58 36 89 / 0.08);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

/* Thème (J3c) : « automatique » suit l'appareil ; « clair » et « sombre »
   sont forcés par theme.js (attribut data-theme sur <html>). */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17182a;
    --surface: #1e2033;
    --text: #edeaf5;
    --muted: #b3b6cc;
    --border: #34364d;
    --accent: #a570ff;
    --accent-text: #1b1233;
    --accent-hover: #c2a0ff;
    --accent-soft: #2a2145;
    --brand-ink: #ffffff;
    --brand-orange-text: #ffb85c;
    --danger: #ffb4ab;
    --danger-bg: #3a1b1a;
    --ok: #8fd8a8;
    --ok-bg: #16301f;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  --bg: #17182a;
  --surface: #1e2033;
  --text: #edeaf5;
  --muted: #b3b6cc;
  --border: #34364d;
  --accent: #a570ff;
  --accent-text: #1b1233;
  --accent-hover: #c2a0ff;
  --accent-soft: #2a2145;
  --brand-ink: #ffffff;
  --brand-orange-text: #ffb85c;
  --danger: #ffb4ab;
  --danger-bg: #3a1b1a;
  --ok: #8fd8a8;
  --ok-bg: #16301f;
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* En-tête */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav form { margin: 0; }
.who { color: var(--muted); }
@media (max-width: 520px) {
  .header-in { flex-wrap: wrap; row-gap: 0.4rem; }
  .site-nav { gap: 0.6rem; flex-wrap: wrap; }
}

/* Appel vers le tchat sous le titre (articles et salons) : texte seul, aucun script ni image */
.chat-call { margin: 0.75rem 0 1rem; padding: 0.6rem 0.9rem; background: var(--accent-soft); border-radius: var(--radius); }
.chat-call p { margin: 0; }
.chat-call .chat-call-links { margin-top: 0.35rem; font-weight: 600; }

/* Contenu */
.page {
  flex: 1;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card h1 { margin-top: 0; font-size: 1.5rem; }
.page.page-wide { max-width: 76rem; }
.hero { text-align: center; padding: 2rem 0; }
.hero h1 { font-size: 1.8rem; font-weight: 800; color: var(--brand-ink); }
.hero-logo { display: block; height: 96px; width: auto; max-width: 100%; margin: 0 auto 1rem; }
.logo-sombre { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-clair { display: none; }
  :root:not([data-theme="light"]) .logo-sombre { display: block; }
}
:root[data-theme="dark"] .logo-clair { display: none; }
:root[data-theme="dark"] .logo-sombre { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.aside { margin: 1.25rem 0 0; color: var(--muted); text-align: center; }
.prose p { max-width: 65ch; }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: 0.35rem; }
.form label:not(.inline) { font-weight: 600; margin-top: 0.75rem; }
.form small { color: var(--muted); }
.form fieldset { border: 0; padding: 0; margin: 0.75rem 0 0; }
.form legend { font-weight: 600; padding: 0; margin-bottom: 0.25rem; }
label.inline { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 1rem 0.25rem 0; }
fieldset label.inline { display: inline-flex; }

input:not([type="checkbox"], [type="radio"]), textarea, select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.9rem; }

/* Boutons */
.button, button.button {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: var(--accent-hover); color: var(--accent-text); }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button.small { padding: 0.4rem 0.8rem; }
.form .button { margin-top: 1.25rem; min-height: 44px; }
button.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* Messages */
.alert, .notice {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 0 0 1rem;
}
.alert { color: var(--danger); background: var(--danger-bg); }
.notice { color: var(--ok); background: var(--ok-bg); }

/* Captcha */
.captcha { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }
.captcha.done { color: var(--ok); }

/* Pot de miel : hors écran, pas display:none (certains robots le détectent). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Pied de page en colonnes. Uniquement des variables de thème : les habillages s'appliquent seuls. */
.site-footer {
  margin-top: 2rem;
  padding: 2rem 1rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 70rem;
  margin: 0 auto;
}
.footer-brand p { margin: 0.5rem 0 0; max-width: 30ch; }
.footer-brand .brand { font-size: 1.1rem; }
.site-footer h2 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.site-footer li a { color: var(--text); text-decoration: none; }
.site-footer li a:hover { color: var(--accent); text-decoration: underline; }
.footer-bar {
  max-width: 70rem;
  margin: 1.5rem auto 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
}
.footer-bar p { margin: 0; }
/* Choix du thème (pied de page) : boutons radio habillés en interrupteur à trois positions. */
.theme-pick { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.theme-pick-label { font-weight: 700; color: var(--text); }
.seg { display: inline-flex; gap: 0.15rem; padding: 0.2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.seg label { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem;
  border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg .ico { width: 16px; height: 16px; flex: none; }
.seg label:hover { color: var(--accent); }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-text); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 760px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  body.has-public-tabs .site-footer { padding-bottom: 5rem; }
}

/* Navigation publique (visiteurs) : menu dans l'en-tête, onglets en bas sur téléphone */
/* En-tête public fixé en haut, aligné sur le contenu, translucide ; ombre une fois la page
   défilée (classe posée par public-nav.js). Maquette : docs/maquettes/front-office-entete.html */
body.has-public-tabs { scroll-padding-top: 5rem; }
body.has-public-tabs .site-header {
  position: sticky; top: 0; z-index: 30;
  transition: box-shadow 0.2s, transform 0.25s;
}
@supports (backdrop-filter: blur(8px)) {
  body.has-public-tabs .site-header {
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}
body.has-public-tabs.scrolled .site-header { box-shadow: 0 4px 18px rgb(30 20 50 / 0.1); }
body.has-public-tabs .header-in { max-width: 76rem; margin: 0 auto; container: hdr / inline-size; }
body.has-public-tabs .mag-side { top: 5rem; }

.public-nav { display: flex; align-items: center; gap: 0.15rem; flex: 1; min-width: 0; margin-left: 0.75rem; }
.public-nav > a, .nav-more > summary {
  position: relative;
  padding: 0.4rem 0.65rem;
  border-radius: calc(var(--radius) - 4px);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.public-nav > a:hover, .nav-more > summary:hover, .nav-more[open] > summary { background: var(--accent-soft); color: var(--accent); }
/* Page courante : couleur d'accent et trait dessous */
.public-nav a[aria-current="page"] { color: var(--accent); }
.public-nav > a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.65rem; right: 0.65rem; bottom: -0.2rem; height: 3px;
  border-radius: 3px; background: var(--accent);
}
.site-nav { white-space: nowrap; }
.site-nav .short { display: none; }

/* Menu « Plus » : reçoit les liens que la largeur ne permet pas d'afficher. Paliers mesurés
   sur la largeur de l'en-tête hors marges : tout tient à partir de 1150 px. */
.nav-more { position: relative; }
.nav-more > summary::after {
  content: ""; display: inline-block; width: 0.4em; height: 0.4em; margin-left: 0.4em; vertical-align: 0.18em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.more-menu {
  position: absolute; top: calc(100% + 0.4rem); left: 0; z-index: 31; min-width: 13rem; margin: 0; padding: 0.35rem;
  list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(30 20 50 / 0.16);
}
.more-menu a {
  display: block; padding: 0.5rem 0.7rem; border-radius: calc(var(--radius) - 4px);
  color: var(--text); font-weight: 600; text-decoration: none;
}
.more-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.more-menu .p1, .more-menu .p2, .more-menu .p3 { display: none; }
@container hdr (min-width: 1150px) { .nav-more { display: none; } }
@container hdr (max-width: 1149px) {
  .public-nav > a.p1 { display: none; }
  .more-menu .p1 { display: block; }
}
@container hdr (max-width: 1037px) {
  .public-nav > a.p2 { display: none; }
  .more-menu .p2 { display: block; }
  .site-nav .long { display: none; }
  .site-nav .short { display: inline; }
}
@container hdr (max-width: 847px) {
  .public-nav > a.p3 { display: none; }
  .more-menu .p3 { display: block; }
}

.public-tabs { display: none; }
@media (max-width: 760px) {
  .public-nav { display: none; }
  .header-in { justify-content: space-between; }
  /* L'en-tête se cache en descendant et revient en remontant ; les onglets du bas restent. */
  body.has-public-tabs.hide-up .site-header:not(:focus-within) { transform: translateY(-100%); box-shadow: none; }
  .public-tabs {
    display: flex; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .public-tabs > a, .public-tabs summary {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
    padding: 0.3rem 0.2rem; font-size: 0.7rem; color: var(--muted); text-decoration: none; cursor: pointer;
    list-style: none;
  }
  .public-tabs summary::-webkit-details-marker { display: none; }
  .public-tabs > a[aria-current="page"], .public-tabs .more[open] summary { color: var(--accent); font-weight: 600; }
  .public-tabs .more { flex: 1; display: flex; }
  .public-tabs .more summary { flex: 1; }
  .more-sheet {
    position: fixed; left: 0; right: 0; bottom: 3.6rem; max-height: 75vh; overflow-y: auto;
    padding: 1rem; background: var(--surface); border-top: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.18);
  }
  .more-sheet h2 { margin: 0.5rem 0 0.4rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
  .more-sheet ul { list-style: none; margin: 0; padding: 0; }
  .more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .more-grid a {
    display: block; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
    background: var(--bg); color: var(--text); font-weight: 600; font-size: 0.85rem; text-decoration: none;
  }
  .more-legal { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 0.9rem !important; font-size: 0.8rem; }
  .more-legal a { color: var(--muted); }
}

/* Paramètres (J2c-1) */
.page .card + .card { margin-top: 1rem; }
.card h2 { margin-top: 0; font-size: 1.2rem; }
.session-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.session-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
}
.session-list form { margin: 0; }
.tag { font-size: 0.75rem; border: 1px solid var(--border); border-radius: 4px; padding: 0 0.3rem; }
.muted { color: var(--muted); }
.button.danger { background: var(--danger); color: #fff; border-color: transparent; }
.danger-zone { border-color: var(--danger); }

/* Photos (J3b) */
.photo-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
.photo-grid li { display: flex; flex-direction: column; gap: 0.3rem; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); }
.photo-grid .photo-pending img { opacity: 0.6; }
.photo-grid .photo-rejected img { opacity: 0.35; filter: grayscale(1); }
.photo-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.photo-actions form { margin: 0; }

/* Pages publiques des salons */
.room-cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.room-cards li { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.room-cards h3 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.room-group { margin: 1.75rem 0 0; }
.room-cards p { margin: 0.4rem 0; }
.article .lead { font-size: 1.1rem; color: var(--muted); }
.article .actions { justify-content: flex-start; margin: 1.25rem 0; }
.article .aside { margin: 0 0 1rem; text-align: left; }
.article .plain-list { padding-left: 1.2rem; }
.command-list { margin: 0; }
.command { padding: 0.75rem 0; border-top: 1px solid var(--border, rgba(128, 128, 128, 0.3)); }
.command:first-child { border-top: 0; }
.command dt { font-weight: 600; }
.command dt code { font-size: 1.05em; overflow-wrap: anywhere; }
.command dd { margin: 0.25rem 0 0; }
.command dd .plain-list { margin: 0.4rem 0; }
.command-who, .command-example { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.92em; }

/* Rendez-vous */
.event-day { margin: 1.5rem 0 0.5rem; }
.event-day::first-letter { text-transform: uppercase; }
.event-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.75rem; }
.event-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; }
.event-list h3 { margin: 0.1rem 0 0.35rem; font-size: 1.05rem; }
.event-list p { margin: 0.3rem 0; }
.event-time { font-weight: 600; }
.event-links { font-size: 0.95rem; color: var(--muted); }
.tag { display: inline-block; padding: 0 0.45rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: transparent; border: 1px solid var(--border); color: var(--text); }

/* Accueil */
.hero .lead { max-width: 40rem; margin: 0.5rem auto 1.25rem; font-size: 1.1rem; color: var(--muted); }
.aside-line { text-align: center; margin: 0.75rem 0 0; }
.home-section { max-width: 64rem; margin: 2.5rem auto 0; }
.home-section > h2 { text-align: center; margin-bottom: 1rem; }
/* Surtitre (libellé du magazine au-dessus de « À la une ») */
.kicker { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.home-section > h3 { margin: 1.25rem 0 0.25rem; }
.grid-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid-cards > li { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.grid-cards h2, .grid-cards h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.grid-cards p { margin: 0.35rem 0; }
.section-more { text-align: center; margin: 1rem 0 0; }
.home-section .event-list { max-width: 46rem; margin-left: auto; margin-right: auto; }
/* Accueil (lot 2, maquette docs/maquettes/accueil-vivant.html) : haut de page en deux colonnes avec pastille
   d'activité et aperçu dessiné du chat, cartes de salons, étapes et questions côte à côte, habillages en bandeau.
   Uniquement des variables de thème : tout suit les habillages. */
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: center;
  max-width: 64rem; margin: 0 auto; padding: 2.5rem 0 1rem; text-align: left; }
.hero-split h1 { font-size: 2.3rem; line-height: 1.2; margin: 0.4rem 0 0.6rem; }
.hero-split .lead { max-width: none; margin: 0 0 1.25rem; }
.hero-split .actions { justify-content: flex-start; }
.hero-split .aside-line, .hero-split .soon-line { text-align: left; }
.hero-split .hero-logo { height: 80px; margin: 0 0 1rem; }
.live { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 0.9rem; padding: 0.3rem 0.8rem 0.3rem 0.6rem;
  border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 0.92rem; }
.live .dot { width: 0.6rem; height: 0.6rem; flex: none; border-radius: 50%; background: currentColor; animation: live-pulse 2s infinite; }
.live.calm { background: var(--accent-soft); color: var(--accent); }
.live.calm .dot { animation: none; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 0.5rem transparent; }
}
.chat-preview { border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--surface);
  box-shadow: 0 18px 50px rgb(58 36 89 / 0.16); overflow: hidden; font-size: 0.9rem; }
.pv-bar { display: flex; gap: 0.35rem; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.pv-tab { padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.pv-tab.on { background: var(--accent-soft); color: var(--accent); }
.pv-body { display: grid; grid-template-columns: 1fr 8.5rem; height: 17rem; }
.pv-log { list-style: none; margin: 0; padding: 0.6rem 0.7rem; display: flex; flex-direction: column; justify-content: flex-end;
  gap: 0.3rem; overflow: hidden; }
.pv-log li.new { animation: pv-pop 0.35s ease-out both; }
.pv-log b { margin-right: 0.3rem; font-weight: 800; }
.pv-log .sys { color: var(--muted); font-style: italic; font-size: 0.82rem; }
.pv-log .c1 { color: var(--accent); }
.pv-log .c2 { color: var(--brand-orange-text); }
.pv-log .c3 { color: var(--ok); }
.pv-log .c4 { color: var(--danger); }
.pv-log .c5 { color: var(--brand-ink); }
.pv-mod { margin-left: 0.25rem; padding: 0 0.3rem; border-radius: 4px; font-size: 0.65rem; font-weight: 800;
  background: var(--ok); color: var(--surface); vertical-align: 1px; }
@keyframes pv-pop { from { opacity: 0; transform: translateY(0.4rem); } to { opacity: 1; transform: none; } }
.pv-users { list-style: none; margin: 0; padding: 0.6rem; border-left: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }
.pv-users li { display: flex; align-items: center; gap: 0.35rem; padding: 0.12rem 0; white-space: nowrap; overflow: hidden; }
.pv-users li::before { content: ""; flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--ok); }
.pv-input { margin: 0 0.7rem 0.7rem; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) { .live .dot, .pv-log li.new { animation: none; } }
@media (max-width: 760px) {
  .hero-split { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; text-align: center; }
  .hero-split h1 { font-size: 1.8rem; }
  .hero-split .actions { justify-content: center; }
  .hero-split .aside-line, .hero-split .soon-line { text-align: center; }
  .hero-split .hero-logo { height: 64px; margin: 0 auto 0.75rem; }
  .pv-body { grid-template-columns: 1fr; height: 10.5rem; }
  .pv-users { display: none; }
}

.pillars > li { display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.8rem; align-content: start; }
.pillars > li > :not(.pillar-ico) { grid-column: 2; }
.pillar-ico { grid-row: span 3; width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) {
  .pillars { gap: 0.6rem; }
  .pillars > li { padding: 0.75rem 0.9rem; }
  .pillars > li > p:last-child { display: none; }
}

.room-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.room-card { position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem 1.1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s; }
.room-card:hover, .room-card:focus-within { transform: translateY(-2px); border-color: var(--accent); }
.room-top { display: flex; align-items: center; gap: 0.75rem; }
.room-ico { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.room-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.2; }
.room-card h3 a { color: var(--text); text-decoration: none; }
.room-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.room-card > p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1; }
.room-card .room-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.25rem; }
.online { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.85rem; color: var(--ok); }
.online::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.online.calm { color: var(--muted); font-weight: 600; }
.online.calm::before { width: 0.45rem; height: 0.45rem; background: transparent; border: 2px solid currentColor; }
@media (prefers-reduced-motion: reduce) { .room-card { transition: none; } .room-card:hover, .room-card:focus-within { transform: none; } }

.join { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.join-card { padding: 1.2rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.join-card h2 { margin: 0 0 0.9rem; font-size: 1.25rem; }
.join-card > .muted { margin: 0.9rem 0 0; font-size: 0.92rem; }
.join-card .section-more { text-align: left; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.steps li { display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.7rem; }
.steps li::before { counter-increment: step; content: counter(step); grid-row: span 2; display: grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800; }
.steps h3 { margin: 0; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }
.faq-extract details { border-top: 1px solid var(--border); padding: 0.55rem 0; }
.faq-extract details:first-of-type { border-top: 0; padding-top: 0; }
.faq-extract summary { font-weight: 700; cursor: pointer; }
.faq-extract details p { margin: 0.35rem 0 0; color: var(--muted); }
@media (max-width: 760px) { .join { grid-template-columns: 1fr; } }

.apparence-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1.5rem; align-items: center; }
.apparence-row h2 { margin: 0 0 0.4rem; }
.apparence-row p { margin: 0.4rem 0 0; }
.skins-band { display: flex; gap: 0.8rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0; padding: 0.2rem 0.1rem 1rem; list-style: none; }
.skins-band li { flex: 0 0 15rem; scroll-snap-align: start; }
.skins-band a { display: block; color: var(--text); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.skins-band img { display: block; width: 100%; height: auto; margin-bottom: 0.35rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
@media (max-width: 760px) { .apparence-row { grid-template-columns: 1fr; } .skins-band li { flex-basis: 70%; } }

.final-cta { text-align: center; margin: 3rem auto 1rem; padding: 2rem 1rem; max-width: 64rem; border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--brand-orange) 14%, var(--bg))); }
.final-cta h2 { margin-top: 0; }

/* Accueil, lot 3 (maquette docs/maquettes/finitions-mobile.html). Barre d'inscription collante, téléphone
   seulement, au-dessus des onglets du bas ; affichée par home.js. */
.cta-dock { display: none; }
@media (max-width: 760px) {
  .cta-dock:not([hidden]) {
    display: flex; gap: 0.5rem; position: fixed; z-index: 19; left: 0; right: 0;
    bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px)); padding: 0.6rem 0.75rem;
    background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgb(30 20 50 / 0.1); transition: transform 0.25s ease, opacity 0.25s ease;
  }
  @supports (backdrop-filter: blur(8px)) { .cta-dock:not([hidden]) { backdrop-filter: blur(10px); } }
  .cta-dock .button { flex: 1; padding: 0.6rem 0.8rem; }
  .cta-dock .button.secondary { flex: 0 0 auto; }
  .cta-dock.off { transform: translateY(30%); opacity: 0; pointer-events: none; visibility: hidden; }
}
/* Apparition douce des sections : home.js pose « reveal-on » ; sans script, tout reste visible. */
.reveal-on .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-on .reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  .cta-dock { transition: none !important; }
}

/* Alias (pseudos secondaires) */
.alias-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
#alias-list li { flex-wrap: wrap; }
#alias-form input { min-height: 44px; }

/* Connexion par un fournisseur externe. */
.oauth-buttons { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0 0.5rem; }
.oauth-buttons .aside { margin: 0; text-align: center; }
.oauth-buttons .button { text-align: center; }
.inline-form { display: inline; margin-left: 0.5rem; }

/* Espace membre : barre latérale à gauche, barre en bas sur téléphone */
.member-shell { flex: 1; display: flex; width: 100%; max-width: 80rem; margin: 0 auto; min-height: 0; }
.member-nav {
  flex: none; width: 12.5rem; padding: 1rem 0.5rem; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--border); background: var(--surface);
}
.member-nav a, .member-nav .soon {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem; border-radius: 6px;
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
}
.member-nav a:hover { background: var(--bg); color: var(--text); }
.member-nav a.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.member-nav .soon { opacity: 0.55; cursor: default; }
.member-nav .soon small { margin-left: auto; font-size: 0.7rem; }
.member-nav .sep { height: 1px; background: var(--border); margin: 0.4rem 0.5rem; }
.member-nav .ico { flex: none; }
.member-nav .count {
  margin-left: auto; min-width: 1.25rem; padding: 0 0.4rem; border-radius: 999px; text-align: center;
  background: var(--accent); color: #fff; font-size: 0.75rem; line-height: 1.25rem; font-weight: 600;
}
.page.page-member { max-width: none; min-width: 0; margin: 0; }
.page.page-member > .card, .page.page-member > section { max-width: 52rem; }
@media (max-width: 760px) {
  .member-shell { display: block; }
  .page.page-member { padding-bottom: 5rem; }
  .member-nav {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; width: auto; flex-direction: row; gap: 0;
    padding: 0.25rem; border-right: 0; border-top: 1px solid var(--border); justify-content: space-around;
  }
  .member-nav a { flex-direction: column; gap: 0.1rem; padding: 0.3rem 0.4rem; font-size: 0.7rem; position: relative; flex: 1; text-align: center; }
  .member-nav .soon, .member-nav .sep, .member-nav a[href^="/parametres#"], .member-nav a[href="/evenements"], .member-nav a[href="/mes-salons"], .member-nav a[href="/apparence"] { display: none; }
  .member-nav .count { position: absolute; top: 0; right: 18%; margin: 0; min-width: 1rem; line-height: 1rem; font-size: 0.65rem; }
}

/* Listes de l'espace membre (messages, contacts) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.25rem; border-bottom: 1px solid var(--border); }
.rows .who-block { flex: 1; min-width: 0; }
.rows .who-block a { font-weight: 600; text-decoration: none; }
.rows .preview { display: block; color: var(--muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .unread { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 0.5rem; font-size: 0.8rem; }
.rows .when { color: var(--muted); font-size: 0.8rem; }
.rows .row-actions { display: flex; gap: 0.4rem; }
.member-section + .member-section { margin-top: 1.5rem; }
.member-section h2 { font-size: 1.1rem; margin: 0 0 0.25rem; }

/* Recherche de membres */
.member-filters { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: end; margin: 1rem 0; }
.member-filters label:not(.inline) { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; color: var(--muted); }
.member-filters input[type="number"] { width: 5rem; }
.member-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.75rem; }
.member-tile {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.75rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
  cursor: pointer; font: inherit; text-align: center;
}
.member-tile:hover { border-color: var(--accent); }
.member-avatar { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; background: var(--bg); }
.member-avatar.big { width: 6rem; height: 6rem; }
.member-avatar.none { display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--muted); border: 1px solid var(--border); }
.member-name { font-weight: 600; word-break: break-word; }
.member-meta { color: var(--muted); font-size: 0.8rem; }
.dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #2e9d5b; margin-right: 0.35rem; }
#member-card { max-width: 26rem; width: calc(100% - 2rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 1.25rem; }
#member-card::backdrop { background: rgba(0, 0, 0, 0.45); }
.member-card-head { display: flex; gap: 1rem; align-items: center; }
.member-card-head h2 { margin: 0; }
.member-bio { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Champ ville : liste de suggestions sous le champ. */
.city-picker { position: relative; display: flex; flex-direction: column; gap: 0.35rem; }
.city-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 0; padding: 0.25rem 0; list-style: none;
  max-height: 16rem; overflow-y: auto; background: var(--surface); color: inherit;
  border: 1px solid var(--border); border-radius: 0.4rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.city-list[hidden] { display: none; }
.city-list li { padding: 0.45rem 0.75rem; cursor: pointer; }
.city-list li:hover, .city-list li[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }

/* Contenus gérés en ligne : sections, images, magazine */
.cms-section { margin: 1.5rem 0; }
.cms-section::after { content: ""; display: block; clear: both; }
.cms-body > :first-child { margin-top: 0; }
.cms-figure { margin: 1rem 0; }
.cms-figure img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.cms-figure figcaption { margin-top: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.cms-figure .credit { font-size: 0.85em; }
.cms-full { margin-left: 0; margin-right: 0; }
@media (min-width: 701px) {
  .cms-left { float: left; width: 42%; margin: 0.25rem 1.25rem 0.75rem 0; }
  .cms-right { float: right; width: 42%; margin: 0.25rem 0 0.75rem 1.25rem; }
}
.cms-article .lead { font-size: 1.15rem; color: var(--muted); max-width: 65ch; }
.mag-crumb { margin: 0 0 0.5rem; font-size: 0.95rem; }
.crumbs { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 0.5rem; }
.crumbs [aria-current="page"] { color: var(--text); }
.mag-meta { margin: 0.25rem 0 0.75rem; color: var(--muted); font-size: 0.9rem; }
.mag-cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.mag-cats a { padding: 0.2rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; }
.mag-cats a[aria-current="page"] { border-color: currentColor; font-weight: 600; }
.mag-cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mag-cards article { height: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 0 1rem; overflow: hidden; }
.mag-cards article > :not(.mag-cover) { margin-left: 1rem; margin-right: 1rem; }
.mag-cards h2 { margin: 0.25rem 1rem 0.4rem; font-size: 1.15rem; }
.mag-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.mag-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }
.mag-meta .tag { background: transparent; border: 1px solid var(--border); color: var(--text); text-decoration: none; margin: 0; }

/* Magazine : pages larges, « à la une », article avec marge latérale */
.page.page-mag, .page.page-member.page-mag > .card { max-width: 76rem; }
.mag .mag-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mag-une { grid-column: 1 / -1; }
.mag-une article:has(.mag-cover) { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 0 1.5rem; padding: 0; }
.mag-une .mag-cover { grid-row: 1 / span 4; }
.mag-une article:has(.mag-cover) > :not(.mag-cover) { margin-left: 0; margin-right: 1.5rem; }
.mag-une { font-size: 1.05rem; }
.mag-une h2 { margin: 0.25rem 1rem 0.6rem; font-size: 1.6rem; line-height: 1.25; }
.mag-une article:has(.mag-cover) h2 { margin-left: 0; }
.mag-une .mag-more { font-weight: 600; }
.mag-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 2.5rem; align-items: start; }
.mag-main { max-width: 52rem; }
.mag-side { position: sticky; top: 1rem; font-size: 0.95rem; }
.mag-side:not(:has(*)) { display: none; }
.mag-side h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.mag-side > * + * { margin-top: 1.5rem; }
.mag-side ul, .mag-side ol { margin: 0; padding-left: 1.1rem; }
.mag-side li + li { margin-top: 0.35rem; }
.mag-toc ol { list-style: none; padding-left: 0; border-left: 2px solid var(--border); }
.mag-toc li { padding-left: 0.75rem; }
.mag-seealso { margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.mag-seealso h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.mag-seealso ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.mag-seealso li { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: 0.9rem; }
.mag-seealso li > :not(.mag-seealso-cover) { margin-left: 1rem; margin-right: 1rem; }
.mag-seealso-cover { display: block; }
.mag-seealso-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.mag-seealso h3 { margin: 0.7rem 1rem 0.3rem; font-size: 1.05rem; line-height: 1.3; }
.mag-seealso p { margin: 0; font-size: 0.92rem; color: var(--muted, inherit); }

/* Chroniques : lecture resserrée, numéro en vedette (variables du thème seulement) */
.page.page-chroniques, .page.page-member.page-chroniques > .card { max-width: 46rem; }
.chro-list { list-style: none; margin: 1rem 0; padding: 0; }
.chro-entry { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.25rem; padding: 1.25rem 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.chro-list li:first-child .chro-entry { border-top: 0; }
.chro-num { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--accent); }
.chro-num small { display: block; margin-top: 0.4rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
.chro-body { display: grid; gap: 0.25rem; }
.chro-title { font-size: 1.25rem; line-height: 1.3; }
.chro-entry:hover .chro-title, .chro-entry:focus-visible .chro-title { text-decoration: underline; }
.chro-summary { color: var(--muted); }
.chro-meta { font-size: 0.85rem; color: var(--muted); }
.chro-kicker { margin: 1.5rem 0 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.chronique h1 { margin-top: 0.25rem; line-height: 1.2; }
.chro-salon { margin: 2rem 0 1rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); color: var(--text); }
.chro-salon p { margin: 0.25rem 0; }
.chro-back { margin-top: 2rem; }
@media (max-width: 520px) { .chro-entry { grid-template-columns: 4rem 1fr; gap: 0.9rem; } .chro-num { font-size: 1.9rem; } }
@media (max-width: 62rem) {
  .mag .mag-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .mag-side { position: static; }
}
@media (max-width: 40rem) {
  .mag .mag-cards { grid-template-columns: minmax(0, 1fr); }
  .mag-une article:has(.mag-cover) { display: block; padding-bottom: 1rem; }
  .mag-une article:has(.mag-cover) > :not(.mag-cover) { margin-left: 1rem; margin-right: 1rem; }
  .mag-une h2, .mag-une article:has(.mag-cover) h2 { margin: 0.25rem 1rem 0.4rem; font-size: 1.3rem; }
}

/* Écrits de membres (/ecrits, /mes-ecrits) */
.ecrit-warning { font-size: 0.9rem; margin: 0.5rem 0 1rem; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 0.4rem; color: var(--muted); }
.ecrit-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
#ecrits-root label { display: block; margin: 0.6rem 0; font-weight: 600; }
#ecrits-root label input[type="text"], #ecrits-root label select, #ecrits-root label textarea { display: block; width: 100%; max-width: 40rem; margin-top: 0.25rem; font-weight: 400; }
#ecrits-root label.inline { display: flex; align-items: baseline; gap: 0.35rem; flex-wrap: wrap; font-weight: 400; }
#ecrits-root textarea { font: inherit; line-height: 1.5; }
#ecrits-root .block-shell { border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.5rem 0.75rem; margin: 0.75rem 0; max-width: 42rem; }
#ecrits-root .block-text textarea { display: block; width: 100%; margin-top: 0.4rem; }
#ecrits-root .md-toolbar { display: flex; flex-wrap: wrap; gap: 0.3rem; }
#ecrits-root .md-toolbar button[title="Gras"] { font-weight: 700; }
#ecrits-root .md-toolbar button[title="Italique"] { font-style: italic; }
#ecrits-root .block-label { margin: 0 0 0.3rem; font-weight: 600; }
#ecrits-root .photo-preview img { display: block; max-width: 100%; max-height: 16rem; border-radius: 0.4rem; }
#ecrits-root .block-photo select, #ecrits-root .block-photo > input { display: block; width: 100%; margin-top: 0.4rem; }
#ecrits-root .block-photo .upload { margin: 0.5rem 0; padding: 0.5rem 0.75rem; border: 1px dashed var(--border); border-radius: 0.4rem; }
#ecrits-root .block-photo .upload-new { margin: 0.5rem 0; }
#ecrits-root .block-photo .upload-new summary { font-weight: 400; }
#ecrits-root .block-actions { margin: 0.4rem 0 0; text-align: right; }
#ecrits-root .blocks .block-shell:only-child .block-actions { display: none; }
#ecrits-root .block-add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
#ecrits-root .block-add small { margin-left: auto; }
#ecrits-root small.over { color: var(--danger, #b00020); font-weight: 600; }
#ecrits-root .readers { border: 1px solid var(--border); border-radius: 0.5rem; margin: 1rem 0; padding: 0.5rem 1rem; max-width: 42rem; }
#ecrits-root .readers legend { font-weight: 600; padding: 0 0.3rem; }
#ecrits-root details { margin: 1rem 0; max-width: 42rem; }
#ecrits-root details summary { cursor: pointer; font-weight: 600; }
#ecrits-root .ecrit-preview { border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.5rem 1rem; margin: 1rem 0; max-width: 42rem; }
#ecrits-root .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
#ecrits-root .actions .push-end { margin-left: auto; }
#ecrits-root .row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.member-dialog { max-width: 32rem; width: calc(100% - 2rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 1.25rem; }
.member-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.member-dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
#ecrits-root .rows img { border-radius: 0.25rem; height: 48px; width: 64px; object-fit: cover; }
#ecrits-root .tag, .ecrits-list .tag { margin-left: 0.25rem; background: transparent; border: 1px solid var(--border); color: var(--text); }
.profil-bio p { white-space: pre-line; overflow-wrap: anywhere; }
.profil-public { border: 1px solid var(--border); border-radius: 0.5rem; margin: 1rem 0; padding: 0.5rem 1rem; }
.profil-public legend { font-weight: 600; padding: 0 0.3rem; }
.profil-public small { display: block; margin: 0.15rem 0 0.75rem; }
.profil-public label.inline { display: flex; align-items: center; gap: 0.4rem; }
.mag-search { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; max-width: 28rem; }
.mag-search input[type="search"] { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Page « Apparence » : une carte par habillage, avec ses captures d'écran */
.skin-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 28rem), 1fr)); margin-top: 1.25rem; }
.skin-card { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.skin-card h2 { margin: 0; }
.skin-card p { margin: 0; }
.skin-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.skin-shots { display: grid; gap: 0.75rem; margin-top: auto; }
.skin-card:has(.skin-shots.two) { grid-column: 1 / -1; }
.skin-shots.two { grid-template-columns: repeat(2, minmax(0, 30rem)); }
.skin-shots figure { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.skin-shots img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; display: block; background: var(--surface); }
.skin-shots figcaption { text-align: center; }
@media (max-width: 30rem) { .skin-shots.two { grid-template-columns: 1fr; } }

/* Vignettes de l'accueil : aperçu de trois habillages */

/* Lisibilité des articles, chroniques et écrits (.cms-article) : texte à 18 px, interligne 1,7, ligne d'environ
   66 caractères, intertitres, citations, encadré « À retenir », sommaire, progression et réglages du lecteur
   (js/reading.js). Variables du thème seulement. --read-scale vient des réglages du lecteur. */
.cms-article { --read-scale: 1; }
.cms-article .cms-body, .cms-article .lead { font-size: calc(1.125rem * var(--read-scale)); line-height: 1.7; }
.cms-article.read-serif .cms-body, .cms-article.read-serif .lead { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
.cms-article .cms-body > * { max-width: 66ch; }
.cms-article .cms-body p { margin: 0 0 1.15em; }
.cms-article .cms-body pre { overflow-x: auto; }
.cms-article .lead { line-height: 1.6; }
.cms-article > h1, .cms-article .mag-main > h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.chronique h1 { font-size: 2rem; }

/* Intertitres : un filet fin et un trait d'accent repèrent chaque section */
.cms-article .cms-section { margin: 2.75rem 0 0; }
.cms-article .cms-section:first-of-type { margin-top: 1.5rem; }
.cms-article .cms-section > h2 { position: relative; margin: 0 0 0.75rem; padding-top: 1.1rem; border-top: 1px solid var(--border); font-size: 1.5rem; line-height: 1.25; scroll-margin-top: 1rem; }
.cms-article .cms-section > h2::before { content: ""; position: absolute; top: -1px; left: 0; width: 3rem; height: 3px; border-radius: 2px; background: var(--accent); }
.cms-article .cms-section:first-of-type > h2 { border-top-color: transparent; }
.cms-article .cms-body h3 { margin: 1.6em 0 0.4em; font-size: 1.15rem; line-height: 1.3; }

/* Citations, listes, liens */
.cms-article .cms-body blockquote { margin: 1.6rem 0; padding: 0.9rem 1.2rem; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent-soft); font-style: italic; }
.cms-article .cms-body blockquote > :last-child { margin-bottom: 0; }
.cms-article .cms-body ul, .cms-article .cms-body ol { margin: 0 0 1.2em; padding-left: 1.4rem; }
.cms-article .cms-body li { margin: 0.45em 0; padding-left: 0.2rem; }
.cms-article .cms-body li::marker { color: var(--accent); font-weight: 700; }
.cms-article .cms-body a { text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
.cms-article .cms-body strong { font-weight: 800; }

/* Encadré « À retenir » : > **À retenir** dans le texte d'une section */
.cms-article .cms-body blockquote.callout { padding: 1rem 1.25rem; border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); font-style: normal; }
.cms-article .cms-body blockquote.callout > p:first-child { margin: 0 0 0.4rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.cms-article .cms-body blockquote.callout > p:first-child strong { font-weight: 800; }
.cms-article .cms-body blockquote.callout ul, .cms-article .cms-body blockquote.callout ol { margin-bottom: 0; }

/* Sommaire : section en cours mise en évidence (bureau), repliable en haut de l'article (mobile) */
.mag-toc a { display: block; padding: 0.1rem 0; color: var(--muted); text-decoration: none; }
.mag-toc a:hover, .mag-toc a:focus-visible { color: var(--text); text-decoration: underline; }
.mag-toc h2 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mag-toc li { margin-left: -2px; border-left: 2px solid transparent; }
.mag-toc li.on { border-left-color: var(--accent); }
.mag-toc li.on a { color: var(--text); font-weight: 700; }
.toc-mobile { display: none; margin: 0.25rem 0 1.25rem; padding: 0.2rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.toc-mobile summary { padding: 0.5rem 0; font-weight: 700; cursor: pointer; }
.toc-mobile ol { margin: 0.2rem 0 0.6rem; padding-left: 1.2rem; }
.toc-mobile li { margin: 0.35rem 0; }
@media (max-width: 62rem) {
  .mag-toc { display: none; }
  .toc-mobile { display: block; }
}

/* Progression de lecture (barre en haut de page, temps restant en bas) et réglages du lecteur */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 4px; pointer-events: none; }
.read-progress i { display: block; width: 0; height: 100%; background: var(--accent); }
.read-chip { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; padding: 0.3rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 0.85rem; box-shadow: 0 2px 8px rgb(0 0 0 / 0.12); pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.read-chip.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .read-chip { transition: none; } }
.read-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0 0 1.25rem; font-size: 0.85rem; color: var(--muted); }
.read-tools[hidden] { display: none; }
.read-tools button { padding: 0.25rem 0.65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.read-tools button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.read-tools button:disabled { opacity: 0.45; cursor: default; }

/* Chroniques : chapeau, lettrine, fleuron et navigation de fin */
.chronique .lead { max-width: 60ch; padding-left: 1rem; border-left: 3px solid var(--accent); font-size: calc(1.3rem * var(--read-scale)); font-style: italic; line-height: 1.5; color: var(--text); }
.chronique .cms-section:first-of-type .cms-body > p:first-child::first-letter { float: left; padding: 0.3rem 0.55rem 0 0; font-size: 3.6rem; font-weight: 800; line-height: 0.85; color: var(--accent); }
.chro-fleuron { margin: 2.5rem 0 1rem; text-align: center; letter-spacing: 0.6em; color: var(--accent); }
.chro-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.95rem; }
.chro-nav small { display: block; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.chro-nav > :last-child { text-align: right; }
.chro-nav > :only-child { margin-left: auto; }
@media (max-width: 520px) { .cms-article > h1, .cms-article .mag-main > h1, .chronique h1 { font-size: 1.6rem; } .chro-nav { flex-direction: column; } .chro-nav > :last-child { text-align: left; } }

/* Rencontres (page « Mes rencontres ») */
#dating-root [hidden] { display: none !important; }
.dating-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.dating-room { list-style: none; border: 1px solid var(--border, #ccc); border-radius: 0.5rem; padding: 0.6rem 0.9rem; margin: 0 0 0.7rem; }
.dating-room h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.dating-room p { margin: 0.2rem 0; }
#dating-root ul.plain-list { padding: 0; }
.dating-tile { align-items: stretch; text-align: left; }
.dating-tile .member-avatar { align-self: center; }
.dating-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.dating-checks { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.dating-form h2, .dating-section h2 { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; }
.dating-form fieldset, .dating-filters fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.75rem; }
.dating-form .field, .dating-sensitive .field { display: flex; flex-direction: column; gap: 0.2rem; margin: 0.5rem 0; }
.dating-form textarea { width: 100%; }
.dating-form .row, .dating-sensitive .row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.dating-sensitive { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.9rem; margin: 0.75rem 0; }
.dating-sensitive h3 { margin: 0.25rem 0; font-size: 1rem; }
.dating-photos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.dating-photo { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: var(--radius); background: var(--bg); }
.dating-photo-pick { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; max-width: 6.5rem; }
.dating-attrs { list-style: none; padding: 0; margin: 0.5rem 0; }
#dating-dialog { max-width: 32rem; width: calc(100% - 2rem); max-height: 90vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 1.25rem; }
#dating-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

.dating-requests { list-style: none; margin: 0.5rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.dating-request { display: flex; gap: 0.9rem; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem; }
.dating-request .member-tile { width: 9rem; flex: none; }
.dating-request .member-bio { margin: 0 0 0.5rem; }
.dating-tabs button { white-space: nowrap; }
.dating-cards { display: flex; justify-content: center; margin: 1rem 0; }
.dating-card { text-align: center; max-width: 22rem; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.dating-card .row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.dating-modes { margin: 0.5rem 0; }
.dating-example-tag { align-self: center; background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.dating-samples { margin-top: 1.5rem; }
.dating-searches { list-style: none; margin: 0.5rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dating-saved { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.8rem; }
.dating-saved > div:first-child { flex: 1 1 14rem; }
.verif-item { border-bottom: 1px solid var(--border); padding: 0.6rem 0; }
.verif-compare { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.verif-compare figure { margin: 0; }
.verif-compare .photo-view { max-width: 14rem; max-height: 16rem; object-fit: contain; }
.verif-photos { display: flex; flex-wrap: wrap; gap: 0.4rem; }
