/**
 * landing.css v5 — Taux Lakay
 * Approche scroll-lock : la section Taux remplit exactement le viewport.
 * Le JS intercepte wheel/touch et bloque le scroll carte par carte.
 */

/* ========== Variables ========== */
.landing-page {
    --logo-green:       #2E7D32;
    --logo-green-light: #4CAF50;
    --bg-light:         #FAFAFA;
    --text-dark:        #212121;
    --text-muted:       #757575;
    --shadow-soft:      0 4px 20px rgba(0,0,0,.06);
    --shadow-card:      0 8px 32px rgba(0,0,0,.10);
    --radius:           16px;
    --transition:       .4s cubic-bezier(.4,0,.2,1);
}

/* ========== NAVBAR ========== */
/* Hauteur fixe 60px, logo contraint, bouton à droite */
.landing-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}
.landing-nav-inner {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.landing-nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    max-width: 50%;
    overflow: hidden;
}
/* Logo : contraint en hauteur et largeur, sans déformation */
.landing-nav-logo-img {
    height: 36px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 120px !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0;
}
.landing-nav-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .landing-header        { height: 52px; }
    .landing-nav-inner     { height: 52px !important; }
    .landing-nav-logo-img  { height: 28px !important; max-width: 90px !important; }
}

/* ========== HERO ========== */
.landing-hero {
    background: linear-gradient(165deg,#fafafa 0%,#fff 45%,#f8f9fa 100%);
    padding: 3rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 50%; height: 140%;
    background: radial-gradient(ellipse, rgba(46,125,50,.05) 0%, transparent 70%);
    pointer-events: none;
}
.landing-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.landing-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
}
.landing-cta {
    padding: .85rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(46,125,50,.35);
    transition: transform var(--transition), box-shadow var(--transition);
}
.landing-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46,125,50,.4);
}
.animate-fade-in         { opacity:0; transform:translateY(20px); animation:ldFadeIn .8s ease       forwards; }
.animate-fade-in-delay   { opacity:0; transform:translateY(20px); animation:ldFadeIn .8s ease  .2s  forwards; }
.animate-fade-in-delay-2 { opacity:0; transform:translateY(20px); animation:ldFadeIn .8s ease  .4s  forwards; }
@keyframes ldFadeIn { to { opacity:1; transform:translateY(0); } }

