/* =============================================================================
   BASE STYLES - MHB Theme
   ============================================================================= */

/* Note: Les polices sont chargées via fonts.css */

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

html {
    /* scroll-behavior géré par Lenis.js pour un smooth scroll premium */
    /* Fallback natif si Lenis n'est pas chargé */
    scroll-behavior: smooth;
}

html.lenis {
    scroll-behavior: auto;
}

body {
    font-family: var(--mhb-font-primary);
    background-color: var(--mhb-bg-dark);
    color: var(--mhb-text-white);
    font-size: 15px;
    line-height: 1.5;
    padding-top: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.admin-bar body {
    padding-top: calc(120px + var(--mhb-admin-bar-height));
}

/* Main */
.mhb-main {
    overflow: hidden;
    padding-bottom: var(--mhb-section-padding-bottom);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--mhb-transition-fast);
}

a:hover {
    color: var(--mhb-accent);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Containers */
.mhb-container {
    width: calc(100% - var(--mhb-content-padding-x) * 2);
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.mhb-container-center {
    width: 100%;
    max-width: var(--mhb-container-max);
    margin: 0 auto;
    padding: 0 var(--mhb-content-padding-x);
}

/* Note: .mhb-bleed est défini dans sections.css avec les variables responsives */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--mhb-font-display);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-size: 90px;
    margin-bottom: 40px;
}

h2 {
    font-size: 60px;
    margin-bottom: 30px;
}

h3 {
    font-size: 36px;
    color: var(--mhb-secondary);
    margin-bottom: 20px;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

/* Slide animations */
.animate-slide-right {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity var(--mhb-transition-bounce), transform var(--mhb-transition-bounce);
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity var(--mhb-transition-bounce), transform var(--mhb-transition-bounce);
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity var(--mhb-transition-bounce), transform var(--mhb-transition-bounce);
}

.animate-slide-down {
    opacity: 0;
    transform: translateY(-60px);
    transition: opacity var(--mhb-transition-bounce), transform var(--mhb-transition-bounce);
}

.animate-fade-in {
    opacity: 0;
    transition: opacity var(--mhb-transition-bounce);
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--mhb-transition-bounce), transform var(--mhb-transition-bounce);
}

/* Visible state - supports both .is-visible and .visible */
.animate-slide-right.is-visible,
.animate-slide-right.visible,
.animate-slide-left.is-visible,
.animate-slide-left.visible,
.animate-slide-up.is-visible,
.animate-slide-up.visible,
.animate-slide-down.is-visible,
.animate-slide-down.visible,
.animate-fade-in.is-visible,
.animate-fade-in.visible,
.animate-scale-in.is-visible,
.animate-scale-in.visible {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

/* Delays */
.animate-delay-100 {
    transition-delay: 0.1s;
}

.animate-delay-200 {
    transition-delay: 0.2s;
}

.animate-delay-300 {
    transition-delay: 0.3s;
}

.animate-delay-400 {
    transition-delay: 0.4s;
}

.animate-delay-500 {
    transition-delay: 0.5s;
}

.animate-delay-600 {
    transition-delay: 0.6s;
}

.animate-delay-700 {
    transition-delay: 0.7s;
}

.animate-delay-800 {
    transition-delay: 0.8s;
}

/* Speed variants */
.animate-fast {
    transition-duration: 0.4s !important;
}

.animate-slow {
    transition-duration: 1.2s !important;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================================
   SCROLL CAROUSEL - Composant générique de navigation horizontale
   Utilisé pour: shortcuts header, subnav hero, etc.
   ============================================================================= */

/* Wrapper */
[data-mhb-scroll-carousel] {
    position: relative;
    overflow: hidden;
}

/* Liste scrollable */
.mhb-scroll-carousel__list {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mhb-scroll-carousel__list::-webkit-scrollbar {
    display: none;
}

.mhb-scroll-carousel__list li {
    flex-shrink: 0;
}

/* Flèches de navigation */
.mhb-scroll-carousel__arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    display: none;
    align-items: center;
    padding: 0;
    border: none;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.2s ease;
}

.mhb-scroll-carousel__arrow:hover {
    opacity: 1 !important;
}

.mhb-scroll-carousel__arrow--prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 8px;
    background: linear-gradient(to left, transparent, var(--mhb-bg-dark-alt, #010E1E) 70%);
}

.mhb-scroll-carousel__arrow--next {
    right: 0;
    justify-content: flex-end;
    padding-right: 8px;
    background: linear-gradient(to right, transparent, var(--mhb-bg-dark-alt, #010E1E) 70%);
}

.mhb-scroll-carousel__arrow svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* Animation de la flèche next */
.mhb-scroll-carousel__arrow--next svg {
    animation: scrollCarouselHintNext 1.5s ease-in-out infinite;
}

/* Animation de la flèche prev */
.mhb-scroll-carousel__arrow--prev svg {
    animation: scrollCarouselHintPrev 1.5s ease-in-out infinite;
}

@keyframes scrollCarouselHintNext {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.7;
    }

    50% {
        transform: translateX(4px);
        opacity: 1;
    }
}

@keyframes scrollCarouselHintPrev {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.7;
    }

    50% {
        transform: translateX(-4px);
        opacity: 1;
    }
}

/* Afficher les flèches selon l'état */
[data-mhb-scroll-carousel].has-overflow .mhb-scroll-carousel__arrow--next {
    display: flex;
}

[data-mhb-scroll-carousel].has-overflow.is-scrolled .mhb-scroll-carousel__arrow--prev {
    display: flex;
}

[data-mhb-scroll-carousel].has-overflow.scrolled-end .mhb-scroll-carousel__arrow--next {
    display: none;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1024px) {
    h1 {
        font-size: 70px;
    }

    h2 {
        font-size: 50px;
    }

    h3 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 90px;
    }

    .admin-bar body {
        padding-top: calc(90px + var(--mhb-admin-bar-height-mobile));
    }

    h1 {
        font-size: 50px;
        margin-bottom: 30px;
    }

    h2 {
        font-size: 40px;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    /* Reduce animations on mobile */
    .animate-slide-left,
    .animate-slide-up,
    .animate-slide-down {
        transform: none;
        transition-duration: 0.4s;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
        padding-bottom: 80px;
    }

    h1 {
        font-size: 36px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
}