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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

/* Authentification */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.auth-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 10px;
}

.auth-box h1 {
    color: #1a5276;
    margin-bottom: 10px;
    font-size: 28px;
}

.auth-box p {
    color: #666;
    margin-bottom: 25px;
}

#auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#auth-form input {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#auth-form input:focus {
    outline: none;
    border-color: #2980b9;
}

#auth-form button {
    padding: 15px;
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(41, 128, 185, 0.4);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-weight: 500;
}

/* Interface principale */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
}

header h1 {
    flex: 1;
    font-size: 28px;
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

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

main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

/* Section contrôles */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.selection-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 10px 20px;
    background: #ecf0f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #bdc3c7;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.planning-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.planning-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.pandemic-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.pandemic-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.actes-nr-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.actes-nr-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

.qualite-btn {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    color: white;
}

.qualite-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

/* Section centres */
.centers-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.centers-section h2 {
    color: #1a5276;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #2980b9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.centers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.center-card {
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.center-card:hover {
    border-color: #2980b9;
    box-shadow: 0 5px 20px rgba(41, 128, 185, 0.15);
}

.center-card.selected {
    border-color: #27ae60;
    background: rgba(46, 204, 113, 0.05);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.15);
}

.center-card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.center-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #27ae60;
    flex-shrink: 0;
    margin-top: 5px;
}

.center-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #f5f7fa;
    flex-shrink: 0;
}

.center-info {
    flex: 1;
    min-width: 0;
}

.center-name {
    font-weight: bold;
    color: #1a5276;
    font-size: 16px;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.center-address {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.center-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
    color: #777;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.center-detail {
    display: flex;
    flex-direction: column;
}

.center-detail-label {
    font-weight: 600;
    color: #555;
    font-size: 11px;
    text-transform: uppercase;
}

.center-detail-value {
    color: #333;
}

/* Section progression */
.progress-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.progress-section h3 {
    color: #1a5276;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text {
    color: #666;
    font-weight: 500;
}

/* Footer */
footer {
    background: #1a5276;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    header h1 {
        width: 100%;
        order: -1;
    }

    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }

    .selection-controls,
    .action-buttons {
        justify-content: center;
    }

    .action-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .centers-grid {
        grid-template-columns: 1fr;
    }
}
