/* Charte GAZCOOP — fond blanc, contours rectangulaires, accent corail.
   Mobile-first : une seule colonne sous 768 px. */

/* Accent aligné sur le violet du logo Gazcoop (retouche du 25/09/2026) */
:root {
  --accent: #8284fb;
  --accent-clair: #ececfe;
  --contraste: #8284fb;
  --encre: #1f2430;
  --texte: #374151;
  --texte-doux: #6b7280;
  --bordure: #e5e7eb;
  --fond-doux: #f8f9fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--texte);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--contraste);
}

.accent {
  color: var(--accent);
}

/* --- Bandeau haut --- */

.bandeau {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--bordure);
  font-size: 0.85rem;
}

.bandeau-lien {
  color: var(--texte-doux);
  text-decoration: none;
}

.bandeau-lien:hover {
  color: var(--encre);
}

.bandeau-lien--desactive {
  cursor: not-allowed;
  opacity: 0.6;
}

/* --- Structure --- */

.conteneur {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.titre {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 1.9rem;
  color: var(--encre);
}

.accroche {
  margin: 0.35rem 0 1.75rem;
  text-align: center;
  font-style: italic;
  color: var(--texte-doux);
}

/* --- Bandeau et pied de page : logo --- */

.bandeau-logo img {
  display: block;
  height: 30px;
}

.pied-de-page-logo {
  height: 21px;
  margin-bottom: 0.35rem;
}

/* --- Encadré documents (discret depuis les retours du 25/09) --- */

.encadre-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--texte-doux);
}

.encadre-documents-titre {
  font-weight: 600;
}

.encadre-documents-separateur {
  color: var(--bordure);
}

.lien-document {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--texte-doux);
  text-decoration: underline;
}

.lien-document:hover {
  color: var(--encre);
}

.icone {
  flex: none;
}

.icone--externe {
  opacity: 0.75;
}

/* --- Stepper --- */

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 2rem 0;
}

.stepper-etape {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 5.5rem;
}

.stepper-case {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--bordure);
  background: #fff;
  color: var(--texte-doux);
  font-weight: 700;
}

.stepper-libelle {
  font-size: 0.8rem;
  color: var(--texte-doux);
  text-align: center;
}

.stepper-etape--active .stepper-case {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.stepper-etape--active .stepper-libelle {
  color: var(--accent);
  font-weight: 600;
}

.stepper-etape--franchie .stepper-case {
  border-color: var(--accent);
  color: var(--accent);
}

.stepper-etape--franchie .stepper-libelle {
  color: var(--accent);
}

.stepper-ligne {
  flex: 1;
  max-width: 7rem;
  height: 1px;
  background: var(--bordure);
  margin-top: 1rem;
}

.stepper-ligne--franchie {
  background: var(--accent);
  height: 2px;
}

/* --- Carte d'étape --- */

.carte {
  border: 1px solid var(--bordure);
  padding: 1.5rem 1.75rem 1.75rem;
}

.carte-titre {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--bordure);
  font-size: 1.15rem;
  color: var(--encre);
}

.carte-texte {
  color: var(--texte);
}

.bouton-principal {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.bouton-principal:hover {
  filter: brightness(0.95);
}

/* --- Formulaire --- */

.champ {
  margin: 0 0 1.1rem;
  padding: 0;
  border: none;
}

.champ label,
.champ legend {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--encre);
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="tel"],
.champ input[type="date"],
.champ select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 0;
  background: #fff;
  color: var(--encre);
  font: inherit;
  font-size: 0.9rem;
}

.champ input:focus,
.champ select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.champ input::placeholder {
  color: #9ca3af;
}

.obligatoire {
  color: var(--accent);
}

.rangee {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.radio {
  display: block;
  margin: 0.3rem 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--texte);
}

.radio input {
  accent-color: var(--accent);
  margin-right: 0.45rem;
}

.radio--enligne {
  display: inline-block;
  margin-right: 1.5rem;
}

.mention-facultatif {
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 400;
  color: var(--texte-doux);
}

.mention-aide {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--texte-doux);
}

.champ-erreur {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: #c22525;
}

.alerte-email {
  margin: 0.4rem 0 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--accent);
  background: var(--accent-clair);
  font-size: 0.8rem;
  color: var(--encre);
}

/* Honeypot : hors écran, invisible pour un humain */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Étape 2 : parts et engagements --- */

.encart {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--bordure);
}

.encart-note {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  color: var(--texte);
}

.encart-titre {
  padding: 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--encre);
}

.etiquette {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--encre);
}

