/**
 * =============================================================================
 * APPHELP - Styles CSS
 * =============================================================================
 * 
 * Structure du fichier :
 * 
 * 1. GLOBAL & VARIABLES     - Design tokens, reset, base
 * 2. NAVIGATION             - Navbar fixe avec blur
 * 3. BUTTONS                - Styles des boutons (iOS, secondary)
 * 4. HERO SECTION           - Section d'accueil avec mockup iPhone
 * 5. SECTIONS GÉNÉRIQUES    - Layout des features
 * 6. WIDGET ANIMATION       - Animation de la main tapant sur le widget
 * 7. SOCIALS                - Grille des réseaux sociaux
 * 8. TIPEEE                  - Section de soutien
 * 9. PAGES LÉGALES          - CGU, Mentions, Confidentialité
 * 10. FOOTER                - Pied de page
 * 11. RESPONSIVE            - Adaptations mobile/desktop
 * 12. LIVE MAP              - Interface de localisation en direct
 * 
 * Convention de nommage : BEM simplifié avec préfixe "ah-" (Apphelp)
 * 
 * @author Matteo Quintaneiro
 * @version 2025.11
 * =============================================================================
 */

/* =============================================================================
   1. GLOBAL & VARIABLES
   ============================================================================= */

/**
 * Design Tokens
 * Palette de couleurs et valeurs réutilisables
 */
:root {
  /* Couleurs principales */
  --ah-color-dark-purple: #623aad;
  --ah-color-medium-purple: #8475bf;
  --ah-color-medium-light-purple: #9d91cc;
  --ah-color-light-purple: #cfc5e3;
  --ah-color-off-white: #faf9fc;
  --ah-color-bg: #ffffff;
  
  /* Ombres */
  --ah-color-shadow-soft: rgba(98, 58, 173, 0.15);
  --ah-color-shadow-hover: rgba(98, 58, 173, 0.25);
  
  /* Layout */
  --ah-max-width: 1140px;
  --ah-radius-l: 32px;
  --ah-radius-m: 20px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Compense la navbar fixe */
}

/* Animation de scroll plus douce et flottante */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: auto; /* On gère le smooth nous-mêmes en JS pour plus de contrôle */
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", "Aspekta", system-ui, -apple-system, sans-serif;
  background: var(--ah-color-bg);
  color: var(--ah-color-dark-purple);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* =============================================================================
   2. NAVIGATION
   ============================================================================= */
.ah-navbar {
  position: fixed; /* Fixed pour rester visible */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(98, 58, 173, 0.06);
  padding: 16px 24px;
  transition: all 0.3s ease;
}

.ah-navbar-inner {
  max-width: var(--ah-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ah-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0; /* Empêche le logo d'être écrasé */
}

.ah-logo-svg {
  height: 26px;
  width: 132px; /* Largeur fixe calculée pour éviter la coupure (ratio ~5.05) */
  display: block;
  overflow: visible;
}

.ah-nav-links {
  display: none;
  gap: 32px;
  align-items: center;
}

.ah-nav-link {
  color: var(--ah-color-dark-purple);
  opacity: 0.7;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: opacity 0.2s;
}

.ah-nav-link:hover { opacity: 1; }

/* =============================================================================
   3. BUTTONS
   ============================================================================= */
.ah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  gap: 10px;
}

.ah-btn:active { transform: scale(0.98); }

/* Bouton iOS Premium */
.ah-btn-ios {
  background: var(--ah-color-dark-purple);
  color: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(98, 58, 173, 0.5);
  padding: 14px 32px;
  font-size: 17px;
}

.ah-btn-ios svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px; /* Alignement optique pomme */
}

.ah-btn-ios:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -10px rgba(98, 58, 173, 0.6);
}

.ah-btn-secondary {
  background: transparent;
  color: var(--ah-color-dark-purple);
  border: 2px solid rgba(98, 58, 173, 0.1);
}

.ah-btn-secondary:hover {
  border-color: var(--ah-color-dark-purple);
  background: rgba(98, 58, 173, 0.04);
}

