/* --- Déclaration de la police HostGrotesk --- */
@font-face {
    font-family: 'HostGrotesk';
    src: url('../fonts/HostGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'HostGrotesk';
    src: url('../fonts/HostGrotesk-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
  }  

:root {
    --mobile-h: 94vh; /* hauteur cible mobile */
    --mobile-w: 98vw; /* largeur cible mobile */
  }
  
  html,
  body {
    height: 100%;
  }
  
  body {
    font-family: 'HostGrotesk', sans-serif; /* Remplacer l'ancienne pile de polices */
    margin: 0;
  }  
  
  /* Floater centré sur tout l’écran avec fondu */
  .promo-floater {
    position: fixed;
    z-index: 2147483647;
    inset: 0;
    display: grid;
    place-items: center;
  
    /* === CORRECTIONS === */
    /* 1. L'élément est invisible ET non-cliquable par défaut. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Sécurité pour que rien ne soit cliquable. */
  
    /* 2. On ajoute la visibilité à la transition pour éviter les apparitions brusques. */
    transition: opacity 240ms ease-out, visibility 240ms;
  }
  
  /* Classe JS pour afficher le pop-up */
  .promo-visible {
    /* === CORRECTIONS === */
    /* 3. On réactive la visibilité et les clics quand le pop-up est affiché. */
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Permet au fond de réagir (utile pour fermer en cliquant à côté). */
  }
  
  /* Légère translation à l’apparition */
  .promo-center {
    /* On s'assure que la carte elle-même est toujours cliquable, même si son parent a "pointer-events: none" */
    pointer-events: auto;
    transform: translateY(8px);
    transition: transform 240ms ease-out;
  }
  
  .promo-visible .promo-center {
    transform: translateY(0);
  }
  
  /* Carte + ombre */
  .promo-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    background: #fff;
    isolation: isolate;
  
    /* Logique de taille */
    width: 90vw;
    max-width: 980px;
    height: auto;
    max-height: 90vh;
  
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Image responsive, sans déformation */
  .promo-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  /* Bouton fermeture visible */
  .promo-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 24px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    touch-action: manipulation;
  }
  
  /* Mobile: quasi plein écran */
  @media (max-width: 600px) {
    .promo-card {
      border-radius: 12px;
      width: clamp(280px, var(--mobile-w), 100vw);
      max-width: var(--mobile-w);
      max-height: var(--mobile-h);
    }
    .promo-img {
      max-height: var(--mobile-h);
    }
    .promo-close {
      top: 8px;
      right: 8px;
      width: 46px;
      height: 46px;
      line-height: 46px;
      font-size: 26px;
      background: rgba(0, 0, 0, 0.88);
    }
  }
  
  /* Safe areas iOS (encoches) */
  @supports (padding: max(0px)) {
    @media (max-width: 600px) {
      .promo-card {
        margin: max(6px, env(safe-area-inset-top))
          max(6px, env(safe-area-inset-right))
          max(6px, env(safe-area-inset-bottom))
          max(6px, env(safe-area-inset-left));
      }
    }
  }
  