/* Identité No-Change : bleu nuit + ambre, volontairement éloignée du rouge de Change.org. */
:root {
  --nc-primary: #1f2a50;
  --nc-primary-hover: #2c3b6e;
  --nc-accent: #f2a541;
  --nc-bg-soft: #f5f6fa;
  --bs-link-color: #2c3b6e;
  --bs-link-hover-color: #1f2a50;
}

html { font-size: 15px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }

body { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
main { flex: 1 0 auto; }

.btn-primary {
  --bs-btn-bg: var(--nc-primary);
  --bs-btn-border-color: var(--nc-primary);
  --bs-btn-hover-bg: var(--nc-primary-hover);
  --bs-btn-hover-border-color: var(--nc-primary-hover);
  --bs-btn-active-bg: var(--nc-primary-hover);
}
.btn-accent { background: var(--nc-accent); color: #1b1b1b; font-weight: 600; border: none; }
.btn-accent:hover { background: #e0932c; color: #1b1b1b; }

.navbar-brand .nc-no { color: var(--nc-accent); font-weight: 800; }
.navbar-brand { font-weight: 700; letter-spacing: .02em; }
/* En-tête fixé en haut au défilement (ordinateur et mobile) ; les ancres (#voix…) s'arrêtent sous lui. */
:root { --nc-entete-hauteur: 3.6rem; }
html { scroll-padding-top: calc(var(--nc-entete-hauteur) + .5rem); }
.nc-entete { z-index: 1030; box-shadow: 0 1px 0 rgba(31, 42, 80, .06); }
.nc-entete .navbar-collapse { max-height: calc(100vh - var(--nc-entete-hauteur)); overflow-y: auto; }

.hero { background: var(--nc-primary); color: #fff; padding: 3.5rem 0; }
.hero h1 { font-weight: 800; }
.hero .lead { color: #d7dbea; }

.source-box { background: var(--nc-bg-soft); border-left: 4px solid var(--nc-accent); }
.card-cp { transition: box-shadow .15s ease; }
.card-cp:hover { box-shadow: 0 .5rem 1rem rgba(31, 42, 80, .12); }
.badge-platform { background: #e9ecf5; color: var(--nc-primary); font-weight: 500; }
.sign-card { position: sticky; top: calc(var(--nc-entete-hauteur) + 1rem); }
.arguments { white-space: pre-line; }

.nc-pied { background: var(--nc-bg-soft); font-size: .9rem; }

.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .1rem #fff, 0 0 0 .25rem var(--nc-accent);
}

a { color: var(--nc-primary-hover); }
a:hover { color: var(--nc-primary); }
.btn-outline-primary {
  --bs-btn-color: var(--nc-primary);
  --bs-btn-border-color: var(--nc-primary);
  --bs-btn-hover-bg: var(--nc-primary);
  --bs-btn-hover-border-color: var(--nc-primary);
  --bs-btn-active-bg: var(--nc-primary);
}
.page-link { color: var(--nc-primary); }
.active > .page-link { background-color: var(--nc-primary); border-color: var(--nc-primary); }
.nc-compteur { font-variant-numeric: tabular-nums; }
.nc-jauge { height: .5rem; }

/* ---- Page d'une contre-pétition ---------------------------------------------------------------------------- */
.nc-cp-titre { font-weight: 800; font-size: calc(1.5rem + 1.2vw); line-height: 1.15; color: var(--nc-primary); }
@media (min-width: 1200px) { .nc-cp-titre { font-size: 2.6rem; } }
.nc-en-reponse { color: #5b6275; }
.nc-en-reponse a { color: inherit; text-decoration: underline dotted; }
.nc-badge-non { background: var(--nc-accent); color: #1b1b1b; font-weight: 700; letter-spacing: .03em; }

.nc-cp-couverture {
  /* Cadre : une photo sur fond blanc ne se confond pas avec la page. */
  margin: 0; padding: .4rem; border: 1px solid #dde1ec; border-radius: .9rem; background: #fff;
  box-shadow: 0 2px 10px rgba(31, 42, 80, .08);
}
.nc-cp-couverture img { aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: .6rem; background: var(--nc-bg-soft); }
.nc-cp-bandeau {
  aspect-ratio: 16 / 7; border-radius: .75rem; padding: 1.5rem; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(135deg, var(--nc-primary) 0%, var(--nc-primary-hover) 60%, #3d4f8f 100%); color: #fff; overflow: hidden;
}
.nc-cp-bandeau-non { font-size: clamp(3rem, 12vw, 6rem); font-weight: 900; line-height: 1; color: var(--nc-accent); letter-spacing: .04em; }
.nc-cp-bandeau-texte { font-size: 1.1rem; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.nc-avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: var(--nc-primary); color: #fff; font-weight: 700; font-size: .95rem;
}
.nc-avatar-petit { width: 1.6rem; height: 1.6rem; font-size: .75rem; background: #e9ecf5; color: var(--nc-primary); margin-right: .25rem; }
.nc-signataires li { display: flex; align-items: center; margin-bottom: .35rem; }

/* Le face-à-face : la touche No-Change. */
.nc-face-a-face { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: stretch; }
.nc-face { border-radius: .75rem; padding: 1rem 1.1rem; }
.nc-face-origine { background: var(--nc-bg-soft); border: 1px solid #e3e6ef; }
.nc-face-reponse { background: #fff8ec; border: 2px solid var(--nc-accent); }
.nc-face-etiquette { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #6b7286; margin-bottom: .35rem; }
.nc-face-reponse .nc-face-etiquette { color: #9a5b00; }
.nc-face-vs {
  align-self: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--nc-primary); color: var(--nc-accent); font-weight: 900; font-size: .85rem;
}
@media (max-width: 767.98px) {
  .nc-face-a-face { grid-template-columns: 1fr; }
  .nc-face-vs { justify-self: center; margin: -.4rem 0; position: relative; z-index: 1; }
}

.nc-documents li + li { margin-top: .5rem; }
.nc-document {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid #e3e6ef; border-radius: .6rem;
  text-decoration: none; color: inherit; transition: background .15s ease;
}
.nc-document:hover { background: var(--nc-bg-soft); color: inherit; }
.nc-document-vignette { width: 3rem; height: 3rem; object-fit: cover; border-radius: .4rem; flex: 0 0 auto; }
.nc-document-icone {
  width: 3rem; height: 3rem; border-radius: .4rem; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  background: #fde8e6; color: #b3261e; font-weight: 800; font-size: .8rem;
}
.nc-partage { background: var(--nc-bg-soft); }
.nc-jauge { height: .6rem; background: #e9ecf5; }
.nc-jauge .progress-bar { background: var(--nc-accent); }
.nc-jauge-fine { height: .35rem; }
.sign-card { border: 0; box-shadow: 0 .5rem 1.5rem rgba(31, 42, 80, .12); border-radius: .9rem; }
.nc-resume-mobile { border-radius: .9rem; }

/* ---- Cartes de l'accueil ----------------------------------------------------------------------------------- */
.nc-carte-photo { aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid #dde1ec; }
.nc-carte-bandeau {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--nc-primary), #3d4f8f);
}
.nc-carte-bandeau span { color: var(--nc-accent); font-weight: 900; font-size: 2.6rem; letter-spacing: .05em; }
.card-cp { overflow: hidden; border-radius: .75rem; }

/* ---- Création ---------------------------------------------------------------------------------------------- */
.nc-apercu { max-height: 180px; object-fit: cover; }

/* ---- Participation : badge vérifiée, motivation du créateur, voix des signataires, actualités, QR ---- */
.nc-badge-verifiee { background: #e7f6ee; color: #166534; display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.nc-motivation { border-left: 4px solid var(--nc-accent); background: #fffaf1; padding: 1rem 1.25rem; border-radius: 0 .75rem .75rem 0; margin: 0; }
.nc-motivation blockquote { font-size: 1.05rem; font-style: italic; white-space: pre-line; }
.nc-voix { background: var(--nc-primary); color: #fff; border-radius: .9rem; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.nc-voix::before { content: "“"; position: absolute; top: .1rem; right: 1rem; font-size: 3.5rem; line-height: 1; color: var(--nc-accent); font-family: Georgia, serif; }
.nc-voix blockquote { font-style: italic; white-space: pre-line; margin-right: 1.5rem; }
.nc-voix .text-muted { color: #c9d0e6 !important; }
.nc-fil { border-left: 2px solid #dde1ec; margin-left: .5rem; }
.nc-fil > li { position: relative; padding: 0 0 1.1rem 1.25rem; }
.nc-fil > li::before { content: ""; position: absolute; left: -7px; top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--nc-primary); }
.nc-fil > li.nc-fil-message::before { background: var(--nc-accent); border-color: var(--nc-accent); }
.nc-fil > li.nc-fil-palier::before { background: var(--nc-primary); }
.nc-texte { white-space: pre-line; }
.nc-qr { background: #fff; border: 1px solid #dde1ec; border-radius: .5rem; padding: .25rem; }
.nc-qr-ligne { display: flex; gap: 1rem; align-items: center; }
.nc-qr-carte { background: var(--nc-bg-soft); }
.nc-nom-public { background: var(--nc-bg-soft); border-radius: .5rem; padding: .6rem .75rem; }
.nc-defile.nc-defile-actif { position: relative; min-height: 1.9rem; }
.nc-defile.nc-defile-actif > li { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(.4rem); transition: opacity .4s, transform .4s; }
.nc-defile.nc-defile-actif > li.nc-defile-visible { opacity: 1; transform: none; }

/* ---- Espace créateur ---- */
.nc-stat { background: #fff; border: 1px solid #dde1ec; border-radius: .75rem; padding: 1rem; text-align: center; height: 100%; }
.nc-stat-n { font-size: 1.8rem; font-weight: 800; color: var(--nc-primary); line-height: 1.1; }
.nc-stat-l { font-size: .85rem; color: #6b7280; }
.nc-message { border: 1px solid #dde1ec; border-radius: .6rem; padding: .75rem 1rem; background: #fff; }
.nc-message-masque { opacity: .7; border-style: dashed; }

/* Aide de l'IA (création) */
.nc-ia { border: 1px dashed #c9cfe0; border-radius: .75rem; padding: .85rem 1rem; background: #f8f9fd; }
.nc-ia-icone { font-style: normal; color: var(--nc-accent, #f4a340); }
.nc-ia-proposition { background: #fff; border: 1px solid #dde1ec; border-radius: .6rem; padding: .9rem 1rem; }
.nc-ia-conseils { background: #fff8ec; border-radius: .4rem; padding: .5rem .7rem; }
.nc-ia-image { display: block; width: 100%; padding: 0; border: 3px solid transparent; border-radius: .6rem; overflow: hidden; background: none; }
.nc-ia-image img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.nc-ia-image:hover, .nc-ia-image:focus-visible { border-color: #c9cfe0; }
.nc-ia-image.is-choisie { border-color: var(--nc-accent, #f4a340); }

/* À la une (accueil) */
.nc-une { background: linear-gradient(180deg, #fff8ec 0%, rgba(255, 248, 236, 0) 100%); border-radius: 1rem; padding: 1rem 1rem 0; margin-left: -1rem; margin-right: -1rem; }
.nc-une-marque { color: var(--nc-accent); }

/* Barre compacte d'une contre-pétition, fixée sous l'en-tête au défilement. */
.nc-barre-cp { position: fixed; left: 0; right: 0; top: var(--nc-entete-hauteur); z-index: 1029; background: #fff;
  border-bottom: 1px solid #e3e6ef; box-shadow: 0 .25rem .75rem rgba(31, 42, 80, .08); padding: .4rem 0;
  transform: translateY(-120%); opacity: 0; visibility: hidden; transition: transform .2s ease, opacity .2s ease, visibility .2s; }
.nc-barre-cp.nc-barre-visible { transform: none; opacity: 1; visibility: visible; }
.nc-barre-titre { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.nc-barre-compteur { color: var(--bs-secondary-color); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .nc-barre-cp { transition: none; } }
