/* =================================== */
/* 1. STYLES GLOBAUX & RESET           */
/* =================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Suppression du soulignement pour TOUS les liens */
a {
  text-decoration: none;
  color: inherit;
}

/* Utilitaires de police */
.poppins-regular { font-weight: 400; font-style: normal; }
.poppins-semibold { font-weight: 600; font-style: normal; }
.poppins-bold { font-weight: 700; font-style: normal; }
.poppins-extrabold { font-weight: 800; font-style: normal; }

/* =================================== */
/* 2. ÉLÉMENTS PARTAGÉS (DRY)          */
/* =================================== */

/* --- A. Navigation du bas (Mobile) --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
}

.bottom-nav .nav-item {
  color: #333;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.1s;
}

.bottom-nav .nav-item:active {
  color: #3B82F6;
  transform: scale(0.9);
}
.bottom-nav .nav-item:hover {
  color: #3B82F6;
}

/* Trucage icône maison vide */
.fa-house-outline {
    color: transparent !important;
    -webkit-text-stroke: 1.5px #333;
}
.nav-item:active .fa-house-outline,
.nav-item:hover .fa-house-outline {
    -webkit-text-stroke: 1.5px #3B82F6;
}

/* --- B. Inputs & Formulaires --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s;
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  border-color: #10b981; /* Vert par défaut pour étudiant */
  outline: none;
}

/* --- C. Boutons Globaux --- */
button, 
.btn, 
.view-btn,
.msg-btn {
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, transform 0.1s ease-out;
  font-family: 'Poppins', sans-serif;
}

/* EFFET PRESSION (TACTILE) */
button:active, 
.btn:active, 
.view-btn:active,
.msg-btn:active,
.back-arrow:active,
.home_link img:active,
.favorite:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* Couleurs Boutons */
.bg-green, 
.btn.green, 
.btn-student, 
body.student-login .login_form button, 
body.inscription-student form button,
.reset-container button {
  background-color: #10b981;
  color: #fff;
}
.bg-green:active, 
.btn.green:active, 
.btn-student:active,
body.student-login .login_form button:active, 
body.inscription-student form button:active,
.reset-container button:active {
  background-color: #059669;
}

.bg-blue, 
.btn.blue, 
.btn-employer,
.msg-btn,
body.accueil-student .msg-btn {
  background-color: #3b82f6;
  color: #fff;
}
.bg-blue:active, 
.btn.blue:active, 
.btn-employer:active,
.msg-btn:active,
body.accueil-student .msg-btn:active {
  background-color: #2563eb;
}

/* --- D. Footer Uniforme (Login/Inscription/Index) --- */
.simple-footer,
body.student-login .footer,
body.inscription-student .footer,
body.index-page footer {
    width: 100%;
    background-color: #e0e0e0; /* Gris uniforme */
    color: #666;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto; /* Pousse en bas */
    font-size: 0.9rem;
}

/* =================================== */
/* 3. PAGES SPÉCIFIQUES                */
/* =================================== */

/* --- Page: Login (login-etudiant.php) --- */
body.student-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: #f8f8f8;
}

body.student-login main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: 40px;
}

/* En-tête aligné (Flèche + Titre) */
body.student-login .title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  width: 100%;
}

body.student-login .title-container img {
  width: 30px;
  height: auto;
  display: block;
}

body.student-login h1 {
  font-size: 28px;
  color: #3B82F6;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

/* --- Modifications pour aérer la page (Login Étudiant) --- */

body.student-login .subtitle {
  font-size: 15px;
  color: #666;
  margin-bottom: 45px; /* Plus d'espace */
  text-align: center;
  max-width: 450px;
  padding: 0 20px;
  line-height: 1.5;
}

body.student-login .login_form {
  background: #fff;
  padding: 45px 35px;  /* Plus d'espace intérieur */
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  width: 90%;
  max-width: 400px;
  margin-bottom: 25px;
}

/* On doit cibler les inputs spécifiquement pour écraser les règles globales */
body.student-login .login_form input[type="email"],
body.student-login .login_form input[type="password"] {
  padding: 16px 20px;  /* Champs plus hauts */
  margin-bottom: 30px; /* Plus d'espace entre eux */
  font-size: 15px;
  border-radius: 8px;
}

body.student-login .login_form button {
  width: 100%;
  padding: 16px;       /* Bouton plus haut */
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  margin-top: 15px;
}

body.student-login .sign_in_link {
  color: #5b9df9;
  font-weight: 600;
}
body.student-login .sign_in_link:active {
  text-decoration: underline;
  color: #2563eb;
}

/* --- Page: Inscription (Inscription_étudiant.php) --- */
body.inscription-student {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: #f8f8f8;
    padding-top: 20px;
}

body.inscription-student .container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* En-tête Inscription (Identique Login) */
body.inscription-student .header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 630px;
}

