/*
 * ARES SIGNATURE V3
 * Correctif du débordement et du glissement mobile.
 */

/* La page ne doit jamais déborder sur l'axe horizontal. */
#espace,
#espace .espace-defilement,
#espace .espace-corps,
#espace .espace-panneau {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

#espace {
  overflow-x: clip;
}

#espace .espace-defilement {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

#espace .espace-corps {
  width: 100%;
  overflow-x: clip;
}

/* Les cartes restent dans la largeur de l'écran. */
#espace .espace-panneau > *,
#espace .formulaire,
#espace .bloc-donnees,
#espace .a18-card,
#espace .a18-v6-card,
#espace .espace-resume {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

/* Les champs ne poussent plus la page vers la droite. */
#espace input,
#espace textarea,
#espace select {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

/* La navigation est le seul élément qui défile
   horizontalement. */
#espace .espace-onglets {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}

#espace .espace-onglets::-webkit-scrollbar {
  display: none;
}

#espace .espace-onglets > button[data-section] {
  flex-shrink: 0;
  white-space: nowrap;
}

/* La bannière et le profil ne doivent pas déborder. */
#espace .profil-banniere,
#espace .espace-resume,
#espace .espace-identite {
  min-width: 0;
  max-width: 100%;
}

#espace .espace-email,
#espace .espace-meta {
  overflow-wrap: anywhere;
}

/* Correctifs spécifiques aux petits écrans. */
@media (max-width: 720px) {
  #espace .espace-corps {
    width: 100%;
    padding-inline: 14px;
  }

  #espace .espace-panneau {
    width: 100%;
  }

  #espace .ajout-memoire {
    display: flex;
    width: 100%;
    min-width: 0;
  }

  #espace .ajout-memoire input {
    flex: 1 1 0%;
    width: 0;
    min-width: 0;
  }

  #espace .ajout-memoire button {
    flex: 0 0 auto;
  }

  #espace .visuels-ligne {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }

  #espace .liste-sessions,
  #espace .liste-memoire {
    min-width: 0;
    max-width: 100%;
  }
}

/* =====================================================
   ARES SIGNATURE · BANNIÈRE CENTRÉE
   ===================================================== */

/* Bannière principale du profil */
#espace .profil-banniere {
  background-position: center 42% !important;
  background-size: cover !important;
  background-repeat: no-repeat;
}

/* Aperçu dans les paramètres du profil */
#espace .apercu-banniere {
  background-position: center 42% !important;
  background-size: cover !important;
  background-repeat: no-repeat;
}

/* Ajustement pour iPhone et petits écrans */
@media (max-width: 720px) {
  #espace .profil-banniere {
    background-position: center 45% !important;
  }

  #espace .apercu-banniere {
    background-position: center 45% !important;
  }
}

