/* Dashboard L'Eclipse : noir et blanc, sobre, même police que la carte de profil. */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; src: url("/polices/BarlowCondensed-SemiBold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; src: url("/polices/BarlowCondensed-Bold.ttf") format("truetype"); font-display: swap; }

:root {
  --fond: #0b0b0c;
  --surface: #141416;
  --bord: #26262a;
  --texte: #ededed;
  --faible: #8a8a90;
  --accent: #ffffff;
  --alerte: #c9b27a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--texte); text-decoration-color: var(--bord); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--texte); }
h1, h2, .marque, .valeur { font-family: "Barlow Condensed", system-ui, sans-serif; letter-spacing: .02em; }
h1 { font-size: 30px; font-weight: 700; margin: 0; text-transform: uppercase; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; text-transform: uppercase; color: var(--faible); }
main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }

/* barre du haut */
.barre {
  display: flex; align-items: center; gap: 24px; padding: 10px 16px;
  border-bottom: 1px solid var(--bord); background: var(--fond); position: sticky; top: 0; z-index: 2;
}
.marque { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; text-decoration: none; }
.barre nav { display: flex; gap: 4px; flex: 1; }
.barre nav a, .periodes a {
  padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--faible);
}
.barre nav a[aria-current], .periodes a[aria-current] { color: var(--fond); background: var(--accent); }
.barre nav a:not([aria-current]):hover, .periodes a:not([aria-current]):hover { color: var(--texte); }
.sortie { display: flex; align-items: center; gap: 10px; margin: 0; }
.moi { color: var(--faible); font-size: 14px; }

button, .bouton {
  font: inherit; cursor: pointer; border: 1px solid var(--bord); background: transparent; color: var(--texte);
  padding: 6px 12px; border-radius: 6px; text-decoration: none; display: inline-block;
}
button:hover, .bouton:hover { border-color: var(--texte); }
.bouton { background: var(--accent); color: var(--fond); border-color: var(--accent); font-weight: 600; padding: 10px 18px; }
.bouton:hover { background: #d6d6d6; }

/* page de connexion */
.porte { max-width: 380px; margin: 12vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.porte h1 { font-size: 40px; letter-spacing: .12em; }
.sous { color: var(--faible); margin: 0 0 12px; }
.petit { color: var(--faible); font-size: 13px; }
.avis { border: 1px solid var(--bord); padding: 8px 12px; border-radius: 6px; }

/* en-tête de page */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.periodes { display: flex; gap: 4px; border: 1px solid var(--bord); border-radius: 8px; padding: 3px; }

/* indicateurs */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte.alerte { border-color: var(--alerte); }
.carte.alerte .valeur { color: var(--alerte); }
.libelle { color: var(--faible); font-size: 13px; }
.valeur { font-size: 30px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.detail { color: var(--faible); font-size: 13px; }

/* blocs */
.bloc { background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 16px; margin-bottom: 12px; min-width: 0; }
.graphes, .colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; margin-bottom: 12px; }
.graphes .bloc, .colonnes .bloc { margin-bottom: 0; }
.colonnes .large { grid-column: 1 / -1; }
.vide { color: var(--faible); margin: 0; }
.faible { color: var(--faible); }

table { width: 100%; border-collapse: collapse; }
td { padding: 7px 8px 7px 0; border-top: 1px solid var(--bord); vertical-align: top; overflow-wrap: break-word; }
tr:first-child td { border-top: 0; }
td.nb { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 8px; }
td.coupe { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* graphiques SVG */
.graphe { width: 100%; height: auto; display: block; }
.graphe .grille { stroke: var(--bord); stroke-width: 1; }
.graphe .axe { fill: var(--faible); font-size: 11px; font-family: system-ui, sans-serif; }
.graphe .trait { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.graphe .aire { fill: var(--accent); fill-opacity: .07; }
.graphe .point { fill: var(--accent); }
.graphe .plein, .grille-pointage .plein { fill: var(--accent); }
.graphe .creux { fill: var(--faible); fill-opacity: .55; }
.legende-plein, .legende-creux { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: 0; }
.legende-plein { background: var(--accent); }
.legende-creux { background: var(--faible); opacity: .55; }
.grille-pointage { width: 100%; max-width: 420px; height: auto; display: block; margin-bottom: 8px; }
.grille-pointage .case { fill: var(--bord); }

/* membres */
.recherche { display: flex; gap: 8px; margin-bottom: 16px; }
.recherche input {
  flex: 1; min-width: 0; font: inherit; color: var(--texte); background: var(--surface);
  border: 1px solid var(--bord); border-radius: 6px; padding: 8px 12px;
}
.recherche input:focus { outline: none; border-color: var(--texte); }
.profil { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--texte); background: var(--surface); flex: none; }
.profil p { margin: 4px 0 0; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.roles span { border: 1px solid var(--bord); border-radius: 99px; padding: 1px 10px; font-size: 13px; color: var(--faible); }

@media (max-width: 720px) {
  .barre { flex-wrap: wrap; gap: 8px 16px; }
  .barre nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .moi { display: none; }
  .sortie { margin-left: auto; }
  .graphes, .colonnes { grid-template-columns: minmax(0, 1fr); }
  .cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valeur { font-size: 24px; }
  td.coupe { max-width: 140px; }
  .masque-mobile { display: none; }
}
