/**
 * Utrum — Styles Applicatifs Intégrés
 * Aligné rigoureusement sur les maquettes Utrum
 */

/* ==========================================================================
   1. Reset & Fondations Typographiques
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--background, #F5F1EA);
  color: var(--foreground, #1E1B16);
  font-family: var(--font-sans, "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link, #2E6B5B);
  text-decoration: none;
  transition: color var(--dur-fast, 120ms) ease;
}

a:hover {
  color: var(--link-hover, #1F4D41);
}

:focus-visible {
  outline: 2px solid var(--link, #2E6B5B);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -9999px;
  left: 24px;
  z-index: 1000;
  padding: 8px 16px;
  background: #1E1B16;
  color: #F5F1EA;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background, #F5F1EA);
}

/* ==========================================================================
   2. Header & Navigation (68px, 1120px max)
   ========================================================================== */
.app-header {
  border-bottom: 1px solid var(--border, #E4DDD1);
  background: var(--background, #F5F1EA);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-nav {
  max-width: var(--max-width, 1120px);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--foreground, #1E1B16);
}

.brand-link {
  flex-shrink: 0;
}

/* Logo (symbole + « trum ») : 21 px de haut ≈ l'ancien texte en 27 px.
   Les proportions suivent le viewBox 138 × 34. */
.brand-logo {
  display: block;
  flex-shrink: 0;
  height: 21px;
  width: 85px;
}
.brand-logo-text {
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  fill: var(--foreground, #1E1B16);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill, 999px);
  background: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--dur-fast, 120ms) ease, background var(--dur-fast, 120ms) ease;
}
.nav-cta-btn:hover {
  background: var(--primary-hover, #3A352D);
  color: var(--primary-foreground, #F5F1EA);
  transform: translateY(-1px);
}

/* CTA de l'en-tête uniquement (.nav-cta-btn est aussi réutilisé dans home.php
   et profile.php : ces variantes ne doivent pas hériter des règles ci-dessous) */
.app-nav .nav-cta-btn {
  position: relative;
  flex-shrink: 0;
  justify-content: center;
  min-width: 44px;
  white-space: nowrap;
}
.app-nav .nav-cta-btn svg {
  flex-shrink: 0;
}

.nav-cta-subprice {
  font-weight: 400;
  color: var(--border-strong, #CFC6B7);
}

/* Libellé court : invisible par défaut, affiché sur petits écrans */
.nav-cta-short {
  display: none;
}

.nav-user-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill, 999px);
  background: var(--avatar-default-bg, #F8EBCD);
  color: var(--avatar-default-fg, #6E4A0E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  transition: transform var(--dur-fast, 120ms) ease, box-shadow var(--dur-fast, 120ms) ease;
}
.nav-user-avatar:hover {
  transform: scale(1.05);
}
.nav-user-avatar.is-current {
  background: var(--hero-accent, #E2A93B);
  color: var(--foreground, #1E1B16);
}

.nav-link-logout {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--muted-foreground, #6E675D);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.nav-link-logout:hover {
  color: var(--foreground, #1E1B16);
  background: var(--muted, #EFE9DF);
}

.nav-auth-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground, #1E1B16);
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
}
.nav-auth-link:hover {
  background: var(--background, #F5F1EA);
}

/* --- En-tête responsive : une seule ligne de 320 px à l'ordinateur ---
   Les parties masquées utilisent le motif .sr-only : elles restent dans le
   nom accessible du lien (« Poser une question · dès 0,75 $ »). */

/* <= 640 px : le prix quitte l'affichage, reste lu par les lecteurs d'écran */
@media (max-width: 640px) {
  .nav-cta-subprice {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* <= 520 px : marque compacte, libellé visible court « + Question » */
@media (max-width: 520px) {
  .app-nav {
    gap: 12px;
  }
  .brand-link {
    gap: 8px;
  }
  .brand-logo {
    height: 19px;
    width: 77px;
  }
  .nav-actions {
    gap: 8px;
  }
  .app-nav .nav-cta-btn {
    gap: 6px;
    padding: 0 14px;
    font-size: 14px;
  }
  .nav-cta-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .nav-cta-short {
    display: inline;
  }
  .nav-auth-link {
    padding: 0 12px;
    font-size: 14px;
  }
}

/* <= 380 px : bouton rond 44 x 44 avec l'icône + seule */
@media (max-width: 380px) {
  .app-nav .nav-cta-btn {
    width: 44px;
    padding: 0;
  }
  .nav-cta-short {
    display: none;
  }
}

/* --- Lien « Administration » (US-5.7), admins uniquement ---
   Pastille avec libellé > 900 px, puis icône ronde 44 x 44 ; le libellé
   reste le nom accessible (motif .sr-only). La classe .has-admin sur
   .app-nav compacte le reste de l'en-tête pour tenir sur une seule ligne. */
.nav-admin-link {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast, 120ms) ease, border-color var(--dur-fast, 120ms) ease;
}
.nav-admin-link:hover {
  color: var(--foreground, #1E1B16);
  background: var(--background, #F5F1EA);
  border-color: var(--foreground-secondary, #4A443B);
}
.nav-admin-link.is-current {
  background: var(--primary, #1E1B16);
  border-color: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
}
.nav-admin-link svg {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .nav-admin-link {
    width: 44px;
    padding: 0;
  }
  .nav-admin-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* <= 640 px (admin) : libellé court « + Question » dès ce seuil */
@media (max-width: 640px) {
  .app-nav.has-admin .nav-cta-btn {
    gap: 6px;
    padding: 0 14px;
    font-size: 14px;
  }
  .app-nav.has-admin .nav-cta-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .app-nav.has-admin .nav-cta-short {
    display: inline;
  }
}

/* <= 520 px (admin) : seul le U du logo reste visible, le SVG étant rogné à droite
   (preserveAspectRatio « xMinYMid slice ») ; le lien garde son aria-label « Utrum — Accueil » */
@media (max-width: 520px) {
  .app-nav.has-admin .brand-logo {
    width: 16px;
  }
}

/* <= 380 px (admin) : le bouton rond reprend le dessus */
@media (max-width: 380px) {
  .app-nav.has-admin .nav-cta-btn {
    width: 44px;
    padding: 0;
  }
  .app-nav.has-admin .nav-cta-short {
    display: none;
  }
}

/* ==========================================================================
   3. Main Content Flow & Notifications
   ========================================================================== */
.main-content-flow {
  flex-grow: 1;
  width: 100%;
  max-width: var(--max-width, 1120px);
  margin: 0 auto;
  padding: 36px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.home-layout-flow {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.question-detail-flow,
.new-question-flow {
  max-width: var(--measure, 728px);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.my-profile-flow,
.public-profile-flow {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Flash alerts */
.flash-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-pill, 999px);
  font-size: 15px;
  font-weight: 500;
}
.flash-banner-success {
  background: #E2EEE8;
  color: #1F4D41;
}
.flash-banner-error {
  background: #F7E4DC;
  color: #7A2F1C;
}
.flash-banner-warning {
  background: #F8EBCD;
  color: #6E4A0E;
}
.flash-banner-msg {
  flex-grow: 1;
}
.flash-banner-dismiss {
  background: none;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}
.flash-banner-dismiss:hover {
  opacity: 1;
}

/* ==========================================================================
   4. Section Hero Sombre (#1E1B16) avec '?' en filigrane
   ========================================================================== */
.hero-dark-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 56px;
  background: #1E1B16;
  color: #F5F1EA;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 56px;
  align-items: end;
}

.hero-watermark {
  position: absolute;
  right: -30px;
  top: -150px;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 520px;
  line-height: 1;
  font-weight: 500;
  color: #F5F1EA;
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
}

.hero-left-col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--hero-accent, #E2A93B);
  color: #1E1B16;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title-text {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 44px;
  line-height: 50px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  word-wrap: anywhere;
}

.hero-title-anchor {
  color: #F5F1EA;
  text-decoration: none;

}
.hero-title-anchor:hover {
  color: #FFFDF8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  color: #B9B0A2;
}

.hero-author-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-author-anon {
  font-style: italic;
}

.hero-author-link {
  color: #F5F1EA;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hero-author-link:hover {
  text-decoration: underline;
}

.hero-meta-sep {
  opacity: 0.6;
}

.hero-right-col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-opinion-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B9B0A2;
}

.hero-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-vote-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.hero-btn-oui {
  height: 76px;
  border-radius: 16px;
  background: var(--hero-vote-yes, #7DBBA6);
  color: var(--hero-vote-yes-text, #12201B);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
  border: 0;
  cursor: pointer;
  transition: transform 0.12s linear, filter 0.2s;
}
.hero-btn-oui:hover {
  filter: brightness(1.06);
}
.hero-btn-oui:active {
  transform: scale(0.97);
}

.hero-btn-non {
  height: 76px;
  border-radius: 16px;
  background: var(--hero-vote-no, #E58E6E);
  color: var(--hero-vote-no-text, #2A120A);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
  border: 0;
  cursor: pointer;
  transition: transform 0.12s linear, filter 0.2s;
}
.hero-btn-non:hover {
  filter: brightness(1.06);
}
.hero-btn-non:active {
  transform: scale(0.97);
}

.hero-note-text {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #B9B0A2;
}

.hero-voted-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.hero-voted-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #E2EEE8;
  color: #1F4D41;
  font-weight: 600;
  font-size: 14px;
}

.hero-results-link {
  color: #F5F1EA;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero-results-link:hover {
  color: #FFFDF8;
}

/* --- Écran de bienvenue (base vide) : réutilise .hero-dark-card --- */
.welcome-card {
  align-items: center;
}
.welcome-lead {
  margin: 0;
  max-width: 40ch;
  font-size: 18px;
  line-height: 28px;
  color: #D8D0C3;
}
.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 8px;
}
.welcome-cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-pill, 999px);
  background: var(--hero-accent, #E2A93B);
  color: var(--hero-accent-fg, #1E1B16);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur-fast, 120ms) ease, filter 0.2s;
}
.welcome-cta-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.welcome-cta-btn:focus-visible,
.welcome-secondary-link:focus-visible {
  outline: 2px solid #F5F1EA;
  outline-offset: 3px;
}
.welcome-secondary-link {
  color: #F5F1EA;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.welcome-secondary-link:hover {
  color: #FFFDF8;
}
.welcome-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(245, 241, 234, 0.06);
  border: 1px solid rgba(245, 241, 234, 0.1);
}
.welcome-step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #F5F1EA;
  color: #1E1B16;
  font-weight: 700;
  font-size: 15px;
}
.welcome-step:nth-child(2) .welcome-step-num {
  background: var(--hero-vote-yes, #7DBBA6);
  color: var(--hero-vote-yes-text, #12201B);
}
.welcome-step:nth-child(3) .welcome-step-num {
  background: var(--hero-vote-no, #E58E6E);
  color: var(--hero-vote-no-text, #2A120A);
}
.welcome-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 20px;
  color: #B9B0A2;
}
.welcome-step-text strong {
  color: #F5F1EA;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

/* --- Grille vide (ex. seule question = celle à la Une) --- */
.empty-questions-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px;
  border: 1px dashed var(--border-strong, #CFC6B7);
  border-radius: 20px;
  text-align: center;
}
.empty-questions-msg {
  margin: 0;
  max-width: 48ch;
  color: var(--muted-foreground, #6B6358);
  font-size: 16px;
  line-height: 24px;
}

/* ==========================================================================
   5. Toolbar de tri & Grille de questions (.qcard)
   ========================================================================== */
.questions-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #E4DDD1);
}

.toolbar-title-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.toolbar-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.toolbar-count {
  font-size: 14px;
  color: var(--muted-foreground, #6E675D);
}

.toolbar-sort-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-sort-label {
  font-size: 14px;
  color: var(--muted-foreground, #6E675D);
}

.toolbar-sort-select {
  height: 44px;
  padding: 0 36px 0 16px;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 999px;
  background: var(--surface, #FFFDF8);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground, #1E1B16);
  cursor: pointer;
}

.qcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.qcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 14px;
  min-height: 220px;
  box-sizing: border-box;
  transition: box-shadow 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s;
}

.qcard:hover {
  box-shadow: 0 10px 24px rgba(60, 45, 20, 0.08);
  transform: translateY(-2px);
  border-color: var(--border-strong, #CFC6B7);
}

.qcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.qcard-date {
  font-size: 13px;
  color: var(--muted-foreground, #6E675D);
}

.qcard-badge-voted {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #E2EEE8;
  color: #1F4D41;
  font-size: 12px;
  font-weight: 600;
}

.qtitle {
  margin: 0;
  flex-grow: 1;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 21px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.qtitle a {
  color: var(--foreground, #1E1B16);
  text-decoration: none;
}
.qcard:hover .qtitle a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.qcard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle, #EFE9DF);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

.qcard-author {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin: -12px 0;
  font-weight: 600;
  max-width: 24ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qcard-anon {
  font-style: italic;
  font-weight: 400;
  color: var(--muted-foreground, #6E675D);
}

.qcard-signed {
  color: var(--link, #2E6B5B);
  text-decoration: none;
}
.qcard-signed:hover {
  color: var(--link-hover, #1F4D41);
  text-decoration: underline;
}

.qcard-pub-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle, #EFE9DF);
  font-size: 14px;
  color: var(--muted-foreground, #6E675D);
}

/* ==========================================================================
   6. Pagination Bar (Pilules 999px)
   ========================================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 15px;
  margin-top: 16px;
}

.pagination-pill-link {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 999px;
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.pagination-pill-link:hover {
  background: #F5F1EA;
  transform: translateY(-1px);
}

.pagination-pill-disabled {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 999px;
  color: var(--meta-subtle, #A39B8E);
  pointer-events: none;
}

.pagination-status {
  color: var(--muted-foreground, #6E675D);
}

/* ==========================================================================
   7. Page Question Détail (Avant et Après Vote)
   ========================================================================== */
.back-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground, #6E675D);
  text-decoration: none;
}
.back-nav-link:hover {
  color: var(--foreground, #1E1B16);
}

.qdetail-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qdetail-date-badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground, #6E675D);
}

.qdetail-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 42px;
  line-height: 50px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.qdetail-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

.qdetail-anon {
  font-style: italic;
}

.qdetail-author-link {
  color: var(--link, #2E6B5B);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qdetail-author-link:hover {
  text-decoration: underline;
}

/* Boutons de vote détaillés OUI (#2E6B5B) / NON (#B24A30) */
.qvote-box,
.qvote-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.qvote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.qbtn-oui {
  height: 92px;
  border-radius: 18px;
  border: 0;
  background: var(--vote-yes, #2E6B5B);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s linear, filter 0.2s;
}
.qbtn-oui:hover {
  filter: brightness(1.08);
}
.qbtn-oui:active {
  transform: scale(0.97);
}
.qbtn-oui.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qbtn-non {
  height: 92px;
  border-radius: 18px;
  border: 0;
  background: var(--vote-no, #B24A30);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s linear, filter 0.2s;
}
.qbtn-non:hover {
  filter: brightness(1.08);
}
.qbtn-non:active {
  transform: scale(0.97);
}
.qbtn-non.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qvote-note {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
  text-align: center;
}

/* Encart Résultats Masqués */
.qmasked-card {
  border: 1px dashed var(--border-strong, #CFC6B7);
  border-radius: 18px;
  background: var(--muted, #EFE9DF);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.qmasked-placeholder-bars {
  display: flex;
  gap: 6px;
  width: 220px;
  height: 12px;
}
.qmasked-bar-3 {
  flex: 3;
  border-radius: 999px;
  background: #D8D0C3;
}
.qmasked-bar-2 {
  flex: 2;
  border-radius: 999px;
  background: #D8D0C3;
}

.qmasked-title {
  margin: 8px 0 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground, #1E1B16);
}

.qmasked-desc {
  margin: 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 24px;
  color: #4A443B;
  text-wrap: pretty;
}

/* Encart Résultats Révélés */
.qresults-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.qresults-top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.qresults-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground, #6E675D);
}

.qchoice-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.qchoice-yes {
  background: #E2EEE8;
  color: #1F4D41;
}
.qchoice-no {
  background: #F7E4DC;
  color: #7A2F1C;
}

.qpercentages-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.qpercentage-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.qpercent-yes {
  align-items: flex-start;
  color: #2E6B5B;
}
.qpercent-no {
  align-items: flex-end;
  color: #B24A30;
}

.qpercentage-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: inherit;
}

.qpercentage-value {
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 64px;
  line-height: 68px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: inherit;
}

/* Jauge bicolore #3F8C76 / #D0714F */
.qgauge-track {
  display: flex;
  gap: 4px;
  height: 18px;
}

.qgauge-segment-yes {
  border-radius: 999px;
  background: #3F8C76;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.qgauge-segment-no {
  flex-grow: 1;
  border-radius: 999px;
  background: #D0714F;
}

.qgauge-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.qvote-tally {
  font-size: 14px;
  color: var(--muted-foreground, #6E675D);
}

.btn-change-mind {
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.btn-change-mind:hover {
  background: var(--background, #F5F1EA);
}

.change-mind-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle, #EFE9DF);
}

.change-mind-title {
  margin: 0;
  font-size: 15px;
  color: #4A443B;
}

.change-mind-form {
  margin: 0;
}

.change-mind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.change-btn {
  height: 68px;
  border-radius: 16px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.change-btn.is-current {
  background: #EFE9DF;
  color: #6E675D;
  border: 1px solid #E4DDD1;
  cursor: default;
}
.change-btn.is-actionable-yes {
  background: #2E6B5B;
  color: #FFFFFF;
  border: 1px solid #2E6B5B;
}
.change-btn.is-actionable-no {
  background: #B24A30;
  color: #FFFFFF;
  border: 1px solid #B24A30;
}

.change-btn-sub {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

/* Panneaux démographiques "Qui a voté quoi" */
.demographics-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.demo-heading {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.demo-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.demo-table-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.demo-table-caption {
  text-align: left;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4A443B;
}

.demo-thead-row {
  border-bottom: 1px solid var(--border, #E4DDD1);
  font-size: 12px;
  color: var(--muted-foreground, #6E675D);
}

.demo-th-group {
  text-align: left;
  font-weight: 500;
  padding: 6px 0;
}

.demo-th-num {
  text-align: right;
  font-weight: 500;
  padding: 6px 12px;
  width: 64px;
}

.demo-th-bar {
  padding: 6px 0;
  width: 180px;
}

.demo-tbody-row {
  border-bottom: 1px solid var(--border-subtle, #EFE9DF);
}

.demo-td-label {
  text-align: left;
  font-weight: 500;
  padding: 10px 0;
}

.demo-td-num {
  text-align: right;
  padding: 10px 12px;
  color: var(--muted-foreground, #6E675D);
}

.demo-td-yes {
  text-align: right;
  padding: 10px 12px;
  font-weight: 700;
  color: #2E6B5B;
}

.demo-td-no {
  text-align: right;
  padding: 10px 0 10px 12px;
  font-weight: 700;
  color: #B24A30;
}

.demo-td-bar {
  padding: 10px 0;
}

.demo-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #D0714F;
  overflow: hidden;
}

.demo-bar-yes {
  height: 100%;
  background: #3F8C76;
}

.demo-td-masked {
  padding: 10px 0 10px 12px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted-foreground, #6E675D);
}

.demo-details {
  margin-top: 4px;
}

.demo-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--link, #2E6B5B);
  cursor: pointer;
  list-style: none;
}
.demo-summary::-webkit-details-marker {
  display: none;
}

.demo-summary .chev {
  transition: transform 0.2s ease;
}
details[open] .demo-summary .chev {
  transform: rotate(180deg);
}

.demo-details-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-foreground, #6E675D);
  scroll-margin-top: 84px; /* en-tête collant */
  border-radius: 6px;
  transition: background-color 600ms ease;
}
.demo-details-note:target {
  background: var(--background, #F5F1EA);
  outline: 2px solid var(--border-strong, #CFC6B7);
  outline-offset: 4px;
}
.demo-mask-ref {
  margin-left: 2px;
  padding: 0 2px;
  font-style: normal;
  font-weight: 700;
  color: var(--foreground-secondary, #4A443B);
  text-decoration: none;
}
.demo-mask-ref:hover {
  text-decoration: underline;
}

/* ==========================================================================
   8. Écran Nouvelle Question /questions/new (mockup_poser_question.html)
   ========================================================================== */
.nq-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nq-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 42px;
  line-height: 48px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.nq-subtitle {
  margin: 0;
  font-size: 17px;
  line-height: 26px;
  color: var(--muted-foreground, #6E675D);
}

.nq-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
}

.nq-field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nq-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4A443B;
}

.nq-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 128px;
  padding: 18px 20px;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 14px;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 24px;
  line-height: 32px;
  color: var(--foreground, #1E1B16);
  background: var(--surface, #FFFDF8);
  transition: border-color var(--dur-fast);
}
.nq-textarea:focus {
  outline: 2px solid var(--link, #2E6B5B);
  outline-offset: 2px;
  border-color: var(--link, #2E6B5B);
}
.nq-textarea::placeholder {
  color: var(--meta-subtle, #A39B8E);
}

.nq-counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Badge de palier (page de modification d'une question) */
.nq-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.nq-tier-standard {
  background: #E2EEE8;
  color: #1F4D41;
}
.nq-tier-extended {
  background: #E3EBF4;
  color: #284D78;
}

.nq-pricing {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 16px;
  background: var(--surface, #FFFDF8);
}
.nq-pricing-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.nq-pricing-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--border, #E4DDD1);
}
.nq-pricing-fill {
  height: 100%;
  border-radius: 999px;
  background: #2E6B5B;
  transition: width 0.15s linear, background-color 0.2s;
}
.nq-pricing-fill.is-extended {
  background: #284D78;
}
.nq-pricing-tick {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--muted-foreground, #6E675D);
}
.nq-pricing-tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 160fr 140fr; /* proportionnel aux paliers 1–160 / 161–300 */
  gap: 8px;
}
.nq-pricing-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 8px;
  padding: 10px 12px;
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 12px;
  color: var(--muted-foreground, #6E675D);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.nq-pricing-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nq-pricing-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground, #1E1B16);
}
.nq-pricing-range {
  grid-column: 1 / -1;
  font-size: 13px;
}
.nq-pricing-tier.is-standard.is-active {
  background: #E2EEE8;
  border-color: #2E6B5B;
  color: #1F4D41;
}
.nq-pricing-tier.is-extended.is-active {
  background: #E3EBF4;
  border-color: #284D78;
  color: #284D78;
}
.nq-pricing-why {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted-foreground, #6E675D);
}
@media (max-width: 420px) {
  .nq-pricing-tiers { grid-template-columns: 1fr; }
}

.nq-char-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground, #6E675D);
  transition: color 0.2s;
}

.nq-advice {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

.nq-option-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: background 0.2s, border-color 0.2s;
}

.nq-checkbox {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #1E1B16;
  flex-shrink: 0;
  cursor: pointer;
}

.nq-option-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.nq-option-title {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  cursor: pointer;
}

.nq-option-desc {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

.nq-option-note {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: #4A443B;
}

/* Récapitulatif noir #1E1B16 */
.nq-recap-box {
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #1E1B16;
  color: #F5F1EA;
}

.nq-recap-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B9B0A2;
}

.nq-recap-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nq-recap-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  line-height: 22px;
}

.nq-recap-label {
  color: #D8D0C3;
}

.nq-recap-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #3A352D;
}

.nq-total-label {
  font-size: 16px;
  font-weight: 600;
}

.nq-total-amount {
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 36px;
  line-height: 40px;
  font-weight: 500;
}

.nq-pay-btn {
  margin-top: 8px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #3A352D;
  color: #B9B0A2;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: not-allowed;
  transition: background 0.2s, color 0.2s, transform 0.12s;
}
.nq-pay-btn.is-active {
  background: #F5F1EA;
  color: #1E1B16;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.nq-pay-btn.is-active:hover {
  background: #FFFDF8;
  transform: translateY(-1px);
}

.nq-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-top: 4px;
}

.nq-consent-checkbox {
  accent-color: #F5F1EA;
}

.nq-consent-label {
  font-size: 14px;
  line-height: 20px;
  color: #F5F1EA;
  cursor: pointer;
  text-wrap: pretty;
}

.nq-consent-label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nq-admin-note {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #F5F1EA;
}

.nq-recap-legal {
  margin: 0;
  font-size: 13px;
  line-height: 19px;
  color: #B9B0A2;
  text-align: center;
  text-wrap: pretty;
}

/* ==========================================================================
   9. Écran Mon Profil /profile (mockup_mon_profil.html)
   ========================================================================== */
.mp-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.mp-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mp-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--hero-accent, #E2A93B);
  color: #1E1B16;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 30px;
  font-weight: 600;
  flex-shrink: 0;
}

.mp-user-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 38px;
  line-height: 44px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.mp-username {
  font-size: 15px;
  color: var(--muted-foreground, #6E675D);
}

.mp-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--muted, #EFE9DF);
  color: #4A443B;
  font-size: 13px;
  font-weight: 600;
}

.mp-grid-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.mp-sidebar {
  flex: 1 1 340px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mp-main-col {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mp-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.mp-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.mp-card-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4A443B;
}

.mp-card-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted-foreground, #6E675D);
}

.mp-identity-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  row-gap: 12px;
  font-size: 15px;
  line-height: 22px;
}
.mp-identity-dl dt {
  color: var(--muted-foreground, #6E675D);
}
.mp-identity-dl dd {
  margin: 0;
}

.mp-dim-age {
  color: var(--muted-foreground, #6E675D);
}

.mp-residence-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mp-expat-pill {
  padding: 2px 10px;
  border-radius: 999px;
  background: #E3EBF4;
  color: #284D78;
  font-size: 12px;
  font-weight: 700;
}

.mp-settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 16px 0 0;
}

.mp-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.mp-switch-label {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.mp-url-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-url-preview-text {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #4A443B;
}

.mp-inline-link {
  font-weight: 600;
  color: var(--link, #2E6B5B);
}

.mp-private-text {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #4A443B;
}

.mp-bio-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-bio-label {
  font-size: 15px;
  font-weight: 600;
}

.mp-bio-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 12px;
  background: var(--surface, #FFFDF8);
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  color: var(--foreground, #1E1B16);
}
.mp-bio-textarea:focus {
  outline: 2px solid var(--link, #2E6B5B);
  outline-offset: 2px;
}

.mp-bio-counter {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground, #6E675D);
}

.mp-save-btn {
  height: 46px;
  border-radius: 999px;
  border: 0;
  background: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.mp-save-btn:hover {
  background: var(--primary-hover, #3A352D);
}

.mp-certified-card {
  background: #E3EBF4;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 0;
}

.mp-certified-heading {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1B3554;
}

.mp-certified-desc {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
  color: #284D78;
}

.mp-certified-btn {
  align-self: flex-start;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #3567A0;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.mp-certified-btn:hover {
  background: #284D78;
  color: #FFFFFF;
}

.mp-section-card {
  padding: 24px 28px;
}

.mp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.mp-section-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 26px;
  line-height: 32px;
  font-weight: 500;
}

.mp-section-count {
  font-size: 14px;
  color: var(--muted-foreground, #6E675D);
}

.mp-items-list {
  display: flex;
  flex-direction: column;
}

.mp-item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border-subtle, #EFE9DF);
}

.mp-item-info {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-item-title {
  color: var(--foreground, #1E1B16);
  text-decoration: none;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 19px;
  line-height: 25px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mp-item-title:hover {
  text-decoration: underline;
}

.mp-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted-foreground, #6E675D);
}

.mp-status-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.st-paid {
  background: #E2EEE8;
  color: #1F4D41;
}
.st-pending {
  background: #F8EBCD;
  color: #6E4A0E;
}
.st-failed {
  background: #F7E4DC;
  color: #7A2F1C;
}

.mp-retry-form {
  display: inline;
  margin: 0;
}
.mp-retry-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #B24A30;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.mp-retry-link:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
  border-radius: 2px;
}

.mp-toggle-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin: 0;
}

.mp-toggle-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 64px;
  max-width: 9.5em; /* « Pseudo masqué (profil privé) » passe sur 2 lignes plutôt que d'écraser le titre */
  text-align: right;
}
.mp-toggle-label.is-pub {
  color: #2E6B5B;
}
.mp-toggle-label.is-anon {
  color: #6E675D;
}
.mp-toggle-label.is-masked {
  color: var(--hero-accent-icon, #9A6A14);
}

/* Ancre /profile#visibilite : compense l'en-tête collant (68px) */
#visibilite {
  scroll-margin-top: 88px;
}
.mp-vote-choice-box {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.choice-yes {
  background: #E2EEE8;
  color: #2E6B5B;
}
.choice-no {
  background: #F7E4DC;
  color: #B24A30;
}

.txt-yes {
  color: #2E6B5B;
}
.txt-no {
  color: #B24A30;
}

.mp-flip-form {
  margin: 0;
}

.mp-flip-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.mp-flip-btn:hover {
  background: var(--background, #F5F1EA);
}

/* ==========================================================================
   10. Écran Profil Public /u/{username} & 404 (mockup_profil_public.html)
   ========================================================================== */
/* En-tête d'identité : mobile d'abord (une colonne), puis avatar + infos, puis compteurs à droite */
.pub-header-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "avatar"
    "info"
    "stats";
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-2xl, 24px);
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
}

.pub-avatar-circle {
  grid-area: avatar;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-pill, 999px);
  background: var(--link, #2E6B5B);
  color: var(--primary-foreground, #F5F1EA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 38px;
  font-weight: 500;
  flex-shrink: 0;
}

/* Liseré bleu certifié autour de l'avatar (redondant avec le badge, purement décoratif) */
.pub-avatar-circle.is-verified {
  box-shadow: 0 0 0 4px var(--surface, #FFFDF8), 0 0 0 6px var(--verified, #3567A0);
}

.pub-info-col {
  grid-area: info;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 680px;
}

.pub-username {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 32px;
  line-height: 38px;
  font-weight: 500;
  letter-spacing: -0.015em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--foreground-heading, #1E1B16);
}

.pub-username-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pub-verified-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--radius-pill, 999px);
  background: var(--verified-bg, #E3EBF4);
  color: var(--verified-fg, #284D78);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.pub-verified-pill svg {
  flex-shrink: 0;
}

.pub-bio-text {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 26px;
  color: var(--foreground, #1E1B16);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.pub-bio-empty {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted-foreground, #6E675D);
}

.pub-bio-empty a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pub-meta-line {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

/* Compteurs : <dl>, nombre (dd) affiché au-dessus du libellé (dt) */
.pub-stats {
  grid-area: stats;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, #EFE9DF);
}

.pub-stat {
  display: flex;
  flex-direction: column-reverse;
}

.pub-stat-num {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 40px;
  line-height: 44px;
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
}

.pub-stat-label {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

@media (min-width: 600px) {
  .pub-header-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "avatar info"
      "stats  stats";
    gap: 24px 28px;
  }
}

@media (min-width: 900px) {
  .pub-header-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "avatar info  stats";
    gap: 28px 32px;
    padding: 40px;
  }

  .pub-avatar-circle {
    width: 112px;
    height: 112px;
    font-size: 52px;
  }

  .pub-username {
    font-size: 44px;
    line-height: 50px;
  }

  .pub-stats {
    flex-direction: column;
    align-items: flex-end;
    padding-top: 0;
    border-top: 0;
    text-align: right;
  }

  .pub-stat-num {
    font-size: 56px;
    line-height: 60px;
  }
}

/* Catalogue des questions */
.pub-questions-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qcard-footer-votes-only {
  justify-content: flex-end;
}

/* Bandeau d'aperçu propriétaire */
.owner-preview-pill {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 18px;
  border-radius: var(--radius-md, 14px);
  background: var(--vote-yes-bg, #E2EEE8);
  color: var(--vote-yes-text, #1F4D41);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.owner-preview-text {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.owner-preview-text svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.owner-preview-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-weight: 600;
  color: var(--vote-yes-text, #1F4D41);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Composant partagé verified_badge */
.verified-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.verified-icon {
  overflow: visible;
  flex-shrink: 0;
}

.verified-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--verified-fg, #284D78);
}

/* Composant partagé empty_state */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1px dashed var(--border-strong, #CFC6B7);
  border-radius: var(--radius-xl, 20px);
  background: var(--surface, #FFFDF8);
}

.empty-state-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill, 999px);
  background: linear-gradient(90deg, var(--vote-yes, #2E6B5B) 50%, var(--vote-no, #B24A30) 50%);
}

.empty-state-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
}

.empty-state-body {
  margin: 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted-foreground, #6E675D);
  overflow-wrap: anywhere;
}

.empty-state-action {
  margin-top: 8px;
}

/* Gabarit 404 Profil indisponible */
.profile-404-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.profile-404-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 20px;
  padding: 48px 36px;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.profile-404-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill, 999px);
  background: var(--muted, #EFE9DF);
  color: var(--foreground-secondary, #4A443B);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-404-subtext {
  margin: 0;
  max-width: 40ch;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground, #6E675D);
}

.profile-404-owner-hint {
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, #EFE9DF);
  font-size: 14px;
  line-height: 20px;
  color: var(--foreground-secondary, #4A443B);
}

.profile-404-owner-hint a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-404-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 32px;
  line-height: 38px;
  font-weight: 500;
}

.profile-404-text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--muted-foreground, #6E675D);
}

.profile-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.btn-404-primary {
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn-404-secondary {
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* ==========================================================================
   11. Switch Toggle Universel
   ========================================================================== */
.switch-container {
  position: relative;
  width: 52px;
  height: 32px;
  flex-shrink: 0;
}

.custom-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.custom-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #A39B8E;
  transition: background-color 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 999px;
  padding: 4px;
}

.custom-switch-slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: #FFFDF8;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-switch-input:checked + .custom-switch-slider {
  background-color: #2E6B5B;
}

.custom-switch-input:checked + .custom-switch-slider::before {
  transform: translateX(20px);
}

.custom-switch-input:disabled + .custom-switch-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   12. Animations d'Apparition & Responsive Mobile
   ========================================================================== */
@keyframes reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.reveal {
  animation: reveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.rise {
  animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.vote {
  transition: transform 0.12s linear, filter 0.2s;
}
.vote:hover {
  filter: brightness(1.06);
}
.vote:active {
  transform: scale(0.97);
}

/* Mobile & Tablette */
@media (max-width: 768px) {
  .app-nav {
    padding: 0 16px;
  }
  
  .main-content-flow {
    padding: 24px 16px 48px;
    gap: 28px;
  }

  .hero-dark-card {
    padding: 32px 24px;
    gap: 32px;
  }
  
  .hero-title-text {
    font-size: 30px;
    line-height: 36px;
  }

  .qdetail-title {
    font-size: 30px;
    line-height: 36px;
  }

  .qpercentage-value {
    font-size: 46px;
    line-height: 50px;
  }

  .pub-header-card {
    padding: 24px;
    gap: 20px;
  }
}

/* ==========================================================================
   13. Footer Conforme Maquette
   ========================================================================== */
.app-footer {
  border-top: 1px solid var(--border, #E4DDD1);
  margin-top: auto;
  background: var(--background, #F5F1EA);
}

.app-footer-inner {
  max-width: var(--max-width, 1120px);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--muted-foreground, #6E675D);
}

.footer-brand-tag {
  color: var(--muted-foreground, #6E675D);
}

.footer-brand-name {
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 17px;
  color: var(--foreground, #1E1B16);
}

.footer-links-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-link {
  color: var(--muted-foreground, #6E675D);
  text-decoration: none;
}
.footer-link:hover {
  color: var(--foreground, #1E1B16);
  text-decoration: underline;
}

/* ==========================================================================
   Page d'attente post-paiement (/questions/{id}/pending)
   ========================================================================== */
.pending-flow {
  max-width: 640px;
  margin: 48px auto;
  padding: 0 16px;
}
.pending-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 20px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.pending-heading {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: var(--font-size-h2, 1.875rem);
  line-height: var(--line-height-h2, 2.25rem);
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
}
.pending-text {
  margin: 0;
  color: var(--foreground-secondary, #4A443B);
}
.pending-question {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 1.125rem;
  color: var(--muted-foreground, #6E675D);
}
.pending-spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid var(--muted, #EFE9DF);
  border-top-color: var(--foreground, #1E1B16);
  animation: pending-spin 0.9s linear infinite;
}
.pending-spinner[hidden] {
  display: none;
}
@keyframes pending-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pending-spinner { animation-duration: 2.4s; }
}

.mp-form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  color: #B24A30;
  background: #FBEAE4;
}

/* Demande de certification (US-5.2) */
.mp-certified-note {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted-foreground, #6E675D);
}
.mp-cert-details > summary {
  list-style: none;
  cursor: pointer;
}
.mp-cert-details > summary::-webkit-details-marker {
  display: none;
}
.mp-cert-details[open] > summary {
  display: none;
}
.mp-cert-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mp-cert-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground-secondary, #4A443B);
  margin-top: 6px;
}
.mp-cert-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
}
.mp-cert-form .mp-save-btn {
  margin-top: 10px;
}

/* ==========================================================================
   Phase 6 — Connexion Google, onboarding, accès visiteur (US-6.1, 6.3, 6.5)
   ========================================================================== */

/* Déconnexion en POST : le bouton reprend l'apparence de l'ancien lien */
.nav-logout-form {
  display: flex;
  margin: 0;
}
button.nav-link-logout {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

/* Alerte de formulaire générique (auth, onboarding) */
.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #EBC3B5;
  background: var(--vote-no-bg, #F7E4DC);
  color: var(--vote-no-text, #7A2F1C);
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  text-align: left;
}
.form-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.form-alert p {
  margin: 0;
}

/* ---- Écran de connexion /auth ---- */
.auth-flow {
  width: 100%;
  max-width: 460px;
  margin: 8px auto 0;
}
.auth-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-xl, 20px);
  box-shadow: var(--shadow-card);
  padding: var(--space-8, 32px) var(--space-6, 24px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4, 16px);
  text-align: center;
}
.auth-brand {
  align-self: center;
}
.auth-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-h2, 1.875rem);
  line-height: var(--line-height-h2, 2.25rem);
  font-weight: var(--font-weight-h2, 500);
  color: var(--foreground-heading, #1E1B16);
}
.auth-lead {
  margin: 0 0 var(--space-2, 8px);
  color: var(--foreground-secondary, #4A443B);
  font-size: 15px;
  line-height: 22px;
}
.auth-provider-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
}
.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3, 12px);
  min-height: 52px;
  padding: 0 var(--space-6, 24px);
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.auth-provider-btn:hover {
  color: var(--foreground, #1E1B16);
  background: var(--background, #F5F1EA);
  border-color: var(--foreground-secondary, #4A443B);
  transform: translateY(-1px);
}
.auth-provider-btn:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 3px;
}
.auth-provider-btn.is-loading {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}
.auth-provider-icon {
  flex-shrink: 0;
}
.auth-empty {
  padding: var(--space-6, 24px) var(--space-4, 16px);
  border: 1px dashed var(--border-strong, #CFC6B7);
  border-radius: var(--radius-md, 14px);
  background: var(--muted, #EFE9DF);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 8px);
}
.auth-empty-title {
  margin: 0;
  font-weight: 700;
  color: var(--foreground, #1E1B16);
}
.auth-empty-text {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--foreground-secondary, #4A443B);
}
.auth-empty-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3, 12px);
  margin-top: var(--space-2, 8px);
  padding: var(--space-4, 16px);
  border-radius: var(--radius-md, 14px);
  background: var(--vote-yes-bg, #E2EEE8);
  color: var(--vote-yes-text, #1F4D41);
  text-align: left;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
}
.auth-privacy svg {
  flex-shrink: 0;
}
.auth-privacy p {
  margin: 0;
}
.auth-privacy strong {
  display: block;
  margin-bottom: 2px;
}

/* ---- Onboarding /auth/onboarding ---- */
.onb-flow {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6, 24px);
}
.onb-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.onb-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-h2, 1.875rem);
  line-height: var(--line-height-h2, 2.25rem);
  font-weight: var(--font-weight-h2, 500);
  color: var(--foreground-heading, #1E1B16);
}
.onb-lead {
  margin: 0;
  max-width: var(--measure, 728px);
  color: var(--foreground-secondary, #4A443B);
  font-size: 16px;
  line-height: 24px;
}
.onb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6, 24px);
  align-items: start;
}
.onb-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-lg, 18px);
  padding: var(--space-6, 24px) var(--space-4, 16px);
}
.onb-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}
.onb-required-note {
  margin: 0;
  font-size: var(--font-size-xs, 0.8125rem);
  color: var(--muted-foreground, #6E675D);
}
.onb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.onb-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.onb-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground, #1E1B16);
}
.onb-frozen-tag,
.mp-frozen-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-pill, 999px);
  background: var(--muted, #EFE9DF);
  color: var(--foreground-secondary, #4A443B);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.onb-input,
.mp-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 12px;
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font: inherit;
  font-size: 16px; /* évite le zoom automatique iOS */
}
.onb-input:focus-visible,
.mp-select:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
  border-color: var(--ring, #2E6B5B);
}
.onb-input[aria-invalid="true"],
.mp-select[aria-invalid="true"] {
  border-color: var(--destructive, #B24A30);
  border-width: 2px;
}
.onb-input-code {
  max-width: 120px;
  text-transform: uppercase;
}
.onb-input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}
.onb-input-prefix > span {
  position: absolute;
  left: 14px;
  color: var(--muted-foreground, #6E675D);
  font-weight: 600;
  pointer-events: none;
}
.onb-input-prefix > .onb-input {
  padding-left: 32px;
}
.onb-hint,
.mp-field-hint {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  color: var(--muted-foreground, #6E675D);
}
.onb-field-error,
.mp-field-error {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  font-weight: 600;
  color: var(--destructive, #B24A30);
}
.onb-radio-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2, 8px);
}
.onb-radio {
  position: relative;
  display: flex;
}
.onb-radio input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.onb-radio span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 var(--space-3, 12px);
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 12px;
  background: var(--surface, #FFFDF8);
  font-weight: 600;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.onb-radio:hover span {
  background: var(--background, #F5F1EA);
}
.onb-radio input:checked + span {
  background: var(--primary, #1E1B16);
  border-color: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
}
.onb-radio input:focus-visible + span {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}
.onb-radio input[aria-invalid="true"] + span {
  border-color: var(--destructive, #B24A30);
}
.onb-frozen-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hero-accent-bg, #F8EBCD);
  color: var(--foreground, #1E1B16);
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
}
.onb-frozen-note svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--hero-accent-icon, #9A6A14);
}
.onb-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3, 12px);
}
.onb-submit {
  min-height: 50px;
  padding: 0 var(--space-6, 24px);
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) ease;
}
.onb-submit:hover {
  background: var(--primary-hover, #3A352D);
}
.onb-submit:disabled {
  cursor: progress;
  opacity: 0.75;
}
.onb-cancel {
  align-self: center;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: var(--muted-foreground, #6E675D);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.onb-cancel:hover {
  color: var(--foreground, #1E1B16);
}
.onb-aside {
  padding: var(--space-6, 24px) var(--space-4, 16px);
  border-radius: var(--radius-lg, 18px);
  background: var(--vote-yes-bg, #E2EEE8);
  color: var(--vote-yes-text, #1F4D41);
}
.onb-aside-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--space-3, 12px);
  font-family: var(--font-serif);
  font-size: var(--font-size-card-title, 1.3125rem);
  line-height: var(--line-height-card-title, 1.75rem);
  font-weight: 500;
}
.onb-aside-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: 1.45;
}

@media (min-width: 640px) {
  .onb-card,
  .onb-aside {
    padding: var(--space-8, 32px);
  }
  .onb-actions {
    flex-direction: row;
    align-items: center;
  }
  .onb-cancel {
    align-self: auto;
  }
}
@media (min-width: 900px) {
  .onb-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .onb-aside {
    position: sticky;
    top: 92px;
  }
}

/* ---- Profil : données figées & pays de résidence ---- */
.mp-frozen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mp-identity-note {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted-foreground, #6E675D);
}
.mp-select {
  min-height: 44px;
  font-size: 15px;
}

/* ---- Visiteur non connecté : incitation à la connexion ---- */
.qvote-note-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
a.btn-vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.vote-guest-note {
  margin: 8px 0 0;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--muted-foreground, #6E675D);
}

/* ==========================================================================
   US-5.6 — Signaler une question (/questions/{id})
   Discret, en bas de page, séparé des boutons OUI / NON.
   ========================================================================== */
.qreport {
  padding-top: var(--space-4, 16px);
  border-top: 1px solid var(--border-subtle, #EFE9DF);
  display: flex;
  justify-content: flex-end;
}
.qreport-details > summary {
  list-style: none;
}
.qreport-details > summary::-webkit-details-marker {
  display: none;
}
.qreport-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-pill, 999px);
  color: var(--muted-foreground, #6E675D);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--dur-fast, 120ms) ease, background var(--dur-fast, 120ms) ease;
}
.qreport-trigger:hover,
.qreport-details[open] > .qreport-trigger {
  color: var(--foreground, #1E1B16);
  background: var(--muted, #EFE9DF);
}
.qreport-trigger:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}
.qreport-details {
  text-align: right;
}
.qreport-details[open] {
  width: 100%;
}
.qreport-panel {
  text-align: left;
  width: 100%;
  max-width: 420px;
  margin-top: var(--space-2, 8px);
  margin-left: auto;
  padding: var(--space-4, 16px);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #FFFDF8);
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.qreport-prompt {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground, #1E1B16);
}
.qreport-help {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  color: var(--muted-foreground, #6E675D);
}
.qreport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
  margin: var(--space-2, 8px) 0 0;
}
.qreport-confirm-btn,
.qreport-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill, 999px);
  font: inherit;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.qreport-confirm-btn {
  border: 1px solid var(--primary, #1E1B16);
  background: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
}
.qreport-confirm-btn:hover {
  background: var(--primary-hover, #3A352D);
}
.qreport-cancel-btn {
  border: 1px solid var(--border-strong, #CFC6B7);
  background: transparent;
  color: var(--foreground, #1E1B16);
}
.qreport-cancel-btn:hover {
  color: var(--foreground, #1E1B16);
  background: var(--background, #F5F1EA);
}
.qreport-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  color: var(--muted-foreground, #6E675D);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
}

/* ==========================================================================
   US-5.7 / US-5.8 — Espace d'administration (/admin)
   Sobre, mêmes tokens que le reste. Mobile d'abord : cartes empilées.
   ========================================================================== */
.adm-flow {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6, 24px);
}
.adm-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.adm-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground, #6E675D);
}
.adm-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-h2, 1.875rem);
  line-height: var(--line-height-h2, 2.25rem);
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
}
.adm-lead {
  margin: 0;
  max-width: 60ch;
  color: var(--foreground-secondary, #4A443B);
  font-size: 15px;
  line-height: 22px;
}

/* Onglets (liens) : défilement horizontal seulement si nécessaire */
.adm-tabs {
  border-bottom: 1px solid var(--border, #E4DDD1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Dégradé discret au bord droit, visible seulement s'il reste des onglets à faire défiler :
     le cache (attachement local) suit la fin du contenu et recouvre l'ombre (attachement scroll)
     quand il n'y a pas de dépassement ou que le défilement est arrivé au bout. */
  background-color: var(--background, #F5F1EA);
  background-image:
    linear-gradient(to left, var(--background, #F5F1EA) 40%, rgba(245, 241, 234, 0)),
    linear-gradient(to left, rgba(30, 27, 22, 0.12), rgba(30, 27, 22, 0));
  background-position: right center, right center;
  background-size: 48px 100%, 16px 100%;
  background-repeat: no-repeat;
  background-attachment: local, scroll;
}
.adm-tabs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-1, 4px);
}
.adm-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground, #6E675D);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.adm-tab:hover {
  color: var(--foreground, #1E1B16);
}
.adm-tab.is-active {
  color: var(--foreground, #1E1B16);
  border-bottom-color: var(--foreground, #1E1B16);
}
.adm-tab:focus-visible {
  outline-offset: -2px;
}
/* Petits écrans : les 5 onglets tiennent à 390 px (358 px utiles : ~280 px de texte en 13 px
   + 5 × 12 px de marge interne) ; à 320 px, défilement signalé par le dégradé du bord droit.
   Cibles : 44 px de haut, au moins 50 px de large par onglet. */
@media (max-width: 480px) {
  .adm-tabs-list {
    gap: 0;
  }
  .adm-tab {
    padding: 0 6px;
    font-size: var(--font-size-xs, 0.8125rem);
  }
}

.adm-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
}
.adm-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 4px);
}
.adm-section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-card-title, 1.3125rem);
  line-height: var(--line-height-card-title, 1.75rem);
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
}
.adm-section-desc {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  color: var(--muted-foreground, #6E675D);
}

/* Listes de cartes */
.adm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
}
.adm-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-md, 14px);
  box-shadow: var(--shadow-card);
  padding: var(--space-4, 16px);
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  min-width: 0;
}
.adm-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2, 8px) var(--space-3, 12px);
}
.adm-card-title {
  margin: 0;
  flex: 1 1 260px;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
  overflow-wrap: anywhere;
}
.adm-card-title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-strong, #CFC6B7);
  text-underline-offset: 3px;
}
.adm-card-title a:hover {
  text-decoration-color: currentColor;
}
/* Titre posé directement dans une carte (colonne) : la base flex de 260px prévue pour une ligne
   (.adm-card-head) deviendrait une hauteur de 260px */
.adm-card > .adm-card-title {
  flex: none;
}
.adm-card-title-sans {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
}
.adm-count-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill, 999px);
  background: var(--vote-no-bg, #F7E4DC);
  color: var(--vote-no-text, #7A2F1C);
  font-size: var(--font-size-xs, 0.8125rem);
  font-weight: 700;
}
.adm-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: var(--radius-pill, 999px);
  background: var(--muted, #EFE9DF);
  color: var(--foreground-secondary, #4A443B);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.adm-pill-hidden {
  margin-left: 0;
  flex-shrink: 0;
}
.adm-username {
  font-weight: 600;
  color: var(--foreground, #1E1B16);
  overflow-wrap: anywhere;
}
.adm-muted {
  color: var(--muted-foreground, #6E675D);
}
.adm-small {
  font-size: var(--font-size-xs, 0.8125rem);
}

/* Métadonnées : grille fluide */
.adm-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: var(--space-3, 12px) var(--space-4, 16px);
}
.adm-meta > div {
  min-width: 0;
}
.adm-meta-wide {
  grid-column: 1 / -1;
}
.adm-meta dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted-foreground, #6E675D);
}
.adm-meta dd {
  margin: 2px 0 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  color: var(--foreground, #1E1B16);
  overflow-wrap: anywhere;
}
.adm-reason {
  white-space: pre-line;
}
.adm-ext-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Actions */
.adm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2, 8px);
  padding-top: var(--space-3, 12px);
  border-top: 1px solid var(--border-subtle, #EFE9DF);
}
.adm-actions-stack {
  flex-direction: column;
  align-items: stretch;
}
.adm-inline-form {
  margin: 0;
  display: flex;
}
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast, 120ms) ease, border-color var(--dur-fast, 120ms) ease, color var(--dur-fast, 120ms) ease;
}
.adm-btn:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}
.adm-btn-primary {
  background: var(--primary, #1E1B16);
  border-color: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
}
.adm-btn-primary:hover {
  background: var(--primary-hover, #3A352D);
  color: var(--primary-foreground, #F5F1EA);
}
.adm-btn-secondary {
  background: var(--surface, #FFFDF8);
  border-color: var(--border-strong, #CFC6B7);
  color: var(--foreground, #1E1B16);
}
.adm-btn-secondary:hover {
  background: var(--background, #F5F1EA);
  border-color: var(--foreground-secondary, #4A443B);
  color: var(--foreground, #1E1B16);
}
.adm-btn-danger {
  background: var(--surface, #FFFDF8);
  border-color: var(--destructive, #B24A30);
  color: var(--vote-no-text, #7A2F1C);
}
.adm-btn-danger:hover {
  background: var(--vote-no-bg, #F7E4DC);
}
.adm-btn-danger-solid {
  background: var(--destructive, #B24A30);
  border-color: var(--destructive, #B24A30);
  color: #FFFFFF;
}
.adm-btn-danger-solid:hover {
  background: var(--vote-no-text, #7A2F1C);
  border-color: var(--vote-no-text, #7A2F1C);
}
.adm-btn-ghost {
  color: var(--foreground-secondary, #4A443B);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.adm-btn-ghost:hover {
  color: var(--foreground, #1E1B16);
}

/* Confirmation sans JS (<details>) */
.adm-confirm > summary {
  list-style: none;
}
.adm-confirm > summary::-webkit-details-marker {
  display: none;
}
.adm-confirm[open] {
  flex-basis: 100%;
}
.adm-confirm[open] > summary {
  margin-bottom: var(--space-2, 8px);
}
.adm-confirm-panel {
  margin: 0;
  padding: var(--space-4, 16px);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-sm, 8px);
  background: var(--background, #F5F1EA);
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.adm-confirm-text {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  font-weight: 600;
  color: var(--foreground, #1E1B16);
}
.adm-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2, 8px);
  margin-top: var(--space-1, 4px);
}

/* Champs */
.adm-approve-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2, 8px);
}
.adm-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-label {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: var(--foreground, #1E1B16);
}
.adm-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong, #CFC6B7);
  border-radius: 10px;
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font: inherit;
  font-size: 16px; /* évite le zoom automatique iOS */
  resize: vertical;
}
.adm-input:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
  border-color: var(--ring, #2E6B5B);
}
.adm-input[aria-invalid="true"] {
  border-color: var(--destructive, #B24A30);
  border-width: 2px;
}
.adm-field-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3, 12px);
}
.adm-hint {
  margin: 0;
  font-size: var(--font-size-xs, 0.8125rem);
  line-height: var(--line-height-xs, 1.125rem);
  color: var(--muted-foreground, #6E675D);
}
.adm-counter {
  flex-shrink: 0;
  font-size: var(--font-size-xs, 0.8125rem);
  color: var(--muted-foreground, #6E675D);
}
.adm-counter.is-near-limit {
  color: var(--vote-no-text, #7A2F1C);
  font-weight: 700;
}
.adm-field-error {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
  font-weight: 600;
  color: var(--destructive, #B24A30);
}

/* Membres vérifiés */
.adm-verified-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #FFFDF8);
}
.adm-verified-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2, 8px) var(--space-4, 16px);
  padding: var(--space-3, 12px) var(--space-4, 16px);
}
.adm-verified-row + .adm-verified-row {
  border-top: 1px solid var(--border-subtle, #EFE9DF);
}
.adm-verified-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.adm-verified-row .adm-confirm[open] {
  flex-basis: 100%;
}
/* Admins (US-5.9) : même liste à lignes que les membres vérifiés */
.adm-grant-card {
  gap: var(--space-4, 16px);
}
.adm-grant-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-grant-form {
  margin: 0;
  max-width: 560px;
}
.adm-grant-form .adm-field {
  gap: 4px;
}
/* Champ et bouton sur une ligne ; la confirmation passe dessous, à la place du bouton */
.adm-grant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2, 8px);
  margin-top: 4px;
}
.adm-input-group {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}
.adm-input-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--muted-foreground, #6E675D);
  pointer-events: none;
}
.adm-input.adm-input-prefixed {
  padding-left: 30px;
}
.adm-grant-confirm {
  flex: 0 0 auto;
}
.adm-grant-confirm > summary {
  white-space: nowrap;
}
.adm-grant-confirm[open] {
  flex-basis: 100%;
}
.adm-grant-confirm[open] > summary {
  display: none;
}
.adm-grant-confirm .adm-confirm-panel {
  border-left: 4px solid var(--primary, #1E1B16);
}
.adm-grant-confirm [data-grant-name] {
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .adm-grant-confirm,
  .adm-grant-confirm > summary {
    flex-basis: 100%;
    width: 100%;
  }
}
.adm-section-count {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
}
.adm-admin-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.adm-admin-name {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.adm-admin-name .adm-pill {
  margin-left: 0;
}
.adm-admin-trace {
  margin: 0;
  line-height: var(--line-height-xs, 1.125rem);
  overflow-wrap: anywhere;
}
.adm-admin-list .adm-verified-row {
  min-height: 68px; /* hauteur stable avec ou sans bouton « Retirer… » */
}
.adm-empty-inline {
  margin: 0;
  padding: var(--space-4, 16px);
  border: 1px dashed var(--border-strong, #CFC6B7);
  border-radius: var(--radius-md, 14px);
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--muted-foreground, #6E675D);
}

/* Journal : cartes empilées sur mobile, tableau à partir de 720 px */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm, 0.875rem);
  line-height: var(--line-height-sm, 1.25rem);
}
.adm-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.adm-table,
.adm-table tbody,
.adm-table tr,
.adm-table td {
  display: block;
}
.adm-table tbody {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.adm-table tr {
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-md, 14px);
  background: var(--surface, #FFFDF8);
}
.adm-table td {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--space-3, 12px);
  padding: 3px 0;
  overflow-wrap: anywhere;
}
.adm-table td::before {
  content: attr(data-label);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground, #6E675D);
}
.adm-action-tag {
  font-weight: 600;
  color: var(--foreground, #1E1B16);
}

@media (min-width: 720px) {
  .adm-card {
    padding: var(--space-6, 24px);
  }
  .adm-actions-stack {
    flex-direction: row;
    align-items: flex-end;
  }
  .adm-approve-form {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: flex-start;
  }
  .adm-approve-form .adm-btn {
    margin-top: 26px; /* aligne le bouton sur le champ, sous le libellé */
  }

  .adm-table {
    display: table;
    border: 1px solid var(--border, #E4DDD1);
    border-radius: var(--radius-md, 14px);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: var(--surface, #FFFDF8);
  }
  .adm-table thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    display: table-header-group;
  }
  .adm-table tbody {
    display: table-row-group;
  }
  .adm-table tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .adm-table th,
  .adm-table td {
    display: table-cell;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-subtle, #EFE9DF);
  }
  .adm-table tbody tr:last-child td {
    border-bottom: 0;
  }
  .adm-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-foreground, #6E675D);
    background: var(--background, #F5F1EA);
  }
  .adm-table td::before {
    content: none;
  }
  .adm-td-nowrap {
    white-space: nowrap;
  }
  .adm-td-details {
    max-width: 320px;
  }
}

/* ==========================================================================
   Pages d'erreur (404, 405, 500) — templates/error.php, SPECIFICATION §7.6
   Même langage visuel que la 404 du profil public, classes dédiées err-*.
   ========================================================================== */
.err-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-8, 32px) var(--space-4, 16px);
}

.err-card {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: var(--radius-xl, 20px);
  box-shadow: var(--shadow-card, 0 1px 3px rgba(30, 27, 22, 0.04));
  padding: var(--space-10, 40px) var(--space-6, 24px);
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4, 16px);
}

/* Code HTTP décoratif (aria-hidden) : le sens est porté par le h1 */
.err-code {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: var(--font-size-stat, 4rem);
  line-height: var(--line-height-stat, 4.25rem);
  font-weight: var(--font-weight-stat, 500);
  letter-spacing: -0.02em;
  color: var(--border-strong, #CFC6B7);
  user-select: none;
}

.err-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill, 999px);
  background: var(--muted, #EFE9DF);
  color: var(--foreground-secondary, #4A443B);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.err-title {
  margin: 0;
  font-family: var(--font-serif, "Newsreader", Georgia, serif);
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
  overflow-wrap: anywhere;
}

.err-text {
  margin: 0;
  max-width: 40ch;
  font-size: var(--font-size-body, 1rem);
  line-height: 24px;
  color: var(--muted-foreground, #6E675D);
}

.err-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  width: 100%;
  margin-top: var(--space-2, 8px);
}

.err-btn {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill, 999px);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--dur-fast, 120ms) var(--ease-smooth, ease),
              border-color var(--dur-fast, 120ms) var(--ease-smooth, ease);
}

.err-btn-primary {
  background: var(--primary, #1E1B16);
  color: var(--primary-foreground, #F5F1EA);
}

.err-btn-primary:hover {
  background: var(--primary-hover, #3A352D);
  color: var(--primary-foreground, #F5F1EA);
}

.err-btn-secondary {
  border: 1px solid var(--border-strong, #CFC6B7);
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
}

.err-btn-secondary:hover {
  border-color: var(--foreground-secondary, #4A443B);
  color: var(--foreground, #1E1B16);
}

.err-btn:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .err-wrap {
    padding: var(--space-14, 56px) var(--space-6, 24px);
  }
  .err-card {
    padding: var(--space-12, 48px) var(--space-10, 40px);
  }
  .err-code {
    font-size: 5rem;
    line-height: 5.25rem;
  }
  .err-title {
    font-size: 32px;
    line-height: 38px;
  }
  .err-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}

/* Suppression de compte (US-6.6) */
.mp-delete-card {
  border-color: var(--destructive, #B24A30);
}
.mp-delete-text {
  margin: 0 0 1rem;
  color: var(--foreground-secondary, #4A443B);
  line-height: 1.5;
}
.mp-delete-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.mp-delete-input {
  width: 100%;
  max-width: 22rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 8px;
  background: var(--surface, #FFFDF8);
  color: var(--foreground, #1E1B16);
  font: inherit;
}
.mp-delete-input:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}
.mp-delete-input[aria-invalid="true"] {
  border-color: var(--destructive, #B24A30);
}
.mp-delete-btn {
  min-height: 44px;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--destructive, #B24A30);
  border-radius: 8px;
  background: var(--destructive, #B24A30);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.mp-delete-btn:hover {
  background: var(--vote-no-text, #7A2F1C);
  border-color: var(--vote-no-text, #7A2F1C);
}

/* ==========================================================================
   Pages légales (/conditions)
   ========================================================================== */
.legal-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  color: var(--foreground, #1E1B16);
  line-height: 1.6;
}
.legal-header { margin-bottom: 24px; }
.legal-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 500;
  color: var(--foreground-heading, #1E1B16);
}
.legal-meta { margin: 0; font-size: var(--font-size-sm); color: var(--muted-foreground, #6E675D); }
.legal-toc {
  background: var(--surface, #FFFDF8);
  border: 1px solid var(--border, #E4DDD1);
  border-radius: 18px;
  padding: 16px 24px;
  margin-bottom: 32px;
  font-size: var(--font-size-sm);
}
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.legal-toc a, .legal-page a { color: var(--link, #2E6B5B); }
.legal-toc a:hover, .legal-page a:hover { color: var(--link-hover, #1F4D41); }
.legal-section { margin-bottom: 36px; scroll-margin-top: 96px; }
.legal-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: var(--font-size-card-title);
  font-weight: 600;
}
.legal-section h3 { margin: 24px 0 8px; font-size: 1.0625rem; font-weight: 700; }
.legal-section h4 { margin: 20px 0 6px; font-size: var(--font-size-body); font-weight: 600; }
.legal-section p { margin: 0 0 12px; }
.legal-section ul { margin: 0 0 12px; padding-left: 20px; }
.legal-section li { margin-bottom: 6px; }
.legal-tier {
  margin-top: 20px;
  padding: 4px 20px 12px;
  border: 1px solid var(--border, #E4DDD1);
  border-left: 4px solid var(--border-strong, #CFC6B7);
  border-radius: 12px;
  background: var(--surface, #FFFDF8);
}
.legal-tier--ok { border-left-color: var(--vote-yes, #2E6B5B); }
.legal-tier--warn { border-left-color: #C08A2B; }
.legal-tier--ban { border-left-color: var(--vote-no, #B24A30); }
.legal-examples { list-style: none; padding-left: 0 !important; }
.legal-examples li { margin-bottom: 12px; }
.legal-examples q { font-style: italic; }
.legal-examples span {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--muted-foreground, #6E675D);
}
@media (max-width: 640px) {
  .legal-title { font-size: 1.75rem; }
  .legal-toc ol { columns: 1; }
  .legal-tier { padding: 4px 16px 10px; }
}

/* ==========================================================================
   Modification d'une question sans vote (/questions/{id}/edit)
   ========================================================================== */
.eq-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.eq-save-btn {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--foreground, #1E1B16);
  color: var(--surface, #FFFDF8);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.eq-save-btn:hover {
  background: #3A352D;
}
.eq-save-btn:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}
.mp-edit-link {
  color: var(--link, #2E6B5B);
}

/* ==========================================================================
   Sélecteur de langue (pied de page) : FR / EN, discret
   ========================================================================== */
.footer-locale-form {
  margin: 0;
}
.footer-locale-group {
  display: inline-flex;
  gap: 4px;
}
.footer-locale-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 6px;
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted-foreground, #6E675D);
  cursor: pointer;
}
.footer-locale-btn:hover {
  color: var(--foreground, #1E1B16);
  text-decoration: underline;
}
.footer-locale-btn.is-current {
  color: var(--foreground, #1E1B16);
  border-color: var(--border, #DDD5C8);
  font-weight: 600;
}
.footer-locale-btn:focus-visible {
  outline: 2px solid var(--ring, #2E6B5B);
  outline-offset: 2px;
}
