/* Pages simples : connexion, compte, administration, confidentialité */
.page-body { display: flex; flex-direction: column; min-height: 100%; background: var(--bg); }
.page { flex: 1; padding: 32px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.card { background: var(--fg); border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.06); width: 100%; max-width: 960px; }
.card.narrow { max-width: 440px; }
.card > h1, .card > h2 { font-size: 17px; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--border); }
/* Colonne bornée à la carte : sinon une grille intérieure (auto-fit) prend toute sa largeur naturelle et élargit la page */
.card-body { padding: 16px 20px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.form { display: grid; gap: 14px; padding: 20px; }
.hint, .muted { font-size: 12px; color: var(--text-3); margin: 0; line-height: 1.45; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#message:not([open]) { display: none; }
#message { margin: 0 20px 20px; }
.prose { padding: 8px 24px 24px; line-height: 1.6; color: var(--text-2); max-width: 760px; }
.prose h2 { font-size: 16px; color: var(--text); margin: 22px 0 6px; }
.prose ul { padding-left: 20px; }
.todo { background: #FFF4CE; padding: 0 4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; color: var(--text-2); padding: 8px; border-bottom: 2px solid var(--border); white-space: nowrap; }
table.data td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr.inactive td { color: var(--text-3); }
/* Téléphone : tableaux « fiches » (administration, Mon compte, statistiques) : chaque ligne devient une fiche, titre de
   colonne devant chaque valeur (posé par header.js). Les autres tableaux (fiche commune, Comparer) gardent leur forme. */
@media (max-width: 640px) {
  table.data.fiches thead { display: none; }
  table.data.fiches, table.data.fiches tbody, table.data.fiches tr { display: block; width: 100%; }
  table.data.fiches tr { border: 1px solid var(--border); padding: 6px 12px; margin-bottom: 8px; }
  table.data.fiches td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0;
    text-align: right; overflow-wrap: anywhere; }
  table.data.fiches td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; font-weight: 600; color: var(--text-2); }
  table.data.fiches td:first-child { display: block; text-align: left; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
  table.data.fiches td:first-child::before, table.data.fiches td[colspan]::before, table.data.fiches td[data-label=""]::before { content: none; }
  table.data.fiches td[colspan] { display: block; text-align: left; }
  table.data.fiches td:empty { display: none; }
}
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.temp-password { font-family: ui-monospace, monospace; font-size: 20px; letter-spacing: .05em; padding: 12px; background: var(--bg); border: 1px dashed var(--border); text-align: center; user-select: all; }
.danger-zone { border-top: 1px solid var(--border); padding-top: 14px; }

/* Page de connexion : titre, formulaire, points clés — une colonne centrée */
.login-page { padding-top: 48px; gap: 24px; }
.welcome { text-align: center; max-width: 560px; }
.welcome-kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.welcome-title { margin: 6px 0 10px; font-size: 34px; line-height: 1.15; color: var(--text); font-weight: 700; }
.welcome-lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.welcome-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; width: 100%; }
.welcome-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.welcome-points calcite-icon { flex: 0 0 auto; color: var(--blue); margin-top: 1px; }
.welcome-points strong { color: var(--text); }
.welcome-note { margin: 0; font-size: 13px; color: var(--text-3); text-align: center; }
.welcome-note a { color: var(--blue); }
@media (max-width: 760px) {
  .login-page { padding-top: 24px; }
  .welcome-title { font-size: 26px; }
  .welcome-lead { font-size: 15px; }
  .welcome-points { grid-template-columns: 1fr; gap: 10px; }
}

.account-summary .card-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card.highlight { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Tableau de bord des statistiques (administrateurs) */
.viz-root { --series-1: #2a78d6; --viz-grid: #e6e6e3; --viz-text-2: #52514e; --viz-text-3: #7a7974; }
.stats-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 16px 20px 0; }
.stats-head h2 { margin: 0 0 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--border, #e3e3e3); border-radius: 4px; padding: 10px 12px; }
.tile-label { font-size: 12px; color: var(--viz-text-2); }
.tile-value { font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 11px; color: var(--viz-text-3); }
.multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.multiples figure { margin: 0; }
.multiples figcaption { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.stats-grid .card { margin: 0; }
svg.viz { display: block; font-family: inherit; }
.chart-slot { width: 100%; min-width: 0; }
svg.viz .grid { stroke: var(--viz-grid); stroke-width: 1; }
svg.viz .tick { fill: var(--viz-text-3); font-size: 11px; }
svg.viz .bar { fill: var(--series-1); }
svg.viz .hit { fill: transparent; cursor: default; }
svg.viz .hit:hover { fill: rgba(0, 0, 0, 0.04); }
.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.barlist li { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; align-items: center; gap: 10px; }
.barlist-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist-track { height: 12px; }
.barlist-fill { display: block; height: 100%; min-width: 2px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.barlist-value { font-variant-numeric: tabular-nums; color: var(--viz-text-2); min-width: 3ch; text-align: right; }
.data-table { margin-top: 12px; font-size: 13px; }
.data-table summary { cursor: pointer; color: var(--viz-text-2); }
.small { font-size: 12px; }
.note-privacy { font-size: 12px; margin: 8px 4px 24px; }
.viz-tooltip { position: fixed; z-index: 10; pointer-events: none; background: #fff; color: #0b0b0b; font-size: 12px;
  padding: 6px 8px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); line-height: 1.4; }
.page-wide .card, .page-wide .stats-grid { max-width: 1180px; width: 100%; }
.stats-grid.inner { margin-top: 16px; gap: 24px; }
h3.sub { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
#robot-tiles { margin-bottom: 12px; }
.stats-grid.inner .barlist li { grid-template-columns: minmax(110px, 46%) 1fr auto; }

/* Pied des pages de contenu (static/header.js) */
.pied-page { padding: 16px 16px 24px; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.8; }
.pied-page a { color: var(--text-2); }

/* Page « Ce n'était pas moi » (lien des alertes de sécurité) : formulaire simple, sans script */
.danger-button { width: 100%; padding: 10px 16px; border: 1px solid #D83020; background: #D83020; color: #fff; font: inherit;
  font-weight: 600; cursor: pointer; }
.danger-button:hover, .danger-button:focus-visible { background: #A82010; outline: 2px solid #A82010; outline-offset: 2px; }