/* ========== Sections génériques ========== */
.landing-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.landing-section.visible {
    opacity: 1;
    transform: translateY(0);
}
.landing-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
}
.landing-section-intro {
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== SECTION 2 — Taux en temps réel ========== */
/* La section occupe EXACTEMENT le viewport moins la navbar (60px).             */
/* Le JS capte les événements wheel et touch pour bloquer le scroll             */
/* jusqu'à ce que toutes les cartes aient été affichées.                        */

.landing-rates {
    background: #f4f6f8;
    /* Hauteur = viewport entier moins la navbar fixe de 60px */
    height: calc(100vh - 60px);
    min-height: 480px;         /* sécurité sur très petits écrans */
    overflow: hidden;
    position: relative;
}

/* Scène principale : flex colonne, centrage vertical et horizontal */
.rates-stage {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 5rem;
    box-sizing: border-box;
    position: relative;
    background: linear-gradient(180deg,#f8f9fa 0%,#fff 50%,#f4f6f8 100%);
    overflow: hidden;
}
@media (max-width: 768px) {
    .landing-rates  { height: calc(100vh - 52px); min-height: 420px; }
    .rates-stage    { padding: 1.25rem 1rem 4.5rem; }
}

/* En-tête : titre + intro */
.rates-stage-header {
    text-align: center;
    margin-bottom: 1.75rem;
    flex-shrink: 0;
    width: 100%;
}

/* Zone des cartes : toutes empilées en position absolue */
.rates-stack-scene {
    position: relative;
    width: 100%;
    max-width: 580px;
    height: 290px;
    flex-shrink: 0;
    margin: 0 auto;
}
@media (max-width: 768px) { .rates-stack-scene { max-width:100%; height:265px; } }
@media (max-width: 480px) { .rates-stack-scene { height:240px; } }
@media (max-width: 360px) { .rates-stack-scene { height:210px; } }

/* ── Carte individuelle : invisible par défaut ── */
/* Le JS ajoute .stack-current pour la rendre visible et la placer au premier plan */
.rates-stack-card {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    /* Invisible par défaut : JS affecte la classe .stack-current pour l'activer */
    opacity: 0;
    pointer-events: none;
    transition: transform .62s cubic-bezier(.4,0,.2,1),
                opacity   .50s ease,
                box-shadow .40s ease;
    will-change: transform, opacity;
}

/* Carte active : au premier plan */
.rates-stack-card.stack-current {
    z-index: 10;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0,0,0) scale(1);
    box-shadow: 0 20px 56px rgba(0,0,0,.13), 0 6px 20px rgba(0,0,0,.08);
}
/* Carte juste derrière */
.rates-stack-card.stack-behind-1 {
    z-index: 9;
    opacity: 1;
    transform: translate3d(0,-13px,0) scale(.97);
    box-shadow: 0 8px 28px rgba(0,0,0,.07);
}
/* Carte 2 niv. derrière */
.rates-stack-card.stack-behind-2 {
    z-index: 8;
    opacity: .85;
    transform: translate3d(0,-26px,0) scale(.94);
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
/* Carte 3 niv. derrière */
.rates-stack-card.stack-behind-3 {
    z-index: 7;
    opacity: .55;
    transform: translate3d(0,-39px,0) scale(.91);
}

/* ========== Design interne des cartes : deux colonnes ========== */
.rates-card-inner {
    display: flex;
    height: 100%;
}

/* Colonne gauche : texte */
.rates-card-left {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.rates-card-header {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    margin-bottom: .2rem;
}
.rates-card-symbol {
    font-size: 2rem;
    font-weight: 900;
    color: var(--card-accent, #2E7D32);
    line-height: 1;
}
.rates-card-code {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1a1a1a;
}
.rates-card-name {
    font-size: .875rem;
    color: #757575;
    margin-bottom: 1rem;
}
.rates-card-values { display:flex; flex-direction:column; gap:.5rem; }
.rates-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem .7rem;
    border-radius: 9px;
    background: rgba(0,0,0,.033);
}
.rates-card-label  { font-size:.875rem; font-weight:500; }
.rates-card-amount { font-size:.9375rem; font-weight:700; }
.rates-achat { color: #2E7D32; }
.rates-vente  { color: #E65100; }

/* Colonne droite : fond coloré + grand symbole */
.rates-card-right {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    background: var(--card-accent, #2E7D32);
    color: rgba(255,255,255,.95);
}
.rates-card-accent-symbol {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    opacity: .88;
}
.rates-card-accent-code {
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: .1em;
    opacity: .8;
}
@media (max-width: 768px) {
    .rates-card-left    { padding:1.375rem 1.25rem 1rem; }
    .rates-card-right   { width:130px; }
    .rates-card-accent-symbol { font-size:3rem; }
    .rates-card-symbol  { font-size:1.75rem; }
    .rates-card-code    { font-size:1.2rem; }
}
@media (max-width: 480px) {
    .rates-card-left    { padding:1.125rem 1rem .875rem; }
    .rates-card-right   { width:105px; }
    .rates-card-accent-symbol { font-size:2.5rem; }
    .rates-card-accent-code   { font-size:.8125rem; }
    .rates-card-symbol  { font-size:1.5rem; }
    .rates-card-code    { font-size:1.1rem; }
    .rates-card-name    { margin-bottom:.625rem; }
    .rates-card-amount  { font-size:.875rem; }
    .rates-stack-card   { border-radius:14px; }
}
@media (max-width: 360px) {
    .rates-card-left    { padding:1rem .875rem .75rem; }
    .rates-card-right   { width:82px; }
    .rates-card-accent-symbol { font-size:2rem; }
}

/* ========== Navigation par points (dots) ========== */
.rates-nav-dots {
    position: absolute;
    bottom: 2.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 20;
}
.rates-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    touch-action: manipulation;
    transition: background .3s, transform .3s;
}
.rates-dot--active                       { background: var(--logo-green); transform: scale(1.5); }
.rates-dot:hover:not(.rates-dot--active) { background: #999; }

/* ========== Hints scroll / swipe ========== */
.rates-scroll-hint,
.rates-swipe-hint {
    position: absolute;
    bottom: .6rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: .8125rem;
    color: #b0b0b0;
    white-space: nowrap;
    pointer-events: none;
    margin: 0;
    user-select: none;
}
/* Desktop : montrer scroll, cacher swipe */
.rates-scroll-hint { display: block; }
.rates-swipe-hint  { display: none; }
/* Tactile : montrer swipe, cacher scroll */
@media (hover:none) and (pointer:coarse) {
    .rates-scroll-hint { display: none; }
    .rates-swipe-hint  { display: block; }
}

/* ========== SECTION 3 — Pourquoi nous ========== */
.landing-why { background: var(--bg-light); }
.landing-feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,.05);
    transition: opacity .5s ease, transform .5s ease, box-shadow var(--transition);
    opacity: 0; transform: translateY(20px);
}
.landing-feature-card.visible  { opacity:1; transform:translateY(0); }
.landing-feature-card:hover    { transform:translateY(-3px); box-shadow:var(--shadow-card); }
.landing-feature-icon {
    width:56px; height:56px; border-radius:14px;
    background: linear-gradient(135deg,rgba(46,125,50,.12) 0%,rgba(76,175,80,.08) 100%);
    color: var(--logo-green);
    display:flex; align-items:center; justify-content:center; font-size:1.5rem;
}

/* ========== SECTION 4 — Engagements ========== */
.landing-commitments { background: #fff; }
.landing-commit-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 2rem; height:100%; text-align:center;
    border: 1px solid rgba(0,0,0,.05);
    transition: opacity .5s ease, transform .5s ease;
    opacity:0; transform:translateY(20px);
}
.landing-commit-card.visible { opacity:1; transform:translateY(0); }
.landing-commit-card:hover   { transform:translateY(-3px); }

/* ========== Footer ========== */
.landing-footer {
    background: var(--bg-light);
    border-top: 1px solid rgba(0,0,0,.08);
}

/* ========== Responsive général ========== */
@media (max-width: 768px) {
    .landing-hero { padding:2.5rem 0 4rem; }
    .landing-hero-title { font-size:1.6rem; }
    .landing-section-title { font-size:1.4rem; }
    .landing-section-intro { font-size:1rem; }
}
@media (max-width: 480px) {
    .landing-hero { padding:1.5rem 0 3rem; }
    .landing-hero-title { font-size:1.35rem; }
    .landing-hero-subtitle { font-size:.9375rem; }
    .landing-cta { padding:.75rem 1.5rem; font-size:.9375rem; }
    .landing-section-title { font-size:1.25rem; }
    .landing-section-intro { font-size:.9375rem; }
    .landing-section { padding-top:2rem; padding-bottom:2rem; }
    .landing-feature-card, .landing-commit-card { padding:1.25rem 1rem; }
    .landing-feature-icon { width:48px; height:48px; font-size:1.25rem; }
}
@media (max-width: 360px) {
    .landing-hero-title { font-size:1.2rem; }
    .landing-nav-logo-img { height:26px !important; max-width:80px !important; }
    .landing-cta { width:100%; text-align:center; }
}
