/*
 * Espace « Je gère ma fiche » (artiste ou agent) et bloc de contenu validé sur la fiche publique.
 * Charte pop du site : fond sombre, ambre FilmEcran, contours francs. Le glitch RGB n'apparaît
 * qu'à l'ouverture (titre), au clic d'un bouton et pendant l'attente d'un envoi : jamais sur un
 * prix, une date ou un chiffre. Tout mouvement s'arrête avec prefers-reduced-motion.
 */
.ap {
    --ap-amber: #f59e0b;
    --ap-ink: #0b0b0f;
    --ap-paper: #12121a;
    --ap-line: rgba(245, 158, 11, 0.35);
    --ap-red: rgba(255, 42, 60, 0.7);
    --ap-cyan: rgba(0, 229, 255, 0.7);
    color: #f4f4f5;
}

.ap-card {
    background: var(--ap-paper);
    border: 2px solid var(--ap-line);
    border-radius: 14px;
    box-shadow: 6px 6px 0 rgba(245, 158, 11, 0.18);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.ap-eyebrow {
    color: var(--ap-amber);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

/* Titre : un glitch bref à l'ouverture de la page, puis immobile. */
.ap-title {
    font-weight: 800;
    animation: ap-glitch 0.6s steps(2, end) 1;
}

.ap-lead { color: #d4d4d8; }

.ap-price {
    display: inline-block;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--ap-amber);
}

.ap-steps {
    counter-reset: ap-step;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ap-steps li {
    counter-increment: ap-step;
    position: relative;
    padding-left: 2.4rem;
    margin-bottom: 0.75rem;
}

.ap-steps li::before {
    content: counter(ap-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--ap-amber);
    color: var(--ap-ink);
    font-weight: 800;
    display: grid;
    place-items: center;
}

.ap-steps li.is-done::before { content: "✓"; }

.ap-steps li.is-current { color: #fff; font-weight: 600; }

.ap .form-control,
.ap .form-select {
    background: #0b0b12;
    border: 2px solid rgba(255, 255, 255, 0.14);
    color: #f4f4f5;
}

.ap .form-control:focus,
.ap .form-select:focus {
    border-color: var(--ap-amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.ap-choice {
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    height: 100%;
}

.ap-choice:has(input:checked) {
    border-color: var(--ap-amber);
    background: rgba(245, 158, 11, 0.08);
}

.ap-btn {
    background: var(--ap-amber);
    color: var(--ap-ink);
    border: 2px solid var(--ap-ink);
    border-radius: 999px;
    font-weight: 800;
    padding: 0.55rem 1.4rem;
    box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.85);
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.ap-btn:hover { color: var(--ap-ink); transform: translate(-1px, -1px); }

/* Clic : le bouton s'enfonce et lâche un glitch RGB. */
.ap-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85);
    animation: ap-glitch-box 0.25s steps(2, end) 1;
}

.ap-btn--ghost {
    background: transparent;
    color: #f4f4f5;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.ap-btn--ghost:hover { color: #fff; border-color: var(--ap-amber); }

/* Attente : pendant l'envoi d'un formulaire (classe posée par le petit script de la page). */
form.is-sending .ap-btn[type="submit"] {
    pointer-events: none;
    animation: ap-glitch-box 0.5s steps(2, end) infinite;
}

.ap-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    color: var(--ap-amber);
    background: #0b0b12;
    border: 2px dashed var(--ap-amber);
    border-radius: 10px;
    padding: 0.4rem 0.9rem;
    display: inline-block;
    user-select: all;
}

.ap-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.ap-photo {
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    overflow: hidden;
    background: #0b0b12;
}

.ap-photo.is-main { border-color: var(--ap-amber); }

.ap-photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.ap-photo__badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--ap-amber);
    color: var(--ap-ink);
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}

.ap-photo__credit {
    font-size: 0.72rem;
    color: #a1a1aa;
    padding: 0.25rem 0.4rem;
}

.ap-counter { font-size: 0.8rem; color: #a1a1aa; }

.ap-note {
    border-left: 4px solid var(--ap-amber);
    background: rgba(245, 158, 11, 0.08);
    padding: 0.6rem 0.9rem;
    border-radius: 0 10px 10px 0;
}

.ap-note--danger { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* Bloc « fiche gérée par l'artiste » sur la fiche publique. */
.ap-badge-managed {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ap-amber, #f59e0b);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
}

.ap-showreel {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.ap-showreel iframe,
.ap-showreel button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ap-showreel button {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(0, 0, 0, 0.9));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

@keyframes ap-glitch {
    0% { text-shadow: -3px 0 0 var(--ap-red), 3px 0 0 var(--ap-cyan); transform: translateX(1px); }
    50% { text-shadow: 3px 0 0 var(--ap-red), -3px 0 0 var(--ap-cyan); transform: translateX(-1px); }
    100% { text-shadow: none; transform: none; }
}

@keyframes ap-glitch-box {
    0% { box-shadow: -3px 0 0 var(--ap-red), 3px 0 0 var(--ap-cyan); }
    50% { box-shadow: 3px 0 0 var(--ap-red), -3px 0 0 var(--ap-cyan); }
    100% { box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85); }
}

@media (prefers-reduced-motion: reduce) {
    .ap-title,
    .ap-btn:active,
    form.is-sending .ap-btn[type="submit"] {
        animation: none;
    }
}
