/* ==========================================================================
   SR Editer — Site public · Layout
   Header + navigation (barre de verre en pilule, panneau mobile), héros de page,
   sections, footer.
   ========================================================================== */

/* ── Header ──
   Barre de verre flottante et centrée, en pilule.
   En haut de page : presque transparente. Après défilement (.is-scrolled) :
   elle se resserre, s'opacifie et un liseré dégradé apparaît dessous. */
.aww-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 0.9rem var(--gutter);
  z-index: 100;
  pointer-events: none;
  transition: transform 0.7s var(--ease-out-quint), padding 0.6s var(--ease-out-quint);
}
.aww-header.is-scrolled {
  padding-top: 0.6rem;
}
.aww-header-inner {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.4rem 0.4rem 0.4rem 0.45rem;
  border-radius: 999px;
  background: rgba(14, 12, 10, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    max-width 0.8s var(--ease-out-quint),
    background 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}
/* Liseré dégradé sous la barre, visible après défilement */
.aww-header-inner::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 51, 102, 0.75), rgba(255, 168, 0, 0.75), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.aww-header.is-scrolled .aww-header-inner {
  max-width: 1080px;
  background: rgba(14, 12, 10, 0.74);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.aww-header.is-scrolled .aww-header-inner::after {
  opacity: 0.9;
}

/* Logo : icône ∞ + nom du produit, signé SR Studio */
.aww-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  justify-self: start;
  padding-right: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}
.aww-logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  filter: drop-shadow(0 6px 14px rgba(255, 107, 53, 0.35));
  transition: transform 0.7s var(--ease-out-expo);
}
.aww-logo:hover img {
  transform: rotate(-12deg) scale(1.06);
}
.aww-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.aww-logo-name {
  word-spacing: 0.2em;
}
.aww-logo-sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.3s ease;
}
.aww-logo:hover .aww-logo-sub {
  color: var(--accent);
}

/* Actions : Connexion / profil, Télécharger, burger */
.aww-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.aww-header-actions .aww-btn {
  padding: 0.66rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.aww-header-actions .aww-btn-outline {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: rgba(246, 242, 237, 0.82);
}
.aww-header-actions .aww-btn-outline::before {
  background: rgba(255, 255, 255, 0.08);
}
.aww-header-actions .aww-btn-outline:hover {
  color: var(--text-primary);
  border-color: transparent;
}
.aww-header-actions .aww-btn-solid .aww-btn-icon {
  width: 1em;
  height: 1em;
}
.aww-header-actions .aww-btn-profile {
  padding: 0.3rem 1rem 0.3rem 0.3rem !important;
  box-shadow: none;
}

/* ── Navigation : liens dans une piste, surlignage qui glisse (js/core/site.js),
   page courante remplie du dégradé de la marque ── */
.aww-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-soft);
}
.aww-nav-indicator {
  position: absolute;
  top: 0.25rem;
  left: 0;
  height: calc(100% - 0.5rem);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s var(--ease-out-quint),
    width 0.5s var(--ease-out-quint),
    opacity 0.3s ease;
}
.aww-nav-indicator.is-visible {
  opacity: 1;
}
.aww-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.aww-nav .aww-link {
  position: relative;
  z-index: 1;
  overflow: visible;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: rgba(246, 242, 237, 0.62);
  transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.aww-nav .aww-link:hover {
  color: var(--text-primary);
}
/* Dans la barre, pas de texte qui roule : le surlignage suffit */
.aww-nav .aww-link-inner::after {
  display: none;
}
.aww-nav .aww-link:hover .aww-link-inner {
  transform: none;
}
.aww-link-inner {
  display: block;
  position: relative;
  transition: transform 0.5s var(--ease-out-expo);
}
.aww-link-inner::after {
  content: attr(data-hover);
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
  color: var(--accent);
}
.aww-link:hover .aww-link-inner {
  transform: translateY(-100%);
}
.aww-link.is-active,
.aww-link[aria-current="page"] {
  color: var(--accent) !important;
}
.aww-link.is-active .aww-link-inner,
.aww-link[aria-current="page"] .aww-link-inner {
  color: var(--accent) !important;
}
/* Page courante : pilule teintée du dégradé, texte blanc */
.aww-nav .aww-link.is-active,
.aww-nav .aww-link[aria-current="page"] {
  color: var(--text-primary) !important;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.22) 0%, rgba(255, 107, 53, 0.16) 55%, rgba(255, 168, 0, 0.12) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 107, 53, 0.3),
    0 8px 22px -12px rgba(255, 107, 53, 0.7);
}
.aww-nav .aww-link.is-active .aww-link-inner,
.aww-nav .aww-link[aria-current="page"] .aww-link-inner {
  color: var(--text-primary) !important;
}

/* Connexion et Télécharger dans le menu : mobile uniquement */
.aww-nav-portal-mobile,
.aww-nav-download-mobile {
  display: none !important;
}

