/* Jetons, remise a zero, ossature, entete et onglets. */

:root {
  /* Le brand kit valide par Fabrice le 25 septembre 2026.
     Sa consigne est suivie a la lettre: on renomme, on ne garde pas les
     anciens noms. Pas d'alias vers les anciens jetons, pas de mention des
     anciennes couleurs: le jour ou on en laisse un, il repousse. La table
     de correspondance vit dans son plan de match, pas ici. */
  --bg: #0A0714;      /* fond de page */
  --surf: #141026;    /* surfaces */
  --surf2: #1C1636;   /* surfaces 2 */
  --line: #2A2250;    /* traits */
  --line2: #43377A;   /* traits forts, bords de champ, survol */
  --txt: #FFFFFF;     /* titres */
  --txt2: #D8D1F0;    /* texte courant */
  --txt3: #9A91BF;    /* libelles */

  --gold: #FFC857;    /* action, selection, focus */
  --gold1: #FFE3A3;   /* montants */
  --ok: #3DDC97;      /* succes */
  --warn: #FFB547;    /* attention */
  --bad: #FF5C7A;     /* critique */
  --lav: #C6B8E8;     /* interne, en attente */

  /* 🔒 Les quatre ors de la carte de joueur ne bougent pas. Le plan le dit
     noir sur blanc: « .fut garde ses quatre ors ». */
  --or1: #F2E0AC;
  --or2: #D8BC77;
  --or3: #A98B45;
  --or4: #6B5526;

  --cond: 'Barlow Condensed', Impact, sans-serif;
  --semi: 'Barlow Semi Condensed', 'Barlow Condensed', sans-serif;
  --ui: 'Barlow', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--txt);
  /* Deux halos: violet a gauche, un souffle de bleu a droite. C'est ce qui
     empeche le fond d'etre un aplat noir. */
  background: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 15% -12%, rgba(91,36,196,.28), transparent 62%),
    radial-gradient(800px 420px at 95% -8%, rgba(31,169,216,.12), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 1320px; margin: 0 auto; padding: 0 24px 100px; }

button { font-family: var(--ui); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- entete ----------
   Le logo, les onglets et l'identite tiennent sur une seule barre. Le bandeau
   de la carte commence donc plus haut, et la premiere rangee de mandats entre
   dans l'ecran sans faire defiler. */

.top {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 14px 0 0; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, #1A1236 0%, #150F2C 72%, rgba(20,14,42,.92) 100%);
  backdrop-filter: blur(6px);
  margin: 0 -24px; padding-left: 24px; padding-right: 24px;
}

.logo {
  display: flex; align-items: center; gap: 9px; padding-bottom: 14px;
  font-family: var(--cond); font-weight: 800; font-size: 25px; letter-spacing: .03em;
}
.logo b { background: var(--gold); color: #1E1400; padding: 1px 9px; border-radius: 5px; }
.logo span { color: var(--txt2); font-weight: 600; letter-spacing: .15em; font-size: 18px; }

.who { margin-left: auto; padding-bottom: 11px; display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--txt2); }
.who .pic {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surf2); position: relative;
  display: flex; align-items: center; justify-content: center; border: 1px dashed var(--txt3);
  overflow: hidden;
}
.who .pic img { width: 100%; height: 100%; object-fit: cover; }
.who .pic svg { width: 18px; height: 18px; }

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

.tabs { display: flex; gap: 22px; flex-wrap: wrap; align-self: stretch; align-items: flex-end; }
.tabs button {
  font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--txt3); background: none; border: 0; cursor: pointer;
  padding: 0 0 11px; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: .15s;
}
/* Sur telephone, les onglets prennent leur propre rangee et defilent
   lateralement plutot que de passer sur deux lignes. Le nom disparait: il est
   deja ecrit en gros sur la carte, juste en dessous. Chaque rangee economisee
   est une rangee de mandats que le vendeur voit sans defiler. */