/* =============================================================================
   4. HERO SECTION
   ============================================================================= */
.ah-hero {
  position: relative;
  max-width: var(--ah-max-width);
  margin: 0 auto;
  min-height: 100vh; /* Prend toute la hauteur */
  /* Mobile layout: Column */
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center; /* Centre verticalement */
  padding: 120px 20px 60px; /* Padding top compense la navbar */
  gap: 60px;
}

.ah-hero-content {
  flex: 1;
  text-align: center;
  max-width: 600px;
  z-index: 2;
}

.ah-hero-tagline {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ah-color-dark-purple);
  background: #F4F0FF;
  padding: 8px 16px;
  border-radius: 99px;
  margin-bottom: 24px;
}

.ah-hero-title {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0 0 24px;
  color: #1a1a1a;
}

.ah-hero-highlight {
  color: var(--ah-color-dark-purple);
}

.ah-hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: #555;
  margin: 0 auto 40px;
  font-weight: 500;
}

.ah-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.ah-hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 400px; /* Limite largeur mobile */
}

/* Le Mockup */
.ah-mockup-container {
  position: relative;
  border-radius: 40px;
  /* Petit effet de lévitation */
  animation: float 6s ease-in-out infinite;
  z-index: 9999; /* Au-dessus de tout pour que la main ne soit pas clippée par les sections */
  isolation: isolate; /* Crée un contexte de stacking indépendant */
}

/* Wrapper pour le mockup et les éléments externes */
.ah-mockup-wrapper {
  position: relative;
  width: 280px; /* Largeur fixe du mockup pour que la main se positionne bien */
  margin: 0 auto;
}

.ah-mockup {
  width: 280px;
  height: 580px; /* Ratio iPhone approx */
  background: #f0f0f0;
  border-radius: 48px;
  border: 10px solid #1C1C1E; /* Bordure iPhone réduite de 2px */
  box-shadow: 
    0 0 0 2px #3a3a3a, /* Contour extérieur fin */
    0 30px 60px -15px rgba(0, 0, 0, 0.3); /* Ombre portée */
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Dynamic Island / Notch simulation */
.ah-mockup::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 85px; /* Réduit de 120px */
  height: 26px;
  background: #000;
  border-radius: 14px; /* Ajusté proportionnellement */
  z-index: 10;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* =============================================================================
   5. SECTIONS GÉNÉRIQUES (Features)
   ============================================================================= */
.ah-section {
  padding: 100px 20px;
  isolation: isolate; /* Empêche les sections de créer un contexte de stacking qui bloquerait la main */
}

.ah-section-light {
  background: var(--ah-color-off-white);
  border-radius: var(--ah-radius-l);
  margin: 20px; /* Effet carte */
}

.ah-feature-container {
  max-width: var(--ah-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: center;
}

.ah-feature-text {
  flex: 1;
  max-width: 520px;
}

.ah-feature-icon {
  margin-bottom: 32px;
  display: inline-block;
  filter: drop-shadow(0 10px 20px rgba(98, 58, 173, 0.2));
}

.ah-feature-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 20px;
  line-height: 1.2;
  color: #1a1a1a;
}

.ah-feature-desc {
  font-size: 18px;
  line-height: 1.7;
  color: #666;
  margin-bottom: 32px;
}

.ah-feature-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* =============================================================================
   6. WIDGET ANIMATION SECTION
   Animation de la main tapant sur le widget de l'écran verrouillé
   ============================================================================= */
.ah-widget-anim-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.ah-screen-layer {
  position: absolute;
  top: 0;
  left: -1px; /* Décalage vers la droite */
  width: calc(100% + 2px); /* Légèrement plus large pour éviter la bande */
  height: calc(100% + 2px); /* Légèrement plus haut aussi */
  background-size: 100% 100%; /* Force l'image à remplir exactement le conteneur */
  background-position: center center;
  background-repeat: no-repeat;
  transition: opacity 0.5s ease-in-out;
}

.ah-screen-lock {
  z-index: 1;
  opacity: 1;
  animation: fadeOutScreen 6s infinite;
}

.ah-screen-call {
  z-index: 2;
  opacity: 0;
  animation: fadeInScreen 6s infinite;
}

.ah-hand-cursor {
  position: absolute;
  z-index: 10000; /* Au-dessus de tout, même du conteneur */
  width: 180px; /* Main beaucoup plus grande (taille réaliste vs téléphone) */
  height: auto;
  top: 120%;
  left: 100%;
  pointer-events: none;
  transform-origin: 15% 5%; /* Pivot sur l'index pour le scale */
  filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.25)); /* Ombre moins puissante */
  animation: handTapAction 6s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.ah-widget-click-effect {
  position: absolute;
  top: calc(80% + 8px); /* Position du widget + 2px en bas */
  left: calc(35% + 8px); /* Position du widget + 4px à droite */
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(0);
  z-index: 5;
  animation: clickRipple 6s infinite;
}

