/* =========================================================================
   MON COMPTE — planches « Mon compte v2 » (Ludovic, 30/09)

   Canevas « Design Antithèse 2 », page « Compte et paiement » ; recopiées
   dans outils/design-compte/planches/. Le gabarit est
   theme/antithese/compte.php, les onglets theme/antithese/memberpress/account/.

   Sobre, comme le paiement, dont il reprend les gris et les champs : la
   navigation à gauche (260), un filet, l'onglet à droite (640). Le bouton
   d'action est NOIR ; le vert dit ce qui est actif ou payé. Sous 992 px,
   une colonne de 560 px, les onglets en bande, « Se déconnecter » en bas.
   ========================================================================= */

.compte-page { padding-bottom: 96px; }

.compte-grille {
  display: grid;
  grid-template-columns: minmax(0, 260fr) 1px minmax(0, 640fr);
  column-gap: 72px;
  align-items: start;
  max-width: var(--largeur-compte);
  margin: 0 auto;
  padding-top: 56px;
  font-family: var(--police-meta);
  color: var(--gris-texte);
}
.compte-filet { align-self: stretch; background: var(--paiement-filet); }

.compte-masque {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- La navigation -------------------------------------------------------- */
.compte-titre {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em;
  text-transform: none;
}
.compte-qui { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--paiement-texte); overflow-wrap: anywhere; }
.compte-qui span { display: block; color: var(--gris-texte-secondaire); }

.compte-menu ul {
  display: flex; flex-direction: column;
  margin: 28px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--paiement-filet);
}
.compte-menu li { margin: 0; padding: 0; }
.compte-menu li::before { content: none; }
.compte-menu a {
  display: flex; align-items: center; min-height: 44px;
  border-bottom: 1px solid var(--paiement-filet);
  font-size: 15px; color: var(--paiement-texte); text-decoration: none;
}
.compte-menu a:hover { color: var(--gris-texte); }
.compte-menu .est-ouvert a,
.compte-menu .mepr-active-nav-tab a { color: var(--gris-texte); font-weight: 500; }

.compte-sortie {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px;
  font-size: 14px; color: var(--gris-texte-secondaire); text-decoration: none;
}
.compte-sortie:hover { color: var(--gris-texte); }
.compte-sortie svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.compte-sortie-bas { display: none; }

/* --- L'onglet ------------------------------------------------------------- */
.compte-contenu { min-width: 0; }
.compte-section + .compte-section,
.compte-formulaire + .compte-section { margin-top: 44px; }
.compte-section-titre { margin: 0; font-family: var(--police-meta); font-size: 16px; font-weight: 500; line-height: 1.3; }
.compte-texte { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--paiement-texte); }

.compte-lien {
  color: var(--gris-texte);
  text-decoration: underline; text-decoration-color: var(--paiement-souligne);
  text-underline-offset: 3px;
}
.compte-lien:hover { text-decoration-color: currentColor; }

/* La carte d'un abonnement : le nom et l'état, puis des lignes à filets. */
.compte-carte { margin-top: 14px; border: 1px solid var(--paiement-bord); border-radius: var(--rayon); }
.compte-carte-haut {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 20px 18px;
}
.compte-carte-nom { margin: 0; font-family: var(--police-titre); font-size: 22px; font-weight: 700; line-height: 1.25; }
.compte-carte-prix { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--paiement-texte); }

.compte-etat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 9px;
  background: var(--compte-actif-fond); color: var(--compte-actif-texte);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.compte-etat i { width: 7px; height: 7px; border-radius: 50%; background: var(--compte-actif-point); }
.compte-etat-fin { background: var(--paiement-pastille); color: var(--paiement-texte); }
.compte-etat-fin i { background: var(--paiement-indice); }

.compte-ligne {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid var(--paiement-filet);
  font-size: 15px; line-height: 1.45;
}
.compte-ligne-seule { border-top: 0; }
.compte-ligne-nom { color: var(--paiement-texte); }
.compte-ligne-valeur { text-align: right; }
.compte-carte sup, .compte-annuler sup, .compte-tableau sup { font-size: .7em; line-height: 0; }

