table {
    width: 90%;
    max-width: 1200px;
    border-collapse: collapse;
    margin: 2rem auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

/* En-têtes */
th {
    background-color: #003d00;
    color: #fff;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    font-weight: 600;
    border-bottom: 2px solid #003d00;
}

/* Lignes et cellules */
td {
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    color: #333;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Lien dans les cellules */
table a {
    color: #003d00;
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
}

table a:hover {
    text-decoration: underline;
}

/* Couleur alternée */
table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Survol */
table tr:hover {
    background-color: #e6ffe6;
}

/* Media Queries pour petits écrans */
@media only screen and (max-width: 768px) {
    table {
        width: 95%; /* Le tableau prend plus de place sur petits écrans */
    }
    th, td {
        font-size: 3.5vw; /* Taille du texte ajustée */
        padding: 1.2vh 1.5vw; /* Espacements réduits pour mobile */
    }
}

@media only screen and (max-width: 480px) {
    table {
        width: 100%; /* Utilisation complète de l'écran sur mobile */
    }
    th, td {
        font-size: 4.5vw; /* Texte plus grand sur petits écrans */
        padding: 1.2vh 1.2vw;
    }
}
/* CSS spécifique pour le formulaire admin */
.admin-upload-form {
    max-width: 90%; /* Largeur max en pourcentage pour les grands écrans */
    margin: 0 auto;
    background-color: #333333; /* Gris foncé pour adoucir */
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: Arial, sans-serif;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Grille de 2 colonnes par défaut */
    gap: 1rem; /* Espacement entre les éléments */
}

/* Disposition en une seule colonne sur petits écrans */
@media (max-width: 768px) {
    .admin-upload-form {
        grid-template-columns: 1fr; /* Grille de 1 colonne */
        padding: 1rem;
    }
}

.admin-upload-form .form-group {
    display: flex;
    flex-direction: column;
}

.admin-upload-form label {
    font-weight: bold;
    color: #cce5cc; /* Vert clair pour les labels */
    margin-bottom: 0.5rem;
}

.admin-upload-form input[type="file"],
.admin-upload-form input[type="text"],
.admin-upload-form select {
    padding: 0.6rem;
    border: none;
    border-radius: 5px;
    background-color: #444444; /* Gris foncé pour les champs */
    color: #ffffff;
}

.admin-upload-form input[type="file"]::file-selector-button {
    background-color: #004f00;
    color: #ffffff;
    border: none;
    padding: 0.6rem;
    border-radius: 5px;
    cursor: pointer;
}

.admin-upload-form input[type="file"]::file-selector-button:hover {
    background-color: #007700;
}

.admin-upload-form button[type="submit"] {
    background-color: #006600; /* Vert adouci pour le bouton */
    color: #ffffff;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    grid-column: span 2; /* Bouton s’étend sur les deux colonnes */
}

.admin-upload-form button[type="submit"]:hover {
    background-color: #00b300;
}

/* Classe pour les champs qui prennent toute la largeur */
.admin-upload-form .full-width {
    grid-column: span 2;
}
  /* Styles pour les messages */
  .alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-size: 1rem;
    color: #ffffff;
    width: 90%;
    max-width: 600px;
    margin: 1rem auto;
    display: none; /* Masqué par défaut */
}
.alert.success {
    background-color: #4CAF50; /* Vert pour succès */
}
.alert.error {
    background-color: #f44336;} /* Rouge pour erreur */

.cours{margin: 5vh;}
/* ------------ Responsive tableau (tablette & mobile) ------------ */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    padding: 8px;
    background-color: #f9f9f9;
  }

  td {
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #eee;
  }

  td::before {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 45%;
    white-space: nowrap;
    font-weight: bold;
    content: attr(data-label);
  }
  tr {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 5px;
  }

  td {
    padding: 10px;
    border: none;
  }

  td::before {
    color: #555;
  }
  td::before {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 45%;
  white-space: nowrap;
  font-weight: bold;
  content: attr(data-label);
  color: #333;
}

/* ✅ Ajout : décale le contenu à droite pour qu'il ne chevauche pas le label */
td {
  padding-left: 55%; /* plus d'espace pour ne pas se confondre avec le label */
  min-height: 40px;
}
td[data-label="Fichier"] a {
  display: inline-block;
  margin-left: 5px;
  color: #007bff;
  text-decoration: none;
  word-break: break-word;
}

td[data-label="Fichier"] a:hover {
  text-decoration: underline;
}


}