/* ==========================================
   MES JOBS EN LIGNE – ÉCRAN UNIQUE
   Noir profond · blanc cassé · or · champagne
   ========================================== */

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

/* Polices auto-hébergées (sous-ensemble latin, woff2) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-variable.woff2') format('woff2');
}
:root {
  --bg: #0a0908;
  --text: #f4efe6;
  --text-soft: rgba(244, 239, 230, 0.78);
  --text-faint: rgba(244, 239, 230, 0.45);
  --ink: #171208;

  --gold: #d9b664;
  --gold-light: #f3dc98;
  --gold-deep: #b8923f;
  --champagne: #efe4cf;
  --green-deep: #0f241c;

  --line: rgba(244, 239, 230, 0.10);

  --radius-btn: 16px;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Courbe forte pour les interactions (ease-out) */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

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

body {
  font-family: var(--font-ui);
  color: var(--text);
  background: #060504;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==========================================
   COLONNE / ÉCRAN
   ========================================== */
.page {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding:
    max(22px, env(safe-area-inset-top))
    20px
    max(14px, env(safe-area-inset-bottom));
  background: var(--bg);
  isolation: isolate;
}

/* Fond photo plein écran — le visage reste lisible en haut, les CTA en bas */
.bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: #0a0908;
}
.bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(10, 9, 8, 0.28) 0%,
    rgba(10, 9, 8, 0.18) 28%,
    rgba(10, 9, 8, 0.55) 55%,
    rgba(10, 9, 8, 0.88) 78%,
    #0a0908 100%
  );
  pointer-events: none;
}

/* Petits téléphones (iPhone SE, Android compacts) : on resserre pour rester sur un écran */
@media (max-width: 380px), (max-height: 640px) {
  .page { gap: 18px; padding-top: max(20px, env(safe-area-inset-top)); }
  .title { font-size: clamp(38px, 11vw, 46px); }
  .kicker { margin-bottom: 8px; }
  .lead { margin-top: 10px; font-size: 14px; }
  .actions { gap: 8px; }
  .btn { min-height: 52px; padding: 12px 16px; font-size: 15px; }
}

/* Desktop : colonne encadrée, hauteur plafonnée pour garder la composition */
@media (min-width: 560px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
      radial-gradient(60% 45% at 50% 0%, rgba(217, 182, 100, 0.06), transparent 70%),
      #060504;
  }
  .page {
    min-height: min(100dvh, 860px);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* ==========================================
   HAUT : IDENTITÉ · PROMESSE
   ========================================== */
.top {
  position: relative;
}

.kicker {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.title {
  font-size: clamp(38px, 10.5vw, 52px);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--text);
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.lead {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-soft);
  text-wrap: pretty;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* ==========================================
   BAS : LES TROIS ACTIONS
   ========================================== */
.actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 13px 16px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), filter 160ms ease;
  will-change: transform;
}
.btn:active {
  transform: scale(0.96);
}
.btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
.btn[aria-disabled="true"] {
  cursor: default;
}

.btn-ico {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: currentColor;
  color: inherit;
}
.btn-label {
  flex: 1;
  min-width: 0;
  text-wrap: balance;
}

/* 1 · Or plein : l'action principale (plus grande = plus de clics) */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 60px;
  padding: 14px 16px;
  font-size: 15px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 14px 34px -14px rgba(217, 182, 100, 0.6);
}
/* Reflet qui balaie le bouton toutes les 10 s : attire l'œil sans déplacer la cible */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 42%;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.10) 35%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.10) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-160%) skewX(-18deg);
  animation: sheen 10s linear 1.6s infinite;
  pointer-events: none;
  z-index: 1;
}
.btn-primary > * {
  position: relative;
  z-index: 2;
}
@keyframes sheen {
  0%   { transform: translateX(-160%) skewX(-18deg); }
  11%  { transform: translateX(330%)  skewX(-18deg); }   /* balayage ≈ 1,1 s */
  100% { transform: translateX(330%)  skewX(-18deg); }   /* pause jusqu'à 10 s */
}

/* Secousse « cadeau surprise » toutes les 5 s (le reflet reste à 10 s : une
   secousse sur deux suit le reflet). Portée par le conteneur pour laisser au
   bouton son scale(.96) au tap. */
