/* ==========================================================================
   Glemm Demo Landing — Styles
   Couleur accent : bleu du logo (point final)
   ========================================================================== */

:root {
  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-text: #1a1d26;
  --color-text-muted: #5c6370;
  --color-text-light: #8b919a;
  --color-accent: #4a7cff;
  --color-accent-hover: #3568eb;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-shadow: rgba(15, 23, 42, 0.08);
  --radius-header: 999px;
  --radius-btn: 10px;
  --radius-iphone: 44px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 720px;
  --header-max: 960px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Header flottant
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 20px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--header-max);
  margin: 0 auto;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-header);
  box-shadow: 0 1px 3px var(--color-shadow);
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.header__logo img {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
}

.header__cta {
  flex-shrink: 0;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(74, 124, 255, 0.25);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(74, 124, 255, 0.3);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px var(--color-shadow);
  padding: 12px 24px;
  font-size: 15px;
}

.btn--secondary:hover {
  background: #f3f4f6;
  box-shadow: 0 4px 12px var(--color-shadow);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

main {
  flex: 1;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 64px;
  text-align: center;
}

.hero__content {
  max-width: var(--max-width);
  margin-bottom: 48px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.text-accent {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.hero__note {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Mockup iPhone
   -------------------------------------------------------------------------- */

.iphone {
  width: 100%;
  max-width: 300px;
  margin-bottom: 48px;
}

.iphone__frame {
  position: relative;
  background: #111;
  border-radius: var(--radius-iphone);
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 24px 48px -12px rgba(0, 0, 0, 0.25),
    0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.iphone__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: #111;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.iphone__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  background: var(--color-surface);
  border-radius: calc(var(--radius-iphone) - 12px);
  overflow: hidden;
  isolation: isolate;
}

.iphone__orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  touch-action: manipulation;
}

/* Masque le branding Retell et remplace le bouton anglais (cross-origin) */
.iphone__call-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 14%, #fff 100%);
  pointer-events: none;
  z-index: 3;
}

/* Habillage visuel du bouton Retell.
   État inactif : pointer-events none => le tap atteint le widget Retell (lance l'agent).
   État actif : pointer-events auto => le bouton sert à terminer la démo. */
.iphone__call-btn {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.iphone__call-btn-icon {
  flex-shrink: 0;
  color: var(--color-text);
}

.iphone__call-btn-icon[hidden] {
  display: none;
}

.iphone__call-btn--active {
  pointer-events: auto;
  font-size: 12px;
  padding: 10px 16px;
}

.iphone__home-indicator {
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  margin: 10px auto 2px;
}

.iphone__label {
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   CTA secondaire
   -------------------------------------------------------------------------- */

.cta-secondary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 480px;
}

.cta-secondary__note {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding: 24px;
  text-align: center;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .header {
    padding: 12px 16px 0;
  }

  .header__inner {
    padding: 8px 14px;
  }

  .header__logo img {
    height: 24px;
  }

  .header__cta {
    padding: 8px 14px;
    font-size: 13px;
  }

  .hero {
    padding: 32px 20px 48px;
  }

  .hero__content {
    margin-bottom: 36px;
  }

  .iphone {
    max-width: 260px;
  }

  .iphone__frame {
    padding: 10px;
    border-radius: 36px;
  }

  .iphone__notch {
    width: 72px;
    height: 20px;
    top: 10px;
  }

  .iphone__screen {
    border-radius: calc(36px - 10px);
  }
}

@media (max-width: 380px) {
  .header__inner {
    gap: 10px;
  }

  .header__cta {
    padding: 8px 12px;
    font-size: 12px;
  }
}
