/* ===========================
   TYPOGRAPHIE GLOBALE
=========================== */
body {
  font-family: 'Lato', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9fafb;
  color: #1f2937;
}

/* ===========================
   HEADER AVEC LOGO
=========================== */
header {
  background-color: #020A5D;
  color: #ffffff;
  padding: 20px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.logo {
  max-height: 150px; /* desktop */
  width: auto;
}

.header-text h1 {
  font-size: 2rem;
  margin-bottom: 5px;
}

.header-text p {
  font-size: 1.1rem;
  color: #dbeafe;
}

/* ===========================
   NAVIGATION
=========================== */
nav {
  background-color: #2563eb;
  color: #fff;
  position: relative;
}

nav ul {
  display: flex;
  justify-content: center; 
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  position: relative;
}

nav a {
  display: block;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

nav a:hover {
  background-color: #1e40af;
}

/* SOUS-MENUS */
nav ul ul {
  display: none;              /* caché par défaut */
  position: absolute;
  top: 100%;                  /* juste en dessous du parent */
  left: 0;
  background-color: #2563eb;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 1000;
}

nav ul ul li {
  width: 100%;
}

nav ul ul a {
  padding: 10px 15px;
  color: #fff;
  transition: background 0.3s;
}

nav ul ul a:hover {
  background-color: #1e40af;
}

/* Affichage au survol */
nav li:hover > ul {
  display: block;
}

/* BURGER MOBILE */
.burger {
  display: none;
  padding: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  background-color: #1e40af;
  color: #fff;
  text-align: center;
  font-weight: bold;
  border-radius: 6px;
}

/* ===========================
   ENCARTHAUT
=========================== */
#encartHaut {
  background: #e0e7ff;
  padding: 10px;
  text-align: center;
  max-width: 1200px;
  margin: 20px auto;
  border-radius: 8px;
}


/* ===========================
   LAYOUT PRINCIPAL
=========================== */
#corps {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

#contenu {
  flex: 3;
}

aside {
  flex: 1;
}

