/* =========================================================
   1. VARIABLES ET RESET
   ========================================================= */
:root {
    --orange-glow: #ff7f50;
    --orange-dark: #cc6640;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   2. BOUTONS GÉNÉRAUX
   ========================================================= */
.btn {
    display: inline-flex;       /* Aligne l'icône et le texte parfaitement */
    align-items: center;        /* Centre verticalement le contenu */
    justify-content: center;    /* Centre horizontalement le contenu */
    padding: 8px 18px;          /* Augmenté légèrement pour un meilleur confort */
    border-radius: 5px;
    font-size: 12px !important;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.2;           /* Fixe la hauteur de la ligne de texte */
    text-decoration: none;      /* Enlève le soulignement du lien déconnexion */
    transition: background-color 0.3s, transform 0.3s;
    box-sizing: border-box;     /* Assure que le padding n'ajoute pas de taille extra */
}

.btn-danger {
    text-decoration: none;
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger i {
    margin-right: 8px;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-primary {
    text-decoration: none;
    background-color: var(--orange-glow);
    color: #fff;
}

.btn-primary:hover { 
    background-color: var(--orange-dark); 
}

.btn-primary i {
    margin-right: 8px;
}

/* =========================================================
   3. HEADER ET NAVIGATION
   ========================================================= */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px var(--shadow-light);
    padding: 20px 50px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-title h1 {
    color: var(--orange-glow);
    font-size: 1.8rem;
}

.logo-area {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 7px;
}

.logo-img {
    height: 70px; 
    width: auto;
    display: block;
}

.welcome-message {
    margin: 0;
    font-family: inherit !important; 
    font-size: 0.9rem !important;
    color: #555;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* =========================================================
   4. HUB (TABLEAU DE BORD)
   ========================================================= */
main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.hub-card {
    background: var(--white);
    padding: 20px 15px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 12px var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.hub-card i {
    font-size: clamp(1.5rem, 5vw, 2.5rem); 
    color: var(--orange-glow);
    transition: transform 0.3s ease;
}

.hub-info h3 {
    font-size: 1rem; /* Titre plus petit */
    margin-bottom: 5px;
}

.hub-info p {
    font-size: 0.85rem; /* Description plus discrète */
    opacity: 0.8;
}

.hub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.hub-card:hover i {
    transform: scale(1.1);
    
}

.hub-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hub-info { text-align: center; }
.hub-header { text-align: center; margin-bottom: 20px; }

/* =========================================================
   5. PAGE DE CONNEXION (LOGIN) - SORTIE DU MEDIA QUERY
   ========================================================= */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-header { margin-bottom: 25px; }
.login-header h2 { font-size: 1.8rem; color: var(--text-color); margin-top: 10px; }
.login-icon { font-size: 3rem; color: var(--orange-glow); }

.input-group { text-align: left; margin-bottom: 20px; }
.input-group label { display: block; font-weight: bold; margin-bottom: 8px; color: #555; }

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--orange-glow);
    outline: none;
    box-shadow: 0 0 5px rgba(255, 127, 80, 0.3);
}

.btn-primary-login {
    background-color: var(--orange-glow);
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary-login:hover { 
    background-color: var(--orange-dark); 
}

.message-box.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* =========================================================
   6. RESPONSIVE (À METTRE TOUJOURS À LA FIN)
   ========================================================= */
@media (max-width: 768px) {
    header {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 20px !important;
    }
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    background-color: #fff;
    color: #888;
}