.cta-shake {
  width: 100%;
  transform-origin: 50% 100%;
  animation: gift-shake 5s ease-in-out 1.6s infinite;
  will-change: transform;
}
.cta-shake .btn {
  width: 100%;
}
@keyframes gift-shake {
  0%, 22%  { transform: rotate(0deg) scale(1); }        /* 1,1 s de repos = durée du reflet */
  24.4%    { transform: rotate(-2.4deg) scale(1.02); }
  27.2%    { transform: rotate(2.4deg)  scale(1.02); }
  30%      { transform: rotate(-1.8deg) scale(1.015); }
  32.8%    { transform: rotate(1.4deg)  scale(1.01); }
  35.2%    { transform: rotate(-0.6deg) scale(1.005); }
  37.2%, 100% { transform: rotate(0deg) scale(1); }
}

/* 2 · Champagne : 2ᵉ offre (plus discrète que le Canada) */
.btn-secondary {
  min-height: 54px;
  background: var(--champagne);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 3 · Contour : communauté (jamais « gratuit » — pas de cannibalisation) */
.btn-tertiary {
  min-height: 52px;
  background: rgba(10, 9, 8, 0.55);
  border: 1px solid rgba(217, 182, 100, 0.38);
  color: var(--text-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover,
  .btn-secondary:hover { filter: brightness(1.04); }
  .btn-tertiary:hover  { background: rgba(217, 182, 100, 0.10); }
}

.footer {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(244, 239, 230, 0.6);
}

/* ==========================================
   UNE SEULE SÉQUENCE D'ENTRÉE
   ========================================== */
.top,
.actions .cta-shake .btn,
.actions > .btn,
.actions .footer {
  opacity: 0;
  transform: translateY(8px);
  animation: enter 520ms var(--ease-out) forwards;
}
.top                           { animation-delay: 40ms; }
.actions .cta-shake .btn       { animation-delay: 160ms; }
.actions > .btn:nth-of-type(1) { animation-delay: 220ms; }
.actions > .btn:nth-of-type(2) { animation-delay: 280ms; }
.actions .footer               { animation-delay: 340ms; }

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

@media (prefers-reduced-motion: reduce) {
  .top, .actions .cta-shake .btn, .actions > .btn, .actions .footer {
    transform: none;
    animation: fade 200ms ease forwards;
  }
  @keyframes fade { to { opacity: 1; } }
  .btn { transition: none; }
  .btn:active { transform: none; }
  .btn-primary::after { animation: none; display: none; }
  .cta-shake { animation: none; }
  .tuto-arrow.bounce { animation: none; }
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 30px 22px calc(30px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #17140f, #100e0b);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  text-align: center;
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.modal-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}
.modal-icon:empty {
  display: none;
}

.modal-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.modal-desc {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
  margin-bottom: 10px;
}
.modal-btn:active {
  transform: scale(0.96);
}

.copy-btn {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.open-btn {
  background: rgba(217, 182, 100, 0.06);
  color: var(--text);
  border: 1px solid rgba(217, 182, 100, 0.45);
}

.modal-hint {
  color: var(--text-faint);
  font-size: 12px;
  margin-bottom: 12px;
}

.modal-copied {
  margin-top: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(20, 49, 38, 0.6);
  border: 1px solid rgba(94, 170, 130, 0.35);
  color: #9fd8b8;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
}
.modal-copied.show {
  opacity: 1;
  transform: translateY(0);
}

/* Tutoriel TikTok */
.tiktok-tuto { margin-top: 6px; display: none; }
.tiktok-tuto.show { display: block; }

.tuto-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}
.tuto-divider::before,
.tuto-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.tuto-divider span {
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}

.tuto-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tuto-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.tuto-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.tuto-step-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}
.tuto-step-content strong { color: var(--gold-light); }

.tuto-dots-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 8px;
  width: fit-content;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}
.tuto-three-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.tuto-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text);
}
.tuto-arrow-container {
  width: 100%;
  display: flex;
  justify-content: center;
}
.tuto-arrow {
  font-size: 22px;
  display: inline-block;
}
.tuto-arrow.bounce { animation: bounceUp 1.2s ease-in-out infinite; }
@keyframes bounceUp {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.tuto-browser-icon {
  width: fit-content;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(217, 182, 100, 0.35);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-soft);
}

/* Desktop : modal centré */
@media (min-width: 560px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
  .modal {
    max-width: 440px;
    border-bottom: 1px solid var(--line);
    border-radius: 24px;
    padding-bottom: 30px;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 260ms var(--ease-out), opacity 200ms ease;
  }
  .modal-overlay.active .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
