/* Scanner : feuilles qui montent du bas (<dialog class="feuille">), interrupteurs, segments, et le contenu de
   chaque feuille (outils, élève, minuteur, médias, tirage, classe, réglages). Cibles tactiles ≥ 48 px. */

/* La feuille elle-même : composant commun (css/base-composants.css). Ici : son contenu. */
.scanner .feuille-corps { padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); }
.scanner .feuille-titre { min-width: 0; overflow-wrap: anywhere; }
.sous-titre { margin: 6px 0 0; color: var(--texte-pale); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Boutons des feuilles (variantes communes : .btn-principal, .btn-secondaire, .btn-danger) */
.feuille .btn-large { width: 100%; min-height: 56px; font-size: 1.1rem; }

/* Segments : un choix parmi quelques-uns */
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.segments button { min-height: 48px; padding: 0 4px; border: 0; border-radius: 10px; background: transparent; color: var(--texte-pale); font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.segments button[aria-pressed='true'] { background: var(--agir); color: #fff; }
.segments button:disabled { opacity: 0.35; cursor: default; }

/* Lignes à interrupteur : bouton role=switch, ou label avec une case role=switch */
.bascule-ligne {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px;
  border: 0; border-radius: 12px; background: var(--surface-2); color: var(--texte); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
button.bascule-ligne::after, .bascule-ligne input {
  content: ''; flex: none; width: 52px; height: 30px; margin: 0; border-radius: 15px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.22) radial-gradient(circle at 15px 50%, #fff 10px, transparent 10.6px);
}
button.bascule-ligne[aria-checked='true']::after, .bascule-ligne input:checked {
  background: var(--agir) radial-gradient(circle at 37px 50%, #fff 10px, transparent 10.6px);
}
.bascule-ligne input:disabled { opacity: 0.35; }

/* Menu « ⋯ » */
.outils { gap: 6px; }
.outil {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--surface-2); color: var(--texte); font: inherit; font-size: 1.05rem; font-weight: 600; text-align: left; cursor: pointer;
}

/* Élève : corriger son vote */
.fiche-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 1.1rem; }
.eleve-lettres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lettre {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 12px; border: 0; border-left: 6px solid var(--rep);
  border-radius: 14px; background: var(--surface-2); color: var(--texte); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.lettre[aria-pressed='true'] { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 3px var(--rep); }
.lettre-texte { min-width: 0; overflow-wrap: anywhere; }

/* Minuteur */
.minuteur-affiche { margin: 0; text-align: center; font-size: 3.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.minuteur-affiche[data-etat='bientot'] { color: #f7c948; }
.minuteur-affiche[data-etat='fini'] { color: var(--texte-pale); font-size: 2rem; } /* neutre */
.pave { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pave .btn { min-height: 64px; font-size: 1.25rem; }

/* Médias */
.media-bloc { display: grid; gap: 10px; }
.media-boutons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.media-btn[aria-pressed='true'], .media-plein[aria-pressed='true'] { --btn-bord: var(--agir); }
.media-miniature { width: min(100%, calc(36vh * var(--ratio, 1.333))); margin: 0 auto; border-radius: 10px; cursor: crosshair; }
.miniature-repere {
  position: absolute; width: 34px; height: 34px; border: 4px solid #f7c948; border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); pointer-events: none;
}
.miniature-zoom { position: absolute; border: 3px solid #fff; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45); pointer-events: none; }

/* Tirage au sort */
.tirage-resultat { display: grid; place-items: center; gap: 2px; min-height: 104px; margin: 0; padding: 12px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.tirage-prenom { font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.tirage-numero, .tirage-vide { color: var(--texte-pale); }

/* Classe : équipes, objectif */
.champ-court { display: flex; align-items: center; gap: 8px; color: var(--texte-pale); font-weight: 600; }
.equipes-apercu { display: grid; gap: 6px; }
.equipe-ligne { display: grid; margin: 0; padding: 8px 12px; border-left: 6px solid var(--equipe); border-radius: 8px; background: var(--surface-2); }
.equipe-nom { font-weight: 600; }
.equipe-membres { color: var(--texte-pale); font-size: 0.85rem; }
#classe-etat { flex: 1 1 100%; margin: 0; }
#classe-etat[data-etat='ok'] { color: #7ee2a8; }

/* Réglages */
.champ-ligne { display: grid; gap: 6px; font-weight: 600; }
.diagnostic-bloc summary { display: flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 600; cursor: pointer; list-style: none; }
.diagnostic-bloc summary::-webkit-details-marker { display: none; }
.diagnostic-bloc summary::before { content: '▸'; color: var(--texte-pale); transition: transform 0.15s; }
.diagnostic-bloc[open] summary::before { transform: rotate(90deg); }
.diagnostic { max-height: 30vh; overflow: auto; margin: 0; padding: 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.3); font-size: 0.8rem; white-space: pre-wrap; }