/* ── Burger (mobile) ── */
.aww-burger-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
  transition: border-color 0.2s, background 0.2s;
}
.aww-burger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.4s var(--ease-out-quint), opacity 0.3s ease;
}
.aww-burger-btn:hover {
  border-color: var(--accent);
}
.is-menu-open .aww-burger-btn {
  background: rgba(255, 107, 53, 0.14);
  border-color: rgba(255, 107, 53, 0.45);
}
.is-menu-open .aww-burger-btn span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.is-menu-open .aww-burger-btn span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ── Héros ── */
.aww-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem var(--gutter) 4rem;
  position: relative;
}
.aww-page-hero {
  min-height: 42vh;
  display: flex;
  align-items: center;
  padding: 8.5rem var(--gutter) 3.5rem;
}
/* Variantes de hauteur des pages de contenu */
.aww-page-hero--tall {
  height: 45vh;
  min-height: 380px;
}
.aww-page-hero--docs {
  height: 44vh;
  min-height: 380px;
}
.aww-page-hero--legal {
  min-height: 440px;
  padding-bottom: 3rem;
}
.aww-page-hero--dashboard {
  min-height: 250px;
  height: auto;
  padding: 7.5rem var(--gutter) 2rem;
}
.aww-hero-content {
  max-width: 760px;
}
.aww-kicker {
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.aww-kicker::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.aww-hero-heading, .aww-page-title {
  font-size: clamp(3rem, 6.5vw, 5.8rem);
  font-weight: 500;
  margin-bottom: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 0.92;
}
.aww-hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.25rem;
  line-height: 1.55;
}
.aww-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Sections ── */
.aww-section-title {
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
}

/* ── Footer ── */
.aww-footer {
  position: relative;
  padding: 12rem var(--gutter) 2rem;
  /* Fondu continu depuis la section précédente : ni bordure ni halo collé au bord */
  background:
    radial-gradient(50% 30% at 50% 32%, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0) 100%),
    linear-gradient(180deg, rgba(8, 7, 6, 0) 0%, rgba(8, 7, 6, 0.85) 30%, var(--bg-color) 60%);
  overflow: hidden;
}
.aww-footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 8rem;
}
.aww-footer-title {
  font-size: clamp(3.5rem, 10vw, 10rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.86;
  margin-bottom: 3rem;
}
.aww-footer-note {
  margin-top: 1.5rem;
  color: var(--text-faint);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.aww-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--line-soft);
}
.aww-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
  max-width: 260px;
  line-height: 1.5;
}
.aww-footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
.aww-footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}
.aww-footer-col .aww-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.aww-footer-col .aww-link:hover {
  color: var(--text-primary);
}
.aww-footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}
.aww-footer-wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(4rem, 19.5vw, 22rem);
  line-height: 0.78;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
  margin: 1rem calc(var(--gutter) * -0.5) 0;
  background: linear-gradient(180deg, rgba(246, 242, 237, 0.14) 0%, rgba(246, 242, 237, 0.02) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  user-select: none;
}
.aww-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 0.85rem;
}
.aww-footer-bottom .aww-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .aww-nav .aww-link {
    padding: 0.6rem 0.8rem;
  }
}

