/* ===========================================================
   Bandeau d'annonce - fine bande tout en haut, au-dessus du header
   =========================================================== */

.announcement-banner {
    position: relative;
    z-index: 60; /* au-dessus du header public (z 50) */
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 0.5rem 1rem;
    color: #fff;
    transition: opacity 180ms ease, transform 180ms ease;
}

.announcement-banner--dismissing {
    opacity: 0;
    transform: translateY(-4px);
}

/* Variantes */
.announcement-banner--info {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
}
.announcement-banner--success {
    background: linear-gradient(90deg, #059669, #10b981);
}
.announcement-banner--warning {
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #fff7ed;
}
.announcement-banner--promo {
    background: linear-gradient(90deg, #C8102E 0%, #7c0f1f 100%);
}
.announcement-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-right: 2rem; /* espace pour la croix */
    position: relative;
}

/* Abonnement perdu : une bande sobre et basse, sur UNE ligne, bouton a droite.
   L'orange d'alerte hurlait sur toutes les pages pour une information qui se
   lit une fois (demande du PO, 2026-10-19). */
.announcement-banner--abonnement {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.3rem 1rem;
    font-size: 0.82rem;
}
.announcement-banner--abonnement strong { color: #fff; }

.announcement-banner__inner--split {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    padding-right: 0;
}
.announcement-banner__inner--split .announcement-banner__message {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announcement-banner__action {
    flex: none;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    background: #C8102E;
    color: #fff;
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
}
.announcement-banner__action:hover { background: #a60d26; }
/* Sous 640 px, la regle maison tronque le message : le bouton, lui, garde sa
   taille et reste a droite. */
@media (max-width: 640px) {
    .announcement-banner__inner--split { justify-content: space-between; }
}



.announcement-banner__message {
    font-weight: 500;
}

.announcement-banner__link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.announcement-banner__link:hover {
    text-decoration: none;
}

.announcement-banner__close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 120ms ease, background 120ms ease;
    padding: 0;
}
.announcement-banner__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile : tronque le message plutôt que de wrapper salement */
@media (max-width: 640px) {
    .announcement-banner {
        font-size: 0.8125rem;
    }
    .announcement-banner__inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    .announcement-banner__message {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1 1 auto;
    }
    .announcement-banner__link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Preview dans l'admin : la même chose mais sans sticky */
.announcement-banner--preview {
    border-radius: 6px;
    margin-top: 0.5rem;
}

/* ===========================================================
   Admin - section Apparence
   =========================================================== */

.admin-appearance-group {
    margin-bottom: 1.5rem;
}

.admin-appearance-group__header {
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.admin-appearance-group__header h2 {
    margin: 0;
    font-size: 1.125rem;
}

.admin-appearance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1rem;
}

.admin-appearance-card {
    background: #fff;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.admin-appearance-card:hover {
    border-color: #C8102E;
    box-shadow: 0 2px 12px rgba(200, 16, 46, 0.08);
}
.admin-appearance-card.is-enabled {
    border-left: 3px solid #059669;
}
.admin-appearance-card.is-disabled {
    border-left: 3px solid #d1d5db;
}

.admin-appearance-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-appearance-card__icon {
    font-size: 1.5rem;
    line-height: 1;
}
.admin-appearance-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.admin-appearance-card__desc {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
    flex: 1 1 auto;
}
.admin-appearance-card__meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}
.admin-appearance-card__foot {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

/* Configure page */
.admin-appearance-configure__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.admin-appearance-configure__icon {
    font-size: 2.5rem;
    line-height: 1;
}
.admin-appearance-configure__header h2 {
    margin: 0 0 0.25rem;
}

.admin-appearance-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.admin-appearance-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.admin-appearance-field--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.admin-appearance-field input[type="text"],
.admin-appearance-field input[type="datetime-local"],
.admin-appearance-field select,
.admin-appearance-field textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    font-size: 0.9rem;
}
.admin-appearance-field input:focus,
.admin-appearance-field select:focus,
.admin-appearance-field textarea:focus {
    outline: none;
    border-color: #C8102E;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.admin-appearance-redisplay {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.admin-appearance-redisplay .admin-setting__label em {
    color: #7c2d12;
}

.admin-appearance-preview {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}
.admin-appearance-preview__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.admin-divider {
    border: 0;
    border-top: 1px solid var(--color-border, #e5e7eb);
    margin: 1rem 0 0;
}

.admin-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.admin-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}
.admin-breadcrumb a:hover {
    color: #111827;
    text-decoration: underline;
}

.admin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.admin-badge--ok {
    background: #d1fae5;
    color: #065f46;
}
.admin-badge--muted {
    background: #f3f4f6;
    color: #6b7280;
}

@media (max-width: 640px) {
    .admin-appearance-field--grid {
        grid-template-columns: 1fr;
    }
}

/* Bandeau « confirmez votre adresse email » : deux actions a droite du message. */
.email-verif-banner .announcement-banner__inner {
    padding-right: 0;
}
.email-verif-banner__form {
    margin: 0;
}
.email-verif-banner__btn {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #fff;
    background: #fff;
    color: #92400e;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.email-verif-banner__btn:hover {
    background: #fff7ed;
}
.email-verif-banner__btn--ghost {
    background: transparent;
    color: #fff;
}
.email-verif-banner__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.15);
}
.email-verif-banner__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
