/**
 * Rid'Air Homepage V5 — "Editorial Altitude"
 * Styles dédiés au design V5 homepage.
 * Tous les sélecteurs préfixés v5- pour éviter les conflits avec le CSS existant.
 * Dark mode global overrides are in dark-mode.css — this file only has V5-specific overrides.
 */

/* ═══ THEME TOKENS V5 — Light (default) ═══ */
:root {
    --v5-primary: #19a4b0;
    --v5-primary-h: #148890;
    --v5-accent: #FF6B35;
    --v5-accent-h: #e55a2b;
    --v5-navy: #2e6488;
    --v5-bg: #fff;
    --v5-bg2: #ffffff;
    --v5-bg3: #f1f5f9;
    --v5-fg: #0f172a;
    --v5-fg2: #475569;
    --v5-fg3: #94a3b8;
    --v5-border: rgba(15,23,42,.08);
}

/* ═══ V5 TOKENS — Dark (via site-wide attribute) ═══ */
[data-theme="dark"] {
    --v5-bg: #0a0f1a;
    --v5-bg2: #111827;
    --v5-bg3: #1a2236;
    --v5-fg: #f0f4f8;
    --v5-fg2: #94a3b8;
    --v5-fg3: #64748b;
    --v5-border: rgba(148,163,184,.12);
}

/* ═══ V5-SPECIFIC DARK OVERRIDES ═══ */
/* About section */
[data-theme="dark"] .v5-about__txt {
    background: var(--v5-bg2);
}
/* Product cards */
[data-theme="dark"] .v5-pcard:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,.3);
}
/* CTA gradient */
[data-theme="dark"] .v5-cta {
    background: linear-gradient(135deg, rgba(25,164,176,.08), rgba(46,100,136,.08));
}

/* Theme toggle is now in dark-mode.css (.dm-toggle) — V5-specific toggle removed */

/* ═══ V5 BUTTONS ═══ */
.v5-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 1.75rem;
    border-radius: 9999px;
    font-weight: 650;
    font-size: .875rem;
    cursor: pointer;
    border: none;
    transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
    white-space: nowrap;
    text-decoration: none;
}
.v5-btn--accent {
    background: var(--v5-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255,107,53,.3);
}
.v5-btn--accent:hover {
    background: var(--v5-accent-h);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,107,53,.4);
}
.v5-btn--outline {
    background: transparent;
    color: var(--v5-fg);
    border: 1.5px solid var(--v5-border);
}
.v5-btn--outline:hover {
    border-color: var(--v5-primary);
    color: var(--v5-primary);
}

/* ═══ V5 WRAP ═══ */
.v5-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ═══ HERO — SPLIT EDITORIAL ═══ */
.v5-hero {
    min-height: 90vh;
    min-height: 90svh;
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    overflow: hidden;
}
@media(min-width: 768px) {
    .v5-hero { grid-template-columns: 1fr 1fr; }
}
.v5-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 2;
}
@media(min-width: 768px) {
    .v5-hero__text { padding: 0 clamp(2rem, 5vw, 4rem); }
}
.v5-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--v5-primary);
    margin-bottom: 1.5rem;
}
.v5-hero__tag::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--v5-primary);
}
.v5-hero__h1 {
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: .92;
    letter-spacing: -.04em;
    color: var(--v5-fg);
}
.v5-hero__h1 em {
    font-style: normal;
    color: var(--v5-primary);
    display: inline-block;
}
.v5-hero__sub {
    margin-top: 1.5rem;
    font-size: clamp(.9375rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--v5-fg2);
    max-width: 440px;
}
.v5-hero__sub strong {
    color: var(--v5-fg);
    font-weight: 600;
}
.v5-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 2rem;
}
.v5-hero__img {
    position: relative;
    overflow: hidden;
    min-height: 50vh;
}
@media(max-width: 767px) {
    .v5-hero__img { min-height: 40vh; order: -1; }
}
.v5-hero__img picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}
.v5-hero__img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.js-v5-lazy-img {
    background: var(--v5-bg3);
}
.js-v5-lazy-img.is-loaded {
    background: transparent;
}
.v5-hero__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--v5-bg) 0%, var(--v5-bg) 8%, transparent 55%);
    pointer-events: none;
}
@media(max-width: 767px) {
    .v5-hero__img::after {
        background: linear-gradient(to top, var(--v5-bg) 0%, var(--v5-bg) 10%, transparent 65%);
    }
}
.v5-hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: var(--v5-fg3);
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .15em;
}
.v5-hero__scroll span {
    width: 1px;
    height: 2.5rem;
    background: var(--v5-fg3);
    animation: v5scrollPulse 2s ease-in-out infinite;
}
@keyframes v5scrollPulse {
    0%, 100% { opacity: .3; transform: scaleY(.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ═══ MARQUEE TICKER ═══ */
.v5-ticker {
    border-top: 1px solid var(--v5-border);
    border-bottom: 1px solid var(--v5-border);
    padding: .875rem 0;
    overflow: hidden;
    white-space: nowrap;
}
.v5-ticker__track {
    display: flex;
    gap: 0;
    animation: v5tickerScroll 25s linear infinite;
    width: max-content;
    will-change: transform;
    backface-visibility: hidden;
}
.v5-ticker__track span {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--v5-fg3);
}
.v5-ticker__track span::after {
    content: '✦';
    color: var(--v5-primary);
    font-size: .5rem;
}
@keyframes v5tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ═══ SECTION SPACING ═══ */
.v5-section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

/* ═══ SECTION TITLE ═══ */
.v5-stitle {
    margin-bottom: 2.5rem;
}
.v5-stitle__tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--v5-primary);
    margin-bottom: .75rem;
}
.v5-stitle__tag::before {
    content: '';
    width: 1.5rem;
    height: 2px;
    background: var(--v5-primary);
    border-radius: 1px;
}
.v5-stitle h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
}
.v5-stitle p {
    margin-top: .625rem;
    font-size: .9375rem;
    color: var(--v5-fg2);
    max-width: 480px;
    line-height: 1.6;
}

