/* Page d'accueil publique (index.php) — thème Îdiää fixe : photo de fond tirée au sort,
   panneaux de verre dépoli, texte sombre, orange (#ff7300) en accent de mise en avant.
   Tokens de variables.css ([data-theme="idiaa"]) : --text, --text-muted, --border. */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.landing {
  margin: 0;
  font-family: var(--font-system);
  color: var(--text);
  background: #1d1d1f;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--landing-bg, url("../img/background/login-background.jpg"));
  background-size: cover;
  background-position: center;
  animation: landing-fade 0.9s ease both;
}

@keyframes landing-fade { from { opacity: 0; } to { opacity: 1; } }

main, .landing-footer { position: relative; z-index: 1; }

/* Panneau de verre commun */
.glass,
.landing-hero__text,
.landing-strip p,
.landing-feature,
.landing-pro,
.landing-final,
.landing-footer {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

/* ---------- Menu ---------- */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  /* env(safe-area-inset-top) = zone de l'heure / Dynamic Island / réseau sur iPhone */
  height: calc(64px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.landing-nav__logo { display: inline-flex; color: var(--text); }
.landing-nav__logo svg { height: 30px; width: auto; }

/* Collé sur le côté droit */
.landing-nav__menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.landing-nav__item {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.landing-nav__item.is-soon { cursor: default; }

@media (hover: hover) and (pointer: fine) {
  .landing-nav__item:hover { background: rgba(29, 29, 31, 0.08); }
  .landing-nav__item--login:hover { background: #000; }
}

.landing-nav__item--login {
  margin-left: 6px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
}

/* ---------- Hero ---------- */
.landing-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(112px + env(safe-area-inset-top, 0px)) 20px 40px;
  display: grid;
  gap: 36px;
  align-items: center;
}

.landing-hero__text { padding: 34px 26px; border-radius: 32px; }

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(29, 29, 31, 0.15);
  font-size: 13px;
  font-weight: 600;
}
.landing-pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a3c, #ff7300);
  box-shadow: 0 0 0 4px rgba(255, 115, 0, 0.2);
}

.landing-hero__title {
  margin: 18px 0 16px;
  font-size: clamp(40px, 11vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.landing-hero__title span { display: block; }

.landing-hero__accent,
.landing-feature__num {
  background: linear-gradient(135deg, #ff9a3c, #ff7300 55%, #e85d00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.landing-hero__lead {
  margin: 0 0 24px;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.55;
  color: rgba(29, 29, 31, 0.82);
}

.landing-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.landing-hero__note { font-size: 14px; font-weight: 600; }

.landing-badge { display: inline-block; line-height: 0; transition: transform 0.2s ease; }
.landing-badge img { height: 56px; width: auto; display: block; }
@media (hover: hover) and (pointer: fine) {
  .landing-badge:hover { transform: translateY(-2px) scale(1.03); }
}

/* ---------- Cadre de téléphone ---------- */
/* Cadre = assets/img/iphone-frame.png (iphone01.png dont l'écran vert est rendu transparent,
   recadré 697×1400). Le screenshot est placé dessous, dans le rectangle de l'écran. */
.phone {
  position: relative;
  width: min(290px, 72vw);
  aspect-ratio: 697 / 1400;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.42));
}
.phone img {
  position: absolute;
  left: 4.3%; top: 1.2%;
  width: 91.2%; height: 97.6%;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: 14% / 6.8%; /* suit l'arrondi de l'écran, le cadre recouvre le reste */
}
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/iphone-frame.png") center / 100% 100% no-repeat;
  pointer-events: none;
}

.landing-hero__phones {
  position: relative;
  height: 620px;
  display: flex;
  justify-content: center;
}
.landing-hero__phones .phone { position: absolute; width: 250px; }
.phone--front { right: calc(50% - 215px); top: 0; transform: rotate(4deg); z-index: 2; animation: landing-float 7s ease-in-out infinite; }
.phone--back { left: calc(50% - 215px); top: 70px; transform: rotate(-6deg); animation: landing-float 8s ease-in-out -2s infinite; }

@keyframes landing-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

@media (min-width: 900px) {
  .landing-hero { grid-template-columns: 1.05fr 0.95fr; padding-top: calc(128px + env(safe-area-inset-top, 0px)); }
  .landing-hero__text { padding: 46px 44px; }
  .landing-hero__phones { height: 700px; }
  .landing-hero__phones .phone { width: 280px; }
  .phone--front { right: 4%; }
  .phone--back { left: 4%; top: 90px; }
}

/* ---------- Slogans ---------- */
.landing-strip {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 0 20px;
  display: grid;
  gap: 14px;
  background: none; border: 0; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.landing-strip p {
  margin: 0;
  padding: 26px 22px;
  border-radius: 26px;
  text-align: center;
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
@media (min-width: 800px) { .landing-strip { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Sections ---------- */
.landing-section { max-width: 1080px; margin: 0 auto; padding: 64px 20px 0; }

.landing-heading { text-align: center; margin-bottom: 30px; }
.landing-heading h2 {
  display: inline-block;
  margin: 12px 0 0;
  padding: 8px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  font-size: clamp(28px, 5vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.landing-heading p {
  margin: 14px auto 0;
  max-width: 520px;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  font-size: 17px;
  line-height: 1.5;
}

.landing-kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Fonctionnalités ---------- */
.landing-feature {
  display: grid;
  gap: 24px;
  align-items: center;
  margin: 0 0 28px;
  padding: 30px 24px;
  border-radius: 36px;
}
.landing-feature__num {
  display: block;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.landing-feature h3 {
  margin: 8px 0 12px;
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.landing-feature p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(29, 29, 31, 0.82);
}
.landing-feature__shot { display: flex; justify-content: center; }

@media (min-width: 860px) {
  .landing-feature { grid-template-columns: 1.1fr 0.9fr; padding: 40px 48px; gap: 40px; }
  .landing-feature--flip { grid-template-columns: 0.9fr 1.1fr; }
  .landing-feature--flip .landing-feature__text { order: 2; }
  .landing-feature--flip .landing-feature__shot { order: 1; }
}

.landing-chip {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9a3c, #ff7300 55%, #e85d00);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(255, 115, 0, 0.35);
}
.landing-chip--big { margin: 0 0 14px; font-size: 14px; padding: 6px 16px; }

/* ---------- Thèmes ---------- */
.landing-themes__row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
}
.landing-themes__row figure { margin: 0; text-align: center; }
.landing-themes__row .phone { width: min(26vw, 230px); }
.landing-themes__row .is-main .phone { width: min(32vw, 270px); }
.landing-themes__row figcaption {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Pro + CTA final ---------- */
.landing-pro, .landing-final {
  max-width: 880px;
  margin: 64px auto 0;
  padding: 44px 26px;
  border-radius: 36px;
  text-align: center;
}
.landing-pro {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 115, 0, 0.3), transparent 62%),
    rgba(255, 255, 255, 0.62);
}
.landing-pro h2, .landing-final h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.4vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.landing-pro p, .landing-final p {
  margin: 0 auto 4px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
}
.landing-final { margin-bottom: 0; }
.landing-final .landing-badge { margin-top: 24px; }
@media (min-width: 700px) {
  .landing-pro, .landing-final { margin-left: auto; margin-right: auto; }
}
main { padding-bottom: 64px; }

/* ---------- Pied de page ---------- */
.landing-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 0;
  border-width: 1px 0 0;
  box-shadow: none;
  font-size: 14px;
}
.landing-footer__logo { display: inline-flex; }
.landing-footer__logo svg { height: 26px; width: auto; }
.landing-footer nav { display: flex; gap: 22px; }
.landing-footer a { color: var(--text); text-decoration: underline; }
.landing-footer__rights { color: var(--text-muted); }

/* ---------- Animations d'apparition ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .landing-bg, .phone--front, .phone--back { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Petits écrans ---------- */
@media (max-width: 560px) {
  .landing-nav { padding-left: 8px; padding-right: 8px; }
  .landing-nav__logo { display: none; }
  .landing-nav__menu { margin-left: 0; width: 100%; justify-content: flex-end; }
  .landing-nav__item { padding: 9px 9px; font-size: 13.5px; }
  .landing-hero__phones { height: 500px; }
  .landing-hero__phones .phone { width: 200px; }
  .phone--front { right: calc(50% - 175px); }
  .phone--back { left: calc(50% - 175px); top: 60px; }
}