/* ===========================
   BLOCS
=========================== */
.bloc {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.titre_bloc {
  display: block;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 10px;
  border-bottom: 2px solid #93c5fd;
  padding-bottom: 5px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===========================
   TABLEAUX
=========================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

th, td {
  border: 1px solid #d1d5db;
  padding: 8px;
  text-align: left;
}

th {
  background: #eff6ff;
}

/* ===========================
   FOOTER
=========================== */
footer {
  background: #020A5D;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  border-radius: 8px 8px 0 0;
}

footer a {
  color: #bfdbfe;
  text-decoration: none;
}

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

/* ===========================
   IMAGES D'ILLUSTRATION
=========================== */
.img-left {
  float: left;
  max-width: 40%;
  margin: 0 15px 10px 0;
  border-radius: 8px;
}

.img-right {
  float: right;
  max-width: 40%;
  margin: 0 0 10px 15px;
  border-radius: 8px;
}

/* Grille des pronostiqueurs */
.trophee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.trophee-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.trophee-card img.medium {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.trophee-card h3 {
    margin: 5px 0;
    font-size: 1rem;
    color: #1e3a8a;
}

.trophee-card p {
    margin: 5px 0 10px 0;
    font-weight: bold;
}

.trophee-card .medailles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.trophee-card .medailles figure {
    margin: 0;
    text-align: center;
}

.trophee-card .medailles img.mini_trophee {
    width: 35px;
    height: 35px;
}
.trophee-card .medailles figcaption {
    font-size: 0.7rem;
}

/* ===========================
   TABLEAUX AMÉLIORÉS
=========================== */
.table-container {
  width: 100%;
  overflow-x: auto; /* scroll horizontal sur mobile */
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
  border-radius: 8px;
  overflow: hidden; /* pour arrondir */
}

th, td {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap; /* évite que les colonnes éclatent */
}

th {
  background: #2563eb;
  color: white;
  font-weight: 600;
  text-transform: capitalize;
}

tr:nth-child(even) {
  background: #f9fafb; /* gris clair */
}

tr:hover {
  background: #e0f2fe; /* bleu clair au survol */
  transition: background 0.2s ease-in-out;
}

/* Classes utilitaires pour mettre en valeur */
td strong {
  color: #1e3a8a;
}

.bgbleu {
  background: #eff6ff; /* bleu très léger */
}


/* ===========================
   forum
=========================== */
/* Bloc principal du forum */
.bloc {
    max-width: 900px;
    margin: 20px auto;
    padding: 15px;
}

/* Titre de la section */
.titre_bloc {
    display: block;
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #003366;
    text-align: center;
}

/* Boutons */
.bouton {
    display: inline-block;
    margin: 5px 10px 15px 0;
    padding: 8px 15px;
    background-color: #003366;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}
.bouton:hover {
    background-color: #0055a5;
}

/* Sujet principal */
.blocmessage {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Sujet */
.sujet {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    background-color: #f0f8ff; /* fond légèrement bleu pour le sujet */
    padding: 10px;
    border-radius: 5px;
}

 .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid #ccc;
}

.sujet .message {
    flex: 1;
    font-size: 0.95em;
}

.sujet .bleumarine {
    color: #003366;
    font-weight: bold;
    text-decoration: none;
}

.sujet .bleu {
    font-size: 0.85em;
    color: #0066cc;
    margin-left: 10px;
}

/* Réponses */
.reponse {
    display: flex;
    align-items: flex-start;
    margin-left: 62px; /* indentation par rapport au sujet */
    margin-top: 8px;
    padding: 8px;
    background-color: #f9f9f9; /* fond légèrement gris */
    border-left: 3px solid #003366; /* barre verticale pour indiquer la réponse */
    border-radius: 5px;
}

.reponse .avatar {
    width: 35px;
    height: 35px;
    margin-right: 10px;
    border-radius: 50%;
}

.reponse .message {
    flex: 1;
    font-size: 0.9em;
}

.reponse .bleumarine {
    color: #003366;
    font-weight: bold;
}

.reponse .date {
    font-size: 0.8em;
    color: #666;
    margin-left: 8px;
}

/* Lien "répondre" */
.reponse a.rouge {
    color: #cc0000;
    font-weight: bold;
    text-decoration: none;
}
.reponse a.rouge:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    background-color: #eee;
    color: #003366;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

.pagination a:hover {
    background-color: #ddd;
}

.pagination .current {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    background-color: #003366;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
}




/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {


  /* Menu burger */
  nav ul {
    flex-direction: column;
    display: none;
  }

  nav.active ul {
    display: flex;
  }

  nav ul ul {
    position: static;
    display: flex;
    flex-direction: column;
    padding-left: 20px;
    box-shadow: none;
    border-radius: 0;
  }

  nav ul ul a {
    padding-left: 30px;
  }

  .burger {
    display: block;
  }

  /* Layout corps */
  #corps {
    flex-direction: column;
  }

  /* Images */
  .img-left,
  .img-right {
    float: none;
    display: block;
    margin: 10px auto;
    max-width: 100%;
  }

  th, td {
    padding: 8px;
    font-size: 0.85rem;
  }

  #encartHaut {
    max-width: 100%;
    padding: 0 5px;
  }

  #encartHaut iframe,
  #encartHaut img {
    max-width: 100% !important;
    height: auto !important;
  }


/* Sujet et réponse : passage en colonne */
  .sujet,
  .reponse {
      display: flex;
      flex-direction: column;   /* empile avatar et message */
      align-items: flex-start;
      width: 100%;
      padding: 8px;
      box-sizing: border-box;
      margin-left: 0 !important; /* annule margin-left fixe */
  }

  /* Avatar centré en haut */
  .sujet .avatar,
  .reponse .avatar {
      width: 50px;
      height: 50px;
      margin: 0 0 8px 0;
      border-radius: 50%;
      flex-shrink: 0;
  }

  /* Message prend toute la largeur */
  .sujet .message,
  .reponse .message {
      width: 100%;
      min-width: 0;
      white-space: normal;
      word-break: break-word;
      overflow-wrap: break-word;
      font-size: 0.9em;
  }

  /* Pseudo et date sous le message */
  .sujet .bleu,
  .reponse .date {
      display: block;
      margin-left: 0;
      margin-top: 4px;
  }

  /* Barre verticale des réponses repositionnée */
  .reponse {
      border-left: 3px solid #003366;
      padding-left: 8px;
      background-color: #f9f9f9;
      border-radius: 5px;
  }

  /* Si code ou texte préformaté */
  .sujet .message pre,
  .reponse .message pre,
  .sujet .message code,
  .reponse .message code {
      overflow-x: auto;
      display: block;
  }
}