/* Séquence d'animation organique avec fade-in/out smooth */
@keyframes handTapAction {
  0% {
    top: calc(90% - 30px); /* 26px plus haut (16 + 10) */
    left: calc(80% - 13px); /* 13px plus à gauche (8 + 5) */
    transform: translate(0, 15px);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 0;
  }
  8% {
    /* Fade-in + glisse vers le haut */
    top: calc(90% - 30px);
    left: calc(80% - 13px);
    transform: translate(0, 0);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 1;
  }
  35% {
    /* Arrive sur le widget */
    top: 80%;
    left: 35%;
    transform: translate(0, 0);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 1;
  }
  40% {
    /* Press */
    top: 80%;
    left: 35%;
    transform: translate(0, 0) scale(0.95);
    filter: drop-shadow(2px 5px 10px rgba(0,0,0,0.25));
    opacity: 1;
  }
  45% {
    /* Release */
    top: 80%;
    left: 35%;
    transform: translate(0, 0);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 1;
  }
  52% {
    /* Pause après le clic (main reste immobile) */
    top: 80%;
    left: 35%;
    transform: translate(0, 0);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 1;
  }
  68% {
    /* Retour vers position initiale */
    top: calc(90% - 30px);
    left: calc(80% - 13px);
    transform: translate(0, 0);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 1;
  }
  76% {
    /* Toujours visible à la position finale */
    top: calc(90% - 30px);
    left: calc(80% - 13px);
    transform: translate(0, 0);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 1;
  }
  84% {
    /* Fade-out + glisse vers le bas */
    top: calc(90% - 30px);
    left: calc(80% - 13px);
    transform: translate(0, 15px);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 0;
  }
  100% {
    /* Reste invisible jusqu'à la fin de la boucle */
    top: calc(90% - 30px);
    left: calc(80% - 13px);
    transform: translate(0, 15px);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.35));
    opacity: 0;
  }
}

@keyframes clickRipple {
  0%, 37% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  38% { transform: translate(-50%, -50%) scale(1); opacity: 1; } /* Vient un peu plus tôt */
  53% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

@keyframes fadeOutScreen {
  0%, 46% { opacity: 1; } /* Plus tard qu'avant */
  52%, 90% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeInScreen {
  0%, 46% { opacity: 0; } /* Plus tard qu'avant */
  52%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

/* =============================================================================
   7. SOCIALS
   Grille des liens vers les réseaux sociaux
   ============================================================================= */
.ah-socials {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
}

.ah-social-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.ah-social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  width: 160px;
  text-decoration: none;
  color: #1a1a1a;
  transition: all 0.3s ease;
}

.ah-social-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0,0,0,0.1);
  border-color: var(--ah-color-dark-purple);
}

.ah-social-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ah-color-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ah-color-dark-purple);
}

.ah-social-name {
  font-weight: 700;
  font-size: 15px;
}

/* =============================================================================
   8. TIPEEE
   Section de soutien au projet
   ============================================================================= */
