/**
 * Salon Banner — Styles
 * Design : date verticale gauche avec clip-path, countdown imposant, infos centre, image dégradé droite
 */

/* ============================================================
   BASE
   ============================================================ */

.salon-banner,
.salon-banner *,
.salon-banner *::before,
.salon-banner *::after {
    box-sizing: border-box;
}

.salon-banner {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.salon-banner__card {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

a.salon-banner__card {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

a.salon-banner__card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   DATE (gauche) — clip-path diagonal
   ============================================================ */

.salon-banner__date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #163C79 0%, #163C79 100%);
    color: #ffffff;
    padding: 12px 24px 12px 20px;
    min-width: 80px;
    text-align: center;
    gap: 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
}

.salon-banner__date-days {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.salon-banner__date-month {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    line-height: 1.3;
}

.salon-banner__date-year {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    line-height: 1.3;
}

/* ============================================================
   COUNTDOWN — centré, imposant
   ============================================================ */

.salon-banner__countdown {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    position: relative;
}

.salon-banner__countdown::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: #d0d5dd;
}

.salon-banner__countdown-value {
    font-size: 35px;
    font-weight: 800;
    color: #163C79;
    white-space: nowrap;
    letter-spacing: -1px;
    line-height: 1;
}

/* ============================================================
   INFOS (centre)
   ============================================================ */

.salon-banner__info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 20px;
    min-width: 0;
    gap: 6px;
}

.salon-banner__title {
    font-size: 24px;
    font-weight: 800;
    color: #163C79;
    margin: 0;
    line-height: 1.2;
}

.salon-banner__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.salon-banner__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.salon-banner__meta-item svg {
    flex-shrink: 0;
    color: #6abf69;
}

.salon-banner__location svg {
    color: #6abf69;
}

.salon-banner__hall svg,
.salon-banner__stand svg {
    color: #163C79;
    opacity: 0.6;
}

/* Séparateur avant le texte personnalisé quand il suit la localité */
.salon-banner__location + .salon-banner__detail-text::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 14px;
    background: #a0aec0;
    vertical-align: middle;
}

/* ============================================================
   IMAGE + DÉGRADÉ (droite) — pleine hauteur
   ============================================================ */

.salon-banner__visual {
    flex: 1 1 300px;
    position: relative;
    min-width: 180px;
    max-width: 530px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.salon-banner__visual-img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
    padding: 0;
    border: 0;
}

.salon-banner__visual-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   CTA "Voir plus" (quand lien actif)
   ============================================================ */

.salon-banner__cta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #163C79;
    color: #ffffff;
    gap: 8px;
    padding: 0 10px 0 25px;
    min-width: 100px;
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%);
}

