/**
 * Top Message Banner - Frontend Styles
 */

/* Container principal */
#tmb-banner-container {
    position: relative;
    width: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Le bandeau */
.tmb-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 50px 12px 20px;
    min-height: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: tmb-slide-down 0.3s ease-out;
}

@keyframes tmb-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animation de fermeture */
.tmb-banner.tmb-closing {
    animation: tmb-slide-up 0.3s ease-out forwards;
}

@keyframes tmb-slide-up {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Contenu du bandeau */
.tmb-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

/* Icône */
.tmb-banner-icon {
    flex-shrink: 0;
}

.tmb-banner-icon.dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* Message */
.tmb-banner-message {
    font-size: 14px;
    line-height: 1.4;
}

.tmb-banner-message a {
    color: inherit;
    text-decoration: underline;
}

.tmb-banner-message a:hover {
    text-decoration: none;
}

.tmb-banner-message strong,
.tmb-banner-message b {
    font-weight: 600;
}

/* Lien CTA */
.tmb-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 3px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tmb-banner-link:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.tmb-banner-link::after {
    content: '→';
    font-size: 12px;
}

/* Bouton fermer */
.tmb-banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tmb-banner-close:hover {
    opacity: 1;
}

.tmb-banner-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .tmb-banner {
        padding: 10px 45px 10px 15px;
    }

    .tmb-banner-content {
        flex-direction: column;
        gap: 8px;
    }

    .tmb-banner-message {
        font-size: 13px;
    }

    .tmb-banner-link {
        font-size: 13px;
        padding: 6px 14px;
    }

    .tmb-banner-close {
        right: 10px;
        font-size: 22px;
    }
}

@media screen and (max-width: 480px) {
    .tmb-banner {
        padding: 8px 40px 8px 10px;
    }

    .tmb-banner-message {
        font-size: 12px;
    }

    .tmb-banner-icon {
        font-size: 1em;
    }
}

/* État caché */
.tmb-banner.tmb-hidden {
    display: none;
}
