/* Notimail - Styles CSS complets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #008586 0%, #164287 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
}

/* Header */
.header {
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Page d'accueil */
.role-selector {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 40px;
    margin: 0;
    background: linear-gradient(135deg, #008586 0%, #164287 100%);
    position: relative;
    align-items: center;
    justify-content: center;
}

.welcome-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: center;
    margin-bottom: 30px;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    max-height: 80px;
    width: auto;
}

.client-button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.role-btn-client {
    padding: 16px 32px;
    font-size: 18px;
    border-radius: 12px;
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    width: 80%;
    max-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.role-btn-client:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background: linear-gradient(45deg, #009a9b, #1a4b98);
}

.manager-link-container {
    text-align: center;
}

.manager-link-bottom {
    color: white;
    font-size: 12px;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.7);
    text-underline-offset: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.manager-link-bottom:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration-color: white;
}

/* Formulaires de connexion */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #008586;
    box-shadow: 0 0 0 3px rgba(0, 133, 134, 0.1);
}

/* Boutons */
.btn {
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #495057);
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.btn-success {
    background: linear-gradient(45deg, #008586, #164287);
}

.btn-small {
    padding: 6px 12px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    width: auto !important;
}

/* Dashboard */
.dashboard {
    padding: 30px;
}

.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.nav-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-tab.active {
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Grille des personnes */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.person-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.person-card:hover {
    border-color: #008586;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.person-card.selected {
    border-color: #008586;
    background: linear-gradient(45deg, rgba(0, 133, 134, 0.1), rgba(22, 66, 135, 0.1));
}

.person-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    border: 2px solid #008586;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #008586;
    font-weight: bold;
}

.person-card.selected .person-checkbox {
    background: #008586;
    color: white;
}

.person-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.person-info {
    color: #666;
    margin-bottom: 5px;
}

/* Statuts de notification */
.notification-status {
    margin-top: 15px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-received {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-none {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* Auto-refresh */
.auto-refresh-label-small {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.auto-refresh-label-small:hover {
    background: #e9ecef;
}

.auto-refresh-label-small input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    cursor: pointer;
    transform: scale(0.9);
}

.auto-refresh-label-small span {
    white-space: nowrap;
    font-size: 13px;
}

.btn-refreshing {
    animation: blink 1s ease-in-out;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.last-update {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Tableau */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th {
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
    padding: 15px;
    text-align: left;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Dashboard Client */
.client-dashboard {
    text-align: center;
    padding: 40px 30px;
    max-width: 600px;
    margin: 0 auto;
}

.mail-status {
    margin: 30px 0;
    padding: 40px 30px;
    border-radius: 15px;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.has-mail {
    background: linear-gradient(45deg, #fff5f5, #ffe6e6);
    border: 2px solid #fecaca;
    color: #721c24;
}

.no-mail {
    background: linear-gradient(45deg, #f0fdff, #e6fffa);
    border: 2px solid #a7f3d0;
    color: #0c5460;
}

.mail-status h3 {
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.mail-status p {
    margin: 15px 0;
}

.mail-status .btn {
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mail-status .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Messages d'erreur et succès */
.error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.success {
    color: #28a745;
    font-size: 14px;
    margin-top: 5px;
}

/* Types de notifications dans l'historique */
.notification-type {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    min-width: 60px;
}

.type-email {
    background: linear-gradient(45deg, #008586, #164287);
    color: white;
}

.type-sms {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.type-reception {
    background: linear-gradient(45deg, #6f42c1, #e83e8c);
    color: white;
}

.status-badge {
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.status-envoye {
    background: #d4edda;
    color: #155724;
}

.status-confirme {
    background: #cce7ff;
    color: #004085;
}

.status-erreur {
    background: #f8d7da;
    color: #721c24;
}

.status-non-configure {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

/* Responsive */
@media (max-width: 768px) {
    .people-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .role-selector {
        padding: 20px;
    }
    
    .welcome-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .role-btn-client {
        padding: 14px 28px;
        font-size: 16px;
        width: 90%;
    }
    
    .main-logo {
        max-height: 60px;
    }
    
    .manager-link-bottom {
        font-size: 11px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .container {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .auto-refresh-label-small {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .auto-refresh-label-small span {
        font-size: 11px;
    }
    
    .btn-small {
        padding: 4px 8px !important;
        font-size: 12px !important;
    }
}