/* ================== BASE ================== */

.imagetext {
  padding: 40px 15px 60px;
  background: #fafafa;
}

.imagetext-container{position: relative;}

/* Image */
.imagetext-img {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
}

.imagetext-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================== MOBILE : content en absolute ================== */

.imagetext-content {
  position: absolute;
  left: 50%;
  bottom: 2em;
  transform: translateX(-50%);
  width: calc(100% - 2em);
  max-width: 320px;
  padding: 1.5rem 2rem;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.imagetext-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #444;
  margin-bottom: 14px;
}

.imagetext-text h1,.imagetext-text h2,.imagetext-text h3,.imagetext-text h4,.imagetext-text h5 {
  text-align: center;
  color: #000;
}

.imagetext-text p {
  color: #000;
}

.imagetext-text strong {
  color: #000;
}

/* Bouton */
.imagetext-button{
  text-align: center;
}

.imagetext-button .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 18px;
  background-color: #000;
  border-color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.imagetext-button .btn:hover {
  background-color: #111;
  border-color: #111;
}

.imagetext-button .material-icons {
  font-size: 18px;
  line-height: 1;
}

/* ================== DESKTOP : layout côte à côte ================== */

@media (min-width: 768px) {
  .imagetext {
    padding: 48px 30px 72px;
  }

  .imagetext > .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1120px;
  }

  .imagetext-img {
    flex: 0 0 40%;
    max-width: 420px;
    margin: 0;

    /* 👉 ratio 4:3 en desktop */
    aspect-ratio: 1 / 1;
  }

  .imagetext-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  /* on enlève l’absolute en desktop */
  .imagetext-content {
    position: static;
    transform: none;
    width: auto;
    max-width: 460px;
    padding: 24px 24px 26px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .imagetext-text h1,.imagetext-text h2,.imagetext-text h3,.imagetext-text h4,.imagetext-text h5 {
    text-align: left;
  }

  .imagetext-button{
    text-align: left;
  }
}
