/*
 * Système de notifications (toasts) — Inkwell
 * Couleurs et typographie alignées sur le brandboard
 */

.notifications-conteneur {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.notification {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #ffffff;
    color: var(--couleur-anthracite);
    border-radius: var(--rayon-carte);
    box-shadow: 0 8px 24px rgba(38, 53, 60, 0.16);
    padding: 16px 40px 16px 16px;
    overflow: hidden;
    pointer-events: auto;
    font-family: var(--police-corps);
    animation: notification-entree 0.3s ease forwards;
}

.notification.notification--sortie {
    animation: notification-sortie 0.25s ease forwards;
}

@keyframes notification-entree {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notification-sortie {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

.notification__icone {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
}

.notification--succes .notification__icone {
    background-color: var(--couleur-vert-emeraude);
}

.notification--erreur .notification__icone {
    background-color: var(--couleur-rouge-vif);
}

.notification--avertissement .notification__icone {
    background-color: var(--couleur-ocre);
}

.notification--info .notification__icone {
    background-color: var(--couleur-bleu-vif);
}

.notification__contenu {
    flex: 1;
    padding-top: 4px;
}

.notification__titre {
    font-family: var(--police-titres);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.notification__message {
    font-size: 0.85rem;
    color: rgba(38, 53, 60, 0.75);
    line-height: 1.4;
}

.notification__fermer {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(38, 53, 60, 0.4);
    font-size: 0.85rem;
    border-radius: 50%;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.notification__fermer:hover {
    background-color: rgba(38, 53, 60, 0.08);
    color: var(--couleur-anthracite);
}

.notification__barre-progression {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: rgba(38, 53, 60, 0.1);
}

.notification__barre-progression::after {
    content: '';
    display: block;
    height: 100%;
    background-color: currentColor;
    animation: notification-progression linear forwards;
}

.notification--succes .notification__barre-progression::after { color: var(--couleur-vert-emeraude); }
.notification--erreur .notification__barre-progression::after { color: var(--couleur-rouge-vif); }
.notification--avertissement .notification__barre-progression::after { color: var(--couleur-ocre); }
.notification--info .notification__barre-progression::after { color: var(--couleur-bleu-vif); }

@keyframes notification-progression {
    from { width: 100%; }
    to { width: 0%; }
}

/* Adaptation mobile : notifications pleine largeur en haut de l'écran */
@media (max-width: 576px) {
    .notifications-conteneur {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}