.salon-banner__cta-text {
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.salon-banner__cta-arrow {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

/* Hover desktop : flèche glisse à droite */
a.salon-banner__card:hover .salon-banner__cta-arrow {
    transform: translateX(4px);
}

/* Pas d'image : masquer la section */
.salon-banner--no-image .salon-banner__visual {
    display: none;
}

/* Pas d'image desktop : infos en row centré */
@media (min-width: 993px) {
    .salon-banner--no-image .salon-banner__info {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .salon-banner--no-image .salon-banner__title {
        flex-shrink: 0;
    }

    .salon-banner--no-image .salon-banner__meta {
        flex-wrap: nowrap;
    }
}

/* ============================================================
   PROGRESS BAR (rotation multi-salons)
   ============================================================ */

.salon-banner__progress {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    margin-top: 0px;
    position: relative;
    z-index: 10;
}

.salon-banner__progress-fill {
    height: 100%;
    width: 0%;
    background: #163C79;
    transition: none;
}

/* ============================================================
   ANIMATIONS (rotation)
   ============================================================ */

.salon-slide-out {
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.salon-slide-in {
    animation: salonSlideIn 0.35s ease forwards;
}

@keyframes salonSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Tablette large */
@media (max-width: 1200px) {
    .salon-banner {
        max-width: 95%;
    }

    .salon-banner__visual {
        flex: 1 1 200px;
        min-width: 150px;
        max-width: 300px;
    }

    .salon-banner__cta {
        padding: 0 20px;
        min-width: 90px;
    }

    .salon-banner__title {
        font-size: 20px;
    }

    .salon-banner__countdown-value {
        font-size: 28px;
    }
}

/* Tablette + Mobile */
@media (max-width: 992px) {
    .salon-banner {
        margin: 12px auto;
    }

    /* Visual masqué */
    .salon-banner__visual {
        display: none;
    }

    /* Parent : flex row wrap */
    .salon-banner__card {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        height: auto;
    }

    /* Enfant 1 : date bandeau 100% (force retour à la ligne après) */
    .salon-banner__date {
        clip-path: none;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        padding: 10px 12px;
        min-width: auto;
        flex: 0 0 100%;
    }

    .salon-banner__date-days {
        font-size: 16px;
    }

    .salon-banner__date-month,
    .salon-banner__date-year {
        font-size: 13px;
        line-height: 1.1;
        opacity: 1;
    }

    /* Enfant 2 : infos + countdown en row
       info prend la place restante, countdown prend sa largeur intrinsèque
       (évite le wrap Safari dû aux arrondis sous-pixel de flex-basis en %) */
    .salon-banner__info {
        flex: 1 1 0;
        min-width: 0;
        padding: 6px 12px 10px;
        gap: 2px;
        align-items: center;
        text-align: center;
    }

    .salon-banner__title {
        font-size: 14px;
        white-space: normal;
    }

    .salon-banner__meta {
        gap: 8px;
        justify-content: center;
    }

    .salon-banner__meta-item {
        font-size: 11px;
    }

    .salon-banner__countdown {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 12px;
    }

    .salon-banner__countdown-value {
        font-size: 20px;
    }

    /* CTA mobile — positionné dans le bandeau date */
    .salon-banner__cta {
        position: absolute;
        top: 0;
        right: 0;
        height: auto;
        flex-direction: row;
        padding: 10px 12px;
        gap: 6px;
        min-width: auto;
        clip-path: none;
        -webkit-clip-path: none;
        border-bottom-left-radius: 4px;
    }

    /* Réserver la place du CTA absolu pour éviter le chevauchement du mois/année */
    .salon-banner--has-link .salon-banner__date {
        padding-right: 110px;
    }

    .salon-banner__cta-text {
        font-size: 12px;
    }

    .salon-banner__cta-arrow {
        width: 18px;
        height: 18px;
        animation: salonArrowSlide 1.5s ease-in-out infinite;
    }

    @keyframes salonArrowSlide {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }
}

/* Mobile : localité sur sa propre ligne, hall+stand restent en row */
@media (max-width: 767px) {
    .salon-banner__meta {
        flex-wrap: wrap;
        gap: 2px 8px;
    }

    .salon-banner__location {
        flex: 0 0 100%;
        justify-content: center;
    }

    .salon-banner__location + .salon-banner__detail-text::before {
        display: none;
    }

    .salon-banner__detail-text {
        flex: 0 0 100%;
        justify-content: center;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .salon-banner {
        max-width: 100%;
        margin: 8px 0;
        padding: 0 8px;
    }

    .salon-banner__date-days {
        font-size: 14px;
    }

    .salon-banner__countdown-value {
        font-size: 18px;
    }

    .salon-banner__title {
        font-size: 13px;
    }

    .salon-banner__meta-item {
        font-size: 10px;
    }

    .salon-banner__meta-item svg {
        width: 12px;
        height: 12px;
    }

    .salon-banner__cta-text {
        font-size: 10px;
    }

    .salon-banner__cta-arrow {
        width: 14px;
        height: 14px;
    }
}

/* Très petit mobile — date à gauche si lien, centrée sinon */
@media (max-width: 375px) {
    .salon-banner__date {
        justify-content: center;
    }

    .salon-banner--has-link .salon-banner__date {
        justify-content: flex-start;
    }
}