/* Les boutons : noir pour l'action, clair pour le reste. */
.compte-boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.compte-bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px; box-sizing: border-box;
  border: 1px solid var(--paiement-bord); border-radius: var(--rayon);
  background: var(--c-blanc); color: var(--gris-texte);
  font-family: var(--police-meta); font-size: 15px; font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background var(--duree-survol), border-color var(--duree-survol);
}
.compte-bouton:hover { border-color: var(--gris-texte); }
.compte-bouton-noir { border-color: var(--gris-texte); background: var(--gris-texte); color: var(--c-blanc); }
.compte-bouton-noir:hover { background: #000; border-color: #000; }

/* Annuler l'abonnement : un lien sous la carte, la confirmation dessous. */
.compte-annuler { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--gris-texte-secondaire); }
.compte-annuler summary { display: block; cursor: pointer; list-style: none; }
.compte-annuler summary::-webkit-details-marker { display: none; }
.compte-annuler summary .compte-lien { color: var(--paiement-texte); }
.compte-confirmer {
  margin-top: 14px; padding: 16px 20px;
  border: 1px solid var(--paiement-bord); border-radius: var(--rayon);
  background: var(--fond-action);
}
.compte-confirmer p { margin: 0; font-size: 15px; color: var(--gris-texte); }
.compte-confirmer .compte-boutons { margin-top: 14px; }

/* Vos accès : des lignes à filets, un chevron quand toute la ligne mène. */
.compte-acces { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--paiement-filet); }
.compte-acces > li { margin: 0; padding: 0; }
.compte-acces > li::before { content: none; }
.compte-acces-ligne {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 10px 0; box-sizing: border-box;
  border-bottom: 1px solid var(--paiement-filet);
  color: var(--gris-texte); text-decoration: none;
}
.compte-acces-ligne strong { display: block; font-size: 15px; font-weight: 500; }
.compte-acces-note { display: block; margin-top: 2px; font-size: 13px; color: var(--gris-texte-secondaire); }
.compte-acces-ligne > svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--paiement-indice); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.compte-acces-ligne:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.compte-acces-liens { display: flex; gap: 14px; font-size: 14px; }
.compte-acces-liens a { color: var(--gris-texte); text-decoration: underline; text-decoration-color: var(--paiement-souligne); text-underline-offset: 3px; }

/* Compris dans l'abonnement : la liste du paiement, en coches. */
.compte-compris > p { margin: 0; font-size: 13px; font-weight: 500; color: var(--paiement-texte); }
.compte-compris ul { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.compte-compris li { display: flex; gap: 10px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--paiement-texte); }
.compte-compris li::before { content: none; }
.compte-compris svg { flex: none; width: 14px; height: 14px; margin-top: 3px; fill: none; stroke: var(--gris-texte-secondaire); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Le moyen de paiement. */
.compte-moyen { display: flex; align-items: center; gap: 12px; }
.compte-moyen svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--paiement-texte); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.compte-alerte { color: var(--accent); }

