/**
 * Espace artiste : connexion, création de compte, tableau de bord.
 *
 * Cette feuille ne s'intègre pas au thème — elle le remplace. Les formulaires
 * de connexion sont ce que voient les groupes en premier, et un thème qui
 * repeint ses champs ou ses boutons donnerait un écran différent d'un site à
 * l'autre. Tout ce que le thème pourrait poser est donc réécrit ici : polices,
 * fonds, bordures, arrondis, ombres, et l'apparence native des contrôles.
 *
 * Le poids des sélecteurs est volontaire : `.aap-space` devant chaque règle
 * l'emporte sur les feuilles de thème, sans recourir à !important.
 */

/* Le gabarit de l'espace artiste pose ce bloc à la place de la colonne de
   contenu du thème : il reprend toute la largeur disponible, sans colonne
   latérale à côté. */
.aap-space-main {
	width: 100%;
	max-width: none;
	margin: 0 auto;
	float: none;
	clear: both;
}

.aap-space {
	--ink: #17181b;
	--muted: #6b6862;
	--rule: #e6e2da;
	--surface: #ffffff;
	--bg: #ffffff;
	--accent: #b4691f;
	--live: #3e6b57;
	--danger: #9e3b36;
	--radius: 14px;

	box-sizing: border-box;
	/* Pleine largeur : l'espace artiste occupe la page, sans colonne latérale. */
	max-width: 78rem;
	margin: 0 auto;
	padding: clamp(1.5rem, 4vw, 3rem) clamp(1.15rem, 4vw, 2.5rem) 4rem;
	color: var(--ink);
	/* Le bloc peint son propre fond : sans lui, un thème clair resterait
	   visible derrière des couleurs prévues pour un fond sombre. */
	background: var(--bg);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.aap-space *,
.aap-space *::before,
.aap-space *::after { box-sizing: border-box; }

/* ---------- titres et textes ---------- */

.aap-space h1,
.aap-space h2,
.aap-space p,
.aap-space ul,
.aap-space li { margin: 0; padding: 0; }

/* Un thème habille ses titres, ses libellés et ses textes forts : ils
   reprennent ici la police et l'encre de l'espace, sans exception. */
.aap-space h1,
.aap-space h2,
.aap-space p,
.aap-space li,
.aap-space label,
.aap-space strong,
.aap-space span,
.aap-space input,
.aap-space button {
	font-family: inherit;
	color: inherit;
}

.aap-space ul { list-style: none; }

.aap-space a { color: var(--accent); text-decoration: none; }
.aap-space a:hover { text-decoration: underline; }

.aap-space :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- champs ---------- */

/* Le thème n'a pas son mot à dire sur les contrôles : ni apparence native, ni
   fond hérité, ni police différente d'un champ à l'autre. */
.aap-space input[type="text"],
.aap-space input[type="email"],
.aap-space input[type="password"],
.aap-space input[type="url"] {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	margin: 0;
	padding: .7rem .85rem;
	font: inherit;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: 10px;
	box-shadow: none;
	min-height: 0;
	line-height: 1.4;
}

.aap-space input::placeholder { color: var(--muted); opacity: 1; }

.aap-space input[type="text"]:focus,
.aap-space input[type="email"]:focus,
.aap-space input[type="password"]:focus,
.aap-space input[type="url"]:focus {
	border-color: var(--accent);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.aap-space label {
	display: block;
	margin: 0 0 .3rem;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--muted);
	text-transform: none;
}

/* ---------- boutons ---------- */

/* La remise à zéro porte sur l'élément, l'apparence sur la seule classe : un
   sélecteur d'attribut comme button[type="submit"] pèserait plus lourd que
   .aap-btn--quiet, et les variantes ne pourraient plus rien reprendre. */
.aap-space button {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	font: inherit;
	text-transform: none;
	letter-spacing: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.aap-space .aap-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	margin: 0;
	padding: .6rem 1.1rem;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--accent);
	color: #ffffff;
	box-shadow: none;
	transition: opacity .15s ease, border-color .15s ease;
}

.aap-space .aap-btn:hover { opacity: .88; text-decoration: none; }

.aap-space .aap-btn--quiet {
	background: none;
	color: var(--ink);
	border-color: var(--rule);
}

.aap-space .aap-btn--quiet:hover { border-color: var(--ink); opacity: 1; }

.aap-space .aap-btn--danger {
	background: none;
	color: var(--danger);
	border-color: transparent;
	padding-inline: .5rem;
}

.aap-space .aap-btn--danger:hover { text-decoration: underline; }

.aap-space .aap-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- messages ---------- */

/* Le bandeau de message est posé dans son propre .aap-space, au-dessus de
   l'écran : il n'a donc ni marge basse du bloc, ni fond à repeindre. */
.aap-space--notice { padding-bottom: 0; }
.aap-space--notice .aap-notice { margin-bottom: 0; }

.aap-space .aap-notice {
	margin: 0 0 1.25rem;
	padding: .8rem 1rem;
	border-radius: 10px;
	font-size: .95rem;
	background: color-mix(in srgb, currentColor 8%, transparent);
}

.aap-space .aap-notice--success { color: var(--live); }
.aap-space .aap-notice--error { color: var(--danger); }