/* ═══ BENTO CATEGORIES ═══ */
.v5-bento {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(180px, auto);
}
@media(min-width: 768px) {
    .v5-bento {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: minmax(220px, auto);
    }
}
.v5-bento__item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
}
.v5-bento__item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22,1,.36,1), filter .4s;
}
.v5-bento__item:hover img {
    transform: scale(1.08);
    filter: brightness(.35);
}
.v5-bento__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.15) 50%, transparent);
    pointer-events: none;
}
.v5-bento__content {
    position: relative;
    z-index: 2;
    padding: 1.25rem;
    width: 100%;
    transform: translateY(8px);
    transition: transform .4s;
}
.v5-bento__item:hover .v5-bento__content {
    transform: translateY(0);
}
.v5-bento__tag {
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--v5-primary);
    margin-bottom: .25rem;
    display: block;
}
.v5-bento__name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    line-height: 1.2;
}
@media(min-width: 768px) {
    .v5-bento__name { font-size: 1.125rem; }
}
.v5-bento__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    color: #fff;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    opacity: 0;
    transform: translate(-8px, 8px);
    transition: all .3s;
}
.v5-bento__item:hover .v5-bento__arrow {
    opacity: 1;
    transform: translate(0);
}
/* Large bento item */
.v5-bento--lg {
    grid-column: span 2;
    grid-row: span 2;
}
@media(max-width: 767px) {
    .v5-bento--lg {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ═══ ABOUT — EDITORIAL SPLIT ═══ */
.v5-about {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
    overflow: hidden;
}
@media(min-width: 768px) {
    .v5-about { grid-template-columns: 1fr 1fr; min-height: 600px; }
}
.v5-about__img {
    position: relative;
    min-height: 360px;
    overflow: hidden;
}
.v5-about__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.v5-about__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(25,164,176,.15), transparent);
}
.v5-about__txt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--v5-bg2);
}
@media(min-width: 768px) {
    .v5-about__txt { padding: 4rem clamp(2rem, 5vw, 4rem); }
}
.v5-about__txt blockquote {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1.25rem;
    border-left: 3px solid var(--v5-primary);
}
.v5-about__author {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: var(--v5-fg2);
}
.v5-about__author strong {
    color: var(--v5-fg);
    font-weight: 600;
}

/* ═══ HORIZONTAL SCROLL PRODUCTS ═══ */
.v5-hscroll-wrap {
    overflow: visible;
    position: relative;
}
.v5-hscroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    scrollbar-width: none;
}
.v5-hscroll::-webkit-scrollbar { display: none; }

/* ═══ PRODUCT CARDS ═══ */
.v5-pcard {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--v5-bg2);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--v5-border);
    transition: border-color .3s, transform .3s, box-shadow .3s;
    position: relative;
}
@media(min-width: 768px) {
    .v5-pcard { flex: 0 0 300px; }
}
.v5-pcard:hover {
    border-color: rgba(25,164,176,.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
}
.v5-pcard a { text-decoration: none; color: inherit; }
.v5-pcard__img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--v5-bg3);
    position: relative;
}
.v5-pcard__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .75rem;
    transition: transform .5s;
}
.v5-pcard:hover .v5-pcard__img img {
    transform: scale(1.05);
}
.v5-pcard__badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 2;
    padding: .25rem .625rem;
    border-radius: 9999px;
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
}
.v5-pcard__badge--new { background: var(--v5-primary); }
.v5-pcard__badge--promo { background: var(--v5-accent); }
.v5-pcard__badge--hot {
    background: linear-gradient(135deg, var(--v5-accent), var(--v5-primary));
}
.v5-pcard__body {
    padding: 1rem 1.25rem 1.25rem;
}
.v5-pcard__brand {
    font-size: .6875rem;
    font-weight: 700;
    color: var(--v5-primary);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.v5-pcard__name {
    font-size: .875rem;
    font-weight: 600;
    margin-top: .25rem;
    line-height: 1.3;
    color: var(--v5-fg);
}
.v5-pcard__price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-top: .625rem;
}
.v5-pcard__now {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--v5-fg);
}
.v5-pcard__now--promo {
    color: var(--v5-accent);
}
.v5-pcard__old {
    font-size: .8125rem;
    color: var(--v5-fg3);
    text-decoration: line-through;
}
.v5-pcard__ttc {
    font-size: .6875rem;
    font-weight: 400;
    color: var(--v5-fg3);
    margin-left: .25rem;
}

