/* WEMOOVE EVENT — tableau de bord de saison.
   DA WEMOOVE AGENCY : noir, blanc, Inter Tight, angles droits, aucune ombre.
   Les deux accents portent une information : corail pour les événements signature,
   rose pour les formats du club. Ils ne décorent rien. */

:root {
  --noir: #000000;
  --panneau: #0b0b0b;
  --survol: #141414;
  --blanc: #ffffff;
  --doux: rgba(255, 255, 255, 0.72);
  --faible: rgba(255, 255, 255, 0.42);
  --trait: rgba(255, 255, 255, 0.13);
  --trait-fort: rgba(255, 255, 255, 0.3);
  --signature: #ff9273;
  --club: #f5afc5;
  --flanc: 268px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* `hidden` ne pose qu'un display de feuille par défaut : toute règle auteur le bat. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--noir);
  color: var(--blanc);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

h1, h2 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.surtitre {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--faible);
}

button, input, textarea, select { font: inherit; color: inherit; border-radius: 0; }

:focus-visible { outline: 2px solid var(--blanc); outline-offset: 2px; }

input, textarea, select {
  background: transparent;
  border: 1px solid var(--trait);
  padding: 9px 11px;
  width: 100%;
  transition: border-color 140ms ease-out;
}

input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blanc); }
select option { background: #0b0b0b; }
textarea { resize: vertical; min-height: 88px; line-height: 1.55; }

button {
  background: var(--blanc);
  color: var(--noir);
  border: 1px solid var(--blanc);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 140ms ease-out;
}
button:hover { opacity: 0.8; }

button.discret {
  background: transparent;
  color: var(--faible);
  border: 0;
  padding: 4px 0;
  letter-spacing: 0.12em;
}
button.discret:hover { color: var(--blanc); opacity: 1; }

kbd {
  font-family: inherit;
  font-size: 10px;
  border: 1px solid var(--trait);
  padding: 1px 5px;
  color: var(--doux);
  margin: 0 1px;
}

/* ---------------------------------------------------------------- connexion */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__boite {
  width: min(392px, 100%);
  border: 1px solid var(--trait);
  padding: clamp(28px, 6vw, 46px);
  display: grid;
  gap: 17px;
}
.login__boite h1 { font-size: clamp(32px, 8vw, 44px); margin-bottom: 8px; }
.login__boite label { display: grid; gap: 6px; }
.login__boite label span {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--faible);
}
.login__erreur { color: var(--signature); font-size: 13px; min-height: 18px; }

/* ---------------------------------------------------------------- charpente */

.app { display: grid; grid-template-columns: var(--flanc) 1fr; min-height: 100vh; }

.flanc {
  border-right: 1px solid var(--trait);
  background: var(--panneau);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.flanc__tete { padding: 18px 18px 14px; border-bottom: 1px solid var(--trait); }
.flanc__saison {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-top: 3px;
}

.colonne { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }

.colonne__titre {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faible);
  padding: 6px 8px;
}
.colonne__titre--espace { margin-top: 18px; }

.colonne__periode {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--faible);
  padding: 12px 8px 4px;
}

.lien {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: transparent;
  color: var(--doux);
  border: 0;
  padding: 8px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
  font-weight: 500;
  transition: background 130ms ease-out, color 130ms ease-out;
}
.lien:hover { background: var(--survol); color: var(--blanc); opacity: 1; }
.lien--actif { background: var(--survol); color: var(--blanc); font-weight: 600; }
/* Le libellé porte une classe explicite : un sélecteur `:first-child` attraperait
   aussi la pastille de couleur des événements et l'étirerait sur toute la ligne. */
.lien__nom {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.puce { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; }
.puce--signature { background: var(--signature); }
.puce--club { background: var(--club); }

.pastille { font-size: 11px; color: var(--faible); flex: 0 0 auto; }
.pastille--alerte { color: var(--signature); font-weight: 700; }

.flanc__pied {
  border-top: 1px solid var(--trait);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--faible);
}

/* ---------------------------------------------------------------- principal */

.principal { min-width: 0; display: flex; flex-direction: column; }

.barre {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid var(--trait);
  position: sticky;
  top: 0;
  background: var(--noir);
  z-index: 5;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--faible);
}
.barre__compte { color: var(--doux); }
.barre__aide { display: flex; align-items: center; gap: 5px; }