/* L'historique des paiements. */
.compte-tableau { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.compte-tableau th {
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--paiement-filet);
  font-size: 13px; font-weight: 400; color: var(--gris-texte-secondaire); text-align: left;
  text-transform: none; letter-spacing: 0;
}
.compte-tableau td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--paiement-filet); vertical-align: top; }
.compte-montant { font-variant-numeric: tabular-nums; white-space: nowrap; }
.compte-reference { display: block; margin-top: 2px; font-size: 12px; color: var(--paiement-indice); overflow-wrap: anywhere; }
.compte-paye {
  display: inline-block; padding: 2px 8px;
  background: var(--compte-actif-fond); color: var(--compte-actif-texte);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.compte-pages { display: flex; justify-content: space-between; margin: 16px 0 0; font-size: 14px; }

/* --- Les champs : ceux du paiement ---------------------------------------- */
.compte-formulaire .mp-form-row { margin: 0; }
.compte-libelle { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 400; color: var(--paiement-texte); }
.compte-section-titre + .compte-champ .compte-libelle,
.compte-section-titre + .mp-form-row .compte-libelle { margin-top: 14px; }
.compte-groupe { border: 1px solid var(--paiement-bord); border-radius: var(--rayon); background: var(--c-blanc); }
.compte-rang { display: grid; position: relative; }
.compte-rang + .compte-rang { border-top: 1px solid var(--paiement-bord); }
.compte-rang-deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.compte-groupe input {
  width: 100%; height: 46px; box-sizing: border-box; margin: 0;
  padding: 0 14px;
  border: 0; border-radius: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--gris-texte);
}
.compte-groupe select {
  width: 100%; height: 46px; box-sizing: border-box; margin: 0;
  padding: 0 14px;
  border: 0; border-radius: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--gris-texte);
}
.compte-groupe select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--gris-texte); }
.compte-groupe input::placeholder { color: var(--paiement-indice); }
.compte-groupe .compte-rang-deux > * + * { border-left: 1px solid var(--paiement-bord); }
.compte-rang-code { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.compte-groupe-titre { margin-top: 14px; }
.compte-facultatif { font-weight: 400; color: var(--gris-texte-secondaire); }
.compte-groupe input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--gris-texte); }
/* Le fond rouge de MemberPress sur un champ invalide, en `!important`. */
.compte-groupe input.invalid { background: transparent !important; border: 0 !important; box-shadow: inset 0 0 0 1px var(--accent); }
.compte-avec-oeil input { padding-right: 52px; }
.compte-oeil {
  position: absolute; right: 2px; top: 1px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--paiement-indice);
}
.compte-oeil svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.compte-oeil:hover,
.compte-oeil[aria-pressed="true"] { color: var(--gris-texte); }
.compte-aide { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--gris-texte-secondaire); }
.compte-formulaire .compte-boutons { margin-top: 24px; }
.compte-formulaire .mepr-form-has-errors { display: none; margin-top: 12px; font-size: 13px; color: var(--accent); }
/* Le message d'erreur d'un champ que MemberPress rend : caché, sauf si le
   champ est marqué invalide. */
.compte-formulaire .cc-error { display: none; font-size: 13px; color: var(--accent); }
.compte-formulaire .mp-form-row:has(.invalid) .cc-error { display: block; }

/* Un champ que MemberPress rend lui-même (un champ personnalisé, l'adresse
   s'il la demande) : le libellé et le cadre du thème. */
.compte-formulaire .mepr_custom_field .mp-form-label label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 400; color: var(--paiement-texte); }
.compte-formulaire .mepr_custom_field input[type="text"],
.compte-formulaire .mepr_custom_field input[type="email"],
.compte-formulaire .mepr_custom_field select {
  width: 100%; height: 46px; box-sizing: border-box; padding: 0 14px;
  border: 1px solid var(--paiement-bord); border-radius: var(--rayon); background: var(--c-blanc);
  font: inherit; font-size: 16px;
}

.compte-mdp {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding: 13px 16px;
  border: 1px solid var(--paiement-bord); border-radius: var(--rayon);
  font-size: 15px;
}
.compte-mdp > span { letter-spacing: .2em; color: var(--paiement-texte); }

/* --- Les messages de MemberPress : enregistré, annulé, une erreur ---------- */
.compte-contenu .mepr_updated,
.compte-contenu .mepr_error,
.compte-message {
  margin: 0 0 28px; padding: 12px 16px;
  border: 0; border-left: 3px solid var(--compte-actif-point);
  background: var(--fond-action);
  font-family: var(--police-meta); font-size: 14px; line-height: 1.5; color: var(--gris-texte);
}
.compte-contenu .mepr_error { border-left-color: var(--accent); }
.compte-contenu .mepr_error ul { margin: 0; padding: 0; list-style: none; }
.compte-contenu .mepr_error li::before { content: none; }
.compte-contenu .mepr_error a,
.compte-contenu .mepr_updated a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.compte-contenu .mp_wrapper:has(> .mepr_error),
.compte-contenu .mp_wrapper:has(> .mepr_updated) { overflow: visible; }

