/* ==========================================================================
   Mage Studio · Hero de l'accueil
   Réalisations qui défilent en fond, nav transparente en haut,
   cartes « notification » à droite, titre en bas à gauche.
   La nav flottante (.navbar) n'apparaît qu'une fois le hero dépassé.
   ========================================================================== */

.mage-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--black);
}

/* Fond : les colonnes d'images existantes (#frag-grid) */
.mage-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.mage-hero-bg .dix-flex { height: 100%; }
.mage-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, #000000b3 0%, #00000040 22%, #00000026 50%, #000000cc 82%, #000 100%),
    #0000004d;
}

/* Barre du haut */
.mage-hero-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 24px;
}
.mage-hero-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.mage-hero-links {
  display: flex;
  gap: 20px;
  margin-left: 15vw;
}
.mage-hero a { color: var(--white); text-decoration: none; }
.mage-hero-links a,
.mage-hero-brand {
  font-size: 12px;
  line-height: 1.5;
  transition: opacity .3s;
}
.mage-hero-links a { opacity: .85; }
.mage-hero-links a:hover { opacity: .5; }
.mage-hero-brand { font-weight: 500; }

.mage-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}
/* Cartes notification */
.mage-notifs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 400px;
}
.mage-notif {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffffd9;
  color: #111 !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px #00000033;
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  animation: mage-notif-in .7s cubic-bezier(.2, .8, .2, 1) forwards;
  transition: transform .3s, background .3s;
  corner-shape: squircle;
}
.mage-notif:nth-child(2) { animation-delay: .9s; }
.mage-notif:first-child { animation-delay: .4s; }
.mage-notif:hover { background: #fffffff2; transform: translateY(-2px); }
.mage-notif-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.mage-notif-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mage-notif-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mage-notif-title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.mage-notif-sub {
  font-size: 14px;
  line-height: 1.3;
  color: #0000008c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mage-notif-cta {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: #0000000f;
  font-size: 12px;
  font-weight: 500;
}
@keyframes mage-notif-in {
  to { opacity: 1; transform: none; }
}

/* Titre en bas à gauche */
.mage-hero-bottom {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
/* Titre : toujours sur deux lignes à partir de la tablette, plus grand sur grand écran */
.mage-hero-title span { display: block; }
@media screen and (min-width: 768px) {
  .mage-hero-title span { white-space: nowrap; }
}
.mage-hero-title {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 84px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.mage-hero-btn {
  display: inline-flex;
  padding: 14px 20px;
  border-radius: 12px;
  background: #ffffff26;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 16px;
  transition: background .3s;
  corner-shape: squircle;
}
.mage-hero-btn:hover { background: #ffffff40; }

/* Nav flottante : cachée tant qu'on est dans le hero */
.navbar.navbar-scroll {
  transform: translateY(calc(-100% - 24px));
  pointer-events: none;
  /* Sortie : rapide et discrète */
  transition: transform .45s cubic-bezier(.4, 0, 1, 1);
}
.navbar.navbar-scroll.is-visible {
  transform: none;
  pointer-events: auto;
  /* Entrée : longue décélération pour une arrivée douce */
  transition: transform .85s cubic-bezier(.25, 1, .5, 1);
}

@media screen and (max-width: 991px) {
  .mage-hero-links { margin-left: 0; }
  .mage-notifs { width: 340px; }
}

@media screen and (max-width: 767px) {
  .mage-hero-top { grid-template-columns: 1fr auto; padding: 20px; }
  .mage-hero-links { display: none; }
  .mage-notifs { display: none; }
  .mage-hero-bottom { left: 20px; right: 20px; bottom: 28px; }
  .mage-hero-bg .col-3 { display: none; }
  .mage-hero-bg .col-1, .mage-hero-bg .col-2 { width: 50%; }
  .mage-hero-bg .image-fragments { aspect-ratio: 16 / 10; min-height: 0; }
  .mage-hero-title span { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .mage-notif { animation: none; opacity: 1; transform: none; }
}

/* Respiration entre le hero et la section suivante */
.mage-hero + .work-section { padding-top: 160px; }
@media screen and (max-width: 767px) {
  .mage-hero + .work-section { padding-top: 96px; }
}

/* Boutons du hero : principal + secondaire (contour) */
.mage-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mage-hero-btn.is-secondary {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 1px #ffffff40;
}
.mage-hero-btn.is-secondary:hover {
  background: #ffffff14;
  box-shadow: inset 0 0 0 1px #ffffff66;
}