/* ================================================================
   Connexion et création de compte
   ================================================================ */

.aap-space .aap-panel {
	max-width: 26rem;
	margin: 0 auto;
	padding: clamp(1.4rem, 4vw, 2.2rem);
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	box-shadow: 0 12px 34px rgba(0, 0, 0, .06);
}

.aap-space .aap-panel__title {
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: .4rem;
}

.aap-space .aap-panel__lede {
	color: var(--muted);
	font-size: .95rem;
	margin-bottom: 1.4rem;
}

.aap-space .aap-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.aap-space .aap-field { display: flex; flex-direction: column; gap: .3rem; }

.aap-space .aap-hint { color: var(--muted); font-size: .8rem; }

.aap-space .aap-form .aap-btn { width: 100%; padding-block: .75rem; }

.aap-space .aap-switch {
	margin-top: 1.3rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: .9rem;
	text-align: center;
}

/* Le leurre anti-robots reste hors de l'écran, jamais display:none : un robot
   sait lire cette propriété, et l'éviterait. */
.aap-space .aap-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ================================================================
   Tableau de bord
   ================================================================ */

.aap-dash__head {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 2rem;
}

.aap-dash__title { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; line-height: 1.15; }
.aap-dash__lede { color: var(--muted); font-size: .95rem; margin-top: .25rem; }

.aap-dash__empty {
	color: var(--muted);
	padding: 1.5rem;
	border: 1px dashed var(--rule);
	border-radius: var(--radius);
	margin-bottom: 1.5rem;
}

.aap-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 1rem;
}

.aap-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
}

.aap-card__cover {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	background: #f4f2ee;
}

.aap-card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aap-card__blank { font-size: 1.6rem; color: var(--muted); }

.aap-card__body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1rem; }

.aap-card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.25; }

.aap-card__state { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.aap-card__state--live { color: var(--live); }
.aap-card__state--pending { color: var(--muted); }

/* Avancement de la fiche pro : un chiffre et une jauge, rien de plus. */
.aap-space .aap-card__pro {
	display: grid;
	gap: .35rem;
	margin-top: .35rem;
	padding: .6rem .75rem;
	border-radius: 10px;
	background: #f6f4ef;
	color: var(--ink);
	text-decoration: none;
	transition: background-color .15s ease;
}

.aap-space .aap-card__pro:hover { background: #efece5; }
.aap-space .aap-card__pro-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.aap-space .aap-card__pro-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.aap-space .aap-card__meter { display: block; height: 4px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.aap-space .aap-card__meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.aap-space .aap-card__meter.is-complete span { background: var(--live); }

.aap-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	margin-top: .5rem;
}

.aap-card__actions form { margin: 0; }

.aap-card__actions .aap-btn { font-size: .82rem; padding: .45rem .85rem; }

/* ---------- création ---------- */

.aap-dash__new {
	margin-top: 2rem;
	padding: 1.25rem;
	background: #fbfaf8;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
}

.aap-newform__label { font-size: .82rem; }

.aap-newform__row { display: flex; flex-wrap: wrap; gap: .6rem; }
.aap-newform__row input { flex: 1 1 14rem; width: auto; }

.aap-newform__note { color: var(--muted); font-size: .85rem; margin-top: .6rem; }

@media (max-width: 30rem) {
	.aap-dash__head { flex-direction: column; }
	.aap-newform__row button { width: 100%; }
}

/* Entrées posées par les extensions à côté de la déconnexion. */
.aap-space .aap-dash__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.aap-space .alb-dash-badge {
	display: inline-grid;
	place-items: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 .35rem;
	border-radius: 999px;
	background: #fff;
	color: var(--ink);
	font-size: .72rem;
	font-weight: 700;
}

/* ---------- posé dans l'espace membre (plugin concerts) ----------
   Une section parmi d'autres : pas de fond ni de marge propres, et les
   boutons, rayons et titres de l'espace qui l'accueille. */
.aap-space.aap-space--embedded {
	--accent: #111827;
	--radius: 12px;
	max-width: none;
	margin: 0 0 3rem;
	padding: 0;
	background: transparent;
	font-family: inherit;
}
.aap-space--embedded .aap-dash__head { align-items: center; margin-bottom: 1rem; }
.aap-space--embedded h3.aap-dash__title--section { margin: 0; font-size: 20px; font-weight: 700; }
.aap-space--embedded .aap-btn { border-radius: 10px; }
.aap-space--embedded .aap-newform { margin-top: 1rem; }

/* Création d'une autre page : repliée, elle ne détourne pas l'œil. */
.aap-space .aap-dash__new--fold { margin-top: 1rem; }
.aap-space .aap-dash__new--fold summary { display: inline-block; padding: .5rem 0; color: var(--muted); font-weight: 600; cursor: pointer; list-style: none; }
.aap-space .aap-dash__new--fold summary::-webkit-details-marker { display: none; }
.aap-space .aap-dash__new--fold summary:hover { color: var(--ink); }


/* Lien de connexion : sous le bouton principal, pleine largeur sur téléphone. */
.aap-space .aap-magic-btn { margin-top: .6rem; }
@media (max-width: 600px) {
	.aap-space .aap-panel--auth .aap-btn { width: 100%; }
}
