* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Trebuchet MS', sans-serif;
    background-color: #f4f7f6;
    color: #91999F; /* gris */
}

header {
    background-color: #00A3E0; /* bleu */
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.stats-header {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.date-divider {
    color: #00A3E0;
    font-weight: bold;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #91999F;
    padding-bottom: 5px;
}

.date-divider i { margin-right: 10px; }

.mail-item {
    background: white;
    border-left: 5px solid #73C92D; /* vert */
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.mail-item:hover { transform: scale(1.01); }

.mail-info { flex: 1; }
.mail-info strong { display: block; color: #333; margin-bottom: 3px; }

.mail-actions { margin-left: 20px; }

.delete-btn {
    color: #e74c3c; /* rouge corbeille */
    cursor: pointer;
    font-size: 1.2rem;
    background: none;
    border: none;
    padding: 10px;
}

.delete-btn:hover { color: #c0392b; }

#loader {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #00A3E0;
}

.stats-header {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid transparent;
}

.stats-header:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stats-header.active {
    background: white;
    color: #00A3E0;
    font-weight: bold;
}

.mail-item.is-filtered {
    border-left-color: #91999F; /* bordure grise pour les spams */
    opacity: 0.8;
}

#view-title {
    color: #91999F;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

/* bouton désinscription */
.unsub-btn {
    color: #73C92D; /* vert */
    margin-right: 15px;
    font-size: 1.1rem;
    text-decoration: none;
}

/* styles du modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 2px solid #00A3E0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    color: #91999F;
    font-size: 1.5rem;
    cursor: pointer;
}

.mail-item { cursor: pointer; }

/* l'heure au-dessus du titre */
.mail-time-top {
    display: block;
    font-size: 0.75rem;
    color: #91999F; /* gris */
    margin-bottom: 2px;
}

/* alignement des boutons sur la même ligne à droite */
.mail-actions-row {
    display: flex;
    align-items: center;
    gap: 15px; /* espace entre les deux boutons */
    margin-left: 15px;
}

.unsub-btn {
    color: #73C92D; /* vert */
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.unsub-btn:hover {
    transform: scale(1.2);
}

.delete-btn {
    color: #e74c3c; /* rouge corbeille */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}


@media (max-width: 600px) {
    .header-content { flex-direction: column; text-align: center; gap: 10px; }
}
