/**
 * scripts/_partials/account.css — pages /connexion/ et /compte/ (vit-S776).
 * Chargé en <link> par ces deux pages uniquement. Variables et registre visuel
 * repris de la vitrine (paper / ink / accent vert), mode sombre déclaré ici même
 * plutôt que laissé à l'auto-génération : ces classes ne vivent que sur 2 pages.
 */
/* [hidden] doit gagner sur les display: flex/grid déclarés plus bas — sans cela
   #acc-code-form (display:flex) s'affiche dès le chargement, à côté du formulaire
   d'email qu'il doit remplacer. Constaté en recette locale, vit-S776. */
[hidden] { display: none !important; }

/* ─── Socle typographique ───────────────────────────────────────────────────
   Les autres pages de la vitrine portent ces variables et la règle `body` dans
   leur CSS inline. /connexion/ et /compte/ ne chargent que components.css et ce
   fichier : sans déclaration ici, `body` n'avait AUCUNE font-family et le
   navigateur retombait sur sa police par défaut — toute la page en serif, y
   compris les libellés, les champs et les boutons. Repéré par Rémy sur la page
   en production (vit-S776).

   Convention de la vitrine, relevée dans abonnement/index.html et respectée
   ici : `body` en --sans (Plus Jakarta Sans), titres en --serif. */
:root {
  --paper:      #F3F0E8;
  --paper2:     #F8F6F0;
  --ink:        #06172D;
  --muted:      rgba(6,23,45,.72);
  --muted2:     rgba(6,23,45,.58);
  --border:     rgba(6,23,45,.12);
  --borderSoft: rgba(6,23,45,.08);
  --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans:  "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper2);
  margin: 0;
}

/* Les champs et boutons n'héritent pas de la police du document : sans ceci,
   les placeholders et les libellés de bouton restent en serif. */
input, button, select, textarea { font-family: inherit; }

