/* --- VARIABLES --- */
:root {
    --primary: #036897;
    --secondary: #00a8cc;
    --danger: #d9534f;
    --bg: #f4f7f9;
    --white: #ffffff;
    --text: #333;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- GÉNÉRAL --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* --- LOGOS (Nouveau) --- */
.login-logo-img {
    max-width: 220px; /* Taille pour la page de connexion */
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}

.navbar-logo-img {
    height: 40px; /* Taille compacte pour la barre de navigation */
    width: auto;
    margin-right: 10px;
}

/* --- LAYOUT & CENTRAGE --- */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    justify-content: center;
    margin-top: 30px;
}

/* --- CARTES --- */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--primary);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card:hover {
    transform: translateY(-10px);
}

/* --- FORMULAIRES & INPUTS --- */
input, select {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0 20px 0;
    border: 2px solid #eee;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 8px rgba(0, 168, 204, 0.2);
}

/* --- BOUTONS PILULES --- */
.btn-action {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: center;
}

.btn-action:hover {
    background: var(--secondary);
    transform: scale(1.02);
}

/* --- HEADER --- */
header {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: 0.3s;
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* --- LOGIN PAGE --- */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.feature { flex: 1; text-align: center; }
.feature i { color: var(--secondary); font-size: 1.2rem; margin-bottom: 5px; }
.feature span { display: block; font-size: 0.7rem; color: #666; font-weight: 600; }

.login-footer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #888;
}

/* --- ALERTES --- */
.alert-success { background: #d4edda; color: #155724; padding: 12px; border-radius: 10px; margin-bottom: 20px; border-left: 5px solid #28a745; text-align: left; }
.alert-danger { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 10px; margin-bottom: 20px; border-left: 5px solid var(--danger); text-align: left; }

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    header { flex-direction: column; gap: 10px; }
    .grid { grid-template-columns: 1fr; }
    .login-card { width: 90%; padding: 25px; }
}

/* --- CSS POUR RENDRE LE LOGO ROND --- */

/* Style pour le logo sur la page de connexion (grand) */
.login-logo-img-round {
    width: 150px; /* Taille du cercle */
    height: 150px; /* Obligatoire : largeur = hauteur pour un cercle parfait */
    border-radius: 50%; /* La magie qui rend le logo rond */
    object-fit: cover; /* Recadre l'image pour qu'elle remplisse le cercle sans se déformer */
    display: block;
    margin: 0 auto 20px auto; /* Centre horizontalement avec de l'espace en dessous */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Ajoute une ombre pour l'effet "badge" */
    border: 3px solid #fff; /* Un petit contour blanc pour le faire ressortir */
}

/* Style pour le logo dans la barre de navigation (petit) */
.navbar-logo-img-round {
    height: 40px; /* Taille compacte */
    width: 40px; /* Obligatoire : largeur = hauteur */
    border-radius: 50%; /* Rend le logo rond */
    object-fit: cover; /* Recadre l'image sans déformation */
    margin-right: 12px; /* Espace entre le logo et le texte "CyberMed" */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Petite ombre */
    border: 1px solid #fff; /* Contour fin */
}