/* ═══ HOT PRODUCTS GRID ═══ */
.v5-product-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}
@media(min-width: 640px) {
    .v5-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media(min-width: 1024px) {
    .v5-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.v5-product-grid .v5-pcard {
    flex: initial;
    min-width: 0;
}

/* ═══ NUMBERS ═══ */
.v5-numbers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media(min-width: 768px) {
    .v5-numbers { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
}
.v5-numbers__item {
    text-align: center;
    padding: 1.5rem 1rem;
}
.v5-numbers__val {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--v5-primary);
    line-height: 1;
    letter-spacing: -.03em;
}
.v5-numbers__label {
    font-size: .8125rem;
    color: var(--v5-fg2);
    margin-top: .375rem;
    line-height: 1.3;
}

/* ═══ CTA SECTION ═══ */
.v5-cta {
    background: linear-gradient(135deg, rgba(25,164,176,.06), rgba(46,100,136,.06));
    border: 1px solid var(--v5-border);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
@media(min-width: 768px) {
    .v5-cta { padding: 4rem 3rem; }
}
.v5-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25,164,176,.08), transparent 70%);
    pointer-events: none;
}
.v5-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: .75rem;
}
.v5-cta p {
    font-size: 1rem;
    color: var(--v5-fg2);
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.v5-cta p strong {
    color: var(--v5-fg);
    font-weight: 600;
}

/* ═══ TRUST CARDS ═══ */
.v5-trust {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}
@media(min-width: 768px) {
    .v5-trust { grid-template-columns: repeat(5, 1fr); gap: 1rem; }
}
.v5-trust__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem .75rem;
    border-radius: 1rem;
    border: 1px solid var(--v5-border);
    background: var(--v5-bg2);
    transition: all .2s;
}
.v5-trust__card:hover {
    border-color: rgba(25,164,176,.3);
    background: rgba(25,164,176,.04);
}
.v5-trust__card svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v5-primary);
    margin-bottom: .625rem;
}
.v5-trust__title {
    font-size: .8125rem;
    font-weight: 650;
    color: var(--v5-fg);
    line-height: 1.2;
}
.v5-trust__sub {
    font-size: .6875rem;
    color: var(--v5-fg3);
    margin-top: .125rem;
}

/* ═══ BRANDS MARQUEE ═══ */
.v5-brands-marquee {
    overflow: hidden;
    padding: 2.5rem 0;
    border-top: 1px solid var(--v5-border);
    border-bottom: 1px solid var(--v5-border);
}
.v5-brands__track {
    display: flex;
    gap: 3rem;
    animation: v5brandsScroll 30s linear infinite;
    width: max-content;
    align-items: center;
    will-change: transform;
    backface-visibility: hidden;
}
.v5-brands__track a {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--v5-fg3);
    white-space: nowrap;
    transition: color .2s;
    text-decoration: none;
}
.v5-brands__track a:hover {
    color: var(--v5-primary);
}
@keyframes v5brandsScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ═══ REVEAL ANIMATIONS ═══ */
.v5-rv {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
.v5-rv.v5-vis {
    opacity: 1;
    transform: translateY(0);
}
.v5-rv-d1 { transition-delay: .1s; }
.v5-rv-d2 { transition-delay: .2s; }
.v5-rv-d3 { transition-delay: .3s; }
.v5-rv-d4 { transition-delay: .4s; }

.v5-cv {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}

/* ═══ RESPONSIVE HELPERS ═══ */
@media(max-width: 767px) {
    .hide-m { display: none !important; }
    .v5-rv {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .v5-ticker,
    .v5-brands-marquee {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .v5-ticker::-webkit-scrollbar,
    .v5-brands-marquee::-webkit-scrollbar {
        display: none;
    }
    .v5-ticker__track,
    .v5-brands__track {
        animation: none !important;
        will-change: auto;
    }
}

/* ═══ REDUCED MOTION ═══ */
@media(prefers-reduced-motion: reduce) {
    .v5-rv { opacity: 1; transform: none; transition: none; }
    .v5-ticker__track, .v5-brands__track { animation: none !important; }
    .v5-hero__scroll span { animation: none; }
}