.contenu { padding: clamp(22px, 3vw, 42px) clamp(18px, 3vw, 40px) 80px; max-width: 1180px; }

.tete { margin-bottom: 26px; }
.tete h1 { font-size: clamp(28px, 4.2vw, 44px); margin: 7px 0 8px; }
.tete__sous { color: var(--faible); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tete__domaine { font-size: 12px; }

/* ---------------------------------------------------------------- frise */

.frise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 1px;
  background: var(--trait);
  border: 1px solid var(--trait);
  margin-bottom: 34px;
}
.frise__periode { background: var(--noir); padding: 13px 14px 15px; }
.frise__nom {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faible);
  margin-bottom: 11px;
}
.frise__event {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0 0 9px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  font-size: 12px;
  color: var(--doux);
}
.frise__event:hover { color: var(--blanc); opacity: 1; }
.frise__barre { display: block; height: 3px; background: var(--trait); margin-bottom: 5px; }
.frise__barre span { display: block; height: 100%; transition: width 280ms ease-out; }
.frise__barre--signature span { background: var(--signature); }
.frise__barre--club span { background: var(--club); }
.frise__label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- groupes */

.groupe { margin-bottom: 34px; }

.groupe__titre {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--faible);
  padding-bottom: 9px;
  border-bottom: 1px solid var(--trait);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.groupe__titre span { font-size: 11px; letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- une ligne */

.ligne {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 6px 9px 0;
  border-bottom: 1px solid var(--trait);
  transition: background 120ms ease-out;
}
.ligne:hover { background: var(--panneau); }

.coche {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: transparent;
  border: 1px solid var(--trait-fort);
  padding: 0;
  position: relative;
}
.coche:hover { border-color: var(--blanc); opacity: 1; }
.coche[aria-checked='true'] { background: var(--blanc); border-color: var(--blanc); }
.coche[aria-checked='true']::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--noir);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ligne__titre { cursor: text; line-height: 1.4; }
.ligne__titre:hover { text-decoration: underline; text-decoration-color: var(--trait-fort); }
.ligne--faite .ligne__titre { color: var(--faible); text-decoration: line-through; }

input.edition {
  border: 1px solid var(--blanc);
  padding: 4px 7px;
  font-size: 14px;
}

.ligne__droite {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.jeton {
  background: transparent;
  border: 1px solid var(--trait);
  color: var(--doux);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jeton:hover { border-color: var(--blanc); color: var(--blanc); opacity: 1; }
.jeton--signature { color: var(--signature); border-color: rgba(255, 146, 115, 0.4); }
.jeton--club { color: var(--club); border-color: rgba(245, 175, 197, 0.4); }

.ligne__date { display: flex; align-items: center; gap: 7px; }
.ligne__date input {
  width: auto;
  padding: 3px 6px;
  font-size: 11px;
  color: var(--doux);
  border-color: var(--trait);
  color-scheme: dark;
}
.ligne__date em { font-style: normal; font-size: 10px; color: var(--faible); white-space: nowrap; }
.ligne--retard .ligne__date em { color: var(--signature); font-weight: 600; }

.retirer {
  background: transparent;
  border: 0;
  color: transparent;
  padding: 2px 5px;
  font-size: 12px;
}
.ligne:hover .retirer { color: var(--faible); }
.retirer:hover { color: var(--blanc); opacity: 1; }

/* ---------------------------------------------------------------- ajout */

.ajout { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.ajout input { flex: 1; border-color: var(--trait); }
.ajout button { flex: 0 0 auto; }

.champs {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  padding-top: 16px;
}
.champ { display: grid; gap: 5px; }
.champ span {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--faible);
}

.groupe > textarea { margin-top: 14px; }

/* ---------------------------------------------------------------- onglets */

.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--trait); margin-bottom: 26px; }

