/* ===== STYLES GÉNÉRAUX / RÉINITIALISATION ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #e0e0ff;
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ===== STRUCTURE COMMUNE ===== */
.header-principal {
    background: rgba(15, 12, 41, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border: 2px solid #4a00e0;
    box-shadow: 0 0 20px rgba(74, 0, 224, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #8e94f2;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.nav-links a:hover {
    background: linear-gradient(45deg, #4a00e0, #8e2de2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 45, 226, 0.4);
}

.nav-links a.active {
    background: linear-gradient(45deg, #8e2de2, #4a00e0);
    color: white;
    border-color: #8e94f2;
}

/* Pied de page */
.footer-principal {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    border-top: 1px solid #302b63;
    color: #8e94f2;
    font-size: 0.9rem;
}

/* ===== ÉTATS DE CONNEXION ===== */
.user-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    color: #8e94f2;
    font-size: 0.9rem;
}

.btn-logout {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    padding: 6px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.4);
}

/* Cache les éléments selon l'état */
.hidden {
    display: none !important;
}

/* ===== STYLES DES FORMULAIRES ===== */
.form-container {
    background: rgba(20, 18, 58, 0.9);
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #4a00e0;
    box-shadow: 0 0 30px rgba(74, 0, 224, 0.2);
}

.form-title {
    color: #8e94f2;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #8e2de2;
    text-align: center;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #b8bcff;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(30, 27, 75, 0.7);
    border: 1px solid #4a00e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #e0e0ff;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #8e2de2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.3);
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    background: linear-gradient(45deg, #4a00e0, #8e2de2);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(142, 45, 226, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
}
.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #00b09b, #96c93d);
}
.btn-success:hover {
    box-shadow: 0 4px 15px rgba(0, 176, 155, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #f7971e, #ffd200);
}
.btn-warning:hover {
    box-shadow: 0 4px 15px rgba(247, 151, 30, 0.4);
}

/* ===== PAGE ACCUEIL ===== */
.page-accueil .hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(74, 0, 224, 0.8), rgba(142, 45, 226, 0.8));
    color: white;
    border-radius: 15px;
    margin-bottom: 40px;
    border: 2px solid #8e94f2;
}

.page-accueil .hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-accueil .hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.page-accueil .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(20, 18, 58, 0.9);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #4a00e0;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #8e2de2;
    box-shadow: 0 8px 25px rgba(142, 45, 226, 0.3);
}

.feature-card h3 {
    color: #8e94f2;
    margin-bottom: 15px;
}

.feature-card p {
    color: #b8bcff;
    margin-bottom: 20px;
}

/* ===== PAGE LOGIN ===== */
.page-login .form-container {
    max-width: 450px;
}

.page-login .options {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
}

.page-login .options a {
    color: #8e94f2;
    text-decoration: none;
}

.page-login .options a:hover {
    text-decoration: underline;
}

/* Messages */
.success-message {
    background: rgba(0, 176, 155, 0.2);
    color: #96c93d;
    border: 1px solid #00b09b;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-message {
    background: rgba(255, 65, 108, 0.2);
    color: #ff8fa3;
    border: 1px solid #ff416c;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===== PAGE MODIFICATION ===== */
.page-modif .creneaux-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.page-modif .creneau-form,
.page-modif .creneau-list {
    background: rgba(20, 18, 58, 0.9);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #4a00e0;
}

.page-modif .creneau-list {
    max-height: 600px;
    overflow-y: auto;
}

.page-modif .horaire-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(30, 27, 75, 0.7);
    border-radius: 6px;
}

.page-modif .creneau-card {
    background: rgba(30, 27, 75, 0.7);
    border-left: 4px solid #8e2de2;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.page-modif .equipement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.page-modif .equipement-item {
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.page-modif .equipement-reserved {
    background: rgba(255, 65, 108, 0.2);
    color: #ff8fa3;
    border: 1px solid #ff416c;
}

.page-modif .equipement-free {
    background: rgba(0, 176, 155, 0.2);
    color: #96c93d;
    border: 1px solid #00b09b;
}

.page-modif .info-box {
    background: rgba(74, 0, 224, 0.2);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #8e2de2;
    margin-bottom: 25px;
}

/* ===== PAGE RÉSERVATION ===== */
.page-reservation .reservation-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.page-reservation .step {
    background: rgba(20, 18, 58, 0.9);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #4a00e0;
    margin-bottom: 20px;
}

.page-reservation .step-title {
    color: #8e94f2;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #8e2de2;
}

.page-reservation .equipement-option {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    background: rgba(74, 0, 224, 0.2);
    border: 2px solid #4a00e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-align: center;
    min-width: 70px;
}

.page-reservation .equipement-option:hover {
    background: linear-gradient(45deg, #4a00e0, #8e2de2);
    color: white;
    transform: scale(1.05);
}

.page-reservation .equipement-option.selected {
    background: linear-gradient(45deg, #8e2de2, #4a00e0);
    color: white;
    transform: scale(1.05);
}

.page-reservation .equipement-option.reserved {
    background: rgba(255, 65, 108, 0.2);
    border-color: #ff416c;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-reservation .confirmation-box {
    background: rgba(0, 176, 155, 0.2);
    border: 1px solid #00b09b;
    color: #96c93d;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

.page-reservation .pin-display {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 5px;
    background: rgba(20, 18, 58, 0.9);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 10px 0;
    border: 2px dashed #96c93d;
}

/* ===== PAGE ADMIN ===== */
.page-admin .users-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.page-admin .user-form-card,
.page-admin .users-list-card {
    background: rgba(20, 18, 58, 0.9);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #4a00e0;
}

.page-admin .users-list-card {
    max-height: 600px;
    overflow-y: auto;
}

.page-admin .user-card {
    background: rgba(30, 27, 75, 0.7);
    border-left: 4px solid #8e2de2;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 10px;
}

.role-super_admin {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    color: white;
}

.role-admin {
    background: #4a00e0;
    color: white;
}

.role-gerant {
    background: #8e2de2;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.status-active {
    background: rgba(0, 176, 155, 0.3);
    color: #96c93d;
}

.status-inactive {
    background: rgba(255, 65, 108, 0.3);
    color: #ff8fa3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(20, 18, 58, 0.9);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #4a00e0;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #8e94f2;
}

.stat-label {
    font-size: 0.9rem;
    color: #b8bcff;
    margin-top: 5px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header-principal {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
        gap: 15px;
    }
    
    .page-accueil .hero h1 {
        font-size: 2rem;
    }
    
    .page-accueil .features {
        grid-template-columns: 1fr;
    }
    
    .page-modif .creneaux-container,
    .page-reservation .reservation-flow,
    .page-admin .users-container {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-accueil .hero {
        padding: 40px 15px;
    }
    
    .btn {
        padding: 10px 20px;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 27, 75, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4a00e0, #8e2de2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #8e2de2, #4a00e0);
}

