/* Global Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

p {
  text-align: justify;
  font-size: 10pt;
  padding-left: 15px;
  padding-right: 15px;
}

p.gras {
  font-weight: bold;
}

/* Responsive containers - utilisation maximale de la largeur avec petites marges */
.container-fluid {
  width: 100%;
  max-width: none;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

.container {
  width: 100%;
  max-width: none;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

/* Alignement du menu et du contenu principal - maintenant obsolète avec header fixe */
.main-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
}

.restrictions-card { /* Restriction épreuves */
  max-width: none;
  width: 100%;
}

#sidebar {
  flex: 0 0 200px; /* Largeur fixe pour le menu */
  margin-right: 20px;
}

#content {
  flex: 1;
  margin-top: 0;
  width: 100%;
}

.title-col {
    flex-grow: 1;
    flex-shrink: 1;
    margin-bottom: 0; /* Enlève les marges en bas du titre */
    word-wrap: break-word; /* Permet la coupure des mots longs */
    overflow-wrap: break-word; /* Compatibilité navigateurs */
    min-width: 0; /* Permet la réduction si nécessaire */
}

.date-col {
  flex-basis: 30%; /* Ajustez ce pourcentage selon vos besoins */
  text-align: right;
  white-space: nowrap; /* Empêche le retour à la ligne */
}

/* Assurez-vous que chaque élément de la list-group prend toute la largeur */
.list-group-item {
  width: 100%;
  display: block;
}

/* Pour s'assurer que les éléments flex prennent toute la largeur */
.list-group-item .d-flex {
  width: 100%;
}
.col-title {
  width: 100%; /* Ajustez ce pourcentage selon vos besoins */
  white-space: normal; /* Permet de gérer les retours à la ligne dans le texte long */
  word-wrap: break-word; /* Coupe les mots longs si nécessaire */
}
/* Optionnel : Ajouter de la marge ou du padding si nécessaire */
.list-group-item h5, .list-group-item p, .list-group-item small {
  margin: 0;
  padding: 0 0px; /* Optionnel : ajuster selon vos besoins */
}
.card-header {
  background-color: #17a2b8; /* Correspond à bg-info */
  color: white;
  text-align: center;
}
/* Réduction de la marge entre les sections */
.card-header, .card-body {
  padding: 10px; /* Réduit le padding à 10px pour la carte */
}

.card-title {
  margin-bottom: 0;
}

.table-responsive {
  margin-top: 10px;
}

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

.table-bordered {
  border: 1px solid #ddd;
}

.table th, .table td {
  padding: 4px 8px;
  text-align: left;
  border: 1px solid #ddd;
}
/* Réduction de la hauteur des lignes */
.table {
  line-height: 1.2; /* Réduit la hauteur de ligne */
}
.table thead th {
  vertical-align: middle; /* Centre verticalement le texte des en-têtes */
}
/* Pour centrer spécifiquement les boutons dans la colonne "Actions" */
.table td .btn {
  display: inline-block;
  margin: 0 auto;
  text-align: center;
}
img {
  border: 0;
}

a {
  text-decoration: none;
}

.btn-primary {
  color: white; /* Texte en blanc */
}

a:link, a:visited {
  color: blue;
}

a:hover, a:active {
  color: red;
}
.active-button {
    background-color: #67af1b !important; /* Vert demandé */
    color: white !important;
    border-color: #67af1b !important;
}

.inactive-button {
    background-color: #007bff !important; /* Bleu Bootstrap standard */
    color: white !important;
    border-color: #007bff !important;
}

.active-button:hover, .inactive-button:hover {
    background-color: #5a9918 !important; /* Version légèrement plus foncée du vert pour le hover */
    color: white !important;
    border-color: #5a9918 !important;
}

/* Pour le bouton de filtrage */
.btn-filtrage {
  color: white;
}

/* Pour les éléments de pagination, si vous voulez ajuster la taille de la police */
.pagination .page-link {
  font-size: 1rem;
}

/* Pour le bouton de retour */
.btn-secondary.btn-retour {
  background-color: #6c757d; /* Ceci est la couleur de fond 'secondary' */
  color: white !important; /* Utilisation de !important pour forcer la couleur */
}

.btn-secondary.btn-retour:hover {
  color: white !important; /* Assurer que le texte reste blanc au survol */
}

.custom-heading {
  color: #003300;
  font-family: 'Arial', sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(to right, #003300, #005500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  border: 3px solid #005500;
  border-radius: 15px;
  padding: 10px 20px;
  display: inline-block;
}
input, textarea {
  border: solid black 1px;
  background-color: #CCCCFF;
  color: black;
}

/* Interface Items */
#logo {
  background-color: white;
  text-align: center;
}

#date, #citation {
  font-size: 9pt;
  font-weight: bold;
  padding: 5px;
  text-align: right;
  border-top: solid blue 1px;
}

#citation {
  margin-bottom: 10px;
  border-bottom: solid blue 1px;
}

/* Footer styles */
footer {
  background-color: #f8f9fa;
  padding: 1rem;
  text-align: center;
  width: 100%;
  border-top: 1px solid #ccc;
}

.menu-container {
  border: 2px solid #005500; /* Couleur de la bordure */
  border-radius: 15px; /* Angles arrondis */
  padding: 15px; /* Espacement intérieur */
  background-color: #f8f9fa; /* Couleur de fond */
  max-width: 300px; /* Limite la largeur du menu */
  margin: 20px auto; /* Centre le menu horizontalement */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre pour l'effet de relief */
}

.card-footer {
  font-size: 10pt;
}

