
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* scrolbar */

  /* Pour Chrome, Edge, Safari */
  ::-webkit-scrollbar {
    width: 12px; /* largeur de la barre */
  }
  
  ::-webkit-scrollbar-track {
    background: #fff; /* couleur de l'arrière-plan */
  }
  
  ::-webkit-scrollbar-thumb {
    background: red; /* couleur de la barre */
    border-radius: 6px; /* coins arrondis */
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: darkred; /* couleur au survol */
  }
  
  /* Pour Firefox */
  html {
    scrollbar-width: thin;
    scrollbar-color: red white; /* premier = barre, second = arrière-plan */
  }
  

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f9fafb;
  }

/* === HEADER === */

header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
  .logo{
    font-weight: bold;
  font-size: 25px;
 }

 .burger {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

   nav a {
    padding: 4px 4px;
    text-decoration: none;
    color: #444;
    margin: 0 1rem;
    transition: 0.6s ease-out;
    margin:0 1rem;
    -webkit-transition: 0.6s ease-out;
    -moz-transition: 0.6s ease-out;
    -ms-transition: 0.6s ease-out;
    -o-transition: 0.6s ease-out;
  }

  nav a:hover,
  nav a:focus {
    color: white;
    background-color:#2563eb ;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    -ms-border-radius: 20px;
    -o-border-radius: 20px;
}

  .burger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
  }
  
/* === MENU MOBILE === */

.mobile-menu {
  display: flex;
 }
@media (max-width: 768px) {
  .mobile-menu {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    right: 0;
    border: 1px solid #ddd;
    }

  .mobile-menu.show {
    display: flex;
  }

  .burger {
    display: block;
  }
}

 h2{
  margin-top: 20px;
  text-align: center;
}

@media (max-width:768px) {
  h2{
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 0;
    text-align: center;
  }
}

  main{
    
    padding-top: 0px;
    padding-bottom: 0px ;
   
  }

/* Conteneur des cartes */

#cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1280px;
 margin: 1rem auto;
  padding: 0 1rem;
}

/* Responsif : en dessous de 768px -> une seule colonne */

@media (max-width: 768px) {
  #cards-container {
    grid-template-columns: 1fr;
    
  }
}

/* Style des cartes */

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease;
  line-height: 2;
  
}

.card img {
  max-width: 110px;
  max-height:140px;
  object-fit: cover;
  border-radius:8px ;
  margin-bottom: 0.5rem;
  box-shadow: 3px 4px 0px rgb(231, 229, 229);
  -webkit-border-radius:8px ;
  -moz-border-radius:8px ;
  -ms-border-radius:8px ;
  -o-border-radius:8px ;
}

.card button {
  background: #2563eb;
  color: white;
  border: none;
  width: 80px;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 10px;
}

.card button:hover {
  background: #1d4ed8;
}

.card:hover {
  transform: translateY(-4px);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pagination button {
  border: 1px solid #ddd;
  background: #fff;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.pagination button.active {
  background: #2563eb;
  color: white;
}

@media (max-width: 768px) {
  nav a {
    display: block;
  }
  .burger {
    display: block;
     }

  .grid {
    grid-template-columns: 1fr;
    padding:0px;

  }
  .card{
   width: 90%;
    margin: 10px auto;
    padding: 15px 15px 0px;

  }

  .card button{
    margin-bottom:20px;
  }
 
  main{
    padding:0px 0px
  }
}

#modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none; /* sera affiché en JS */
 
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

/* Contenu de la modale */

#modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  /*border:solid 6px #2563eb;*/
  padding: 1.5rem;
  max-width: 600px;
  max-height: 600px;
  width: 90%;
  box-shadow: 2px 4px 1px 2px rgba(17, 17, 18, 0.809);
  text-align: left;
  overflow: auto;
  scrollbar-width: none;
  font-size: 18px;
  font-weight: 400;
  transition: 0.5s ease-in-out;
  line-height: 1.6; /* espace vertical entre les lignes de texte */
}

#modal-image{
 max-width: 110px;
 
 /*max-height: 141px;*/
 
}

#modal-image img{
 
 float: left;
 margin-right: 20px;
 margin-bottom: 20px;
 border-radius:8px ;
 box-shadow: 2px 4px 0px rgb(231, 229, 229);
 -webkit-border-radius:8px ;
 -moz-border-radius:8px ;
 -ms-border-radius:8px ;
 -o-border-radius:8px ;
}

@media (max-width:880px) {
  #modal-content{
    font-size: 14px;
    max-width: 100%;
    max-height: 350px;
    padding: 0.8rem;
  
  }
  #modal-image img{
    width: 75px;
  }
}

ul{
  list-style: none;
}

#cards-container::-webkit-scrollbar {
  display: none;
}

/* Bouton de fermeture */
.close-btn {
  position:absolute;
  top:0px;
  right: 0px;
  /*background: rgb(10, 10, 10);*/
  color:rgb(10, 10, 10) ;
  border: none;
  margin-top: 0rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-transition: background 0.2s ease;
  -moz-transition: background 0.2s ease;
  -ms-transition: background 0.2s ease;
  -o-transition: background 0.2s ease;
}

.close-btn:hover {
  background: #dc2626;
}

footer {
  text-align: center;
  width: 100%;
  padding: 15px;
  background: #222;
  color: white;
  margin-top: 20px;
}