@media (max-width: 860px) {
  /* Header compact */
  .aww-header,
  .aww-header.is-scrolled {
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.75rem !important;
  }
  .aww-header-inner,
  .aww-header.is-scrolled .aww-header-inner {
    display: flex;
    justify-content: space-between;
    max-width: none;
    padding: 0.35rem 0.35rem 0.35rem 0.4rem;
    background: rgba(14, 12, 10, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
    /* Pas de backdrop-filter ici : il casserait le panneau du menu (position: fixed) */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .aww-header-actions .aww-btn-solid,
  .aww-nav-indicator {
    display: none !important;
  }
  .aww-logo img {
    width: 34px;
    height: 34px;
  }
  .aww-header-actions .aww-btn-outline,
  .aww-header-actions .aww-btn-profile {
    display: none !important;
  }
  .aww-burger-btn {
    position: relative;
    min-width: 44px;
    min-height: 44px;
    display: flex;
  }

  /* Voile derrière le menu ouvert (un clic dessus ferme le menu) */
  /* Hauteur explicite : l'animation d'intro pose un transform sur le header,
     qui devient alors le bloc de référence des éléments fixes. */
  .aww-header::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: -1;
    background: rgba(5, 4, 3, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }
  .aww-header.is-menu-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  /* Menu : panneau déroulant sous la barre */
  .aww-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: calc(4.6rem + env(safe-area-inset-top, 0px));
    max-height: calc(100vh - 5.6rem - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - 5.6rem - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.55rem;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background:
      radial-gradient(120% 60% at 100% 0%, rgba(255, 107, 53, 0.16) 0%, rgba(255, 107, 53, 0) 70%),
      rgba(14, 12, 10, 0.97);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.5s var(--ease-out-quint),
      visibility 0s linear 0.5s;
    counter-reset: navlink;
  }
  .is-menu-open .aww-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition:
      opacity 0.3s ease,
      transform 0.5s var(--ease-out-quint),
      visibility 0s;
  }
  .aww-nav .aww-link {
    counter-increment: navlink;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.5s var(--ease-out-quint), background 0.25s ease;
  }
  .aww-nav .aww-link::before {
    content: counter(navlink, decimal-leading-zero);
    min-width: 1.4rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
  }
  .aww-nav .aww-link:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  .is-menu-open .aww-nav .aww-link {
    opacity: 1;
    transform: none;
  }
  .is-menu-open .aww-nav .aww-link:nth-child(2) { transition-delay: 0.04s; }
  .is-menu-open .aww-nav .aww-link:nth-child(3) { transition-delay: 0.08s; }
  .is-menu-open .aww-nav .aww-link:nth-child(4) { transition-delay: 0.12s; }
  .is-menu-open .aww-nav .aww-link:nth-child(5) { transition-delay: 0.16s; }
  .is-menu-open .aww-nav .aww-link:nth-child(6) { transition-delay: 0.2s; }
  .is-menu-open .aww-nav .aww-link:nth-child(7) { transition-delay: 0.24s; }

  /* Bas du panneau : Connexion (ou profil) puis Télécharger */
  .aww-nav .aww-nav-portal-mobile,
  .aww-nav .aww-nav-download-mobile {
    display: flex !important;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
  }
  .aww-nav .aww-nav-portal-mobile::before,
  .aww-nav .aww-nav-download-mobile::before {
    display: none;
  }
  .aww-nav .aww-nav-portal-mobile {
    margin-top: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
  }
  .aww-nav .aww-nav-download-mobile {
    gap: 0.5rem;
    margin-top: 0.35rem;
    color: #fff !important;
    background: var(--accent-gradient);
    box-shadow: 0 12px 30px -12px rgba(255, 107, 53, 0.7);
  }
  .aww-nav .aww-nav-download-mobile .aww-btn-icon {
    width: 1.05em;
    height: 1.05em;
  }
  .aww-nav-portal-mobile.is-user {
    justify-content: flex-start;
    gap: 0.75rem !important;
    text-transform: none !important;
  }
  .aww-nav-portal-mobile.is-user .aww-link-inner {
    text-transform: none !important;
  }
  .aww-nav-portal-mobile.is-user .aww-user-avatar {
    width: 32px;
    height: 32px;
  }

  /* Héros */
  .aww-hero {
    padding: 6.5rem 1.25rem 3rem !important;
    min-height: calc(100vh - 50px);
    min-height: calc(100dvh - 50px);
  }
  .aww-hero-heading {
    font-size: clamp(2rem, 7.5vw, 3.6rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -1px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .aww-hero-desc {
    font-size: 1.05rem !important;
    margin-bottom: 1.75rem !important;
    max-width: 100%;
  }
  .aww-hero-actions {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    gap: 0.75rem !important;
  }
  .aww-hero-actions .aww-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 0.9rem 1.5rem !important;
  }
  .aww-page-hero {
    padding: 6.5rem 1.25rem 2.5rem !important;
    min-height: auto !important;
    height: auto !important;
  }
  .aww-page-hero--dashboard {
    padding: 4.25rem 1.25rem 1rem !important;
    min-height: auto !important;
    height: auto !important;
  }
  .aww-page-title {
    font-size: clamp(2rem, 7vw, 3.4rem) !important;
    line-height: 1.05 !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Footer */
  .aww-footer {
    padding: 5rem 1.25rem 1.5rem !important;
  }
  .aww-footer-cta {
    margin-bottom: 4rem;
  }
  .aww-footer-title {
    font-size: clamp(2.8rem, 13vw, 4.5rem) !important;
    margin-bottom: 2rem;
  }
  .aww-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem 1.5rem;
  }
  .aww-footer-brand {
    grid-column: 1 / -1;
  }
  .aww-footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .aww-page-hero--dashboard {
    padding: 3.6rem 1rem 0.5rem !important;
  }
}

@media (max-width: 360px) {
  .aww-hero-heading {
    font-size: clamp(1.75rem, 7vw, 2.3rem) !important;
  }
  .aww-page-title {
    font-size: clamp(1.75rem, 6.8vw, 2.3rem) !important;
  }
}

/* ── Modificateurs de contenu ──
   Déclarés après les media queries : ils remplacent d'anciens style="" inline
   et doivent garder la priorité sur les règles responsive non !important. */
.aww-hero-desc--wide {
  max-width: 650px;
  font-size: 1.2rem;
}
.aww-hero-desc--docs {
  max-width: 680px;
  font-size: 1.15rem;
}
.aww-hero-desc--legal {
  max-width: 780px;
  font-size: 1.15rem;
}
.aww-link--accent {
  color: var(--accent);
}
.aww-link--muted {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
