/* ==========================================================================
   ECOPHOT - SYSTÈME D'ALERTES ET MESSAGES UNIFIÉ
   Fichier: 03-components/alerts.css
   ========================================================================== */

/* ==========================================================================
   ALERTES DE BASE
   ========================================================================== */

.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.alert:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Icône d'alerte */
.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Contenu d'alerte */
.alert-content {
    flex: 1;
}

.alert-content h3,
.alert-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.alert-content p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.alert-content p:last-child {
    margin-bottom: 0;
}

.alert-content ul {
    margin: 10px 0 10px 20px;
}

.alert-content li {
    margin-bottom: 5px;
}

/* ==========================================================================
   ALERTES PAR TYPE
   ========================================================================== */

.alert-info {
    background: #e3f2fd;
    border-left-color: var(--primary);
    color: #0d47a1;
}

.alert-info .alert-icon {
    color: var(--primary);
}

.alert-success {
    background: #e8f5e8;
    border-left-color: #28a745;
    color: #155724;
}

.alert-success .alert-icon {
    color: #28a745;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.alert-warning .alert-icon {
    color: #f39c12;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-danger .alert-icon {
    color: #dc3545;
}

/* ==========================================================================
   BOÎTES D'ALERTE SPÉCIALISÉES
   ========================================================================== */

.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #856404;
}

.warning-box h3,
.warning-box h4 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 15px;
}

.success-box {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #155724;
}

.success-box h3,
.success-box h4 {
    color: #155724;
    margin-top: 0;
    margin-bottom: 15px;
}

.danger-box {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #721c24;
}

.danger-box h3,
.danger-box h4 {
    color: #721c24;
    margin-top: 0;
    margin-bottom: 15px;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #0d47a1;
}

.info-box h3,
.info-box h4 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
}

/* ==========================================================================
   ALERTES DE SÉCURITÉ
   ========================================================================== */

.safety-warning {
    display: flex;
    background-color: #ff4646;
    border: 2px solid var(--warning);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 3px 10px rgba(255, 59, 48, 0.2);
    align-items: flex-start;
}

