/* Import de la police Almarai */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300&display=swap');

body {
  font-family: 'Almarai', sans-serif;
}

/* Style du bouton principal */
.webform-file-button {
  position: relative;
  display: inline-flex;
  align-items: center; /* centre verticalement texte + icône */
  justify-content: center; /* centre horizontalement le texte */
  padding: 12px 20px 12px 45px; /* espace pour icône à gauche */
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  //background: url('https://form.univ-usto.dz/sites/default/files/backrg.jpg') no-repeat center center;
  background-size: cover;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: filter 0.3s ease, background-position 0.3s ease;
}

/* Hover sur le bouton */
.webform-file-button:hover {
  filter: brightness(1.1); /* éclaircit légèrement le bouton */
  background-position: center top; /* léger déplacement du fond */
}

/* Icône à gauche */
.webform-file-button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url('/sites/default/files/telecharger.png') no-repeat center center;
  background-size: contain;
  transition: transform 0.3s ease;
}

/* Hover sur l'icône */
.webform-file-button:hover::before {
  transform: translateY(-50%) scale(1.1);
}

/* Texte centré correctement si bouton très large */
.webform-file-button span {
  display: inline-block;
  text-align: center;
  width: 100%;
}

/* --- Responsive pour mobile et tablette --- */

/* Tablette (max 1024px) */
@media (max-width: 1024px) {
  .webform-file-button {
    padding: 10px 18px 10px 40px;
    font-size: 15px;
    border-radius: 6px;
  }

  .webform-file-button::before {
    width: 18px;
    height: 18px;
    left: 10px;
  }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
  .webform-file-button {
    padding: 8px 16px 8px 38px;
    font-size: 14px;
    border-radius: 5px;
  }

  .webform-file-button::before {
    width: 16px;
    height: 16px;
    left: 8px;
  }
}

/* Petit mobile (max 480px) */
@media (max-width: 480px) {
  .webform-file-button {
    padding: 6px 12px 6px 36px;
    font-size: 13px;
  }

  .webform-file-button::before {
    width: 14px;
    height: 14px;
    left: 6px;
  }
}
