/* Asperluette Avatars — styles communs (pages publiques + admin) */

.asp-avatar-grid, .asp-accessory-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.asp-avatar-tile, .asp-accessory-tile {
	border: 2px solid #ddd;
	border-radius: 10px;
	padding: 10px;
	text-align: center;
	width: 110px;
}
.asp-avatar-tile img, .asp-accessory-tile img {
	max-width: 80px;
	display: block;
	margin: 0 auto 6px;
}
.asp-accessory-tile.verrouille img { filter: grayscale(1) opacity(0.5); }
.asp-cadenas { display: block; font-size: 18px; }

.asp-progress-bar {
	background: #eee;
	border-radius: 8px;
	height: 12px;
	overflow: hidden;
	margin: 8px 0;
}
.asp-progress-bar span {
	display: block;
	height: 100%;
	background: #6aa84f;
}

.asp-avatar-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.asp-btn-primary, .asp-btn-secondary, .asp-btn-commencer {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	border: none;
}
.asp-btn-primary, .asp-btn-commencer { background: #3d85c6; color: #fff; }
.asp-btn-secondary { background: #eee; color: #333; }

.asp-niveau-choice label { margin-right: 16px; }
.asp-texte-card { border: 1px solid #ddd; border-radius: 8px; padding: 12px; margin-bottom: 10px; }

.asp-lecture-vocale { margin: 10px 0; }
.asp-lecture-controles button { margin-right: 6px; }
.asp-mot-actif { background: #fff2a8; border-radius: 3px; }
.asp-texte-vide { font-style: italic; color: #888; }

.asp-status-fait { color: #2e7d32; font-weight: bold; }
.asp-status-bientot { color: #b26a00; }
.asp-status-manquant { color: #999; }
.asp-badge { background: #2e7d32; color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; margin-left: 6px; }

.asp-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.asp-table th, .asp-table td { border: 1px solid #ddd; padding: 6px 10px; text-align: left; }
.asp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; }
.asp-dot-green { background: #2e7d32; }
.asp-dot-orange { background: #b26a00; }

.asp-form { border: 1px solid #eee; border-radius: 8px; padding: 12px; margin: 10px 0; }
.asp-form label { display: block; margin-bottom: 8px; }
.asp-form textarea { width: 100%; }

.asp-notice { background: #eaf7ea; border: 1px solid #b6dfb6; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }
.asp-access-denied { color: #b00020; }

.asp-gestion-nav { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.asp-gestion-nav a { text-decoration: none; padding: 6px 10px; border-radius: 6px; background: #f2f2f2; }
.asp-gestion-nav a.active { background: #3d85c6; color: #fff; }

.asp-question, .asp-play-question { border: 1px solid #eee; border-radius: 6px; padding: 8px; margin-bottom: 8px; }

.asp-hint { color: #777; font-size: 13px; }
.asp-content-label-badge { margin-bottom: 4px; }
.asp-content-label-badge code { background: #f2f2f2; border-radius: 4px; padding: 2px 6px; font-size: 12px; }
.asp-avatar-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 6px; }

/* Comptes élèves & sélecteur "Qui joue ?" (v1.13.0) */
.asp-profile-switcher { margin: 10px 0; }
.asp-profile-tile { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.asp-profile-tile:hover { border-color: #3d85c6; }
.asp-changer-profil { margin-bottom: 10px; }
.asp-changer-profil a { text-decoration: none; }
.asp-choix-mode { border: none; padding: 0; margin-bottom: 12px; }
.asp-choix-mode label { display: block; margin-bottom: 6px; font-weight: normal; }
.asp-champs-enfant { margin-bottom: 10px; }
.asp-profils-existants { list-style: none; padding: 0; }
.asp-profils-existants li { border: 1px solid #eee; border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; }
.asp-notice-erreur { background: #fbeaea; border-color: #e6b6b6; color: #8a1f1f; }

/* Gestion des élèves (v1.14.0) */
.asp-eleve-block { border: 1px solid #ddd; border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.asp-form-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; border: none; padding: 0; margin: 8px 0; }
.asp-form-inline label { display: flex; flex-direction: column; font-size: 13px; margin-bottom: 0; }
.asp-btn-danger { display: inline-block; margin-top: 6px; color: #b00020; text-decoration: none; }
.asp-btn-danger:hover { text-decoration: underline; }

/* Page d'accueil de l'application (v1.15.0) */
.asp-accueil { max-width: 480px; margin: 0 auto; text-align: center; }
.asp-accueil-bienvenue h2 { margin-bottom: 4px; }
.asp-accueil-connexion { text-align: left; }
.asp-accueil-connexion > p:first-child { text-align: center; margin-bottom: 16px; }

/* Gestion du contenu "syllabes dans l'ordre" (v1.16.0) */
.asp-question-syllabes label { display: inline-block; margin-right: 10px; }
.asp-question-syllabes input[type="text"] { width: 90px; }
.asp-syllabe-mot-preview { margin-bottom: 6px; }

/* Jeu "syllabes dans l'ordre" côté élève (v1.16.0) */
.asp-syllabes-game { max-width: 560px; }
.asp-syllabes-progress { font-weight: bold; margin-bottom: 12px; }
.asp-syllabe-mot { border: 1px solid #ddd; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.asp-syllabe-consigne { margin-top: 0; color: #555; }
.asp-syllabe-slots, .asp-syllabe-bank {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px;
	margin: 0 0 12px;
	min-height: 52px;
	border-radius: 8px;
}
.asp-syllabe-slots { background: #f7f7f7; border: 2px dashed #ccc; }
.asp-syllabe-bank { background: #eef5fc; border: 2px solid #cfe2f3; }
.asp-syllabe-slot {
	width: 60px;
	height: 40px;
	border-radius: 6px;
	background: #fff;
	border: 1px dashed #bbb;
}
.asp-syllabe-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 40px;
	padding: 0 10px;
	background: #3d85c6;
	color: #fff;
	border-radius: 6px;
	cursor: grab;
	font-weight: bold;
	user-select: none;
	/* Empêche le navigateur d'interpréter un glissement au doigt comme un
	   défilement de la page (le glissement est géré en JS, v1.18.1). */
	touch-action: none;
}
.asp-syllabe-tile:active { cursor: grabbing; }
.asp-syllabe-tile.asp-syllabe-verrouillee { cursor: default; opacity: 0.8; }
/* Retour visuel pendant un glissement (v1.18.1, glissement par événements Pointer) */
.asp-syllabe-tile.asp-syllabe-en-glissement { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); z-index: 5; }
.asp-mot-reussi { border-color: #6aa84f; background: #f4faf2; }
.asp-syllabe-feedback { min-height: 22px; font-weight: bold; margin-bottom: 8px; }
.asp-feedback-success { color: #2e7d32; }
.asp-feedback-retry { color: #b26a00; }

/* Corrigé affiché après soumission d'une évaluation (v1.18.0) */
.asp-corrections { border: 1px solid #cfe2f3; background: #f7fbff; border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.asp-corrections h4 { margin: 0 0 6px; }
.asp-corrections ul { margin: 0; padding-left: 0; list-style: none; }
.asp-corrections li { padding: 4px 0; }
.asp-correction-ok { color: #2e7d32; }
.asp-correction-ko { color: #333; }
.asp-reponse-trouvee { color: #1155cc; }
.asp-syllabe-actions button[disabled] { opacity: 0.5; cursor: not-allowed; }
