/**
 * Styles communs pour les blocs Medal of Honor
 * (Chargés dans l'éditeur ET le frontend)
 */

/* === VARIABLES CSS PARTAGÉES === */
:root {
    --moh-primary: #8B4513;
    --moh-secondary: #D2691E;
    --moh-accent: #CD853F;
    --moh-text: #2C1810;
    --moh-bg: #F5F5DC;
    --moh-white: #FFFFFF;
    --moh-border-radius: 8px;
    --moh-transition: all 0.3s ease;
}

/* === LOADING STATES === */
.moh-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.moh-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--moh-accent);
    border-radius: 50%;
    border-top-color: transparent;
    animation: moh-spin 1s linear infinite;
    z-index: 10;
}

@keyframes moh-spin {
    to { transform: rotate(360deg); }
}

/* === UTILITAIRES === */
.moh-text-center {
    text-align: center;
}

.moh-text-left {
    text-align: left;
}

.moh-text-right {
    text-align: right;
}

.moh-mb-0 { margin-bottom: 0; }
.moh-mb-1 { margin-bottom: 8px; }
.moh-mb-2 { margin-bottom: 16px; }
.moh-mb-3 { margin-bottom: 24px; }
.moh-mb-4 { margin-bottom: 32px; }

.moh-mt-0 { margin-top: 0; }
.moh-mt-1 { margin-top: 8px; }
.moh-mt-2 { margin-top: 16px; }
.moh-mt-3 { margin-top: 24px; }
.moh-mt-4 { margin-top: 32px; }

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.fadeInUp {
    animation-name: fadeInUp;
}

/* === SYSTÈME DE NOTIFICATIONS === */
#moh-notifications {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.moh-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--moh-white);
    border: 1px solid #E9ECEF;
    border-left: 4px solid var(--moh-primary);
    border-radius: var(--moh-border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: var(--moh-transition);
}

.moh-notification.visible {
    opacity: 1;
    transform: translateX(0);
}

.moh-notification-success {
    border-left-color: #28A745;
}

.moh-notification-error {
    border-left-color: #DC3545;
}

.moh-notification-warning {
    border-left-color: #FFC107;
}

.moh-notification-info {
    border-left-color: #17A2B8;
}

.moh-notification-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.moh-notification-icon::before {
    font-family: dashicons;
    font-size: 16px;
}

.moh-notification-success .moh-notification-icon::before {
    content: '\f147';
    color: #28A745;
}

.moh-notification-error .moh-notification-icon::before {
    content: '\f335';
    color: #DC3545;
}

.moh-notification-warning .moh-notification-icon::before {
    content: '\f534';
    color: #FFC107;
}

.moh-notification-info .moh-notification-icon::before {
    content: '\f348';
    color: #17A2B8;
}

.moh-notification-message {
    font-size: 14px;
    line-height: 1.4;
    color: var(--moh-text);
}

.moh-notification-close {
    background: none;
    border: none;
    color: var(--moh-text);
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    opacity: 0.5;
    transition: var(--moh-transition);
}

.moh-notification-close:hover {
    opacity: 1;
}

/* === TOOLTIPS === */
.moh-tooltip {
    position: fixed;
    z-index: 10000;
    padding: 8px 12px;
    background: var(--moh-text);
    color: var(--moh-white);
    font-size: 12px;
    line-height: 1.3;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    max-width: 200px;
}

.moh-tooltip.visible {
    opacity: 1;
}

.moh-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--moh-text);
}
