body {
  font-family: Arial, sans-serif;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  size: 16px;
}

.back {
  position: fixed;
  top: 20px;
  left: 20px;
  text-decoration: none;
  color: #ffffff;
  font-size: 20px;
  background: rgba(255, 0, 0, 0.85);
  padding: 8px 14px;
  border-radius: 8px;
}

.suivant {
  position: fixed;
  top: 20px;
  right: 20px;
  text-decoration: none;
  color: #ffffff;
  font-size: 20px;
  background: rgba(255, 0, 0, 0.85);
  padding: 8px 14px;
  border-radius: 8px;
}

h1 {
  text-align: center;
  font-size: clamp(48px, 6vw, 100px);
  margin: 70px 0 30px;
  font-weight: 700;
  color: #ffffff;
}

.container {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 20px;
  align-content: center;
  flex-wrap: wrap;
}
.container1 {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 20px;
  align-content: center;
  flex-wrap: wrap;
}


.card {
  padding: 20px;
  width: 400px;
  size: 16px;
  justify-content: space-evenly;
  flex-wrap: wrap;
  align-items: stretch;
  font-size: 20px;
  text-align: justify;
  color: #ffffff;
  text-align: center;
  
}

.card img {
  width: 90%;
  height: 90%;
  object-fit: cover; /*pour que limage ne soit pas flou*/
  border-radius: 8px; /*pour faire la bordure ronde*/
  
}
.page-background {
  position: fixed;
  inset: 0;
  background: url("../media/Caufield_celi.jpg") center/cover no-repeat;
  z-index: -2;
}

.page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: -1;
}

.title {
  text-align: center;
  font-size: 100px;
}
nav :hover{
  background: rgb(49, 49, 243);
  transition: 2s;
}


@media (max-width: 600px) {

  body {
    font-size: 16px; 
    margin: 0;
    overflow-x: hidden;
  }

  .page-background {
    background-size: cover;
    background-position: center;
  }

  
  h1 {
    font-size: clamp(28px, 8vw, 38px);
    margin: 84px 12px 16px; 
    line-height: 1.2;
    text-align: center;
  }

  .back,
  .suivant {
    font-size: 15px;
    padding: 6px 10px;
    top: 12px;
    border-radius: 8px;
    z-index: 10;
  }
  .back { left: 12px; }
  .suivant { right: 12px; }


  .container,
  .container1 {
    flex-direction: column;
    gap: 16px;
    padding: 0 12px 20px;
    align-items: center;
  }

  .card {
    width: 100%;
    max-width: 520px;    
    padding: 14px;
    font-size: 16px;      
    line-height: 1.5;
    text-align: center;   
  }

  
  .card img {
    width: 100%;
    height: auto;
    max-height: 60vh;     
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto 8px;
  }


  .title {
    font-size: 36px;
  }

  nav :hover {
    transition: 0.2s;
  }
}


@media (max-width: 380px) {

  h1 {
    font-size: clamp(24px, 7.5vw, 30px);
    margin: 76px 10px 14px;
  }

  .back,
  .suivant {
    font-size: 14px;
    padding: 5px 8px;
    top: 10px;
  }

  .card {
    padding: 12px;
    font-size: 15px;
  }

  .card img {
    max-height: 50vh;
  }
}

@media (min-width: 601px) and (max-width: 900px) {

  h1 {
    font-size: clamp(34px, 5.2vw, 56px);
    margin: 90px 16px 20px;
  }

  .back,
  .suivant {
    font-size: 16px;
    padding: 7px 12px;
    top: 14px;
  }

  .container,
  .container1 {
    gap: 20px;
  }

  .card {
    width: calc(50% - 24px);  
    max-width: 520px;
    font-size: 18px;
  }

  .card img {
    width: 100%;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
