/* docs/compte/compte.css
   Page « Mon compte » (compte.js). Réutilise les classes de base de
   auth.css (compte-voile, compte-entete, compte-bouton, compte-input…). */

.moncompte-voile { justify-content: flex-end; align-items: stretch; padding: 0; }
.moncompte {
  width: 100%; max-width: 560px; height: 100%; overflow-y: auto;
  padding: calc(var(--space-5) + var(--safe-top)) var(--space-5) calc(var(--space-5) + var(--safe-bottom));
  border-left: 1px solid var(--border); background: var(--bg-1); color: var(--text); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
}
.moncompte-onglets {
  display: flex; gap: var(--space-1); overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); flex-shrink: 0;
  /* Degrades aux deux bords (recette "scrolling shadows") : seul indice
     que la barre defile sur mobile, la scrollbar etant volontairement
     masquee ci-dessus -- sans lui le dernier onglet semble coupe/inaccessible
     (bug signale 2026-12-01). Les deux premiers calques (opaques, collés au
     contenu via background-attachment: local) cachent les onglets sous le
     bord ; les deux suivants (fixes, scroll) ne deviennent visibles que
     lorsqu'il reste du contenu a faire defiler de ce cote.
  */
  background-color: var(--bg-1);
  background-image:
    linear-gradient(to right, var(--bg-1), transparent),
    linear-gradient(to left, var(--bg-1), transparent),
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .25), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .25), transparent);
  background-repeat: no-repeat;
  background-position: left center, right center, left center, right center;
  background-size: 24px 100%, 24px 100%, 10px 100%, 10px 100%;
  background-attachment: local, local, scroll, scroll;
}
.moncompte-onglets::-webkit-scrollbar { display: none; }
.moncompte-onglet {
  flex: 0 0 auto; min-height: 44px; padding: 0 var(--space-3);
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none;
  color: var(--muted); font: inherit; font-size: var(--text-sm); font-weight: 500; cursor: pointer;
}
.moncompte-onglet:hover { color: var(--text); }
.moncompte-onglet[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.moncompte-onglet:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
/* Ordinateur : libellé complet seul ; l'icône et le libellé court ne
   servent qu'à la barre mobile ci-dessous. */
.moncompte-onglet-icone, .moncompte-onglet-court { display: none; }
.moncompte-corps { flex: 1; min-height: 0; }

.moncompte-infos { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-5); font-size: var(--text-sm); }
.moncompte-infos dt { color: var(--muted); }
.moncompte-infos dd { margin: 0; overflow-wrap: anywhere; }

.moncompte-bloc { padding: var(--space-4) 0; border-top: 1px solid var(--border); }
.moncompte-bloc:first-child { border-top: 0; padding-top: 0; }
.moncompte-bloc h3 { margin: 0 0 var(--space-2); font-family: 'Newsreader', serif; font-weight: 400; font-size: var(--text-lg); }
.moncompte-bloc .compte-texte { margin-bottom: var(--space-3); }
.moncompte-danger { border-color: var(--rust); color: var(--rust-300); }
.moncompte-danger:hover { background: var(--rust-soft); border-color: var(--rust); }
.moncompte-legal { margin-top: var(--space-4); }
.moncompte-legal a { color: var(--gold); }

.moncompte-barre { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.moncompte-liste { list-style: none; margin: 0; padding: 0; }
.moncompte-liste > li { border-top: 1px solid var(--border); }
.moncompte-echange summary {
  display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline;
  min-height: 44px; padding: var(--space-2) 0; cursor: pointer; list-style: none;
}
.moncompte-echange summary::-webkit-details-marker { display: none; }
.moncompte-question { font-weight: 500; overflow-wrap: anywhere; }
.moncompte-date { color: var(--muted); font-size: var(--text-xs); flex-shrink: 0; }
.moncompte-reponse { margin: 0 0 var(--space-2); color: var(--muted); font-size: var(--text-sm); line-height: var(--lh-relaxed); white-space: pre-line; }
.moncompte-echange .compte-lien { margin-bottom: var(--space-3); }
.moncompte-conversation-tours { display: flex; flex-direction: column; gap: var(--space-2); padding-left: var(--space-3); border-left: 2px solid var(--border); }
.moncompte-conversation-tours .moncompte-echange { border-top: 0; }
.moncompte-conversation-tours .moncompte-echange summary { padding-top: var(--space-2); }

.moncompte-admin-tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-bottom: var(--space-4); }
.moncompte-admin-tuile { padding: var(--space-3); border: 1px solid var(--border); border-radius: 8px; text-align: center; }
.moncompte-admin-tuile-valeur { margin: 0; font-family: 'Newsreader', serif; font-size: var(--text-lg); color: var(--gold); }
.moncompte-admin-tuile-libelle { margin: var(--space-1) 0 0; font-size: var(--text-xs); color: var(--muted); }
.moncompte-admin-tableau { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.moncompte-admin-tableau th, .moncompte-admin-tableau td { padding: var(--space-2); border-bottom: 1px solid var(--border); text-align: left; }
.moncompte-admin-tableau th { color: var(--muted); font-weight: 500; }
.moncompte-admin-point { color: var(--muted); }
.moncompte-admin-point-actif { color: var(--gold); }

@media (max-width: 600px) {
  .moncompte { max-width: none; border-left: 0; }
  /* Barre à icônes : tous les onglets visibles sur une ligne, en colonnes
     égales (5, ou 6 avec l'administration), sans défilement horizontal. */
  .moncompte-onglets {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    gap: 0; overflow: visible; background: none;
    margin-left: calc(-1 * var(--space-2)); margin-right: calc(-1 * var(--space-2));
  }
  .moncompte-onglet {
    min-height: 60px; padding: var(--space-2) 2px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  }
  .moncompte-onglet-long { display: none; }
  .moncompte-onglet-court { display: block; font-size: 11px; font-weight: 600; line-height: 1.2; }
  .moncompte-onglet-icone {
    display: block; width: 22px; height: 22px;
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  }
  .moncompte-admin-tuiles { grid-template-columns: 1fr; }
  .moncompte-admin-tableau { display: block; overflow-x: auto; white-space: nowrap; }
}