.warning-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    color: var(--warning);
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.warning-content h3 {
    color: var(--warning);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.warning-content p,
.warning-content ul {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.warning-content p:last-child {
    font-weight: bold;
    margin-bottom: 0;
}

.warning-content ul {
    margin-left: 20px;
}

.warning-content ul li {
    margin-bottom: 8px;
}

/* ==========================================================================
   INFORMATIONS D'INSTALLATION
   ========================================================================== */

.installation-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 20px;
    margin: 30px 0;
    border-radius: 5px;
    color: #856404;
}

.installation-info h3,
.installation-info h4 {
    color: #f39c12;
    margin-top: 0;
    margin-bottom: 15px;
}

.installation-info ul {
    margin: 15px 0 15px 20px;
}

.installation-info li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ==========================================================================
   SECTIONS TECHNIQUES MISES EN ÉVIDENCE
   ========================================================================== */

.technical-highlight {
    background-color: #e8f5e8;
    border-left: 4px solid #34a853;
    border-radius: 0 8px 8px 0;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.technical-highlight h4 {
    color: #34a853;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.technical-highlight h4::before {
    content: '⚡';
    margin-right: 8px;
    font-size: 1rem;
}

.technical-highlight p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.technical-highlight p:last-child {
    margin-bottom: 0;
}

/* Mise en évidence de fonctionnalité */
.feature-highlight {
    background: linear-gradient(145deg, #1e7e34 0%, #2e7d32 100%);
    border-left: 5px solid #27ae60;
    padding: 25px;
    margin: 30px 0;
    border-radius: 0 10px 10px 0;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.feature-highlight h4 {
    color: #e8f5e8;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
}

.feature-highlight h4::before {
    content: '✓';
    background-color: #27ae60;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.feature-highlight p {
    color: white;
    margin-bottom: 12px;
    line-height: 1.6;
}

.feature-highlight p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   SECTIONS INFORMATIVES
   ========================================================================== */

.info-section {
    background: #e3f2fd;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-section p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.success-section {
    background: #e8f5e8;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #34a853;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.success-section h3 {
    color: #34a853;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.success-section p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.success-section p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   ALERTES DE DÉVELOPPEMENT
   ========================================================================== */

.development-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.development-warning h3 {
    color: #856404;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.development-warning h3::before {
    content: '🚧';
    font-size: 1.3rem;
}

.development-warning p {
    color: #856404;
    line-height: 1.6;
    margin-bottom: 15px;
}

.development-warning p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   ALERTES DE BUDGET
   ========================================================================== */

.budget-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    color: #856404;
}

.budget-warning p {
    margin: 0;
    font-weight: 500;
}

.budget-bonus {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    color: #155724;
}

.budget-bonus p {
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   HIGHLIGHTS VINTAGE ET SPÉCIALISÉS
   ========================================================================== */

.vintage-highlight {
    background: #fff8dc;
    border-left: 4px solid #daa520;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #8b4513;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vintage-highlight h3,
.vintage-highlight h4 {
    color: #8b4513;
    margin-top: 0;
    margin-bottom: 15px;
}

.vintage-highlight p {
    line-height: 1.6;
    margin-bottom: 12px;
}

.vintage-highlight p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   ALERTES DE STATUT ET PROGRESSION
   ========================================================================== */

.status-banner {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    padding: 15px 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.status-banner::before {
    content: '🚧';
    margin-right: 10px;
    font-size: 1.3rem;
}

/* Conteneur de progression */
.progress-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 1.1em;
}

.progress-body {
    padding: 20px;
}

/* ==========================================================================
   NOTES ET REMARQUES
   ========================================================================== */

.note {
    background: #e8f4f8;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin: 20px 0;
    font-style: italic;
    color: #333;
}

.note::before {
    content: '💡';
    margin-right: 8px;
    font-style: normal;
}

.tech-note {
    background: #e8f4f8;
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.tech-note h4 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
}

.tech-note p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tech-note p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   BOÎTES D'EXEMPLE
   ========================================================================== */

.example-box {
    background-color: #f0f7ff;
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.example-box h4 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
}

.example-box p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.example-box p:last-child {
    margin-bottom: 0;
}

.response-box {
    background-color: #f5f5f5;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.response-box h4 {
    color: #28a745;
    margin-top: 0;
    margin-bottom: 15px;
}

.response-box p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.response-box p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   ALERTES AVEC BOUTONS D'ACTION
   ========================================================================== */

.alert-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.alert-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.alert-btn {
    padding: 6px 12px;
    border: 1px solid currentColor;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.alert-btn:hover {
    background: currentColor;
    color: white;
}

/* ==========================================================================
   ALERTES DISMISSIBLES
   ========================================================================== */

.alert-dismissible {
    position: relative;
    padding-right: 50px;
}

.alert-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: currentColor;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.1);
}

/* Animation de fermeture */
.alert.closing {
    animation: alertSlideOut 0.3s ease forwards;
}

@keyframes alertSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .alert,
    .warning-box,
    .success-box,
    .danger-box,
    .info-box {
        padding: 15px;
        margin: 15px 0;
    }

    .safety-warning {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .warning-icon {
        font-size: 2rem;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .development-warning {
        padding: 25px 20px;
        margin: 30px 0;
    }

    .development-warning h3 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 8px;
    }

    .technical-highlight,
    .feature-highlight {
        padding: 18px 15px;
    }

    .info-section,
    .success-section {
        padding: 20px 15px;
    }

    .alert-with-actions {
        flex-direction: column;
        gap: 15px;
    }

    .alert-actions {
        justify-content: center;
    }

    .progress-header {
        padding: 12px 15px;
    }

    .progress-body {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .alert,
    .warning-box,
    .success-box,
    .danger-box {
        padding: 12px;
        font-size: 0.9rem;
    }

    .alert-content h3,
    .alert-content h4 {
        font-size: 1.1rem;
    }

    .warning-content h3 {
        font-size: 1.2rem;
    }

    .feature-highlight h4 {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .feature-highlight h4::before {
        margin-right: 0;
        margin-bottom: 5px;
        align-self: center;
    }

    .development-warning {
        padding: 20px 15px;
    }

    .development-warning h3 {
        font-size: 1.2rem;
    }

    .status-banner {
        padding: 12px 0;
        font-size: 1rem;
    }

    .alert-dismissible {
        padding-right: 40px;
    }

    .alert-close {
        top: 8px;
        right: 10px;
        width: 20px;
        height: 20px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   ACCESSIBILITÉ
   ========================================================================== */

/* Amélioration du contraste pour les alertes */
.alert[role="alert"] {
    outline: none;
}

/* Focus visible pour les boutons d'alerte */
.alert-btn:focus,
.alert-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   ANIMATIONS D'APPARITION
   ========================================================================== */

.alert.fade-in {
    animation: alertFadeIn 0.3s ease;
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.slide-in {
    animation: alertSlideIn 0.3s ease;
}

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

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .alert,
    .warning-box,
    .success-box,
    .danger-box,
    .info-box,
    .safety-warning {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #333 !important;
        background: white !important;
        color: #000 !important;
    }

    .alert-close,
    .alert-btn {
        display: none !important;
    }

    .development-warning,
    .status-banner {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }

    .alert-icon,
    .warning-icon {
        color: #000 !important;
    }
}