/* ================= Global ================= */

/* ✅ Compter padding/border dans la largeur totale */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden; /* empêche le scroll horizontal */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #fff;
  font-weight: 400;
}

main {
  flex-grow: 1;
}

/* ================= Animations ================= */

.hidden {
  opacity: 0;
}

.visible {
  opacity: 1;
}

@keyframes slideDown {
  0% { transform: translateY(-40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideRight {
  0% { transform: translateX(-40px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.slide-down.visible {
  animation: slideDown 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.slide-right.visible {
  animation: slideRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ================= Buttons ================= */

.btn {
  position: relative;
  font-size: 20px;
  background-color: rgb(231, 82, 22);
  padding: 15px 50px;
  color: white;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.2s ease, padding-right 0.3s ease;
  max-width: 100%; 
  display :flex ; 
  flex-direction :column;
  align-items:center ;
}

.btn > * {
  flex-shrink: 4;
}


.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 8px solid white;
  opacity: 1;
  transition: right 0.3s ease, opacity 0.3s ease;
}

.btn:hover {
  background-color: rgba(0, 0, 0, 0.454);
  padding-right: 70px;
}

.btn:hover::after {
  right: 30px;
  opacity: 1;
}

/* ================= Section Images ================= */

.img-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 850px;
  background-size: cover;
  background-position: center;
  text-align: center;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 15%;
  gap: 15px;
  font-size: x-large;
  width: 100%;
  padding: 0 15px; /* éviter débordement */
}

.text {
  width: 100%;
  max-width: 700px;
  background-color: rgba(0, 0, 0, 0.484);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

h2 {
  font-size: xxx-large;
}

p {
  line-height: 2;
}

/* ================= Second Section ================= */

.second_section {
  background-color: rgb(231, 88, 32);
  color: white;
  text-align: center;
  padding-top: 55px;
  font-size: x-large;
}

.ss_text {
  margin: 0 auto;
  padding: 0 10%;
  max-width: 100%;
}

.bold_text {
  font-weight: bold;
}

/* ==================== Media Queries ==================== */

/* -------- Mobile (max 480px) -------- */
@media (max-width: 480px) {
  .img-section {
    height: 600px;
    padding: 20px;
  }

  .overlay-content {
    margin-top: 35%;
    gap: 10px;
    font-size: medium;
  }

  h2 { font-size: 1.6rem; }

  .text {
    width: 90%;
    padding: 20px;
    font-size: 0.9rem;
  }

  p {
    line-height: 1.5;
    font-size: 0.9rem;
  }

  button {
    font-size: 16px;
    padding: 12px 40px;
  }

  button:hover { padding-right: 60px; }

  button::after { right: 15px; }

  button:hover::after { right: 25px; }

  .second_section {
    font-size: large;
    padding-top: 40px;
  }

  .ss_text { padding: 0 5%; }
}

/* -------- Tablette (481px → 768px) -------- */
@media (min-width: 481px) and (max-width: 768px) {
  .img-section {
    height: 700px;
    padding: 40px;
  }

  .overlay-content {
    margin-top: 25%;
    font-size: large;
  }

  h2 { font-size: 2.2rem; }

  .text {
    width: 80%;
    padding: 30px;
    font-size: 1rem;
  }

  p {
    line-height: 1.7;
    font-size: 1rem;
  }

  button {
    font-size: 18px;
    padding: 14px 45px;
  }

  .second_section {
    font-size: x-large;
    padding-top: 50px;
  }

  .ss_text { padding: 0 8%; }
}
