/* ==========================================
   THEME SOMBRE MODERNISÉ
   Palette : #0D1117, #1E2636, #C81417, #FFFFFF
   ========================================== */

:root {
  --bg-color: #FFFFFF;
  --surface-color: #171F36;
  --text-color: #E6E6E6;
  --text-muted: #E6E6E6;
  --accent-color: #ffffff;
  --border-color: #2C3548;
  --success: #2ecc71;
  --warning: #f1c40f;
  --error: #e74c3c;
}

* {
  box-sizing: border-box;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

/* === GLOBAL === */
body {
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: url("../images/back.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ==========================================
   LOGIN
========================================== */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url("../images/back.jpeg"); /* même fond que les autres pages */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: Inter, Arial, sans-serif;
}

.login-card {
    padding: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.login-container {
    display: flex;
    flex-direction: column;
    background: rgba(23, 31, 54, 0.95);
    border-radius: 15px;
    padding: 10px 10px;
    width: 350px;
    gap: 10px;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.login-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
}

.login-logo img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

.login-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    color: #fff;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.login-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #2C3548;
    border-radius: 8px;
    background: #11151f;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-form input:focus,
.login-form select:focus {
    border-color: #C81417;
    box-shadow: 0 0 6px rgba(200,20,23,0.4);
    outline: none;
}

.submitLogin {
    width: 40%;
    background-color: #C81417;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.submitLogin:hover {
    background-color: #a31213;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(200,20,23,0.3);
}

.muted {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-top: 10px;
}

/* Responsive pour petits écrans */
@media (max-width: 500px) {
    .login-container {
        width: 90%;
        padding: 20px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-logo img {
        max-width: 50px;
        max-height: 50px;
    }
}


/* ==========================================
   TOPBAR / HEADER
========================================== */

.topbar {
    display: flex;
    align-items: center;
    text-decoration:none;
    justify-content: space-between; /*Logo à gauche, menu à droite */
    background-color: #171F36;
    color: #FFFFFF;
    padding: 10px 40px;
    border-bottom: 3px solid #ffffff;
    font-size:14px
}

/* Bloc gauche */
.container-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.LogoBMPM {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.site-title {
  font-size: 1.6em;
  margin: 0;
}

/* Bloc navigation (à droite) */
.container {
  margin-left: auto;
  max-width: 1500px;
  padding: 25px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar nav a,
.topbar nav .dropbtn {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.topbar nav a:hover,
.topbar nav .dropbtn:hover {
  background: #C81417;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(200,20,23,0.3);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block; /* important pour que hover fonctionne */
}

.dropbtn {
  display: inline-block; /* pour que hover couvre tout le bouton */
  cursor: pointer;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;  /* juste sous le bouton */
  left: 0;
  background: #0D1117;
  border: 1px solid #2C3548;
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  z-index: 20;
}

.dropdown-content a {
  display: block;
  padding: 10px 14px;
  color: #E6E6E6;
  text-decoration: none;
  transition: background 0.3s ease;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: #C81417;
  color: white;
}

.dropdown:hover .dropdown-content {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   TITRES
========================================== */

h1, h2, h3, h4 {
  font-weight: 600;
}

h3 { color: #272727; }
h4 { color: #ffffff; }

/* ==========================================
   CARTES / BOXES
========================================== */

.containerBox {
  max-width: 1000px;
  margin: 24px auto;
  padding: 16px;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 12px;
}

/* ==========================================
   CARROUSEL
========================================== */

.carousel-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  height: 350px;
  margin: 40px auto 20px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.carousel {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Flèches */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(23,31,54,0.7);
  border: none;
  color: white;
  font-size: 28px;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.carousel-btn:hover {
  background: #C81417;
}

.prev { left: 10px; }
.next { right: 10px; }

/* ==========================================
   TABLEAUX
========================================== */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-color);
  border-radius: 10px;
  overflow: hidden;
}

.table th {
  background: #111827;
  color: #fff;
  padding: 12px 10px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 10px;
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
}

.table tr:hover {
  background: rgba(255,255,255,0.04);
}

/* ==========================================
   FORMULAIRES
========================================== */

input, select, textarea {
  background: #11151f;
  color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 5px rgba(200,20,23,0.4);
}

/* ==========================================
   BOUTONS
========================================== */

.btn, button, .button-link {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:hover, button:hover, .button-link:hover {
  background: #a31213;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: #fff;
}

/* ==========================================
   ALERTES 
========================================== */

.alert-success, .alert-warning, .alert-error {
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  margin: 15px auto;
  max-width: 800px;
  font-weight: 500;
  animation: fadeOut 0.5s ease 2.5s forwards;
}

.alert-success {
  background: rgba(46,204,113,0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(241,196,15,0.1);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.alert-error {
  background: rgba(231,76,60,0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-5px); display: none; }
}

/* ==========================================
   LIENS
========================================== */

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================
   USERS.PHP — TABLE LISTE PERSONNEL
========================================== */

/* Conteneur principal */
main.container {
  max-width: 1250px;
  margin: auto;
  padding: 20px;
}

/* Header de page */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Barre de recherche */
.search-box input {
  width: 250px;
  padding: 6px 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
}

/* Table en style clair pour users.php */
.users-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  color: #000;
}

.users-table th,
.users-table td {
  padding: 10px;
  text-align: left;
  color: #000;
}

.users-table th {
  background: #f3f3f3;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.5px;
}

.users-table tr:hover {
  background: #f8faff;
}

/* Petit bouton bleu (voir / éditer / supprimer) */
.btn-small {
  padding: 4px 8px;
  background: #0078d7;
  color: white !important;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85em;
}

.btn-small:hover {
  background: #005fa3;
}

/* Cartes */
.user-card {
  background: #fff;
  padding: 15px;
  margin-top: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  color: #000;
}

.user-card h4 {
  margin: 0 0 10px 0;
  font-size: 1.1em;
  color: #2d4a7d;
}

/* Images des grades */
.grade-img {
  width: 70px;
  height: 30px;
  display: block;
  border: 3px solid #131725;
}

@media (max-width: 768px) {
  .grade-img {
    width: 70px;
    height: 30px;
  }
}

/* Bouton Voir agents archivés */
.btn-archive-users {
  display: inline-block;
  padding: 10px 16px;
  background: #a71414;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(175, 29, 29, 0.15);
  transition: all 0.2s ease-in-out;
  margin-top: 1%;
}

.btn-archive-users:hover {
  background: #c00f0f;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Alertes spécifiques users.php */
.alert-success-users,
.alert-error-users {
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  animation: fadeIn 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
}

.alert-success-users {
  background: #e8f8ec;
  color: #1b7b33;
  border: 1px solid #b4e0b8;
}

.alert-error-users {
  background: #fdecea;
  color: #b1221c;
  border: 1px solid #f5b5b0;
}

/* === BLOCS FICHE AGENT === */
.container-block {
  background: rgba(23, 31, 54, 0.95); /* bleu nuit transparent */
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.container-block h3 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.4rem;
  border-left: 4px solid #C81417;
  padding-left: 10px;
}

/* === COMPÉTENCES === */
.competences-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.competence-badge {
  background: #C81417;
  color: white;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  transition: 0.2s;
}

/* === TABLE ÉTAT DE SERVICE === */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.table th {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 10px;
  font-size: 0.9rem;
  border-bottom: 2px solid #C81417;
}

.table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: white;
}

.table tr:hover td {
  background: rgba(255,255,255,0.05);
}

/*Card User_view*/
.cardUserView {
  background: rgba(23, 31, 54, 0.95); /* bleu nuit transparent */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ==========================================
   FORMULAIRE CRÉATION UTILISATEUR
========================================== */

.containerCE {
  max-width: 900px;
  margin: 40px auto;
  background: rgba(23, 31, 54, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  padding: 30px 40px;
  color: #fff;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.containerCE h3 {
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 1.6rem;
  border-left: 4px solid #C81417;
  padding-left: 12px;
  color: white;
}

/* Labels */
.containerCE form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  margin-bottom: 18px;
  color: #ffffff;
}

/* Inputs */
.containerCE input,
.containerCE select,
.containerCE textarea {
  background: #11151f;
  color: #fff;
  border: 1px solid #2C3548;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  transition: border-color 0.3s ease;
}

.containerCE input:focus,
.containerCE select:focus {
  border-color: #C81417;
  box-shadow: 0 0 6px rgba(200,20,23,0.4);
}

/* Bouton submit */
.containerCE button {
  background: #C81417;
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.25s ease;
}

.containerCE button:hover {
  background: #a31213;
  transform: translateY(-1px);
}

/* Message d'erreur */
.alert-error {
  background: rgba(231,76,60,0.1);
  border: 1px solid #e74c3c;
  color: #e74c3c;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

/* === FORM CONTAINER GLOBAL === */
.form-box {
  background: rgba(23, 31, 54, 0.95);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  margin-top: 25px;
  backdrop-filter: blur(6px);
  color: #fff;
}

/* === TITRES === */
.form-box h3, 
.form-box h4 {
  margin-bottom: 25px;
  color: #fff;
  border-left: 4px solid #C81417;
  padding-left: 12px;
}

/* === LABELS === */
.form-box label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
}

/* === INPUTS / SELECT / TEXTAREA === */
.form-box input,
.form-box select,
.form-box textarea {
  background: #11151f;
  color: #fff;
  border: 1px solid #2C3548;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 15px;
}

/* === BOUTONS === */
.form-box button,
.form-box .button-link {
  background: #C81417;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  display: inline-block;
  margin-right: 10px;
}

.form-box button:hover,
.form-box .button-link:hover {
  background: #9f1013;
}

/* === COMPETENCES BLOCK === */
.competences-panel label.competence-item {
    display: flex !important;       /* force le flex */
    flex-direction: row !important; /* sur une ligne */
    align-items: center;
    gap: 8px;
}

.competence-item input[type="checkbox"] {
  margin: 0; /* pour enlever tout espace par défaut */
}

.competence-toolbar button {
  background: #2C3548;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  margin-right: 10px;
  color: #fff;
  cursor: pointer;
}

.competence-toolbar button:hover {
  background: #C81417;
}

.competences-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px; /* 4px vertical (row), 10px horizontal (column) */
    margin: 5px;
    padding: 0;
}

/* Chaque compétence dans sa box */
.competence-item {
    display: flex;
    align-items: center;
    gap: 10px;                        /* espace checkbox / texte */
    background: #1c2438;              /* couleur de la box */
    padding: 8px 12px;                /* padding interne */
    border-radius: 8px;               /* coins arrondis */
    border: 1px solid #2C3548;        /* bordure */
    flex: 0 0 210px;                  /* largeur fixe */
    box-sizing: border-box;
    transition: background 0.2s;
    cursor: pointer;                  /* pointeur au survol */
}

/* Checkbox */
.competence-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;   /* ne pas réduire */
}

/* Texte de la compétence */
.competence-item span {
    color: #ffffff;
    font-weight: 600;
}

/* Effet hover sur la box */
.competence-item:hover {
    background: #232c45;
}

/* === ALERTES === */
.alert {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 15px;
  animation: fadeIn 0.4s ease-out;
}

.alert-error {
  background: #8b0d0f;
  color: white;
  border-left: 4px solid #ff4444;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   FORMATION
========================================== */
.TitleForm {
  font-size: 40px;
}

.containerForm {
  margin: auto;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
  background: rgba(23, 31, 54, 0.85);
  padding: 40px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(5px);
  max-width: 1000px;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
}

.card-folder {
  background: #171F36;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  cursor: pointer;
  border-top: 6px solid rgb(204, 0, 0);
  width: 100%;
  max-width: 230px;
  min-height: 180px; /* Taille uniforme */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* Centre le contenu horizontalement */
  text-align: center;  /* Assure que le texte reste centré */
  transition: all 0.25s ease;
}

.card-folder:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.card-folder h4 {
  color: #fff;
  margin: 0 0 8px 0; /* marge uniforme sous le titre */
  font-size: 1.2em;
}

.card-folder p {
  font-size: 0.9em;
  color: #666;
  margin: 0; /* supprime les marges par défaut */
}

/* Pop-up modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background: #171F36;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: left;
}

.modal-content h4 {
  color: #fff;
  margin-bottom: 15px;
}

.modal-content ul {
  list-style: none;
  padding: 0;
}

.modal-content li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.modal-content a {
  color: #ffffff;
  text-decoration: none;
}

.modal-content a:hover {
  text-decoration: underline;
}

.close-btn {
  float: right;
  font-size: 1.4em;
  cursor: pointer;
  color: #999;
}

.close-btn:hover {
  color: #c00;
}

/* Bouton submit */
.container-block button {
  background: #C81417;
  padding: 8px 16px;
  border-radius: 10px;
  color: white;
  border: none;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.25s ease;
}

.container-block button:hover {
  background: #a31213;
  transform: translateY(-1px);
}

.TitleForm {
  font-size: 42px;
  font-weight: 700;
  color: white;
  margin-bottom: 35px;
  position: relative;
  display: inline-block;
}

.TitleForm::after {
  content: "";
  display: block;
  width: 60%;
  height: 4px;
  background: #C81417;
  margin: 10px auto 0 auto;
  border-radius: 5px;
  animation: grow 0.8s ease-out;
}

@keyframes grow {
  from { width: 0; }
  to { width: 60%; }
}

/* Cards */
.card-folder {
  position: relative;
  overflow: hidden;
  border-top: 6px solid #C81417;
  transition: all 0.30s ease;
}

.card-folder:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 20px rgba(200,20,23,0.25);
}

.card-folder h4 {
  font-size: 1.3em;
  margin-bottom: 6px;
}

/* Modals améliorés */
.modal-content {
  animation: fadeScale 0.35s ease-out;
}

@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.modal-content li {
  color: white;
  padding: 6px 0;
}

.modal-content a {
  font-weight: 500;
  transition: 0.2s;
}

.modal-content a:hover {
  color: #C81417;
  text-decoration: underline;
}


/* ==========================================
   FEUILLE DE GARDE
========================================== */
.left-column { flex: 2; }
.right-column { flex: 1; display: flex; flex-direction: column; gap: 15px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
th, td { padding: 8px; border-bottom: 1px solid #eee; }
th { background: #972121; text-align: left; text-transform: uppercase; font-size: 0.85em; }
select { width: 100%; padding: 6px 10px; border: 1px solid #bbb; border-radius: 6px; }
.btn { background: #0078d7; color: white; border: none; border-radius: 6px; padding: 10px 15px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn:hover { background: #005fa3; }
.alert-info { background: #eaf3ff; color: #084298; padding: 10px; border-radius: 8px; margin: 10px 0;}
.card.small-card {font-size: 0.9em; padding: 10px;}
.card.small-card table td,
.card.small-card table th {padding: 6px 8px;}

.titleCards {
  font-size: 18px;
}

.btnFeuille {
  background-color: #C81417;
}

/* 🔹 Grille de véhicules sur 3 colonnes */
.vehicles-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

/* 🔹 Ajustement automatique selon la taille de l’écran */
@media (max-width: 1400px) {
  .vehicles-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .vehicles-container {
    grid-template-columns: 1fr;
  }
}

.global-alert {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  font-size: 1em;
  padding: 12px 20px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
  font-weight: 500;
}

.alert-success strong {
  color: #0f5132;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
  font-weight: 500;
}

/* ==========================================
   HISTORIQUE FEUILLE DE GARDE
========================================== */
.cardFeuille { 
  background: rgba(23, 31, 54, 0.95); 
  border-radius: 8px; 
  padding: 15px; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); 
  margin-bottom: 15px; 
}

.cardFeuille h5 {
  margin: 0 0 10px 0; 
  font-size: 1.1em; 
  color: #eee; 
}

.cardFeuille table { 
  width: 100%; 
  border-collapse: collapse; 
}

.cardFeuille th, .cardFeuille td { 
  padding: 6px 10px; 
  border-bottom: 1px solid #eee; 
  text-align: left; 
  font-size: 0.9em; 
}
    
.toggle-details { 
  cursor: pointer; 
  color: #fff; 
  text-decoration: underline; 
  font-size: 0.9em; 
}

.details { 
  display: none; 
  margin-top: 10px; 
}
.hidden { 
  display: none; 
}

.vehicles-container { 
  margin-top: 10px; 
  grid-template-columns: repeat(3,1fr); 
  gap: 15px; 
}

.cardFeuille.small-card { 
  font-size: 0.9em; 
  padding: 10px; 
}

.cardFeuille.small-card table td,
.cardFeuille.small-card table th { 
  padding: 6px 8px; 
}