/* Style global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #230903 0%, #3d1408 50%, #230903 100%);
    background-attachment: fixed;
    color: #230903;
    min-height: 100vh;
}

/* Conteneur principal */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.6s ease-out;
}

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

/* Section du logo */
.logo-section {
    margin-bottom: 40px;
    text-align: center;
}

.logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(2deg);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5em;
    color: #230903;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 20px 0;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #230903 0%, #e96c30 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: #230903;
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 600;
}

.slogan {
    font-size: 1.1em;
    color: #e96c30;
    margin: 15px 0;
    text-align: center;
    font-style: italic;
    font-weight: 500;
}

/* Description */
.description {
    font-size: 1.05em;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(254, 228, 78, 0.1), rgba(233, 108, 48, 0.1));
    border-left: 4px solid #e96c30;
    border-radius: 8px;
}

/* Champs de formulaire */
input {
    width: 100%;
    margin: 15px 0;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

input:focus {
    outline: none;
    border-color: #e96c30;
    box-shadow: 0 0 0 3px rgba(233, 108, 48, 0.1);
    transform: translateY(-2px);
}

.password-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
}

.password-wrapper button {
    margin: 0;
}

/* Boutons */
button {
    padding: 12px 28px;
    margin: 5px;
    background: linear-gradient(135deg, #230903 0%, #3d1408 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(35, 9, 3, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(254, 228, 78, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    background: linear-gradient(135deg, #e96c30 0%, #ff5491 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 108, 48, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Mot de passe oublié */
.forgot-password {
    margin-top: 10px;
    font-size: 0.9em;
    color: #FF5491;
}

.forgot-password a {
    color: #FF5491;
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Tableau */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    text-align: left;
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

table th, table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

table th {
    background: linear-gradient(135deg, #e96c30 0%, #ff5491 100%);
    color: #FFFFFF;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 10;
}

table tbody tr {
    transition: all 0.3s ease;
    background: white;
}

table tbody tr:hover {
    background: linear-gradient(135deg, rgba(254, 228, 78, 0.1), rgba(233, 108, 48, 0.05));
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

table tbody tr:last-child td {
    border-bottom: none;
}

table td {
    color: #333;
    font-size: 0.95em;
}

/* Status badges */
table td:nth-child(3) {
    font-weight: 600;
}

table td:nth-child(7) {
    font-weight: 600;
}

table td:nth-child(8) {
    font-style: italic;
    font-weight: 500;
}

/* Pied de page */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9em;
}

footer a {
    color: #FEE44E;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #ff5491;
    text-decoration: underline;
}

/* Authentification */
#auth-container {
    text-align: center;
    max-width: 500px;
}

#reset-password-section {
    animation: fadeIn 0.4s ease-out;
}

.reset-description {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, rgba(233, 108, 48, 0.1), rgba(254, 228, 78, 0.1));
    border-radius: 8px;
    border-left: 3px solid #e96c30;
}

.secondary-button {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    margin-top: 10px;
}

.secondary-button:hover {
    background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
}

/* Wrapper pour overflow du tableau */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Adaptation pour les petits écrans */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 15px;
    }

    h1 {
        font-size: 2.2em;
        letter-spacing: 2px;
    }

    h2 {
        font-size: 1.4em;
    }

    .slogan {
        font-size: 0.95em;
    }

    #dashboard-controls {
        flex-direction: column;
        gap: 10px;
    }

    #search-bar {
        width: 100%;
    }

    #logout-button, #download-report-button {
        width: 100%;
    }

    table {
        font-size: 0.85em;
    }

    table th, table td {
        padding: 12px 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    .container {
        padding: 15px;
    }

    table {
        font-size: 0.75em;
    }

    table th, table td {
        padding: 8px 6px;
    }
}

#dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

#search-bar {
    padding: 15px 20px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    flex: 1;
    min-width: 250px;
    transition: all 0.3s ease;
    background: white;
}

#search-bar:focus {
    outline: none;
    border-color: #e96c30;
    box-shadow: 0 0 0 3px rgba(233, 108, 48, 0.1);
}

#logout-button, #download-report-button, #monthly-report-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #e96c30 0%, #ff5491 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 108, 48, 0.3);
}

#monthly-report-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#logout-button:hover, #download-report-button:hover {
    background: linear-gradient(135deg, #ff5491 0%, #e96c30 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 108, 48, 0.4);
}

#monthly-report-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#manual-request-button {
    padding: 15px 35px;
    background: linear-gradient(135deg, #230903 0%, #3d1408 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(35, 9, 3, 0.3);
    width: 100%;
}

#manual-request-button:hover {
    background: linear-gradient(135deg, #e96c30 0%, #ff5491 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 108, 48, 0.4);
}

/* Badges et indicateurs de statut */
.status-badge, .email-badge, .state-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-badge.status-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.status-badge.status-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.status-badge.status-unknown {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.email-badge.email-sent {
    background: linear-gradient(135deg, #ff5491, #e96c30);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 84, 145, 0.3);
}

.email-badge.email-not-sent {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

.state-badge.state-ok {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.state-badge.state-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: shake 0.5s;
}

.state-badge.state-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.time-value {
    font-weight: 600;
    color: #10b981;
}

.time-na {
    color: #9ca3af;
    font-style: italic;
}

.url-link {
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.url-link:hover {
    color: #e96c30;
    text-decoration: underline;
}
#add-site-form-container {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(254, 228, 78, 0.1), rgba(233, 108, 48, 0.1));
    border-radius: 12px;
    border: 2px solid #e96c30;
    box-shadow: 0 4px 15px rgba(233, 108, 48, 0.1);
}

#add-site-form-container h3 {
    margin-bottom: 20px;
    color: #230903;
    font-size: 1.4em;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

#add-site-form input {
    width: 100%;
    margin: 0;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1em;
    background-color: white;
    color: #230903;
    transition: all 0.3s ease;
}

#add-site-form input:focus {
    outline: none;
    border-color: #e96c30;
    box-shadow: 0 0 0 3px rgba(233, 108, 48, 0.1);
    transform: translateY(-2px);
}

#add-site-form button {
    padding: 15px 35px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    width: 100%;
}

#add-site-form button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

#add-site-form button:active {
    transform: translateY(0);
}

/* Delete button */
.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #6b7280;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
