/*
  Contenu des pages de compte et des pages légales (formulaires, rubriques, offres, passkeys, texte légal), dans une
  carte papier « .compte-carte ». Global (et non isolé dans AccountLayout) : servi aussi par SiteLayout, la mise en
  page avec barre du haut de Mon compte, Mon abonnement et des pages légales.
*/
.compte-carte h1 {
  font-size: 1.9rem;
  text-align: center;
  margin: 4px 0 14px;
}

.compte-carte .compte-formulaire {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compte-carte .compte-formulaire label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--police-texte);
  font-size: .95rem;
  color: var(--encre);
}

.compte-carte .compte-formulaire small { color: var(--encre-douce); }

.compte-carte .compte-formulaire input[type=email],
.compte-carte .compte-formulaire input[type=password] {
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid #aca776;
  border-radius: 8px;
  background: #fffdf7;
  color: var(--encre);
}

.compte-carte .compte-formulaire input:focus-visible {
  outline: 2px solid #1f3440;
  outline-offset: 1px;
}

.compte-carte .compte-formulaire .compte-case {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.compte-carte .validation-message {
  color: #a3261b;
  font-size: .88rem;
}

.compte-carte .btn-jaune {
  align-self: center;
  margin-top: 4px;
  min-width: 220px;
}

.compte-carte .compte-erreur {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f8e1dc;
  color: #7c1d14;
  font-family: var(--police-texte);
  font-size: .95rem;
  list-style: none;
}

.compte-carte .compte-lien {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--police-texte);
  font-size: .95rem;
}

.compte-carte .compte-lien a { color: var(--rouille); }

.compte-carte .compte-info {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e3eedb;
  color: #2c4a1f;
  font-family: var(--police-texte);
  font-size: .95rem;
}

.compte-carte .compte-erreur a,
.compte-carte .compte-texte a { color: var(--rouille); }

.compte-carte .compte-texte {
  font-family: var(--police-texte);
  font-size: .98rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.compte-carte .compte-discret { color: var(--encre-douce); font-size: .9rem; }

.compte-carte .compte-retour {
  display: inline-block;
  margin-bottom: 4px;
  font-family: var(--police-texte);
  font-size: .92rem;
  color: var(--rouille);
}

.compte-carte .compte-rubrique {
  padding: 16px 4px 18px;
  border-top: 1px dashed #aca776;
}

.compte-carte .compte-rubrique h2 {
  font-size: 1.35rem;
  margin: 0 0 10px;
}

/* Boutons des rubriques : moins appuyés que le bouton jaune de l'action principale. */
.compte-carte .btn-secondaire,
.compte-carte .btn-danger {
  align-self: flex-start;
  display: inline-block;
  font: inherit;
  font-family: var(--police-texte);
  font-size: .95rem;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.compte-carte .btn-secondaire {
  border: 1px solid #1f3440;
  background: transparent;
  color: #1f3440;
}

.compte-carte .btn-secondaire:hover { background: rgba(31, 52, 64, .07); }

.compte-carte .btn-danger {
  border: 1px solid #a3261b;
  background: #a3261b;
  color: #fff;
}

.compte-carte .btn-danger:hover { filter: brightness(1.08); }
.compte-carte .compte-danger h2 { color: #a3261b; }

/* « ou » entre la connexion par mot de passe et par passkey. */
.compte-carte .compte-ou {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--encre-douce);
  font-family: var(--police-texte);
  font-size: .88rem;
}

.compte-carte .compte-ou::before,
.compte-carte .compte-ou::after {
  content: "";
  flex: 1;
  border-top: 1px dashed #aca776;
}

.compte-carte .btn-passkey { align-self: center; }

/* Liste des passkeys de « Mon compte » : nom modifiable, date, retirer. */
.compte-carte .passkeys {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compte-carte .passkey {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.compte-carte .passkey input[type=text] {
  flex: 1 1 200px;
  font: inherit;
  font-family: var(--police-texte);
  padding: 8px 10px;
  border: 1px solid #aca776;
  border-radius: 8px;
  background: #fffdf7;
}

.compte-carte .passkey .date { flex-basis: 100%; order: 3; font-size: .85rem; color: var(--encre-douce); font-family: var(--police-texte); }
.compte-carte .btn-lien-danger {
  background: none;
  border: none;
  color: #a3261b;
  font: inherit;
  font-family: var(--police-texte);
  font-size: .92rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Offres de « Mon abonnement ». */
.compte-carte .offres {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.compte-carte .offre {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  border: 1.5px solid #aca776;
  border-radius: 10px;
  background: #fffdf7;
  font-family: var(--police-texte);
}

.compte-carte .offre .duree { font-size: 1.3rem; }
.compte-carte .offre .prix { font-size: 1.15rem; font-weight: 600; color: var(--rouille); }
.compte-carte .offre .par-mois { font-size: .8rem; color: var(--encre-douce); }

.compte-carte .btn-lien {
  background: none;
  border: none;
  padding: 0;
  color: var(--rouille);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Offre cochée : surlignage bleu nuit (le bouton radio lui-même est caché, toute la carte se clique). */
.compte-carte .offre input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.compte-carte .offre:has(input:checked) { border-color: #1f3440; box-shadow: 0 0 0 2px #1f3440; background: #f3f6f7; }
.compte-carte .offre:has(input:focus-visible) { outline: 2px solid #1f3440; outline-offset: 3px; }

.compte-carte .achat { display: flex; flex-direction: column; gap: 12px; }
.compte-carte .renonciation { font-size: .88rem; line-height: 1.4; align-items: flex-start; }
.compte-carte .renonciation input { margin-top: 3px; }
.compte-carte paypal-checkout { display: block; max-width: 420px; width: 100%; align-self: center; min-height: 100px; }

.compte-carte .achats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-family: var(--police-texte); font-size: .92rem; }
.compte-carte .achats li { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* Pages légales (Components/Legal) : texte suivi, titres de rubrique, tableau des données gardées. */
.page-legale {
  font-family: var(--police-texte);
  font-size: .97rem;
  line-height: 1.55;
  color: var(--encre);
  padding: 0 8px;
}

.page-legale h1 { font-family: var(--police-titre); font-weight: 400; }

.page-legale h2 {
  font-family: var(--police-titre);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 22px 0 6px;
}

.page-legale p,
.page-legale ul { margin: 0 0 10px; }

.page-legale a { color: var(--rouille); }

.page-legale table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 6px 0 12px;
}

.page-legale th,
.page-legale td {
  text-align: left;
  vertical-align: top;
  padding: 6px 8px;
  border-bottom: 1px dashed var(--bordure-pointillee, #aca776);
}

.page-legale .mise-a-jour { color: var(--encre-douce); font-size: .88rem; margin-top: 20px; }

/* Donnée manquante, à renseigner dans la section « Legal » de appsettings.json. */
.compte-carte .a-completer {
  background: #fbe38c;
  color: var(--rouille);
  padding: 0 4px;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .page-legale table { display: block; overflow-x: auto; }
}
