/* ============================================================
   LES LOUPS — interclub tennis, entre potes.
   Parenté avec Prono (fond clair lumineux, cartes blanches,
   pastilles, énergie) mais identité PROPRE : la BALLE JAUNE
   FLUO est l'unique accent — c'est elle qui dit « présent »,
   partout, du logo au pion de présence. Encre bleu nuit de
   loup, Archivo en display, rythme 8px, pouce d'abord.
   ============================================================ */

:root {
  /* Le bleu Matys structure l'app (demande Lionel, 30/08) ; la balle
     volt ne garde qu'UN rôle : dire la présence. */
  --fond: #f2f8f7;
  --carte: #ffffff;
  --carte-2: #f6faf9;
  --bord: #dbe7e4;
  --encre: #0c2b29;            /* l'encre Matys */
  --sourd: #5f7d7a;
  --bleu: #0a7d8e;             /* le bleu Matys — actions, liens, identité */
  --bleu-vif: #0bb9c5;
  --bleu-doux: rgba(10, 125, 142, .1);
  --balle: #cdf043;            /* la balle — présence, rien d'autre */
  --balle-vif: #b8e620;
  --balle-texte: #5d7c07;
  --balle-douce: rgba(205, 240, 67, .25);
  --rayon: 14px;
  --ombre: 0 6px 24px rgba(10, 54, 72, .08);
  --tf: 'Archivo', system-ui, sans-serif;
  --tx: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--tx); font-size: 15.5px; line-height: 1.5;
  background: linear-gradient(180deg, #e4f0ee 0%, var(--fond) 320px);
  color: var(--encre); min-height: 100vh;
}
::selection { background: var(--balle); color: var(--nuit); }
a { color: var(--bleu); font-weight: 600; }

/* ── La balle : un SVG propre, pas un tour de passe-passe CSS ── */
.balle-svg { width: 26px; height: 26px; flex: 0 0 auto; filter: drop-shadow(0 2px 6px rgba(184, 230, 32, .45)); }

/* ── Barre du haut ── */
.haut {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; position: sticky; top: 0; z-index: 40;
  background: rgba(242, 248, 247, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bord);
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.marque-nom { font-family: var(--tf); font-weight: 900; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; color: var(--bleu); }
.qui {
  text-decoration: none; color: var(--encre); font-weight: 700; font-size: 14px;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 999px;
  padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px;
}

.page { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
.bas { text-align: center; color: var(--sourd); font-size: 13px; padding: 24px 0 32px; }

/* ── Cartes ── */
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 20px; margin-bottom: 16px;
}
.carte.vide { text-align: center; color: var(--sourd); padding: 40px 20px; }

.titre { font-family: var(--tf); font-weight: 900; font-size: 26px; letter-spacing: -.01em; }
.sous { color: var(--sourd); margin: 4px 0 16px; }
.soustitre { font-family: var(--tf); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--sourd); margin: 24px 0 8px; }
.flash { background: var(--balle-douce); border: 1px solid var(--balle); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; margin-bottom: 12px; }

/* ── La prochaine séance ── */
.etiquette { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bleu); }
.prochaine-quand { font-family: var(--tf); font-weight: 900; font-size: clamp(26px, 7vw, 34px); letter-spacing: -.01em; line-height: 1.12; margin: 4px 0 2px; }
.prochaine-lieu, .prochaine-note { color: var(--sourd); font-size: 14.5px; }
.compteur { margin: 14px 0 8px; font-size: 15px; }
.compteur b { font-family: var(--tf); font-size: 22px; color: var(--balle-texte); }
.compteur-mini b { color: var(--balle-texte); }