.ah-tipeee-box {
  background: linear-gradient(135deg, #F4F0FF 0%, #fff 100%);
  border: 1px solid #E0D5F7;
  padding: 60px 20px;
  border-radius: 32px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.ah-tipeee-btn {
  background: var(--ah-color-dark-purple);
  color: white;
  box-shadow: 0 8px 20px rgba(98, 58, 173, 0.25);
  margin-top: 24px;
}
.ah-tipeee-btn:hover {
  box-shadow: 0 12px 28px rgba(98, 58, 173, 0.35);
  transform: translateY(-2px);
  background: #522E95;
}

/* =============================================================================
   9. PAGES LÉGALES
   CGU, Mentions légales, Politique de confidentialité
   ============================================================================= */
.ah-legal-page {
  padding-top: 120px;
  min-height: 60vh;
}

.ah-legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 80px;
  text-align: left;
}

.ah-legal-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 40px;
  color: #1a1a1a;
  letter-spacing: -1px;
}

.ah-legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--ah-color-dark-purple);
}

.ah-legal-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #333;
}

.ah-legal-content p, .ah-legal-content li {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 16px;
}

.ah-legal-content ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.ah-legal-content strong {
  color: #333;
}

/* =============================================================================
   10. FOOTER
   ============================================================================= */
.ah-footer {
  background: #F9FAFB;
  padding: 80px 20px 40px;
  margin-top: 80px;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.03);
}

.ah-footer-logo {
  height: 24px;
  width: auto;
  opacity: 0.8;
  margin-bottom: 20px;
  filter: grayscale(100%); /* Logo discret en bas */
}

.ah-footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 30px 0;
}

.ah-footer-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ah-footer-link:hover { color: var(--ah-color-dark-purple); }

.ah-footer-social-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.ah-footer-link:hover .ah-footer-social-icon {
  opacity: 1;
}

.ah-footer-legal-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 20px 0 10px;
}

.ah-legal-link {
  font-size: 12px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.ah-legal-link:hover {
  color: var(--ah-color-dark-purple);
  text-decoration: underline;
}

.ah-footer-android {
  margin-bottom: 24px;
}

.ah-android-badge {
  background: #f4f0ff;
  color: var(--ah-color-dark-purple);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(98, 58, 173, 0.1);
}

.ah-footer-copy {
  font-size: 13px;
  color: #999;
  margin-top: 40px;
}

/* =============================================================================
   11. RESPONSIVE
   Adaptations pour tablettes et desktop (min-width: 768px)
   ============================================================================= */
@media (min-width: 768px) {
  .ah-nav-links { display: flex; }
  
  .ah-hero {
    flex-direction: row; /* Texte à gauche, Image à droite */
    text-align: left;
    justify-content: space-between;
    padding-top: 80px;
  }

  .ah-hero-content {
    text-align: left;
    align-items: flex-start;
    margin-bottom: 0;
  }

  .ah-hero-title { font-size: 56px; }

  .ah-hero-actions {
    flex-direction: row; /* Boutons côte à côte */
    justify-content: flex-start;
  }

  .ah-feature-container {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .ah-feature-container.reverse {
    flex-direction: row-reverse;
  }

  .ah-section-light { margin: 40px; padding: 100px 60px; }
}

/* =============================================================================
   12. LIVE MAP STYLES
   Interface de localisation en direct (/live/<token>)
   Inclut : carte MapLibre, marqueur animé, formulaire PIN, boutons d'action
   ============================================================================= */
/* Vue Live - padding pour compenser la navbar fixée */
#live-view {
  padding-top: 80px; /* Padding ajusté pour la navbar */
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height pour iOS Safari */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  overflow-x: hidden;
}

.ah-live-card {
  max-width: 500px;
  width: 100%;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 20px 60px -10px rgba(98, 58, 173, 0.15);
  padding: 32px 24px;
  border: 1px solid rgba(98, 58, 173, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ah-header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  background: #F4F0FF;
  color: var(--ah-color-dark-purple);
  border: 1px solid #E0D5F7;
  margin: 0 auto 20px;
  text-align: center;
  letter-spacing: 0.2px;
}

.ah-live-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  text-align: center;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

.ah-live-status {
  font-size: 16px;
  color: #666;
  margin: 0 0 32px;
  text-align: center;
  line-height: 1.6;
  max-width: 400px;
}

/* Intro texte pour le formulaire PIN */
.ah-pin-intro {
  font-size: 15px;
  color: #666;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* Conteneur pour la page "Position non disponible" */
.ah-expired-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
}

.ah-expired-icon {
  margin-bottom: 24px;
  opacity: 0.9;
}

.ah-expired-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
}

.ah-expired-text {
  font-size: 16px;
  color: #666;
  margin: 0 0 16px;
  max-width: 320px;
  line-height: 1.5;
}

.ah-expired-time {
  font-size: 14px;
  color: #888;
  font-weight: 500;
  margin: 0;
  background: #F5F3F9;
  padding: 8px 16px;
  border-radius: 99px;
}

.ah-pin-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 340px;
  width: 100%;
  margin: 0 auto 24px;
}

