/* =====================================================================
   Pages publiques (online/*, carte/verifier.php)
   Charge uniquement par includes/public_header.php, en complement de
   style.css (dont il reutilise les variables --rpp-*).
   ===================================================================== */
.pub-body {
  background: #f1f5f2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Barre de navigation publique ---- */
.pub-navbar {
  background: linear-gradient(135deg, var(--rpp-green) 0%, var(--rpp-green-dark) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 14px rgba(7, 77, 34, .25);
}
.pub-navbar > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.pub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  margin-right: auto;
}
.pub-brand-mark {
  background: #fff;
  color: var(--rpp-green-dark);
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .95rem;
}
.pub-brand-logo {
  height: 40px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}
.pub-brand-text strong { display: block; line-height: 1.1; letter-spacing: .5px; }
.pub-brand-text small { opacity: .8; font-size: .75rem; }

.pub-burger {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 1.3rem;
  line-height: 1;
}
.pub-nav-collapse { width: 100%; }
.pub-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
}
.pub-nav-link,
.pub-nav-login {
  display: block;
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color .15s, color .15s;
}
.pub-nav-link:hover,
.pub-nav-login:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.pub-nav-link.active { background: rgba(255, 255, 255, .2); color: #fff; }
.pub-nav-login { border: 1px solid rgba(255, 255, 255, .45); }

@media (min-width: 992px) {
  .pub-burger { display: none; }
  .pub-nav-collapse { width: auto; display: block !important; }
  .pub-nav { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
}

/* ---- Bandeau de titre ---- */
.pub-hero {
  background: linear-gradient(135deg, var(--rpp-green-dark) 0%, var(--rpp-green) 65%, #0d8a3e 100%);
  color: #fff;
  padding: 2.4rem 0 3.8rem;
  position: relative;
  overflow: hidden;
}
.pub-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(212, 160, 23, .16);
}
.pub-hero-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.pub-hero-icon {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}
.pub-hero-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.pub-hero-text { margin: .4rem 0 0; opacity: .9; max-width: 60ch; font-size: .95rem; }

/* ---- Colonne de contenu ---- */
.pub-main { flex: 1 0 auto; padding-bottom: 3rem; }
.pub-shell {
  max-width: 720px;
  margin: 2rem auto 0;
  position: relative;
  z-index: 2;
}
.pub-shell-wide { max-width: 980px; }
/* Quand un bandeau precede, le contenu remonte legerement dessus. */
.pub-has-hero .pub-shell { margin-top: -2.4rem; }

.pub-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(12, 48, 26, .1);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 575.98px) {
  .pub-card { padding: 1.15rem; border-radius: 12px; }
  .pub-hero-title { font-size: 1.3rem; }
  .pub-hero-icon { width: 48px; height: 48px; font-size: 1.3rem; }
}

/* En-tete de section numerotee dans un formulaire */
.pub-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 1.1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #e6ece8;
}
.pub-section-num {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rpp-green-light);
  color: var(--rpp-green-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}