body.inscription-student .header h1 {
    font-size: 28px;
    color: #3B82F6;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

body.inscription-student .back-arrow img {
    width: 30px;
    height: auto;
    display: block;
    cursor: pointer;
}

body.inscription-student form {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 630px;
    width: 90%;
    margin-bottom: 25px;
}

body.inscription-student form button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
}

body.inscription-student .profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #eee;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    color: #bbb;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.1s;
}
body.inscription-student .profile-photo:active {
    transform: scale(0.95);
    background: #e0e0e0;
}


/* --- Page: Accueil (Accueiletudiant.html) --- */
body.accueil-student {
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  padding-bottom: 70px; /* Espace nav */
}

body.accueil-student main {
  flex: 1;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.accueil-student .logo {
  color: #3b82f6;
  font-size: 2rem;
  font-weight: 700;
  margin: 40px 0;
}

body.accueil-student .btn {
  display: block;
  width: 90%;
  max-width: 360px;
  margin: 10px auto;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 18px;
}

body.accueil-student .profile-card {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  width: 90%;
  max-width: 360px;
  margin: 0 auto 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s;
}
body.accueil-student .profile-card:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

body.accueil-student .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e5e7eb;
  flex-shrink: 0;
}

body.accueil-student .info {
  flex: 1;
  text-align: left;
  margin-left: 12px;
}
body.accueil-student .info h3 { font-weight: 600; margin: 0; }
body.accueil-student .info p { font-size: 0.85rem; color: #666; margin-top: 2px; }

body.accueil-student .bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

body.accueil-student .msg-btn {
  border-radius: 6px;
  font-size: 0.75rem;
  padding: 6px 10px;
}


/* --- Page: Index (Choix Rôle) --- */
body.index-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    padding: 50px 20px 0 20px;
    background: #fff;
}
body.index-page main {
  flex: 1; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
body.index-page h1 {
    color: #3B82F6;
    text-align: center;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
body.index-page h2 {
    text-align: center;
    font-weight: 400;
    margin: 0 10px 30px 10px;
    font-size: 1.2rem;
    color: #111;
}
body.index-page .buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
    max-width: 300px;
}
body.index-page .btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
}


/* --- Page: Profil Étudiant (profil_étudiant.php) --- */
body.profil-student {
  background: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 80px;
}

body.profil-student .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 10;
  height: 60px;
}

body.profil-student .back-arrow {
  color: #3B82F6;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 80px; /* Fixe pour centrer le titre */
}