.ah-pin-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ah-color-medium-purple);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ah-pin-input {
  padding: 16px;
  border-radius: 20px;
  border: 2px solid #EBE6F4;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  color: var(--ah-color-dark-purple);
  background: #FAF9FC;
  transition: all 0.2s ease;
  width: 100%;
}

.ah-pin-input:focus {
  outline: none;
  border-color: var(--ah-color-dark-purple);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(98, 58, 173, 0.1);
}

.ah-pin-input::placeholder {
  color: #E0D5F7;
  letter-spacing: 0.2em;
}

.ah-pin-btn {
  width: 100%;
  margin-top: 8px;
  background: var(--ah-color-dark-purple);
  color: white;
  padding: 16px;
  border-radius: 99px;
  font-size: 16px;
  box-shadow: 0 10px 20px -5px rgba(98, 58, 173, 0.3);
}

.ah-pin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(98, 58, 173, 0.4);
}

.ah-pin-error {
  font-size: 14px;
  color: #D9262C;
  margin-top: 8px;
  text-align: center;
  font-weight: 600;
  background: #FFF5F5;
  padding: 8px 12px;
  border-radius: 12px;
}

.ah-map-container {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  width: 100%;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Boutons d'action sous la carte */
.ah-live-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
  flex-wrap: wrap; /* Permet de passer à la ligne si manque de place */
}

.ah-live-btn {
  flex: 1;
  padding: 14px 12px !important; /* Padding réduit pour tenir sur la même ligne */
  font-size: 15px !important;
  min-width: 140px; /* Largeur min pour déclencher le wrap */
  white-space: nowrap;
}

.ah-map { 
  width: 100%; 
  height: 380px;
  min-height: 300px;
}
.maplibregl-map { width: 100%; height: 100%; }
.maplibregl-ctrl-logo { opacity: 0.6; margin: 0 10px 10px 0; }

/* Marker moderne */
.ah-map-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #623AAD;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  will-change: transform;
  animation: ah-marker-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  position: relative;
}

.ah-map-marker::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
}

@keyframes ah-marker-pulse {
  0% { box-shadow: 0 0 0 0 rgba(98, 58, 173, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(98, 58, 173, 0); }
  100% { box-shadow: 0 0 0 0 rgba(98, 58, 173, 0); }
}



/* ===================== RESPONSIVE LIVE VIEW ===================== */

@media (max-width: 480px) {
  #live-view {
    padding-top: 70px;
  }
  
  .ah-live-card {
    margin: 0 16px 24px;
    padding: 24px 16px;
    border-radius: 24px;
  }
  
  .ah-live-title {
    font-size: 24px;
  }
  
  .ah-map {
    height: 320px;
    min-height: 280px;
  }
  
  .ah-live-actions {
    gap: 10px;
  }
  
  .ah-live-btn {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  .ah-expired-container {
    padding: 30px 16px;
  }
  
  .ah-pin-intro {
    font-size: 14px;
  }
}