.onglets button {
  background: transparent;
  color: var(--faible);
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 9px 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.onglets button:hover { color: var(--blanc); opacity: 1; }
.onglets .onglet--actif { color: var(--blanc); border-bottom-color: var(--blanc); }
.onglets button span {
  font-size: 10px;
  border: 1px solid var(--trait);
  padding: 1px 5px;
  letter-spacing: 0;
}

.tete__concept {
  margin-top: 12px;
  color: var(--doux);
  font-size: 15px;
  max-width: 76ch;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- prose */

.section .groupe__titre { align-items: center; }

.reecrire {
  background: transparent;
  border: 1px solid var(--trait);
  color: var(--faible);
  padding: 3px 9px;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 140ms ease-out, color 140ms ease-out;
}
.section:hover .reecrire, .reecrire:focus-visible { opacity: 1; }
.reecrire:hover { color: var(--blanc); border-color: var(--blanc); opacity: 1; }

.prose { padding-top: 14px; max-width: 78ch; }
.prose p { margin-bottom: 12px; color: var(--doux); line-height: 1.62; }
.prose strong { color: var(--blanc); font-weight: 600; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.87em;
  border: 1px solid var(--trait);
  padding: 1px 5px;
  color: var(--blanc);
}
.prose ul { list-style: none; margin: 0 0 14px; }
.prose li {
  color: var(--doux);
  padding: 3px 0 3px 17px;
  position: relative;
  line-height: 1.55;
}
.prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 1px;
  background: var(--trait-fort);
}

.edition-section {
  width: 100%;
  margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  border-color: var(--blanc);
}

/* ---------------------------------------------------------------- tableaux */

.tableau { overflow-x: auto; margin: 4px 0 16px; }
.tableau table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tableau th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faible);
  font-weight: 700;
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--trait);
  white-space: nowrap;
}
.tableau td {
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--trait);
  color: var(--doux);
  vertical-align: top;
}

.tableau--base { margin-top: 8px; }
.tableau--base tbody tr { cursor: pointer; transition: background 120ms ease-out; }
.tableau--base tbody tr:hover { background: var(--panneau); }
.tableau--base td { padding: 11px 16px 11px 0; }

.cellule-nom {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--blanc);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cellule-fine { font-size: 12px; white-space: nowrap; }
.cellule-concept { min-width: 300px; font-size: 12px; line-height: 1.5; color: var(--faible); }

/* ---------------------------------------------------------------- échanges */

.echange { border-left: 2px solid var(--trait); padding: 3px 0 3px 13px; margin: 14px 0; }
.echange__tete {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--faible);
}
.echange__corps { margin-top: 4px; white-space: pre-wrap; color: var(--doux); }
.commentaire { display: grid; gap: 10px; justify-items: start; margin-top: 16px; }
.commentaire textarea { width: 100%; }

/* ---------------------------------------------------------------- activité */

.activite ul { list-style: none; padding-top: 10px; }
.activite li {
  font-size: 12px;
  color: var(--faible);
  padding: 5px 0;
  border-bottom: 1px solid var(--trait);
}
.activite li b { color: var(--doux); font-weight: 600; }
.activite li span { float: right; font-size: 11px; }

.vide { color: var(--faible); padding: 26px 0; }
.vide--petit { padding: 12px 0; font-size: 13px; }

/* ---------------------------------------------------------------- palette */

.palette { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; }
.palette__fond { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.palette__boite {
  position: relative;
  margin-top: 14vh;
  width: min(520px, 92vw);
  background: var(--panneau);
  border: 1px solid var(--trait-fort);
}
.palette__boite input { border: 0; border-bottom: 1px solid var(--trait); padding: 15px 17px; }
.palette__boite ul { list-style: none; max-height: 320px; overflow-y: auto; }
.palette__boite li button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  color: var(--doux);
  border: 0;
  padding: 10px 17px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
  font-weight: 500;
}
.palette__boite li button:hover, .palette__boite li button[data-premier] {
  background: var(--survol); color: var(--blanc); opacity: 1;
}
.palette__boite li button em {
  font-style: normal; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--faible);
}
.palette__vide { padding: 14px 17px; color: var(--faible); font-size: 13px; }

/* ---------------------------------------------------------------- signal */

.signal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--blanc);
  color: var(--noir);
  padding: 8px 15px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  z-index: 50;
}
.signal--visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------- adaptatif */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .flanc { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--trait); }
  .colonne { max-height: 46vh; }
  .barre__aide { display: none; }
  .ligne { grid-template-columns: auto 1fr; }
  .ligne__droite { grid-column: 1 / -1; justify-content: flex-start; padding-left: 28px; }
  .retirer { color: var(--faible); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