@media (max-width: 860px) {
  .top { gap: 10px 16px; padding-top: 10px; }
  .logo { font-size: 21px; padding-bottom: 10px; }
  .who { order: 2; padding-bottom: 10px; }
  .who span { display: none; }
  .who .pic { width: 30px; height: 30px; }
  .tabs {
    order: 3; width: 100%; gap: 18px; flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 0 24px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { font-size: 16px; white-space: nowrap; padding-bottom: 9px; }
}
.tabs button:hover { color: var(--txt2); }
.tabs button[aria-selected="true"] { color: var(--txt); border-bottom-color: var(--gold); }
.tabs .compteur { color: var(--gold); }

/* ---------- titres de section ---------- */

.sec { display: flex; align-items: center; gap: 11px; margin: 30px 0 15px; flex-wrap: wrap; }
.sec h2 { font-family: var(--cond); font-weight: 800; font-size: 24px; letter-spacing: .05em; text-transform: uppercase; margin: 0; }
.sec .n {
  font-family: var(--cond); font-weight: 800; font-size: 17px; color: var(--bg);
  background: var(--gold); border-radius: 20px; padding: 1px 11px;
}
.sec .n.mut { background: var(--line); color: var(--txt2); }
.sec .hint { margin-left: auto; font-size: 12px; color: var(--txt3); }

/* ---------- boutons ---------- */

.b {
  flex: 1; border: 0; border-radius: 8px; padding: 10px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .15s;
}
/* Le bouton d'action. Degrade de --gold1 vers --gold, texte presque noir:
   c'est le seul element de la page qui a le droit d'etre plein d'or. */
.b.go { background: linear-gradient(180deg, var(--gold1), var(--gold)); color: #1E1400; }
.b.go:hover:not([disabled]) { filter: brightness(1.05); }
.b.gh { flex: none; background: transparent; border: 1px solid var(--line); color: var(--txt3); padding: 10px 11px; }
.b.gh:hover { color: var(--txt); }
.b.ok { background: rgba(61,220,151,.13); color: var(--ok); border: 1px solid rgba(61,220,151,.4); cursor: default; }
.b.un { flex: none; background: transparent; border: 1px solid var(--line); color: var(--txt3); padding: 10px; font-size: 11.5px; }
.b.un:hover { color: var(--bad); border-color: rgba(255,92,122,.45); }
.b[disabled] { opacity: .32; cursor: not-allowed; }

/* ---------- pieds de page ---------- */

.foot {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--txt3); font-size: 12.5px; line-height: 1.65; max-width: 76ch;
}
.foot b { color: var(--txt2); }

.vide {
  text-align: center; padding: 52px 24px; border: 1px dashed var(--line);
  border-radius: 12px; color: var(--txt3); font-size: 13.5px; line-height: 1.6;
}
.vide b {
  display: block; font-family: var(--cond); font-size: 20px; color: var(--txt2);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px;
}

/* ---------- avis ---------- */

.avis {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--surf2); border: 1px solid var(--line); color: var(--txt);
  padding: 12px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 18px 40px rgba(0,0,0,.55); opacity: 0; pointer-events: none;
  transition: .2s; z-index: 99; max-width: 90vw; text-align: center;
}
.avis.visible { opacity: 1; transform: translate(-50%, 0); }
.avis.ok { border-color: rgba(61,220,151,.5); }
.avis.erreur { border-color: rgba(255,92,122,.55); color: #FFC9D3; }

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

/* ===================================================================
   L'ECRAN D'ENTREE
   ===================================================================
   Une seule carte centree, rien d'autre a l'ecran. C'est le premier
   contact du candidat avec HTG: pas de barre d'onglets, pas de bandeau,
   rien a comprendre avant d'avoir un compte.

   Les cibles font 48 px de haut. La moitie des candidats arrivent d'une
   publicite sur leur telephone, souvent d'une main.
   =================================================================== */

.entree {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
}

.entree-carte {
  width: 100%;
  max-width: 420px;
  background: var(--surf, #10203a);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 32px 26px 26px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
}

.entree-oeil {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--or, #d9a441);
  margin: 0 0 10px;
}

.entree-carte h1 {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 8px;
}

.entree-sous {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--doux, #9fb0c7);
  margin: 0 0 22px;
}

/* Google en premier et en clair: c'est le chemin le plus court pour les
   55 % de candidats qui ont un Gmail. Les autres descendent d'un cran. */
.entree-google {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1f2937;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.entree-google:hover { background: #f1f3f5; }
.entree-google:disabled { opacity: .55; cursor: default; }

.entree-ou {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--doux, #9fb0c7);
  font-size: 12.5px;
}
.entree-ou::before,
.entree-ou::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .12);
}

.entree-form { display: grid; gap: 6px; }

.entree-form label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--doux, #9fb0c7);
  margin-top: 8px;
}

.entree-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  color: inherit;
  /* 16 px exactement: en dessous, Safari sur iPhone agrandit la page
     tout seul quand le champ prend le focus, et la mise en page saute. */
  font-size: 16px;
}
.entree-form input:focus {
  outline: 2px solid var(--or, #d9a441);
  outline-offset: 1px;
}

.entree-primaire {
  margin-top: 18px;
  width: 100%;
  min-height: 48px;
  background: var(--or, #d9a441);
  color: #17202e;
  border: 0;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
}
.entree-primaire:disabled { opacity: .6; cursor: default; }

.entree-avis {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
}
.entree-avis.erreur { background: rgba(220, 70, 70, .14); color: #ffc9c9; }
.entree-avis.ok     { background: rgba(80, 180, 120, .14); color: #b6e8cd; }

.entree-lien {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--or, #d9a441);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.entree-bascule {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--doux, #9fb0c7);
}

/* Sans session, l'entete n'a rien a montrer: ni onglets, ni nom, ni photo.
   La laisser afficherait un cadre vide au-dessus de la carte d'entree. */
body.sans-session .top { display: none; }

/* « Mot de passe oublié ? » colle sous le champ, a droite, comme partout
   ailleurs sur le web: c'est la qu'on le cherche quand ca bloque. */
.entree-oubli {
  justify-self: end;
  padding: 4px 0 0;
  font-size: 13px;
}

/* La carte « Changer mon mot de passe » dans Mon profil: meme carte que
   l'entree, sans prendre tout l'ecran. */
.mdp-encart {
  display: grid;
  place-items: center;
  padding: 8px 0 24px;
}

/* ─────────────────────────────────────────── le bandeau d'observation

   Quand un membre du personnel ouvre l'espace de quelqu'un avec « ?voir= »,
   cette barre reste collee en haut de la fenetre, tout le temps. Elle est
   ambre et non bleue pour une raison: aucune autre surface du portail n'est
   de cette couleur, donc l'oeil ne peut pas la confondre avec l'interface
   du candidat. Le corps descend de sa hauteur pour ne rien cacher. */
.obs {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 18px;
  background: var(--warn);
  color: #241A02;
  font: 600 13px/1.4 var(--ui);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}
.obs b { font-weight: 700; }
.obs span { font-weight: 500; opacity: .8; font-size: 12px; }

body.observation { padding-top: 42px; }

@media (max-width: 600px) {
  .obs { padding: 8px 14px; }
  body.observation { padding-top: 58px; }
}
