/* Sticky menu */
.main-header-bar {
  width: 100%;
  position: fixed;
}

/* Supprimer les marges et le padding du body */
body {
  margin: 0 !important;
  padding: 0 !important;
}

/* Initialiser la position de la section */
.scroll-up-section {
  position: relative;
  transition: transform 0.1s ease-in-out;
}

/* Oiseau bleu */
.oiseau-bleu {
  position: fixed;
  pointer-events: none;
  width: 150px;
  height: auto;
  z-index: 9999;
  transition: transform 0.1s ease;
}

/* Cacher l'oiseau sur mobile */
@media (hover: none), (pointer: coarse) {
  .oiseau-bleu {
    display: none !important;
  }
}
/* Réduire slogan sur mobile */
@media (max-width: 768px) {
  .texte-rayon {
    font-size: 1.1em !important;
  }
}

/* Conteneur du logo avec perspective */
.site-branding.ast-site-identity {
  position: relative;
  width: 130px;
  height: 130px;
  perspective: 1000px;
  overflow: visible;
  cursor: pointer;
  display: flex;
  align-items: center; /* Vertically center */
}

/* Logo principal (face avant) */
.site-logo-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 130px;
  height: 130px;
  backface-visibility: hidden;
  transition: transform 0.7s ease;
  z-index: 2;
}

/* Lien et image dans le logo */
.site-logo-img a,
.site-logo-img a img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto !important;
}

/* Logo secondaire (face arrière) */
.site-branding.ast-site-identity::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 130px;
  height: 130px;
  background-image: url('https://www.alice-escudero.fr/wp-content/uploads/2025/04/alice-escudero_coeurFichier-1@4x.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  transition: transform 0.7s ease;
  pointer-events: none;
  z-index: 1;
}

/* Flip au hover uniquement desktop */
@media (hover: hover) and (pointer: fine) {
  .site-branding.ast-site-identity:hover .site-logo-img {
    transform: rotateY(180deg);
  }
  .site-branding.ast-site-identity:hover::before {
    transform: rotateY(0deg);
  }
}

/* Désactivation flip et image arrière sur mobile */
@media (hover: none), (pointer: coarse) {
  .site-branding.ast-site-identity:hover .site-logo-img,
  .site-branding.ast-site-identity:hover::before {
    transform: none !important;
  }
  .site-branding.ast-site-identity::before {
    display: none !important;
  }
}

/* Réduction taille logo sur mobile */
@media (max-width: 768px) {
  .site-branding.ast-site-identity,
  .site-logo-img,
  .site-branding.ast-site-identity::before {
    width: 80px !important;
    height: 80px !important;
  }
}

/* Taille de base des entrées de menu */
.main-header-menu li a {
  font-size: 1em;
  font-weight: normal;
  color: black;
  transition: font-size 0.3s ease, font-weight 0.3s ease, color 0.3s ease;
  display: inline-block;
  transform-style: preserve-3d;
}

/* Agrandir, mettre en gras et changer la couleur au survol */
.main-header-menu li a:hover {
  text-decoration: underline;
  text-underline-offset: 8px;
  color: black !important;
}

/* Le logo reste cliquable malgré le flip */
.site-branding.ast-site-identity a,
.site-logo-img {
  pointer-events: auto !important;
}

/* Supprimer pointer-events sur pseudo-élément pour ne pas bloquer clic */
.site-branding.ast-site-identity::before {
  pointer-events: none !important;
}
/* Aligner le bouton voir mon portfolio à gauche sur la version mobile */
.wp-block-uagb-buttons .uagb-buttons__wrap {
  justify-content: flex-start !important;
}
/* Masquer certaines images sur mobile */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}
@media screen and (max-width: 767px) {
  .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media {
    display: none !important;
  }

  .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
    width: 100% !important;
  }
}
/* Mise en forme des images miniature hover */
.miniature {
  position: relative;
  overflow: hidden;
  width: 300px;
  height: 300px; /* carré */
  cursor: pointer;
  border-radius: 0 !important;
  max-width: none; /* supprime la limite max précédente */
}

.miniature img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
  border-radius: 0 !important;
}

.overlay {
  position: absolute !important;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
  border-radius: 0 !important;
}

.overlay-text {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  user-select: none;
}

.miniature:hover img,
.miniature.touch-active img {
  transform: scale(1.1);
}

.miniature:hover .overlay,
.miniature.touch-active .overlay {
  opacity: 1;
  /* on ne change plus pointer-events */
}

/* Mobile */
@media (hover: none) and (pointer: coarse) {
  .miniature {
    touch-action: manipulation;
  }
}
