/* =========================================
   Site Header
   ========================================= */

/**
 * 1. Fixed position at the top of the viewport
 * 2. Ensure header stays above other content
 * 3. Smooth transitions for any property changes
 */
.site-header {
    position: fixed;
    /* 1 */
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    /* 2 */
    padding: 15px 0;
    transition: all 0.3s ease;
    /* 3 */
    box-sizing: border-box;
}

/**
 * Header container
 * 1. Flex layout for horizontal alignment
 * 2. Center content vertically
 * 3. Add padding and constrain width
 */
.header__container {
    display: flex;
    /* 1 */
    align-items: center;
    /* 2 */
    justify-content: space-between;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    /* 3 */
}

/**
 * Logo styles
 * 1. Smooth hover effect
 * 2. Ensure logo stays above other elements
 */
.header__logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
    /* 1 */
    z-index: 10;
    /* 2 */
    text-decoration: none;
    flex-shrink: 0;
}

.header__logo:hover {
    transform: scale(1.05);
}

.header__logo-img {
    height: 50px;
    width: auto;
    max-width: 100%;
    transition: all 0.2s ease;
}

/**
 * Header content area
 * 1. Allow content to grow and shrink
 * 2. Ensure text truncation works
 */
.header__content {
    text-align: center;
    z-index: 5;
    flex-shrink: 0;
    white-space: nowrap;
}

/**
 * Main title
 * 1. Prevent text from wrapping by default
 * 2. Ensure proper text overflow handling
 */
.header__title {
    color: #1a1a1a;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
    /* 1 */
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    line-height: 1.1;
    overflow: hidden;
    /* 2 */
    text-overflow: ellipsis;
    /* 2 */
}

/**
 * Gradient text for TDEA highlight
 */
.header__highlight {
    background: linear-gradient(135deg, #FF7A29, #C4A35A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/**
 * Subtitle text
 */
.header__subtitle {
    font-size: 1rem;
    color: #666666;
    margin: 4px 0 0 0;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    opacity: 0.9;
}

/* =========================================
   Header Promo Badge (-30%)
   ========================================= */

/* Wrapper: positions the whole group (label + badge) in the absolute center */
.header__promo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    /* True center of the header bar */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

/* "Jusqu'à" text to the left of the badge */
.header__promo-prefix {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f36e1c;
    white-space: nowrap;
    letter-spacing: 0.08em;
}

.header__promo-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    background: linear-gradient(135deg, #ed7723, #f76f1a);
    border-radius: 10px;
    padding: 7px 22px;
    min-width: 76px;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(180, 70, 0, 0.55);
}

.header__promo-percent {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ed7723;
    line-height: 1;
    letter-spacing: 0.02em;
}

/* =========================================
   Header Countdown Timer
   ========================================= */

.header__countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    justify-content: center;
}

.header__countdown-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    color: #FF7A29;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.header__countdown-blocks {
    display: flex;
    align-items: center;
    gap: 6px;
}

.countdown-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FF7A29;
    border-radius: 10px;
    padding: 7px 22px;
    min-width: 76px;
    box-shadow: 0 3px 12px rgba(255, 122, 41, 0.35);
}

.countdown-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0.02em;
}

.countdown-unit {
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* =========================================
   Responsive Styles
   ========================================= */

/* Tablets and below */
@media (max-width: 1030px) {
    .site-header {
        padding: 10px 0;
    }

    .header__container {
        padding: 0 15px;
    }

    /* Allow title to wrap earlier to prevent overflow on tablets */
    .header__title {
        font-size: 1.3rem;
        white-space: normal;
        /* Allow wrapping */
        line-height: 1.2;
    }

    .header__subtitle {
        font-size: 0.85rem;
        margin-top: 2px;
    }

    .header__logo {
        margin-right: 15px;
    }

    .header__logo-img {
        height: 45px;
    }

    .countdown-block {
        min-width: 44px;
        padding: 4px 10px;
    }

    .countdown-number {
        font-size: 1.1rem;
    }
}

/* Small phones */
@media (max-width: 845px) {
    .site-header {
        padding: 10px 0;
    }

    .header__container {
        padding: 0 16px;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 0;
    }

    /* Row 1 – left: logo */
    .header__logo {
        margin: 0;
        flex-shrink: 0;
        order: 1;
    }

    .header__logo-img {
        height: 38px;
        max-width: none;
        /* Removed the previous restriction that made the logo smaller */
    }

    /* Row 1 – right: wrapper + badge */
    .header__promo-wrapper {
        position: static;
        transform: none;
        order: 2;
        margin-left: auto;
        pointer-events: auto;
        gap: 5px;
    }

    .header__promo-prefix {
        font-size: 0.92rem;
    }

    .header__promo-badge {
        padding: 4px 8px;
        border-radius: 8px;
        min-width: 0;
    }

    .header__promo-percent {
        font-size: 1.1rem;
    }

    .header__promo-label {
        font-size: 0.5rem;
    }

    .header__subtitle {
        display: none;
    }

    /* Row 2: countdown spans full width, centered */
    .header__countdown {
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        order: 3;
        margin-top: 4px;
        padding-bottom: 2px;
    }

    .header__countdown-label {
        display: block;
        font-size: 0.58rem;
    }

    .header__countdown-blocks {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        /* Ensures proper centering without pushing */
    }

    .countdown-block {
        flex: 1 1 0;
        /* Distribute available space evenly */
        min-width: 0;
        /* Let flex scale them down if necessary */
        max-width: 60px;
        /* But keep a reasonable max */
        padding: 4px 4px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .countdown-number {
        font-size: 1.15rem;
    }

    .countdown-unit {
        font-size: 0.52rem;
    }
}

@media (max-width: 370px) {
    .site-header {
        padding: 10px 0;
    }

    .header__container {
        padding: 0 8px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 0;
    }

    /* Row 1 – left: logo */
    .header__logo {
        margin: 0;
        flex-shrink: 0;
        order: 1;
    }

    .header__logo-img {
        height: 24px;
        max-width: none;
        /* Removed the previous restriction that made the logo smaller */
    }

    /* Row 1 – right: wrapper + badge */
    .header__promo-wrapper {
        position: static;
        transform: none;
        order: 2;
        margin-left: auto;
        pointer-events: auto;
        gap: 5px;
    }

    .header__promo-prefix {
        font-size: 0.75rem;
    }

    .header__promo-percent {
        font-size: 0.9rem;
    }

    .header__promo-label {
        font-size: 0.5rem;
    }

    .header__subtitle {
        display: none;
    }

    /* Row 2: countdown spans full width, centered */
    .header__countdown {
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        order: 3;
        margin-top: 2px;
        padding-bottom: 1px;
    }

    .header__countdown-label {
        display: block;
        font-size: 0.4rem;
    }

    .header__countdown-blocks {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
        /* Ensures proper centering without pushing */
    }

    .countdown-block {
        flex: 1 1 0;
        /* Distribute available space evenly */
        min-width: 0;
        /* Let flex scale them down if necessary */
        max-width: 60px;
        /* But keep a reasonable max */
        padding: 4px 4px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .countdown-number {
        font-size: 1rem;
    }

    .countdown-unit {
        font-size: 0.5rem;
    }
}