body.profil-student .header h1 {
    color: #3B82F6;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

body.profil-student .logout-btn {
    color: #ef4444;
    font-size: 1.2rem;
    width: 80px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

body.profil-student .favorite {
  font-size: 26px;
  color: #333;
  cursor: pointer;
  margin-left: 10px;
  transition: transform 0.2s;
}
body.profil-student .favorite:active {
    transform: scale(1.3);
}

body.profil-student .container {
  width: 95%; max-width: 600px; margin: 0 auto; padding: 20px;
}
body.profil-student .profile {
  background: #fff; border-radius: 15px; padding: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
body.profil-student .photo {
  width: 80px; height: 80px; border-radius: 50%;
  background: #ddd; margin: 0 auto; overflow: hidden;
}
body.profil-student .photo img { width: 100%; height: 100%; object-fit: cover; }
body.profil-student .photo.company-logo { border-radius: 15px; }

body.profil-student .name { text-align: center; margin-top: 10px; font-weight: 600; }
body.profil-student .info { margin-top: 20px; }
body.profil-student .info p { margin-bottom: 15px; line-height: 1.5; }
body.profil-student .info strong { display: block; color: #555; margin-bottom: 5px; }

body.profil-student .cv-section {
  display: flex; flex-direction: column; text-align: center;
  background: #f5f5f5; border-radius: 12px;
  padding: 20px; margin: 20px 0; gap: 10px;
}
body.profil-student .cv-icon { font-size: 50px; color: #e74c3c; margin-bottom: 10px; }

/* DEFINITION DES GROS BOUTONS (btn-green et btn-blue) */
body.profil-student .btn-green,
body.profil-student .btn-blue {
    display: block;          /* Prend toute la largeur */
    width: 100%;
    padding: 16px 24px;      /* Gros boutons épais (comme l'accueil) */
    border-radius: 8px;
    font-size: 18px;         /* Texte plus grand */
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: white;            /* Texte blanc */
    margin-bottom: 15px;     /* Espace entre les boutons */
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Couleurs spécifiques */
body.profil-student .btn-green {
    background-color: #10b981; /* Vert */
}
body.profil-student .btn-green:active {
    background-color: #059669; /* Vert foncé au clic */
    transform: scale(0.96);    /* Petit effet de rebond */
}

body.profil-student .btn-blue {
    background-color: #3B82F6; /* Bleu */
}
body.profil-student .btn-blue:active {
    background-color: #2563eb; /* Bleu foncé au clic */
    transform: scale(0.96);    /* Petit effet de rebond */
}

/* --- Page: Messagerie (Messagerie.php) --- */
body.messagerie-page {
  background: white; color: #111;
  display: flex; flex-direction: column; min-height: 100vh;
}

body.messagerie-page header {
  display: flex; align-items: center; padding: 16px; border-bottom: 1px solid #eee;
}
body.messagerie-page header h1 {
  flex: 1; text-align: center; font-size: 1.2rem; font-weight: 600;
}
body.messagerie-page .back-arrow { font-size: 1.4rem; color: #3b82f6; }

body.messagerie-page main {
  flex: 1; padding: 16px; padding-bottom: 120px;
}

body.messagerie-page .message {
  display: flex; align-items: center; border-bottom: 1px solid #eee;
  padding: 10px 0; transition: background 0.1s;
}
body.messagerie-page .message:active { background-color: #f5f5f5; }

body.messagerie-page .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #e5e7eb; margin-right: 12px;
}
body.messagerie-page .content { flex: 1; }
body.messagerie-page .name { font-weight: 600; }
body.messagerie-page .date { color: #555; font-size: 0.85rem; }
body.messagerie-page .content p { color: #777; margin: 4px 0 0 0; font-size: 0.9rem; }

body.messagerie-page .new-message {
  position: fixed; bottom: 80px; left: 16px;
  display: flex; align-items: center; gap: 10px;
  color: #555; transition: transform 0.1s;
}
body.messagerie-page .new-message:active { transform: scale(0.95); }
body.messagerie-page .circle {
  background: #3b82f6; color: white; font-size: 1.8rem;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}


/* --- Page: Chat (Conversation.php) --- */
body.chat-page {
    display: flex; flex-direction: column;
    height: 100vh; height: 100dvh;
    background-color: #ffffff; overflow: hidden;
}

body.chat-page .top-header {
    background: #fff; padding: 10px 15px; display: flex;
    align-items: center; gap: 15px; box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    z-index: 10; border-bottom: 1px solid #eee;
}
body.chat-page .top-header .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
body.chat-page .top-header h2 { font-size: 1.1rem; margin: 0; color: #333; font-weight: 600; }

body.chat-page .messages-container {
    flex: 1; padding: 20px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 8px; background-color: #fff;
}
body.chat-page .date-divider {
    align-self: center; color: #888; font-size: 0.75rem;
    margin: 15px 0; background: #f9f9f9; padding: 4px 10px; border-radius: 10px;
}

body.chat-page .msg {
    max-width: 75%; padding: 10px 16px; border-radius: 18px;
    font-size: 0.95rem; position: relative; word-wrap: break-word;
    display: flex; flex-direction: column; user-select: none;
}
body.chat-page .mine { align-self: flex-end; background-color: #3B82F6; color: white; border-bottom-right-radius: 4px; }
body.chat-page .theirs { align-self: flex-start; background-color: #f1f0f0; color: #333; border-bottom-left-radius: 4px; }
body.chat-page .msg-info { display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: 0.65rem; opacity: 0.8; }
body.chat-page .ticks.read { color: #a5d8ff; }
body.chat-page .ticks.sent { color: #e0e0e0; }

body.chat-page .send-bar {
    background: #fff; padding: 10px 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 10px;
    border-top: 1px solid #eee; z-index: 20;
}
body.chat-page .send-bar input { margin: 0; border-radius: 25px; background: #f9f9f9; }
body.chat-page .send-bar button {
    background: #3B82F6; color: white; padding: 10px;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
body.chat-page .send-bar button:active { background: #2563eb; transform: scale(0.9); }


/* =================================== */
/* STYLES : MOT DE PASSE OUBLIÉ        */
/* =================================== */

body.password-reset {
    font-family: 'Poppins', sans-serif;
    background: #f8f8f8;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.reset-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
    text-align: center; /* Garde le Titre et le texte descriptif centrés */
}

/* AJOUT IMPORTANT : On remet l'alignement à gauche pour l'intérieur du formulaire */
.reset-container form {
    text-align: left;
    width: 100%;
}

.reset-container h1 {
    color: #3B82F6; 
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.reset-container p {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

/* Le Label à gauche */
.reset-container label {
    display: block;
    text-align: left; /* Force l'alignement à gauche */
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.reset-container input[type="email"],
.reset-container input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.reset-container input:focus {
    border-color: #10b981; /* Vert au focus comme le login */
    outline: none;
}

/* Le Bouton : Style identique au login (Largeur 100% + Vert) */
.reset-container button {
    width: 100%;         /* Prend toute la largeur */
    display: block;      /* Comportement bloc */
    background: #10b981; /* Vert */
    color: white;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    margin-top: 5px;
}

.reset-container button:hover {
    background: #059669;
}

.reset-container button:active {
    transform: scale(0.96);
}

.reset-container .back-link {
    display: block;
    margin-top: 20px;
    text-decoration: none;
    color: #3B82F6;
    font-size: 14px;
    font-weight: 500;
    text-align: center; /* Le lien retour reste centré */
}

.reset-container .back-link:hover {
    text-decoration: underline;
}


/* =================================== */
/* STYLES DU MENU CONTEXTUEL (CHAT)    */
/* =================================== */

/* 1. État par défaut : Caché sous l'écran */
#context-menu {
    position: fixed;
    bottom: -100%; 
    left: 0;
    width: 100%;
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.15);
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px; /* Espace barre home */
    overflow: hidden;
}

/* 2. État actif : Remonte à l'écran */
#context-menu.active {
    bottom: 0;
}

/* 3. Style des boutons dans le menu */
.menu-item {
    padding: 16px 20px;
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    background: white;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.menu-item:active { background-color: #f0f0f0; }

#btn-delete { color: #ef4444; }
#btn-delete i { color: #ef4444; }

#btn-cancel {
    justify-content: center;
    font-weight: 600;
    color: #555;
    border-top: 5px solid #f8f8f8;
    margin-top: 5px;
    border-bottom: none;
}

/* 4. L'Overlay */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 900;
    display: none; opacity: 0; transition: opacity 0.3s;
}
#context-menu.active ~ .overlay { display: block; }

/* ================================================= */
/* NO SCROLL & FULLSCREEN : INDEX & LOGIN ETUDIANT   */
/* ================================================= */

html {
    overscroll-behavior: none; /* Bloque l'effet rebond natif */
}

body.index-page,
body.student-login {
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%; /* On remplit la fenêtre visible */
    
    /* GESTION DES ZONES DE SÉCURITÉ (Encoche + Barre du bas) */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    
    /* Important : inclut le padding dans le calcul de la hauteur */
    box-sizing: border-box; 
    
    overflow: hidden; /* Coupe tout ce qui dépasse */
    display: flex;
    flex-direction: column;
    background: #fff; /* Assure que le fond couvre tout */
}

/* Le contenu principal prend toute la place et centre les éléments */
body.index-page main,
body.student-login main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden; /* Empêche le contenu de pousser les murs */
}

/* Le footer ne doit pas écraser le contenu et reste dans la zone visible */
body.index-page footer,
body.student-login .footer {
    flex-shrink: 0;
    width: 100%;
}

/* ================================================= */
/* RESPONSIVE : ADAPTATION PETITS ÉCRANS (Hauteur)   */
/* ================================================= */

@media (max-height: 800px) {
    
    body.student-login .subtitle {
        margin-bottom: 20px;
    }

    body.student-login .login_form {
        padding: 25px 20px;
        margin-bottom: 15px;
    }

    body.student-login .login_form input[type="email"],
    body.student-login .login_form input[type="password"] {
        padding: 12px 15px; 
        margin-bottom: 15px;
    }

    body.student-login .login_form button {
        padding: 12px;
        margin-top: 10px;
    }
}

/* SÉCURITÉ ANTI-COUPURE */
body.student-login main {
    justify-content: center;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
    padding-top: 20px;
}

/* =================================== */
/* 4. SÉCURITÉ MESSAGERIE (NOUVEAU)    */
/* =================================== */

/* Badge pour utilisateur bloqué */
.blocked-badge {
    color: #ef4444;
    font-size: 0.65rem;
    border: 1px solid #ef4444;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
    font-weight: 700;
    vertical-align: middle;
}

/* Style pour conversation bloquée (grisée) */
.conversation-blocked {
    opacity: 0.6;
    background-color: #fcfcfc;
}

/* Texte censuré par le filtre */
.censored-text {
    color: #ef4444;
    font-style: italic;
    font-size: 0.85rem;
}

/* Indicateur de message sécurisé (cadenas) */
.secure-icon {
    font-size: 0.7rem;
    color: #10b981; /* Vert */
    margin-right: 4px;
}

/* ================================================= */
/* 5. STYLES MESSAGERIE (Venant de Messagerie.php)   */
/* ================================================= */
.message-link { text-decoration: none; color: inherit; display: block; }
.message:hover { background-color: #f9f9f9; }
.msg-unread { color: #111; font-weight: 700; }
.msg-read { color: #777; font-weight: 400; }
.red-dot {
    height: 10px; width: 10px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
}

/* ====================================================== */
/* 6. STYLES INSCRIPTION (Venant de Inscription_étudiant) */
/* ====================================================== */
.message-box { padding:10px; border-radius:6px; margin:12px 0; text-align: center; width: 90%; max-width: 630px;}
.success { background:#e6ffed; color:#0b6b2d; border:1px solid #c7f0d0; }
.error { background:#ffecec; color:#8b1e1e; border:1px solid #f0c2c2; }
.small-note { font-size:0.85rem; color:#666; margin-top:6px; }

/* Dropdown checkbox component */
.dropdown-checkbox { position: relative; display: inline-block; width:100%; margin-bottom: 20px; }
.dropdown-checkbox .toggle { display:flex; align-items:center; justify-content:space-between; padding:12px 15px; border:1px solid #ddd; border-radius:8px; background:#fff; cursor:pointer; }
.dropdown-checkbox .toggle .label { color:#333; font-size:14px; }
.dropdown-checkbox .panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50; background:#fff; border:1px solid #ddd; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,0.08); padding:8px; max-height:220px; overflow:auto; display:none; }
.dropdown-checkbox.open .panel { display:block; }
.dropdown-checkbox .option { display:flex; align-items:center; gap:8px; padding:6px 4px; }
.dropdown-checkbox .option input[type="checkbox"] { width:16px; height:16px; margin:0; }
.small-input { width:100% !important; padding:8px !important; margin-top:6px; }
.dropdown-placeholder { color:#666; font-size:0.9rem; margin-top:4px; font-weight: normal;}

@media (max-width:720px) {
  .dropdown-checkbox .panel { max-height:180px; }
}