.etiquettes-montant {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.etiquette-montant {
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.etiquette-montant:hover,
.etiquette-montant:focus-visible {
  background: var(--accent-clair);
}

.etiquette-montant--active {
  background: var(--accent);
  color: #fff;
}

.etiquette-montant--active:hover,
.etiquette-montant--active:focus-visible {
  background: var(--accent);
}

.champ input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--encre);
  font: inherit;
  font-size: 0.9rem;
}

.encart-verification {
  border-color: var(--accent);
  animation: pulsation-verification 1.6s ease-in-out infinite;
}

@keyframes pulsation-verification {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.montant-total {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--accent);
  background: var(--accent-clair);
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
}

.engagement {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bordure);
}

.engagement:last-of-type {
  border-bottom: none;
}

.engagement-libelle {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--texte);
}

.engagement-libelle input {
  flex: none;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

/* --- Étape 3 : paiement --- */

.montant-a-regler {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.montant-a-regler .accent {
  font-size: 1.15rem;
}

.tuiles-paiement {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tuile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.4rem 1rem;
  border: 1px solid var(--bordure);
  background: #fff;
  color: var(--texte);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.tuile:hover {
  border-color: var(--accent);
}

.tuile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tuile:has(input:checked) {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-clair);
}

.encart-sous-titre {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--encre);
}

@media (min-width: 768px) {
  .tuiles-paiement {
    flex-direction: row;
  }

  .tuile {
    flex: 1;
  }
}

/* --- Prévisualisation du bulletin --- */

.apercu-bulletin {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--bordure);
  background: var(--fond-doux);
}

.apercu-titre {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--encre);
}

.apercu-lignes {
  margin: 0;
}

.apercu-ligne {
  display: flex;
  gap: 1rem;
  padding: 0.35rem 0;
}

.apercu-ligne dt {
  flex: 0 0 40%;
  color: var(--texte-doux);
  font-size: 0.85rem;
}

.apercu-ligne dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--encre);
}

.mention-validation {
  margin: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--texte-doux);
}

.rangee-boutons {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.bouton-secondaire {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--bordure);
  background: #fff;
  color: var(--texte);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.bouton-secondaire:hover {
  background: var(--fond-doux);
}

.bouton-principal--flexible {
  width: auto;
  flex: 1;
  margin-top: 0;
}

/* --- Bloc partage (confirmation) --- */

.partage {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--bordure);
  background: var(--fond-doux);
}

.partage-mascotte {
  flex: none;
  width: 96px;
}

.partage-titre {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--encre);
}

.partage-contenu p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.partage-merci {
  color: var(--texte-doux);
}

/* --- FAQ --- */

.faq {
  margin-top: 2.5rem;
}

.faq-titre {
  font-size: 1.15rem;
  color: var(--encre);
}

.faq-item {
  border: 1px solid var(--bordure);
  border-bottom: none;
  padding: 0;
}

.faq-item:last-of-type {
  border-bottom: 1px solid var(--bordure);
}

.faq-item summary {
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--encre);
  cursor: pointer;
}

.faq-item summary:hover {
  background: var(--fond-doux);
}

.faq-item p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--texte);
}

/* --- Écran de diagnostic /admin/sync --- */

.conteneur--large {
  max-width: 900px;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  margin: 0 0 1.5rem;
}

.bouton-principal--compact {
  width: auto;
  margin-top: 0;
  padding: 0.6rem 1.25rem;
}

.carte-sync {
  margin-bottom: 1rem;
}

.carte-sync-entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--encre);
}

.badge {
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid;
}

.badge--succes {
  color: #1a7f37;
  border-color: #1a7f37;
  background: #ecf7ef;
}

.badge--echec {
  color: #c22525;
  border-color: #c22525;
  background: #fbeaea;
}

.badge--en_attente,
.badge--en_cours {
  color: var(--texte-doux);
  border-color: var(--bordure);
  background: var(--fond-doux);
}

.erreur-sync {
  color: #c22525;
  word-break: break-word;
}

.payload-sync {
  margin: 0.75rem 0 0;
}

.payload-sync summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texte-doux);
}

.payload-sync pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bordure);
  background: var(--fond-doux);
  font-size: 0.78rem;
  overflow-x: auto;
}

.admin-rejouer {
  margin-top: 0.9rem;
}

/* --- Pied de page --- */

.pied-de-page {
  border-top: 1px solid var(--bordure);
  padding: 1.25rem 1rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--texte-doux);
}

.pied-de-page p {
  margin: 0.25rem 0;
}

.pied-de-page a {
  color: var(--texte-doux);
}

/* --- Deux colonnes à partir de 768 px --- */

@media (min-width: 768px) {
  .encadre-documents-liens {
    flex-direction: row;
  }

  .rangee {
    flex-direction: row;
    gap: 1.25rem;
  }

  .champ--moitie {
    flex: 1;
    min-width: 0;
  }
}