.acc-main { max-width: 720px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 20px 72px; }
.acc-head { margin-bottom: 28px; }
.acc-head h1 { font-family: var(--serif); font-size: clamp(26px, 4.4vw, 36px); line-height: 1.2; color: var(--ink, #06172D); margin: 0 0 10px; }
.acc-head p { color: var(--muted, rgba(6,23,45,.72)); line-height: 1.6; margin: 0; }

.acc-card { background: #fff; border: 1px solid var(--border, rgba(6,23,45,.12)); border-radius: 18px; padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; }
.acc-card h2 { font-size: 16px; font-weight: 700; color: var(--ink, #06172D); margin: 0 0 6px; }
.acc-card > p { color: var(--muted, rgba(6,23,45,.72)); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.acc-card:last-child { margin-bottom: 0; }

.acc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .acc-cols { grid-template-columns: 1fr; } }

.acc-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2, rgba(6,23,45,.58)); margin-bottom: 10px; }
.acc-form { display: flex; flex-direction: column; gap: 10px; }
.acc-form input[type="email"], .acc-form input[type="password"], .acc-form input[type="text"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border, rgba(6,23,45,.12));
  border-radius: 11px; font-family: inherit; font-size: 15px; color: var(--ink, #06172D); background: #fff;
}
.acc-form input:focus-visible { outline: 2px solid #2d6a4f; outline-offset: 1px; }
.acc-form button[type="submit"], .acc-btn {
  padding: 12px 16px; background: #2d6a4f; color: #fff; border: none; border-radius: 11px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.acc-form button[type="submit"]:disabled, .acc-btn:disabled { opacity: .55; cursor: default; }
.acc-btn-quiet { background: none; color: #2d6a4f; border: 1px solid var(--border, rgba(6,23,45,.12)); }
.acc-btn-danger { background: none; color: #8a2b2b; border: 1px solid rgba(138,43,43,.3); }
.acc-linkbtn { background: none; border: none; padding: 4px 0; color: #2d6a4f; font-family: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; text-align: left; }

.acc-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; background: #fff; border: 1px solid var(--border, rgba(6,23,45,.12)); border-radius: 11px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink, #06172D); cursor: pointer; }
.acc-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted2, rgba(6,23,45,.58)); font-size: 12px; }
.acc-divider::before, .acc-divider::after { content: ""; flex: 1; height: 1px; background: var(--border, rgba(6,23,45,.12)); }

.acc-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted, rgba(6,23,45,.72)); cursor: pointer; }
.acc-consent input { margin-top: 3px; flex-shrink: 0; }
.acc-note { font-size: 12.5px; color: var(--muted2, rgba(6,23,45,.58)); line-height: 1.55; margin: 10px 0 0; }
.acc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.acc-status { display: none; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; background: rgba(45,106,79,.08); color: #1b4332; }
.acc-status.is-visible { display: block; }
.acc-status.is-error { background: rgba(138,43,43,.08); color: #8a2b2b; }

.acc-rows { list-style: none; margin: 0; padding: 0; }
.acc-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--borderSoft, rgba(6,23,45,.08)); font-size: 14.5px; }
.acc-row:last-child { border-bottom: none; }
.acc-row dt { color: var(--muted, rgba(6,23,45,.72)); }
.acc-row dd { margin: 0; color: var(--ink, #06172D); font-weight: 600; text-align: right; word-break: break-word; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

html.dark-mode .acc-head h1, html.dark-mode .acc-card h2, html.dark-mode .acc-row dd { color: #e8eef5; }
html.dark-mode .acc-head p, html.dark-mode .acc-card > p, html.dark-mode .acc-row dt, html.dark-mode .acc-consent, html.dark-mode .acc-note, html.dark-mode .acc-label, html.dark-mode .acc-divider { color: rgba(232,238,245,.72); }
html.dark-mode .acc-card { background: #16202b; border-color: rgba(232,238,245,.14); }
html.dark-mode .acc-form input[type="email"], html.dark-mode .acc-form input[type="password"], html.dark-mode .acc-form input[type="text"] { background: #0f1821; border-color: rgba(232,238,245,.18); color: #e8eef5; }
html.dark-mode .acc-google-btn { background: #0f1821; border-color: rgba(232,238,245,.18); color: #e8eef5; }
html.dark-mode .acc-row, html.dark-mode .acc-divider::before, html.dark-mode .acc-divider::after { border-color: rgba(232,238,245,.12); background-color: transparent; }
html.dark-mode .acc-divider::before, html.dark-mode .acc-divider::after { background: rgba(232,238,245,.14); }
html.dark-mode .acc-btn-quiet { color: #7fc9a4; border-color: rgba(232,238,245,.18); }
html.dark-mode .acc-linkbtn { color: #7fc9a4; }
html.dark-mode .acc-btn-danger { color: #e79a9a; border-color: rgba(231,154,154,.3); }
html.dark-mode .acc-status { background: rgba(127,201,164,.12); color: #b8e6cd; }
html.dark-mode .acc-status.is-error { background: rgba(231,154,154,.12); color: #e79a9a; }

/* Le fond et la couleur du corps en sombre viennent de dark-mode.css (§3a) :
   ne pas les redéclarer ici, cela créerait deux sources pour la même règle. */
html.dark-mode { --ink: #e8eef5; --muted: rgba(232,238,245,.72); --muted2: rgba(232,238,245,.58); }

/* ═══ /compte/ v2 — coquille sidebar dockée pleine hauteur (vit-S780) ═══════
   Mockup validé vit-S779. La page est une « coquille » (SHELL_PAGES dans
   inject_header.py) : pas de header/footer vitrine, la sidebar porte la marque,
   l'identité du compte, la navigation par panneaux et le retour au site.
   /connexion/ n'est pas concernée et garde les classes historiques ci-dessus. */
.acc-app { display: flex; min-height: 100vh; }
.acc-side { width: 264px; flex: none; background: var(--paper); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 14px 16px; position: sticky; top: 0; height: 100vh; box-sizing: border-box; }
.acc-side-brand { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 8px 14px; }
.acc-side-logo { text-decoration: none; font-size: 18px; font-weight: 800; }
.acc-side-logo .logo-my { color: var(--ink); }
.acc-side-logo .logo-boussole { color: #2d6a4f; }
.acc-side-back { font-size: 12px; color: var(--muted2); text-decoration: none; }
.acc-side-back:hover { color: #2d6a4f; }
.acc-side-who { display: flex; align-items: center; gap: 11px; padding: 10px 8px 14px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.acc-avatar { width: 40px; height: 40px; border-radius: 50%; background: #2d6a4f; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.acc-side-idwrap { min-width: 0; }
.acc-side-mail { font-size: 12.5px; color: var(--muted); word-break: break-all; line-height: 1.3; }
.acc-side-badge { display: inline-block; margin-top: 3px; font-size: 10.5px; color: #2d6a4f; background: rgba(45,106,79,.08); border-radius: 20px; padding: 2px 8px; font-weight: 600; }
.acc-side-nav { display: flex; flex-direction: column; gap: 2px; }
.acc-side-nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink); cursor: pointer; font-family: inherit; }
.acc-side-nav button:hover { background: rgba(6,23,45,.06); }
.acc-side-nav button.is-active { background: #fff; color: #2d6a4f; font-weight: 600; box-shadow: 0 1px 2px rgba(6,23,45,.08); }
.acc-nav-ico { width: 20px; text-align: center; flex: none; }
.acc-nav-count { margin-left: auto; font-size: 12px; background: rgba(6,23,45,.08); border-radius: 20px; padding: 1px 8px; color: var(--muted); }
.acc-side-nav button.is-active .acc-nav-count { background: #2d6a4f; color: #fff; }
.acc-side-spacer { flex: 1; }
.acc-side-app { display: block; text-align: center; background: #2d6a4f; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.acc-side-foot { margin: 12px 4px 0; font-size: 11.5px; color: var(--muted2); line-height: 1.45; }
.acc-side-foot a { color: var(--muted); }

.acc-content { flex: 1; min-width: 0; padding: 30px clamp(16px, 4vw, 40px) 70px; box-sizing: border-box; }
.acc-panel { max-width: 1160px; }
.acc-panel h1 { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; margin: 0 0 4px; color: var(--ink); }
.acc-sub { color: var(--muted); font-size: 14px; margin: 2px 0 22px; }
.acc-panel .acc-card { max-width: 620px; }

.acc-fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(430px, 100%), 1fr)); gap: 16px; align-items: start; }
.acc-fav { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px 16px; }
.acc-fav-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 20px; padding: 3px 10px; margin-bottom: 8px; background: rgba(45,106,79,.1); color: #2d6a4f; }
.acc-fav h3 { font-family: var(--serif); font-size: 17.5px; margin: 0 0 6px; line-height: 1.35; color: var(--ink); }
.acc-fav-meta { font-size: 12.5px; color: var(--muted2); }
.acc-fav-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.acc-fav-read { background: #2d6a4f; color: #fff; border: 1px solid #2d6a4f; font-size: 13px; border-radius: 9px; padding: 8px 13px; text-decoration: none; font-family: inherit; }
.acc-fav-unfav { background: none; color: var(--muted); border: 1px solid var(--border); font-size: 13px; border-radius: 9px; padding: 8px 13px; cursor: pointer; font-family: inherit; }
.acc-fav-unfav:hover { color: #8a2b2b; border-color: rgba(138,43,43,.45); }
.acc-fav-empty { border: 1.5px dashed var(--border); border-radius: 14px; padding: 18px 22px; color: var(--muted); font-size: 14px; display: flex; gap: 14px; align-items: flex-start; max-width: 620px; }
.acc-fav-empty-star { font-size: 20px; color: #B45309; flex: none; }
.acc-fav-empty p { margin: 0; line-height: 1.6; }
.acc-fav-empty a { color: #2d6a4f; }
/* v2 vit-S781 — sous-onglets À lire / Tous + état de lecture (marquage manuel) */
.acc-fav-tabs { display: flex; gap: 8px; margin: -8px 0 18px; }
.acc-fav-tabs button { border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 20px; padding: 7px 15px; font-size: 13px; font-family: inherit; cursor: pointer; }
.acc-fav-tabs button.is-active { background: #2d6a4f; border-color: #2d6a4f; color: #fff; font-weight: 600; }
.acc-fav.is-read { opacity: .68; }
.acc-fav-readmark { color: #2d6a4f; font-weight: 600; }
.acc-fav-toggleread { background: none; color: #2d6a4f; border: 1px solid rgba(45,106,79,.45); font-size: 13px; border-radius: 9px; padding: 8px 13px; cursor: pointer; font-family: inherit; }
.acc-fav-toggleread:hover { background: rgba(45,106,79,.08); }
.acc-fav-none { border: 1.5px dashed var(--border); border-radius: 14px; padding: 14px 18px; color: var(--muted); font-size: 13.5px; max-width: 620px; }

@media (max-width: 860px) {
  .acc-app { flex-direction: column; }
  .acc-side { width: 100%; height: auto; position: static; padding: 14px 16px 10px; }
  .acc-side-who { border-bottom: none; padding: 4px 0 10px; }
  .acc-side-nav { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 4px; }
  .acc-side-nav button { flex: none; width: auto; border: 1px solid var(--border); padding: 8px 13px; border-radius: 20px; background: #fff; }
  .acc-side-nav button.is-active { border-color: #2d6a4f; box-shadow: none; }
  .acc-side-spacer, .acc-side-foot, .acc-side-app { display: none; }
  .acc-content { padding: 20px 16px 60px; }
}

/* ── Mode sombre de la coquille — même doctrine que le bloc dark historique
   ci-dessus : déclaré ici même, ces classes ne vivent que sur /compte/. ── */
html.dark-mode .acc-side { background: #131c26; border-right-color: rgba(232,238,245,.12); }
html.dark-mode .acc-side-logo .logo-my { color: #e8eef5; }
html.dark-mode .acc-side-logo .logo-boussole { color: #7fc9a4; }
html.dark-mode .acc-side-back { color: rgba(232,238,245,.6); }
html.dark-mode .acc-side-back:hover { color: #7fc9a4; }
html.dark-mode .acc-side-who { border-bottom-color: rgba(232,238,245,.12); }
html.dark-mode .acc-side-nav button { color: rgba(232,238,245,.82); background: none; }
html.dark-mode .acc-side-nav button:hover { background: rgba(232,238,245,.07); }
html.dark-mode .acc-side-nav button.is-active { background: #16202b; color: #7fc9a4; box-shadow: none; border-color: rgba(127,201,164,.4); }
html.dark-mode .acc-nav-count { background: rgba(232,238,245,.1); color: rgba(232,238,245,.7); }
html.dark-mode .acc-side-nav button.is-active .acc-nav-count { background: #2d6a4f; color: #fff; }
html.dark-mode .acc-side-badge { color: #7fc9a4; background: rgba(127,201,164,.12); }
html.dark-mode .acc-side-mail, html.dark-mode .acc-side-foot { color: rgba(232,238,245,.6); }
html.dark-mode .acc-side-foot a { color: rgba(232,238,245,.72); }
html.dark-mode .acc-panel h1, html.dark-mode .acc-fav h3 { color: #e8eef5; }
html.dark-mode .acc-sub, html.dark-mode .acc-fav-meta, html.dark-mode .acc-fav-empty { color: rgba(232,238,245,.66); }
html.dark-mode .acc-fav { background: #16202b; border-color: rgba(232,238,245,.14); }
html.dark-mode .acc-fav-chip { background: rgba(127,201,164,.12); color: #7fc9a4; }
html.dark-mode .acc-fav-unfav { color: rgba(232,238,245,.7); border-color: rgba(232,238,245,.18); }
html.dark-mode .acc-fav-empty { border-color: rgba(232,238,245,.2); }
html.dark-mode .acc-fav-empty a { color: #7fc9a4; }
html.dark-mode .acc-fav-empty-star { color: #e8b072; }
html.dark-mode .acc-fav-tabs button { background: #16202b; color: rgba(232,238,245,.7); border-color: rgba(232,238,245,.18); }
html.dark-mode .acc-fav-tabs button.is-active { background: #7fc9a4; border-color: #7fc9a4; color: #0d1b2e; }
html.dark-mode .acc-fav-readmark { color: #7fc9a4; }
html.dark-mode .acc-fav-toggleread { color: #7fc9a4; border-color: rgba(127,201,164,.4); }
html.dark-mode .acc-fav-toggleread:hover { background: rgba(127,201,164,.1); }
html.dark-mode .acc-fav-none { border-color: rgba(232,238,245,.2); color: rgba(232,238,245,.66); }