/* ── La meute : un pion par loup, la balle dit l'état ── */
.meute-ligne { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.pion {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--encre);
  background: var(--carte-2); border: 1px solid var(--bord); border-radius: 999px;
  padding: 5px 10px 5px 6px;
}
.pion-balle { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; background: #d6dacf; }
.pion-present .pion-balle { background: var(--balle-vif); box-shadow: 0 0 0 3px var(--balle-douce); }
.pion-present { border-color: var(--balle); }
.pion-peutetre .pion-balle { background: linear-gradient(90deg, var(--balle) 50%, #d6dacf 50%); }
.pion-absent { opacity: .45; }
.pion-absent .pion-balle { background: transparent; border: 2px solid #c3c8bc; }
.pion-absent .pion-nom { text-decoration: line-through; }
.pion-muet { color: var(--sourd); }

/* ── Répondre : trois gestes au pouce ── */
.reponse { display: flex; gap: 8px; }
.rep {
  flex: 1; min-height: 48px; border-radius: 12px; cursor: pointer;
  font-family: var(--tx); font-weight: 700; font-size: 14.5px;
  border: 1.5px solid var(--bord); background: var(--carte); color: var(--sourd);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.rep:active { transform: scale(.97); }
.rep-present.on {
  background: radial-gradient(circle at 30% 20%, #e0fb6d, var(--balle));
  border-color: var(--balle-vif); color: var(--nuit);
  box-shadow: 0 6px 18px rgba(184, 230, 32, .45);
}
.rep-peutetre.on { background: var(--balle-douce); border-color: var(--balle); color: var(--encre); }
.rep-absent.on { background: var(--carte-2); border-color: var(--sourd); color: var(--encre); text-decoration: line-through; }
.rep:focus-visible { outline: 3px solid var(--bleu-vif); outline-offset: 2px; }

.mot-form { display: flex; gap: 8px; margin-top: 10px; }
.mot-form input[type="text"] { flex: 1; border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: var(--tx); }
.mot-form button { border: 1px solid var(--bord); background: var(--carte-2); border-radius: 10px; padding: 0 16px; font-weight: 700; cursor: pointer; min-height: 42px; }

.titre-suite { font-family: var(--tf); font-weight: 900; font-size: 18px; margin: 24px 0 10px; letter-spacing: .02em; }
.seance-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.seance-lieu { color: var(--sourd); font-size: 13px; margin-left: 8px; }
.badge-interclub { font-size: 12px; font-weight: 700; background: var(--balle-douce); border: 1px solid var(--balle); border-radius: 999px; padding: 2px 8px; }

/* ── La porte : plein bleu Matys (demande Lionel), balle volt dessus ── */
body:has(.porte) { background: linear-gradient(175deg, var(--bleu-vif) -20%, var(--bleu) 45%, #085d6b 100%); }
body:has(.porte) .haut, body:has(.porte) .bas { display: none; }
.porte { max-width: 420px; margin: 14vh auto 0; text-align: center; padding: 0 12px; }
.porte-balle { width: 68px; height: 68px; filter: drop-shadow(0 8px 22px rgba(20, 40, 30, .35)); }
.porte-titre {
  font-family: var(--tf); font-weight: 900; letter-spacing: .02em;
  font-size: clamp(40px, 11vw, 54px); line-height: 1.05; color: #fff;
  margin-top: 10px; text-shadow: 0 2px 14px rgba(8, 60, 70, .35);
}
.porte-sous { color: rgba(255, 255, 255, .75); margin: 10px 0 26px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.porte-form { display: grid; gap: 10px; }
.porte-form input {
  border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .14);
  color: #fff; backdrop-filter: blur(6px);
  border-radius: 12px; padding: 14px 16px; font-size: 16px; text-align: center; font-family: var(--tx);
}
.porte-form input::placeholder { color: rgba(255, 255, 255, .65); }
.porte-form input:focus { outline: 2.5px solid var(--balle); border-color: var(--balle); }
.porte-form button {
  min-height: 52px; border: 0; border-radius: 12px; cursor: pointer;
  font-family: var(--tf); font-weight: 900; font-size: 16px; letter-spacing: .03em;
  background: #fff; color: var(--bleu);
  box-shadow: 0 10px 26px rgba(8, 60, 70, .35);
  transition: transform .12s;
}
.porte-form button:active { transform: scale(.98); }
.porte-erreur { color: #ffd9d0; font-weight: 600; font-size: 14px; }
.porte-chef .porte-form input { text-align: left; background: var(--carte); color: var(--encre); border-color: var(--bord); }
.porte-chef .porte-form input::placeholder { color: var(--sourd); }

/* ── Qui es-tu ── */
.qui-page { text-align: center; }
.meute-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.loup-carte {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--carte); border: 1.5px solid var(--bord); border-radius: var(--rayon);
  padding: 18px 10px; cursor: pointer; box-shadow: var(--ombre);
  font-family: var(--tx); transition: transform .12s, border-color .15s;
}
.loup-carte:hover { border-color: var(--bleu-vif); transform: translateY(-2px); }
.loup-emoji { font-size: 34px; }
.loup-nom { font-weight: 700; font-size: 15px; }

/* ── Capitaine ── */
.chef-liste { list-style: none; display: grid; gap: 6px; margin-bottom: 10px; }
.chef-liste li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--bord); font-size: 14.5px; }
.chef-liste .muet { color: var(--sourd); border: 0; }
.en-ligne { display: inline; margin-left: auto; }
.lien-discret { border: 0; background: none; color: var(--sourd); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.lien-discret:hover { color: #b3402e; }
.chef-form { display: flex; flex-wrap: wrap; gap: 8px; }
.chef-form input, .chef-form select {
  border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-family: var(--tx); flex: 1; min-width: 120px;
}
.chef-form .mini { flex: 0 0 64px; min-width: 64px; text-align: center; }
.chef-form button {
  border: 0; border-radius: 10px; padding: 0 18px; min-height: 42px; cursor: pointer;
  font-weight: 700; background: var(--bleu); color: #fff;
}

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

/* ── L'équipe et ses classements AFT ── */
.haut-nav { display: flex; align-items: center; gap: 12px; }
.haut-nav > a:not(.qui) { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--bleu); }
.equipe-liste { display: grid; gap: 8px; }
.equipe-ligne {
  display: flex; align-items: center; gap: 12px;
  background: var(--carte-2); border: 1px solid var(--bord); border-radius: 12px;
  padding: 12px 14px;
}
.equipe-ligne .loup-emoji { font-size: 26px; }
.equipe-nom { font-weight: 700; flex: 1; min-width: 0; }
.badge-cap { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu); background: var(--bleu-doux); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.badge-classement {
  font-family: var(--tf); font-weight: 900; font-size: 15px; text-decoration: none;
  color: #fff; background: linear-gradient(160deg, var(--bleu-vif), var(--bleu));
  border-radius: 10px; padding: 6px 12px; min-width: 64px; text-align: center;
  box-shadow: 0 4px 12px rgba(10, 125, 142, .3);
}
.badge-vide { background: var(--carte); color: var(--sourd); border: 1px solid var(--bord); box-shadow: none; }
