/* RESET ET BASE GÉNÉRALE */
*,
*::after,
*::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-width: 768px;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat';
    background-color: #151e2d;
    width: 100vw;
}

/* HEADER */
header {
    background-image: url(images/image1.jpg);
    font-family: 'Montserrat', sans-serif;
    height: 628px;
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    width: 100vw;
    color: white;
    border-bottom: solid 2px whitesmoke;
    gap: 30px;
    padding-top: 20px;
    position: relative;
}

.logo {
    margin-top: 16px; 
    width: 70px;
    height: 70px;
    aspect-ratio: 1/1;
    transition: all 0.3s ease;
}

.left-text, .right-text {
    color: white;
    margin-top: 45px;
    font-size: 1.2em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover,
.left-text:hover,
.right-text:hover {
    transform: scale(1.05);
    color: #9d2521;
}

h1 {
    position: absolute;
    margin-top: 350px;
    font-size: 4em;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

h1:hover {
    transform: scale(1.05);
}


/* TITRES ET SECTIONS */
h2 {
    text-align: left;
    margin-left: 20px;
    font-size: 2em;
    color: white;
}

/* GRILLE DES JOUEURS */
.player-grid {
    display: grid;
    padding: 20px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.player-card {
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.player-card:hover {
    transform: scale(1.10);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
}

.player-card img {
    width: 100%;
    max-width: fit-content;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

/*  FILTRES */
.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    margin: 40px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-container label {
    font-size: 1.2em;
    margin-right: 10px;
}

.filter-container select,
.button,
.reset {
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    color: white;
    background-color: #9d2521;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover,
.reset:hover {
    background-color: #c0312d;
}
.searchbar {
    display: flex;
    align-items: center;
    
}
.searchbar input[type="text"] {
    color: white;
    font-size: 1em;
    background-color: #9d2521;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    background-color: #9d2521;
}

/*  MESSAGE AUCUN RÉSULTAT */
.no-result-message {
    display: none;
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
    font-size: 2em;
    color: white;
}

/*  FOOTER */
.footer {
    background-color: white;
    color: #151e2d;
    padding: 20px 0;
    text-align: center;
    border-top: #9d2521 3px solid;
    margin-top: 40px;
    font-family: 'Montserrat', sans-serif;
}

.footercontent {
    max-width: 1000px;
    margin: 0 auto;
}

.footerlogo img {
    margin: 10px 15px;
    vertical-align: middle;
}

.footerliens {
    margin: 15px 0;
}

.footerliens a {
    color: #151e2d;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
}

.footerliens a:hover {
    text-decoration: underline;
}

.footertext {
    font-size: 0.9em;
    margin-top: 10px;
}

/*  RESPONSIVE */
@media (max-width: 768px) {
  body {
    padding: 0 10px;
  }

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .left-text, .right-text {
    display: block;
    margin: 10px 0;
  }

  .logo {
    width: 80px;
    height: auto;
    margin: 10px 0;
  }

  h1 {
    font-size: 1.5em;
  }

  .filters-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .filter-container {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  select,
  input[type="text"],
  input[type="submit"],
  .reset,
  .button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
  }

  .player-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .player-card img {
    width: 100%;
    height: auto;
  }

  #footer {
    margin-top: 30px;
  }
}
