/* ==========================================================================
   ekko of al-Balât — style.css
   ========================================================================== */

/* ---- Reset minimal ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, p, figure, ul { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---- Design tokens -------------------------------------------------------
   Couleurs et typographies extraites de la maquette Figma
   « Ekko x Al-Bâlât ».
   ========================================================================== */
:root {
  --color-bg: #0f161e;              /* fond de secours derrière les images */
  --color-navy: #0b1333;            /* bandeau bas mobile / footer légal */
  --color-overlay-blue: #0d354e;    /* calque bleu en mode "soft-light" */
  --color-overlay-dark: rgba(0, 0, 0, 0.2);
  --color-white: #ffffff;
  --color-heading: #f4fafe;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.75);
  --color-border-badge: #a6a6a6;

  --font-display: "Fratelli", Georgia, "Times New Roman", serif;
  --font-body: "Sofia Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-max: 1440px;
  --content-max: 700px;
  --gutter-desktop: 80px;
  --gutter-mobile: 20px;

  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Focus visible clavier, partout */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   HERO — commun aux deux variantes (desktop / mobile)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
}
.hero__overlay--blue {
  background: var(--color-overlay-blue);
  mix-blend-mode: soft-light;
}
.hero__overlay--dark {
  background: var(--color-overlay-dark);
}

.hero__landscape {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-heading);
  letter-spacing: -0.08em;
  line-height: 0.85;
}

/* ---- Badges de téléchargement -------------------------------------------- */
.store-badges {
  display: flex;
  gap: 12px;
}
.store-badges--stacked {
  flex-direction: column;
  align-items: flex-start;
}
.store-badge {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border-badge);
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
  transition: transform 0.2s var(--ease-reveal), box-shadow 0.2s var(--ease-reveal);
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.store-badge img {
  display: block;
  height: 46px;
  width: auto;
}

/* ---- Logo Talkartive (bas de page) --------------------------------------- */
.brand-footer {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}
.brand-footer:hover {
  opacity: 0.8;
}
.brand-footer img {
  height: 60px;
  width: auto;
}

/* ---- Lockup ekko / al-Balât ---------------------------------------------- */
.brand-lockup {
  display: inline-block;
  line-height: 0;
}
.brand-lockup--header img {
  height: 56px;
  width: auto;
}
.brand-lockup--hero img {
  height: 120px;
  width: auto;
}

/* ---- Navigation (avis legal / conditions / crédits) ---------------------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1.3;
}
.site-nav a {
  position: relative;
  white-space: nowrap;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s var(--ease-reveal);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  right: 0;
}

/* ==========================================================================
   HERO — DESKTOP
   ========================================================================== */
.hero--desktop { display: block; }
.hero--mobile { display: none; }

.hero--desktop .hero__frame {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter-desktop);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero--desktop .site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
}

/* Ligne principale : texte à gauche + mockup à droite, centrés ensemble */
.hero--desktop .hero__row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4vw;
  padding: 6vh 0;
}

.hero--desktop .hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  max-width: 560px;
  flex-shrink: 0;
}

.hero--desktop .hero__title {
  font-size: clamp(2.4rem, 4.3vw, 3.85rem);
}

.hero--desktop .hero__mockup {
  position: static;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: min(38vw, 560px);
  max-height: 72vh;
  flex-shrink: 0;
}

.hero--desktop .hero__landscape {
  right: -6vw;
  bottom: -6vw;
  left: auto;
  width: 110vw;
  height: auto;
  max-width: none;
  aspect-ratio: 2880 / 1170;
}

.hero--desktop .brand-footer {
  position: absolute;
  left: var(--gutter-desktop);
  bottom: 56px;
  z-index: 2;
}

/* ==========================================================================
   HERO — MOBILE
   ========================================================================== */
@media (max-width: 767px) {
  .hero--desktop { display: none; }
  .hero--mobile { display: flex; flex-direction: column; }
}

.hero--mobile {
  flex-direction: column;
}
.hero--mobile .hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 56px var(--gutter-mobile) 48px;
}
.hero--mobile .hero__mockup {
  position: relative;
  width: min(88%, 350px);
  margin: 0 auto;
}
.hero--mobile .brand-lockup--hero img {
  height: 96px;
}
.hero--mobile .hero__title {
  font-size: clamp(1.7rem, 8vw, 2.2rem);
}
.hero--mobile .hero__landscape {
  left: 50%;
  bottom: 0;
  width: 220vw;
  height: auto;
  max-width: none;
  aspect-ratio: 2880 / 1170;
  transform: translateX(-50%);
  z-index: 1;
}

.mobile-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 60px; /* hauteur approximative de la barre de nav en bas */
  height: 300px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 19, 51, 0) 0%, var(--color-navy) 92%);
}

.mobile-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 48px;
}
.mobile-footer .site-nav {
  width: 100%;
  justify-content: center;
  gap: 14px 20px;
  font-size: 15px;
  flex-wrap: wrap;
  background: var(--color-navy);
  padding: 18px var(--gutter-mobile);
}

/* ==========================================================================
   PAGES LÉGALES
   ========================================================================== */
.legal-page {
  min-height: 100vh;
  position: relative;
}

.legal-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--color-bg) url("/assets/img/legal-bg.jpg") center bottom / cover no-repeat;
}

.site-header--legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px var(--gutter-desktop);
}

.legal-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px var(--gutter-mobile) 120px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  width: fit-content;
}
.legal-back svg { color: var(--color-white); }

.legal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-title-row h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2rem);
  letter-spacing: -0.04em;
  color: var(--color-white);
}
.legal-chevron { transform: rotate(180deg); opacity: 0.7; }

.legal-updated {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.legal-section h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
}
.legal-section p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
}
.legal-section--intro p {
  color: var(--color-text);
}
.legal-section--intro strong { font-weight: 700; }
.legal-section--intro em { font-style: italic; font-weight: 400; }

.legal-section p strong {
  color: var(--color-text);
  font-weight: 700;
}

.legal-section ul {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
  padding-left: 20px;
  margin: 0;
}
.legal-section li {
  margin-bottom: 4px;
}

.legal-section--partners {
  padding-top: 20px;
  gap: 30px;
}
.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}
.partners-row img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.legal-copyright {
  text-align: center;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

/* ==========================================================================
   ANIMATION D'APPARITION AU CHARGEMENT
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.9s var(--ease-reveal) forwards;
  animation-delay: var(--delay, 0s);
}
.hero__bg[data-reveal],
.hero__bg {
  transform: none;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Le fond du hero apparaît en fondu simple, sans décalage */
.hero__bg {
  opacity: 0;
  animation: fadeIn 1.4s ease forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .hero__bg {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .store-badge, .site-nav a::after, .brand-footer {
    transition: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE — ajustements intermédiaires
   ========================================================================== */
@media (max-width: 1100px) {
  :root { --gutter-desktop: 48px; }
  .hero--desktop .hero__content { max-width: 440px; }
  .hero--desktop .hero__mockup { max-width: 34vw; }
  .site-nav { gap: 18px; }
}

@media (max-width: 767px) {
  :root { --gutter-desktop: 20px; }
}
