/* ============================================================
   components.css — Surfaces, cartes, badges, avatar, profil,
                    HTMX, icônes sociales, définitions
   ============================================================ */

/* ── Surface éditoriale (carte carrée avec ombre décalée) ── */
.surface-editoriale {
    background-color: white;
    border: 2px solid var(--encre-900);
    box-shadow: 4px 4px 0 0 rgba(15, 30, 46, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.surface-editoriale:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 0 rgba(15, 30, 46, 0.12);
}

/* ── Section avec fond légèrement teinté ── */
.section-tint {
    background-color: var(--papier-100);
    border-top: 1px solid var(--papier-300);
    border-bottom: 1px solid var(--papier-300);
}

/* ── Cartes d'articles ── */
.carte-article {
    border: 1px solid var(--encre-200);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.carte-article:hover {
    border-color: var(--pourpre-400);
    box-shadow: 2px 2px 0 0 rgba(123, 37, 68, 0.08);
}

/* ── Titres dans les cartes ── */
.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--pourpre-700);
}

.card-heading {
    font-family: var(--font-display);
    font-weight: 700;
}

.subheading-pourpre {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--pourpre-700);
}

.subtitle-editorial {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--encre-700);
}

.block-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--encre-900);
}

/* ── Images de livres ── */
.book-cover {
    max-height: 400px;
    object-fit: contain;
}

.pub-img {
    max-height: 200px;
    object-fit: contain;
}

/* ── Badge éditorial ── */
.badge-editorial {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    padding: 0.15em 0.5em;
    background: transparent;
}

.badge-editorial--pourpre {
    color: var(--pourpre-700);
    border-color: var(--pourpre-700);
}

.badge-editorial--encre {
    color: var(--encre-500);
    border-color: var(--encre-500);
}

.badge-editorial-cuivre {
    color: var(--cuivre-700);
    border-color: var(--cuivre-700);
    font-size: 0.5rem;
}

/* ── Icônes réseaux sociaux ── */
.social-icon-lg {
    font-size: 2rem;
    color: var(--pourpre-600);
    display: block;
}

.social-icon-md {
    font-size: 1.5rem;
}

/* ── Avatar utilisateur (page profil) ── */
.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--pourpre-400);
    background: linear-gradient(135deg, var(--pourpre-600), var(--pourpre-700));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: white;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ── Listes de définitions (profil) ── */
.dl-label {
    min-width: 8rem;
}

.dl-value {
    font-family: var(--font-editorial);
    color: var(--encre-800);
}

.stat-value {
    font-size: 0.875rem;
    color: var(--encre-800);
}

/* ── Utilitaires de bordure ── */
.border-top-editorial {
    border-top: 1px solid var(--encre-200) !important;
}

.border-bottom-editorial {
    border-bottom: 1px solid var(--encre-200);
}

/* ── Succès contact ── */
.success-icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background-color: var(--pourpre-100);
    border: 3px solid var(--pourpre-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--pourpre-700);
}

/* ── Liste d'emails (gestion compte) ── */
.email-item {
    border: 1px solid var(--encre-200);
    background: var(--papier-50);
}

.email-address {
    font-size: 0.875rem;
    color: var(--encre-900);
}

/* ── Toasts / messages ── */
.toast-wrapper {
    z-index: 9998;
    width: 100%;
    max-width: 24rem;
}

.toast-editorial {
    box-shadow: 4px 4px 0 0 rgba(15, 30, 46, 0.12);
    border-radius: 0;
    pointer-events: auto;
}

.toast-close {
    margin-top: 1px;
}

/* ── Zone dangereuse (profil) ── */
.danger-panel {
    border: 1px solid var(--pourpre-300);
    background: var(--pourpre-50);
    padding: 1rem;
}

/* ── HTMX : indicateur de chargement ── */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* ── Skeleton loading ── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--papier-200) 25%,
        var(--papier-100) 50%,
        var(--papier-200) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
