/* =====================================================
   LANDING PAGE - My HR Onboarding
   ===================================================== */

/* ----- Variables CSS ----- */
:root {
  /* Couleurs principales */
  --primary: #4A96B0;
  --primary-hover: #3D8299;
  --accent: #5DBE9A;
  --accent-hover: #4DAD88;

  /* Arrière-plans et texte (alignés sur admin.css, requis par les sections claires) */
  --bg: #F3F7F6;
  --bg-subtle: #E4EDEB;
  --card-bg: #ffffff;
  --text: #2A3F42;
  --text-muted: #7A9B9E;
  --border: #CEDFDD;

  /* Dégradé */
  --landing-gradient: linear-gradient(145deg, #4A96B0 0%, #3D8299 40%, #5DBE9A 100%);

  /* Texte highlight */
  --landing-highlight: #FFE066;
}

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

/* ----- Base ----- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Page Container ----- */
.landing-page {
  min-height: 100vh;
  background: var(--landing-gradient);
  display: flex;
  flex-direction: column;
}

/* =====================================================
   HEADER
   ===================================================== */
.landing-header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.landing-logo {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.landing-logo::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

/* Navigation */
.landing-nav {
  display: flex;
  gap: 1rem;
}

.landing-nav a {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-login {
  color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.nav-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.nav-register {
  background: #fff;
  color: var(--primary);
}

.nav-register:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.hero-content {
  max-width: 860px;
}

/* Titre principal */
.hero-title {
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* 2e ligne du titre : plus petite et non grasse */
.hero-title-sub {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 0.5rem;
}

/* Slogans */
.hero-slogan {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.hero-slogan-main {
  font-weight: 600;
}

.hero-slogan-main strong {
  color: #fff;
}

.hero-slogan-humor {
  color: var(--landing-highlight);
  font-size: 1.1rem;
  font-style: italic;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.hero-slogan-humor strong {
  font-style: normal;
}

/* Force la 1re phrase du hook sur une seule ligne (desktop) */
.hook-nowrap {
  white-space: nowrap;
}

/* Boutons CTA */
.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  color: var(--primary-hover);
}

.cta-secondary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}

/* =====================================================
   FOOTER
   ===================================================== */
.landing-footer {
  padding: 1.5rem 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.landing-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.landing-footer a:hover {
  color: #fff;
}

/* =====================================================
   RESPONSIVE - Mobile (≤768px)
   ===================================================== */
@media (max-width: 768px) {
  .landing-header {
    padding: 1rem;
  }

  .landing-logo {
    font-size: 1.2rem;
  }

  .landing-nav a {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-slogan {
    font-size: 1.1rem;
  }

  .hero-slogan-humor {
    font-size: 1rem;
  }

  /* En mobile, on autorise le retour à la ligne pour éviter le débordement */
  .hook-nowrap {
    white-space: normal;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

/* =====================================================
   ACCESSIBILITÉ
   ===================================================== */
.landing-nav a:focus,
.cta-primary:focus,
.cta-secondary:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Réduction des animations si préféré */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .cta-primary:hover {
    transform: none;
  }
}

/* =====================================================
   LANDING MULTI-SECTIONS (v2)
   ===================================================== */

/* La page n'est plus mono-écran : le hero occupe ~le premier écran,
   le reste défile sur fond clair. */
.landing-page { display: block; }
.landing-hero {
  flex: none;
  min-height: 78vh;
  background: var(--landing-gradient);
}
.landing-header { background: var(--landing-gradient); }

/* Logo + baseline */
.landing-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.landing-logo-name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.landing-logo-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Bandeau de réassurance sous le CTA */
.hero-reassure {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  font-weight: 500;
}
.hero-reassure li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.hero-reassure li::before {
  content: '✓';
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Sections génériques */
.section { background: var(--card-bg); padding: 4.5rem 1.5rem; }
.section--alt { background: var(--bg); }
.section-inner { max-width: 1040px; margin: 0 auto; }

.eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.section-title--left { text-align: left; }
.section-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.section-lead--left { text-align: left; margin-left: 0; }
/* Lead large : tient sur une ligne au desktop, retour à la ligne naturel sur petit écran */
.section-lead--wide { max-width: none; text-wrap: balance; }

/* Étapes */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 4px 16px rgba(74, 150, 176, 0.06);
}
.section--alt .step { background: var(--card-bg); }
.step-num {
  position: absolute;
  top: -14px;
  left: 1.4rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(74, 150, 176, 0.35);
}
.step-icon { font-size: 1.8rem; margin: 0.4rem 0 0.7rem; }
.step h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 0.4rem; }
.step p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.features--3 { grid-template-columns: repeat(3, 1fr); }
.feature {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: box-shadow 0.25s, transform 0.1s;
}
.feature:hover {
  box-shadow: 0 8px 24px rgba(74, 150, 176, 0.12);
  transform: translateY(-2px);
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(74, 150, 176, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}
.feature h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 0.4rem; }
.feature p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* Carte de cas d'usage mise en avant */
.feature--highlight {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(93, 190, 154, 0.08) 0%, var(--card-bg) 60%);
  box-shadow: 0 8px 24px rgba(93, 190, 154, 0.16);
}
.feature--highlight .feature-icon { background: rgba(93, 190, 154, 0.18); }

/* Avant / après détourage */
.ba-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.ba-visual {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: auto auto;
  align-items: center;     /* rangée 1 : centre la miniature face à la grande photo */
  justify-items: center;
  column-gap: 1rem;
  row-gap: 0.6rem;
}
.ba-cell-before { grid-column: 1; grid-row: 1; }
.ba-arrow       { grid-column: 2; grid-row: 1; }
.ba-cell-after  { grid-column: 3; grid-row: 1; }
.ba-cap {
  margin: 0;
  grid-row: 2;
  align-self: start;       /* "Avant" et "Après" alignés en haut de la rangée 2 */
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ba-cap-before { grid-column: 1; }
.ba-cap-after { grid-column: 3; color: var(--primary); }
/* 2e ligne de légende : plus petite, sans majuscules */
.ba-sub {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}
.ba-arrow { font-size: 1.8rem; color: var(--accent); font-weight: 700; }

/* Vignette : cadre commun aux cartes avant/après */
.vignette {
  position: relative;
  width: 150px;
  max-width: 38vw;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(74, 150, 176, 0.18);
  background: #4A96B0;
}
/* Sujet détouré (carte « après »), ancré en bas */
.vignette > img {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 90%;
  height: auto;
  display: block;
  z-index: 1;
}
/* Calques de fond superposés → fondu enchaîné (opacité décalée) */
.vbg {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: vbgFade 20s ease-in-out infinite;
}
.vbg-1 { background: #4A96B0; animation-delay: 0s; }
.vbg-2 { background: linear-gradient(135deg, #5DBE9A 0%, #4A96B0 100%); animation-delay: 5s; }
.vbg-3 { background: #3D8299 radial-gradient(circle, rgba(255, 255, 255, 0.28) 2px, transparent 2.4px) 0 0 / 16px 16px; animation-delay: 10s; }
.vbg-4 { background: repeating-linear-gradient(45deg, #3D8299 0 10px, #4A96B0 10px 20px); animation-delay: 15s; }
@keyframes vbgFade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; }
}
/* Carte « Avant » : photo brute plein cadre, sans fond animé */
.vignette--static {
  background: #e9eef0;
  border-color: #d8dee0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.vignette--static .vignette-fill {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 84%;
  height: auto;
  object-fit: cover;
}
/* Vignette « Après » : miniature (effet photo → vignette normalisée) ;
   centrage vertical assuré par la grille .ba-visual (align-items: center) */
.vignette--mini {
  width: 116px;
  max-width: 30vw;
}
@media (prefers-reduced-motion: reduce) {
  .vbg { animation: none; opacity: 0; }
  .vbg-2 { opacity: 1; }
}

/* Trombinoscope & organigramme */
.org-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.org-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.2rem 1.5rem 1.8rem;
}
.org-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}
.org-node--root { padding-bottom: 1.2rem; }
.org-node--root::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 1.2rem;
  background: var(--border);
  transform: translateX(-50%);
}
.org-branch {
  display: flex;
  gap: 1.6rem;
  padding-top: 1.2rem;
  position: relative;
}
.org-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16.6%;
  right: 16.6%;
  height: 2px;
  background: var(--border);
}
.org-branch .org-node::before {
  content: '';
  position: absolute;
  top: -1.2rem;
  left: 50%;
  width: 2px;
  height: 1.2rem;
  background: var(--border);
  transform: translateX(-50%);
}
.org-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
  box-shadow: 0 3px 8px rgba(74, 150, 176, 0.25);
}
.org-node--root .org-avatar { width: 52px; height: 52px; }
.org-avatar-1 { background: #4A96B0; }
.org-avatar-2 { background: linear-gradient(135deg, #5DBE9A 0%, #4A96B0 100%); }
.org-avatar-3 { background: #3D8299 radial-gradient(circle, rgba(255, 255, 255, 0.28) 2px, transparent 2.4px) 0 0 / 14px 14px; }
.org-avatar-4 { background: repeating-linear-gradient(45deg, #3D8299 0 8px, #4A96B0 8px 16px); }
.org-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* CTA final */
.final-cta {
  background: var(--landing-gradient);
  color: #fff;
  text-align: center;
  padding: 4.5rem 1.5rem;
}
.final-cta h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}
.final-cta p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  margin-bottom: 1.6rem;
}
.final-cta .cta-primary { margin: 0 auto; }
.final-cta-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Punchline (bandeau interstitiel clair, sobre) */
.punchline {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 1.5rem;
  text-align: center;
}
.punchline p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.55;
}
.punchline strong {
  font-style: normal;
  color: var(--primary);
}

/* Footer */
.landing-footer {
  background: #21363a;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Responsive multi-sections */
@media (max-width: 768px) {
  .landing-hero {
    min-height: 0;
    padding: 1rem 1.25rem 3rem;
  }
  .section { padding: 3rem 1.25rem; }
  .final-cta { padding: 3rem 1.25rem; }
  .section-title { font-size: 1.6rem; }
  .final-cta h2 { font-size: 1.6rem; }
  .steps,
  .features,
  .features--3 { grid-template-columns: 1fr; }
  .ba-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-title--left,
  .section-lead--left { text-align: center; }
  /* Rangée avant/après : on resserre pour ne pas déborder sur les petits écrans */
  .ba-visual { column-gap: 0.5rem; }
  .ba-arrow { font-size: 1.4rem; }
  .vignette--static { max-width: 40vw; }
  .org-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .org-inner .org-visual { order: -1; }
}

/* Très petits écrans : on réduit encore l'avant/après et le titre hero */
@media (max-width: 360px) {
  .hero-title { font-size: 1.7rem; }
  .vignette--static { max-width: 38vw; }
  .vignette--mini { max-width: 28vw; }
}