/* --- Changer la carte : le formulaire de la passerelle Stripe ------------
   Écrit par MemberPress dans sa passerelle, sans vue à remplacer : le thème
   n'en règle que l'écriture et le bouton, noir comme ailleurs dans le compte.
   La carte elle-même est dessinée par Stripe (`inc/paiement.php`). */
.compte-contenu .mepr_update_account_table { font-family: var(--police-meta); font-size: 16px; }
.compte-contenu .mepr_update_account_table strong { font-weight: 500; }
.compte-contenu .mepr_update_account_table br { display: none; }
.compte-contenu .mepr-stripe-elements { margin-top: 14px; }
.compte-contenu .mp_wrapper .mepr-submit {
  min-height: 46px; margin-top: 24px; padding: 0 20px;
  border: 1px solid var(--gris-texte); border-radius: var(--rayon);
  background: var(--gris-texte); color: var(--c-blanc);
  font-size: 15px; font-weight: 500;
}
.compte-contenu .mp_wrapper .mepr-submit:hover { background: #000; border-color: #000; }

/* TABLETTE ET TÉLÉPHONE — une colonne, les onglets en bande. */
@media (max-width: 991px) {
  .compte-page { padding-bottom: 64px; }
  .compte-grille { grid-template-columns: minmax(0, 1fr); max-width: 560px; padding-top: 28px; }
  .compte-filet { display: none; }
  .compte-menu ul {
    flex-direction: row; gap: 24px;
    margin-top: 20px;
    overflow-x: auto; scrollbar-width: none; white-space: nowrap;
    border-top: 0; border-bottom: 1px solid var(--paiement-filet);
  }
  .compte-menu ul::-webkit-scrollbar { display: none; }
  .compte-menu li { flex: none; }
  .compte-menu a { border-bottom: 2px solid transparent; }
  .compte-menu .est-ouvert a,
  .compte-menu .mepr-active-nav-tab a { border-bottom-color: var(--gris-texte); }
  .compte-nav > .compte-sortie { display: none; }
  .compte-contenu { margin-top: 28px; }
  .compte-sortie-bas { display: flex; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--paiement-filet); }
}

@media (max-width: 767px) {
  .compte-grille { padding-top: 20px; }
  .compte-titre { font-size: 26px; }
  .compte-carte-haut { padding: 16px; }
  .compte-ligne { padding: 12px 16px; font-size: 14px; }
  .compte-boutons > * { flex: 1 1 100%; }

  /* L'historique : une fiche par paiement, la date et le montant en tête. */
  .compte-tableau thead { display: none; }
  .compte-tableau, .compte-tableau tbody, .compte-tableau td { display: block; }
  .compte-tableau tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px;
    padding: 14px 0; border-bottom: 1px solid var(--paiement-filet);
  }
  .compte-tableau td { padding: 0; border: 0; }
  .compte-date { grid-column: 1; grid-row: 1; }
  .compte-montant { grid-column: 2; grid-row: 1; text-align: right; }
  .compte-formule { grid-column: 1; grid-row: 2; font-size: 14px; color: var(--paiement-texte); }
  .compte-statut { grid-column: 2; grid-row: 2; text-align: right; }
  .compte-par { grid-column: 1; grid-row: 3; font-size: 13px; color: var(--gris-texte-secondaire); }

  /* Le prénom et le nom l'un sous l'autre. */
  .compte-rang-deux { grid-template-columns: minmax(0, 1fr); }
  .compte-groupe .compte-rang-deux > * + * { border-left: 0; border-top: 1px solid var(--paiement-bord); }
}