#ieWarning {
  color: black;
  font-weight: bolder;
  background-color: white;
  font-size: 10pt;
  padding: 5px;
  text-align: center;
  border: solid black 8px;
  margin-top: 10px;
  margin-bottom: 10px;
}

#footnote {
  border-top: solid black 1px;
  clear: both;
  text-align: left;
  font-size: 9pt;
  margin-top: 30px;
}

/* Menu */
#menu {
  margin: 10px 0;
  padding: 3px;
}

#menu ul {
  padding: 0;
  margin: 0;
  margin-bottom: 10px;
  margin-top: 10px;
  border-top: solid blue 1px;
}

#menu li {
  list-style-type: none;
  text-align: left;
  font-weight: bolder;
  font-size: 13pt;
  padding: 5px;
}

#menu li.inactiveMenuItem {
  color: blue;
  background-color: white;
}

#menu li.activeMenuItem {
  color: white;
  background-color: #CCCCFF;
}

/* Dernier inscrit */
#dernierInscrit {
  border: solid blue 1px;
  padding: 3px;
  margin-bottom: 10px;
}

#dernierInscrit p.titre {
  text-align: center;
  font-size: 10pt;
  text-transform: uppercase;
  color: blue;
}

#dernierInscrit p.pseudo, #dernierInscrit a.pseudo {
  text-align: center;
  font-size: 10pt;
  color: red;
  font-weight: bold;
  background-color: #CCCCFF;
}

/* Palmares */
#login {
  border: solid blue 1px;
  padding: 3px;
}

#login p {
  text-align: center;
  font-size: 10pt;
  text-transform: uppercase;
  color: blue;
}

#login table.palmares {
  background-color: #FFFFFF;
  width: 100%;
  color: black;
  font-size: 10pt;
}

#login td {
  text-align: center;
}

#login tr.best, #login a.best {
  color: red;
  font-weight: bold;
  background-color: #CCCCFF;
}

#login a.nom {
  color: black;
  font-weight: bold;
  background-color: #FFFFFF;
}

#login td.nom {
  text-align: left;
}

#login td.nb {
  text-align: center;
}

/* Contenu */
#contenu {
  padding: 15px;
  width: 100%;
  box-sizing: border-box;
  max-width: none;
}

#contenu h1 {
  text-align: center;
  font-weight: bold;
  font-size: 18pt;
  color: blue;
}

#contenu h2 {
  font-size: 12pt;
  border-bottom: solid blue 1px;
  color: blue;
  text-align: left;
}

#contenu h3 {
  font-size: 12pt;
  text-transform: uppercase;
  color: blue;
  text-align: center;
}

#contenu h4 {
  font-weight: bold;
  color: blue;
  margin-left: 10px;
}

#contenu h5 {
  font-weight: bold;
  margin-left: 20px;
}

#contenu pre {
  background-color: #DDDDFF;
  padding: 10px;
}

#contenu ul, #contenu li {
  padding-left: 0;
  list-style-type: none;
}

#contenu #table_encadree {
  border: solid blue 1px;
}

#contenu #table_encadree #titre_boite {
  font-size: 12pt;
  color: blue;
}

/* News */
#contenu div#newsPage1 {
  margin-bottom: 0;
  border: solid blue 2px;
  padding: 5px;
}

#contenu #newsPage1 h2 {
  font-size: 9pt;
  text-transform: uppercase;
  border-bottom: solid blue 1px;
  padding: 2px;
  text-align: left;
  color: black;
}

#contenu div.newsContents {
  text-align: justify;
}

/* Quickinfo bar */
#quickinfo {
  margin-top: 10px;
  padding: 3px;
  border-left: solid blue 1px;
}

#quickinfo h3 {
  font-size: 10pt;
  padding: 0;
  margin: 0;
  margin-top: 6px;
}

#quickinfo div {
  margin-top: 10px;
  padding: 3px;
  padding-left: 0;
  padding-right: 0;
  border-top: solid blue 1px;
}

#quickinfo ul, #quickinfo li {
  padding: 0;
  list-style-type: none;
  margin-left: 10px;
  text-align: left;
}

.container {
  flex: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container, .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }

  #menu, #quickinfo, #contenu {
      position: static;
      width: 100%;
      margin: 0;
      padding: 10px;
  }

  #contenu {
      padding: 10px;
  }

  #menu ul {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
  }

  #menu li {
      flex: 1 0 48%;
      margin: 5px 0;
      text-align: center;
  }

  #contenu pre {
      font-size: 9pt;
      padding: 5px;
  }

  #quickinfo {
      border-left: none;
      border-top: solid blue 1px;
      margin-top: 20px;
  }

  /* Optimisation des tableaux sur mobile */
  .table-responsive {
    margin-left: -10px;
    margin-right: -10px;
  }

  /* Optimisation des cartes sur mobile */
  .card {
    margin-left: -5px;
    margin-right: -5px;
  }
}

/* Responsive pour très petits écrans */
@media (max-width: 576px) {
  .container, .container-fluid {
    padding-left: 8px;
    padding-right: 8px;
  }

  #contenu {
    padding: 8px;
  }

  p {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Optimisations pour les grands écrans */
@media (min-width: 1200px) {
  /* Améliorer l'affichage des listes de compétitions sur grands écrans */
  .list-group-item {
    padding: 15px 20px;
  }

  /* Optimiser l'espacement des éléments flex */
  .d-flex.justify-content-between {
    gap: 20px;
  }
}

@media (min-width: 1400px) {
  /* Optimisations spécifiques pour très grands écrans */
  .list-group-item {
    padding: 20px 25px;
  }

  /* Améliorer la lisibilité des titres longs */
  .title-col h5 {
    line-height: 1.3;
  }
}

