/* ===========================================================
   JEU-COUPLE.FR — éléments communs des pages de jeu
   (écrans, réglages, candidats, boutons segmentés, fin)
   Chaque jeu choisit ses couleurs avec --theme et --theme-2.
   =========================================================== */
body { --p0: #ff4f86; --p1: #ffc94d; --theme: #e0436b; --theme-2: #ff9a62; --panneau: rgba(26, 12, 18, 0.85); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-canvas#fx { z-index: 60; }

.ecran {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));
}
.ecran.jeu { height: 100vh; height: 100dvh; }
.site-presentation { position: relative; z-index: 1; padding: 30px 20px 60px; }
.site-presentation .liens { margin-top: 24px; font-size: 0.9rem; }
.ecran.jeu:not([hidden]) ~ .site-presentation { display: none; }

/* ---------- Réglages ---------- */
.reglages { gap: 18px; justify-content: center; }
.reglages .back-to-site { margin-bottom: auto; }
.marque { text-align: center; }
.marque h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.8rem, 13vw, 4rem); line-height: 1; margin: 12px 0 6px; }
.marque h1 em { font-style: italic; color: var(--theme); text-shadow: 0 0 30px color-mix(in srgb, var(--theme) 60%, transparent); }
.sous-titre { color: var(--muted); margin: 8px auto 0; max-width: 360px; font-size: 0.95rem; }
.panneau {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: var(--panneau);
  border: 1px solid color-mix(in srgb, var(--theme) 30%, transparent);
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--theme) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: auto;
}
.candidats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.candidat { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.perso-apercu { width: 84px; height: 96px; border-radius: 50% 50% 18px 18px; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.12), transparent 70%); overflow: hidden; }
.look { display: flex; gap: 4px; }
.look button { font-size: 0.7rem; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); color: var(--muted); cursor: pointer; }
.candidat .champ { width: 100%; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.champ { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.etiquette { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pastille { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pastille.p0 { background: var(--p0); box-shadow: 0 0 10px var(--p0); }
.pastille.p1 { background: var(--p1); box-shadow: 0 0 10px var(--p1); }
.champ input { width: 100%; min-width: 0; padding: 11px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.35); color: var(--text); font: inherit; }
.champ input:focus { outline: none; border-color: var(--theme); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 25%, transparent); }
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1); }
.segments button { border: 0; background: none; padding: 9px 2px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; min-width: 0; }
.segments button[aria-checked="true"] { color: #fff; background: linear-gradient(180deg, var(--theme-2), var(--theme)); box-shadow: 0 4px 14px color-mix(in srgb, var(--theme) 45%, transparent); }
.btn.gros { padding: 15px 20px; font-size: 1.05rem; color: #fff; background: linear-gradient(180deg, var(--theme-2), var(--theme)); box-shadow: 0 6px 0 color-mix(in srgb, var(--theme) 55%, #000), 0 14px 30px color-mix(in srgb, var(--theme) 45%, transparent); }
.btn.gros:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--theme) 55%, #000); }
.btn.gros:disabled { opacity: 0.5; }

/* ---------- Barre du haut ---------- */
.barre { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; }
.rond { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(0, 0, 0, 0.35); cursor: pointer; font-size: 0.95rem; flex: none; }
.rond.coupe { opacity: 0.4; text-decoration: line-through; }

/* ---------- Fin ---------- */
.fin { justify-content: center; align-items: center; text-align: center; gap: 10px; }
.fin h2 { font-family: var(--serif); font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1.05; margin: 4px 0 0; }
.f-texte { margin: 0 0 6px; color: var(--muted); max-width: 380px; }
.actions-fin { width: 100%; max-width: 360px; display: grid; gap: 8px; flex: none; }
.actions-fin .btn { padding: 12px; }

@media (max-height: 640px) {
  .ecran { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .reglages { gap: 12px; }
  .panneau { padding: 14px; gap: 12px; }
  .perso-apercu { width: 64px; height: 74px; }
  .marque h1 { font-size: 2.6rem; margin: 4px 0; }
  .rond { width: 32px; height: 32px; }
}

/* ---------- Encadré "Comment ça marche ?" ---------- */
.regles { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; background: rgba(0, 0, 0, 0.25); padding: 0 14px; }
.regles summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: 0.9rem; color: var(--theme-2); }
.regles ul { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: 0.84rem; color: #d9cfca; line-height: 1.45; }
.regles b { color: #fff; }
.infos { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--theme-2); text-align: center; }
