/* ---------- Base ---------- */

.ct-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; padding: var(--space-6); }
.ct-stack { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }
.ct-display { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Motif « La Coupe » : rose / bande blanche / ciel ---------- */
.ct-coupe {
  background: linear-gradient(var(--coupe-angle),
    var(--rose-pastel) 0 calc(50% - var(--coupe-bande) / 2),
    var(--halo) calc(50% - var(--coupe-bande) / 2) calc(50% + var(--coupe-bande) / 2),
    var(--ciel-pastel) calc(50% + var(--coupe-bande) / 2) 100%);
}
.ct-coupe--vif {
  background: linear-gradient(var(--coupe-angle),
    var(--rouge) 0 calc(50% - var(--coupe-bande) / 2),
    var(--halo) calc(50% - var(--coupe-bande) / 2) calc(50% + var(--coupe-bande) / 2),
    var(--bleu) calc(50% + var(--coupe-bande) / 2) 100%);
}

/* ---------- Bouton ---------- */
.ct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-weight: 700; font-size: 16px; line-height: 24px;
  padding: var(--space-3) var(--space-6); min-height: 48px; box-sizing: border-box;
  border: var(--trait-sticker) solid var(--contour); border-radius: var(--radius-md);
  box-shadow: var(--ombre-sticker); cursor: pointer; text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease, background-color .12s ease;
}
.ct-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--contour); }
.ct-btn:active { transform: translate(3px, 3px); box-shadow: var(--ombre-presse); }
.ct-btn--or { background: var(--or-clair); color: var(--contour); }
.ct-btn--or:hover { background: var(--or); }
.ct-btn--rouge { background: var(--rouge-fort); color: var(--halo); }
.ct-btn--rouge:hover { background: var(--rouge-ombre); }
.ct-btn--bleu { background: var(--bleu-fort); color: var(--halo); }
.ct-btn--fantome { background: var(--surface-relief); color: var(--encre); border-color: var(--trait); box-shadow: none; }
.ct-btn--fantome:hover { box-shadow: none; transform: none; background: var(--surface-creux); }
.ct-btn--sm { min-height: 36px; padding: 6px var(--space-4); font-size: 14px; line-height: 20px; border-width: var(--trait-fin); box-shadow: 3px 3px 0 0 var(--contour); }
.ct-btn--jouer { min-height: 64px; padding: var(--space-4) var(--space-12); font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 32px; letter-spacing: .02em; border-radius: var(--radius-lg); box-shadow: 0 0 0 var(--trait-halo) var(--halo), var(--ombre-sticker-lg); }
.ct-btn--jouer:hover { box-shadow: 0 0 0 var(--trait-halo) var(--halo), 7px 7px 0 0 var(--contour); }
.ct-btn--jouer:active { box-shadow: 0 0 0 var(--trait-halo) var(--halo), var(--ombre-presse); }
.ct-btn[disabled], .ct-btn[aria-disabled="true"] { background: var(--surface-creux); color: var(--encre-douce); border-color: var(--trait); box-shadow: none; transform: none; cursor: not-allowed; }
.ct-btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Pastille ---------- */
.ct-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface-creux); color: var(--encre); }
.ct-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: none; }
.ct-badge--point::before { display: block; }
.ct-badge--ok { background: var(--teinte-ok); color: var(--statut-ok); }
.ct-badge--rouge { background: var(--teinte-rouge); color: var(--texte-rouge); }
.ct-badge--bleu { background: var(--teinte-bleu); color: var(--texte-bleu); }
.ct-badge--or { background: var(--teinte-or); color: var(--texte-or); }
.ct-badge--sticker { background: var(--or-clair); color: var(--contour); border: var(--trait-fin) solid var(--contour); }

/* ---------- Carte ---------- */
.ct-card { background: var(--surface-relief); color: var(--encre); border: var(--trait-sticker) solid var(--trait); border-radius: var(--radius-lg); box-shadow: var(--ombre-sticker); overflow: hidden; display: flex; flex-direction: column; }
.ct-card__entete { height: 96px; position: relative; border-bottom: var(--trait-sticker) solid var(--trait); }
.ct-card__corps { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.ct-card__titre { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 28px; }
.ct-card__texte { margin: 0; color: var(--encre-douce); font-size: 16px; line-height: 24px; }
.ct-card__meta { margin: 0; color: var(--encre-douce); font-size: 14px; line-height: 20px; }
.ct-card--plate { box-shadow: none; border-width: var(--trait-fin); }

/* ---------- Champ ---------- */
.ct-field { display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.ct-label { font-weight: 700; font-size: 14px; line-height: 20px; color: var(--encre); }
.ct-input { font-family: var(--font-sans); font-size: 16px; line-height: 24px; color: var(--encre); background: var(--surface-relief); border: var(--trait-fin) solid var(--trait); border-radius: var(--radius-sm); padding: 10px var(--space-3); min-height: 48px; box-sizing: border-box; }
.ct-input::placeholder { color: var(--encre-douce); }
.ct-input--mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .04em; }
.ct-input[aria-invalid="true"] { border-color: var(--texte-rouge); }
.ct-hint { font-size: 14px; line-height: 20px; color: var(--encre-douce); }
.ct-hint--erreur { color: var(--texte-rouge); font-weight: 500; }

/* ---------- Statut serveur ---------- */
.ct-status { display: flex; align-items: center; gap: var(--space-4); background: var(--surface-relief); border: var(--trait-fin) solid var(--trait); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-6); }
.ct-status__icone { width: 48px; height: 48px; flex: none; }
.ct-status__infos { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ct-status__nom { font-family: var(--font-display); font-size: 20px; line-height: 24px; }
.ct-status__meta { font-family: var(--font-mono); font-weight: 500; font-size: 13px; line-height: 18px; color: var(--encre-douce); }
.ct-status__joueurs { font-weight: 700; font-size: 14px; color: var(--encre); white-space: nowrap; }

/* ---------- Compte à rebours ---------- */
.ct-countdown { display: inline-flex; align-items: stretch; gap: var(--space-2); }
.ct-countdown__case { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; padding: var(--space-2) var(--space-3); background: var(--or-clair); color: var(--contour); border: var(--trait-sticker) solid var(--contour); border-radius: var(--radius-md); box-shadow: var(--ombre-sticker); }
.ct-countdown__nb { font-family: var(--font-display); font-size: 40px; line-height: 44px; }
.ct-countdown__unite { font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Navigation site ---------- */
.ct-nav { display: flex; align-items: center; gap: var(--space-6); padding: var(--space-3) var(--space-6); background: var(--surface-relief); border-bottom: var(--trait-sticker) solid var(--trait); }
.ct-nav__marque { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--encre); font-family: var(--font-display); font-size: 22px; line-height: 24px; }
.ct-nav__marque img { width: 40px; height: 40px; }
.ct-nav__liens { display: flex; gap: var(--space-1); margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.ct-nav__lien { display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--encre); text-decoration: none; font-weight: 500; }
.ct-nav__lien:hover { background: var(--surface-creux); }
.ct-nav__lien[aria-current="page"] { background: var(--teinte-or); color: var(--texte-or); font-weight: 700; }
