/* ============================================================
   ALERTES AGRICOLES
   ============================================================ */

.agri-alert {
    position: relative;
    z-index: 9997;
    padding: 3px;
    font-family: 'Inter', 'Tajawal', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 3px solid;
    animation: slideDown 0.4s ease;
}

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

.agri-alert__content {
    /* max-width: 1200px; */
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.agri-alert__icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.agri-alert__message {
    flex: 1;
}

.agri-alert__message p {
    margin: 0;
}

.agri-alert__message strong {
    font-weight: 700;
}

.agri-alert__close {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    font-size: 2rem;
}

.agri-alert__close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.agri-alert__close:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* ===== Niveaux d'alerte ===== */

/* Info (bleu) ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â par dÃƒÆ’Ã‚Â©faut */
.agri-alert {
    background: #e9f3ea;
    color: #084298;
    border-bottom-color: #009688;
}

/* Warning (orange) */
.agri-alert.agri-alert--warning {
    background: #fff3cd;
    color: #664d03;
    border-bottom-color: #ffc107;
}

/* Danger (rouge) */
.agri-alert.agri-alert--danger {
    background: #f8d7da;
    color: #842029;
    border-bottom-color: #dc3545;
}

/* Success (vert) */
.agri-alert.agri-alert--success {
    background: #d1e7dd;
    color: #0f5132;
    border-bottom-color: #198754;
}

/* ===== RTL (arabe) ===== */
[dir="rtl"] .agri-alert {
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .agri-alert {
        padding: 10px 15px;
        font-size: 0.88rem;
    }
    
    .agri-alert__content {
        gap: 8px;
    }
    
    .agri-alert__icon {
        font-size: 1.1rem;
    }
    
    .agri-alert__close {
        width: 30px;
        height: 30px;
        padding: 6px;
    }
}

/* ===== Mode sombre ===== */
@media (prefers-color-scheme: dark) {
    .agri-alert {
        background: #084298;
        color: #cfe2ff;
    }
    .agri-alert--warning {
        background: #664d03;
        color: #fff3cd;
    }
    .agri-alert--danger {
        background: #842029;
        color: #f8d7da;
    }
}

/* ============================================================
   ALERTE MÃƒÆ’Ã¢â‚¬Â°TÃƒÆ’Ã¢â‚¬Â°O PERSONNALISÃƒÆ’Ã¢â‚¬Â°E (Module HTML)
   ============================================================ */

.caw-custom-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* background: linear-gradient(135deg, #f0f7f0 0%, #e8f3e9 100%); */ /* Fond vert trÃƒÆ’Ã‚Â¨s pÃƒÆ’Ã‚Â¢le */
    border-left: 4px solid var(--agri-green, #2c7b2f); /* Barre verte ÃƒÆ’Ã‚Â  gauche */
    padding: 0.8rem 1.2rem;
    border-radius: 0 8px 8px 0; /* Coins arrondis sauf ÃƒÆ’Ã‚Â  gauche */
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.05); */
    color: #1a4d3a;
    font-family: var(--font-body, 'Inter', sans-serif);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Petit effet au survol */
.caw-custom-alert:hover {
    transform: translateY(-1px);
    /* box-shadow: 0 4px 15px rgba(0,0,0,0.08); */
}

/* Le logo */
.caw-alert-logo {
    height: 35px; /* Taille discrÃƒÆ’Ã‚Â¨te */
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.9; /* LÃƒÆ’Ã‚Â©gÃƒÆ’Ã‚Â¨rement fondu pour ne pas voler la vedette au texte */
}

/* Le texte */
.caw-alert-content {
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1; /* Prend tout l'espace restant */
}

.caw-alert-content strong {
    color: var(--agri-green-dark, #1a4d3a);
    font-weight: 700;
    margin-right: 0.3rem;
}

/* ============================================================
   RESPONSIVE (Mobile)
   ============================================================ */
@media (max-width: 768px) {
    .caw-custom-alert {
        flex-direction: column;
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--agri-green, #2c7b2f);
        border-radius: 0 0 8px 8px;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .caw-alert-logo {
        height: 30px;
    }
}

/* ============================================================
   RTL (Arabe)
   ============================================================ */
[dir="rtl"] .caw-custom-alert {
    border-left: none;
    border-right: 4px solid var(--agri-green, #2c7b2f);
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .caw-alert-content strong {
    margin-right: 0;
    margin-left: 0.3rem;
}