.pub-section-title { font-size: 1.02rem; font-weight: 700; margin: 0; color: #15301f; }
.pub-section-sub { font-size: .82rem; color: #6c7a70; margin: 0; }

.pub-card .form-label { font-weight: 600; font-size: .88rem; color: #2a3b31; margin-bottom: .3rem; }
.pub-card .form-control,
.pub-card .form-select {
  border-radius: 10px;
  border-color: #d8e2db;
  padding: .55rem .8rem;
}
.pub-card .form-control:focus,
.pub-card .form-select:focus {
  border-color: var(--rpp-green);
  box-shadow: 0 0 0 .2rem rgba(10, 110, 49, .15);
}

/* ---- Encarts ---- */
.pub-note {
  background: var(--rpp-green-light);
  border: 1px solid #cde5d6;
  border-radius: 12px;
  padding: .9rem 1rem;
  font-size: .88rem;
  color: #1d4430;
}
.pub-note-gold {
  background: #fdf6e3;
  border-color: #f0e0b0;
  color: #5c4708;
}

/* ---- Accuse de depot (code de suivi) ---- */
.pub-success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--rpp-green-light);
  color: var(--rpp-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

/* ---- Cartes de service (portail public) ---- */
.pub-service {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(12, 48, 26, .1);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  border-top: 4px solid var(--rpp-green);
  transition: transform .15s, box-shadow .15s;
}
.pub-service:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(12, 48, 26, .16);
  color: inherit;
}
.pub-service-gold { border-top-color: var(--rpp-gold); }
.pub-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--rpp-green-light);
  color: var(--rpp-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: .9rem;
}
.pub-service-gold .pub-service-icon { background: #fdf6e3; color: #8a6a00; }
.pub-service h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.pub-service p { font-size: .88rem; color: #5d6b62; margin-bottom: 1rem; }
.pub-service-cta { margin-top: auto; font-weight: 600; color: var(--rpp-green-dark); font-size: .9rem; }

/* ---- Frise d'avancement d'une doleance ---- */
.pub-timeline { list-style: none; margin: 0; padding: 0; }
.pub-timeline li { display: flex; gap: 14px; align-items: stretch; }
.pub-timeline-dot {
  flex: 0 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pub-timeline-dot i {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e6ece8;
  color: #8c998f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}
.pub-timeline-dot::after {
  content: "";
  flex: 1 1 auto;
  width: 2px;
  background: #e6ece8;
  min-height: 12px;
}
.pub-timeline li:last-child .pub-timeline-dot::after { display: none; }
.pub-timeline-done .pub-timeline-dot i { background: var(--rpp-green); color: #fff; }
.pub-timeline-current .pub-timeline-dot i {
  background: var(--rpp-gold);
  color: #3a2d00;
  box-shadow: 0 0 0 4px rgba(212, 160, 23, .22);
}
.pub-timeline-ko .pub-timeline-dot i { background: var(--rpp-red); color: #fff; }
.pub-timeline-body { padding-bottom: 1.1rem; }
.pub-timeline-label { font-weight: 600; font-size: .92rem; color: #15301f; }
.pub-timeline-sub { font-size: .8rem; color: #78857c; }

/* ---- Fil de discussion public ---- */
.pub-thread { display: flex; flex-direction: column; gap: .8rem; }
.pub-msg {
  border-radius: 12px;
  padding: .8rem 1rem;
  background: #f4f7f5;
  border: 1px solid #e6ece8;
  max-width: 92%;
}
.pub-msg-team {
  align-self: flex-start;
  background: var(--rpp-green-light);
  border-color: #cde5d6;
}
.pub-msg-me { align-self: flex-end; background: #fff; }
.pub-msg-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .8rem;
  margin-bottom: .3rem;
}
.pub-msg-author { font-weight: 700; color: #15301f; }
.pub-msg-date { color: #8c998f; white-space: nowrap; }
.pub-msg-body { font-size: .92rem; white-space: pre-wrap; word-break: break-word; }

/* ---- Pied de page public ---- */
.pub-footer {
  background: #0c2417;
  color: rgba(255, 255, 255, .72);
  padding: 2.2rem 0 1.2rem;
  margin-top: auto;
}
.pub-footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.pub-footer-brand .small { opacity: .7; }
.pub-footer-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rpp-gold);
  margin-bottom: .7rem;
}
.pub-footer-links { list-style: none; padding: 0; margin: 0; }
.pub-footer-links li { margin-bottom: .4rem; }
.pub-footer-links a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .9rem; }
.pub-footer-links a:hover { color: #fff; text-decoration: underline; }
.pub-footer-note { opacity: .6; }
.pub-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 1.6rem;
  padding-top: 1rem;
  text-align: center;
  opacity: .6;
}

/* ---- Verification de carte de membre ---- */
.pub-verdict { text-align: center; padding: .5rem 0; }
.pub-verdict-icon { font-size: 3.4rem; line-height: 1; }
.pub-verdict-title { font-size: 1.25rem; font-weight: 800; margin: .6rem 0 .2rem; }
.pub-infos { list-style: none; padding: 0; margin: 1.4rem 0 0; text-align: left; }
.pub-infos li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: .6rem 0;
  border-bottom: 1px solid #f0f4f1;
  font-size: .92rem;
}
.pub-infos li:first-child { border-top: 1px solid #e6ece8; }
.pub-infos-label { color: #78857c; }
.pub-infos-value { font-weight: 600; color: #15301f; text-align: right; }

/* ---- Formulaire par etapes (adhesion en ligne) ---- */
.pub-steps {
  list-style: none;
  counter-reset: pubstep;
  display: flex;
  gap: 6px;
  margin: 0 0 1.6rem;
  padding: 0;
}
.pub-steps li {
  flex: 1 1 0;
  counter-increment: pubstep;
  text-align: center;
  font-size: .76rem;
  color: #8c998f;
  position: relative;
  padding-top: 38px;
}
.pub-steps li::before {
  content: counter(pubstep);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e6ece8;
  color: #8c998f;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.pub-steps li::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e6ece8;
}
.pub-steps li:last-child::after { display: none; }
.pub-steps li.is-done::before { content: "\F26E"; font-family: 'bootstrap-icons'; font-size: .8rem; background: var(--rpp-green); color: #fff; }
.pub-steps li.is-done::after { background: var(--rpp-green); }
.pub-steps li.is-current::before {
  background: var(--rpp-gold);
  color: #3a2d00;
  box-shadow: 0 0 0 4px rgba(212, 160, 23, .22);
}
.pub-steps li.is-current { color: #15301f; font-weight: 700; }
@media (max-width: 575.98px) {
  .pub-steps li { font-size: 0; padding-top: 32px; }
  .pub-steps li.is-current { font-size: .72rem; }
}

/* Sans JavaScript, toutes les etapes restent visibles : le formulaire
   fonctionne alors comme une page unique. */
.pub-wizard-on .pub-step { display: none; }
.pub-wizard-on .pub-step.is-active { display: block; }
.pub-wizard-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 1.4rem;
}
.pub-wizard-nav .btn { min-width: 130px; }

/* ---- Bandeau d'apercu (utilisateur connecte sur une page publique) ---- */
.pub-apercu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #15301f;
  color: rgba(255, 255, 255, .85);
  border-radius: 12px;
  padding: .7rem 1rem;
  font-size: .86rem;
  margin-bottom: 1.2rem;
}
.pub-apercu strong { color: #fff; }
.pub-apercu .bi-eye-fill { color: var(--rpp-gold); }
