/* ============================================================
   WORLDCUP 2026 — Habillage festif TR Conseil
   ------------------------------------------------------------
   Composants :
     1. Bandeau sticky en haut (drapeau ondulant + texte + close)
     2. Mascotte coq en coin bas-droite (animation au survol)
     3. Mini bandes tricolores latérales (rappel discret)

   Activation : ce fichier CSS + le snippet HTML doivent être
   inclus via Gantry (voir worldcup-2026.html.snippet pour le
   HTML à coller dans un atom "Custom HTML").

   Couleurs drapeau officiel :
     Bleu  #0055A4
     Blanc #FFFFFF
     Rouge #EF4135
   ============================================================ */


/* ============================================================
   1. BANDEAU SUPÉRIEUR STICKY
   ============================================================ */

.wc2026-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px 0 20px;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #0055A4 0%,
        #0055A4 25%,
        #FFFFFF 45%,
        #FFFFFF 55%,
        #EF4135 75%,
        #EF4135 100%
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Sweep blanc translucide qui glisse sur le drapeau */
.wc2026-banner::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: wc2026-sweep 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes wc2026-sweep {
    0%   { left: -60%; }
    50%  { left: 120%; }
    100% { left: 120%; }
}

.wc2026-banner__content,
.wc2026-banner__close {
    position: relative;
    z-index: 2;
}

.wc2026-banner.wc2026-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.wc2026-banner__content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wc2026-banner__flag {
    display: inline-block;
    font-size: 18px;
    animation: wc2026-flag-flutter 2.5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes wc2026-flag-flutter {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50%      { transform: rotate(8deg)  scale(1.1); }
}

.wc2026-banner__ball {
    display: inline-block;
    font-size: 18px;
    animation: wc2026-ball-spin 3s linear infinite;
}

@keyframes wc2026-ball-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.wc2026-banner__close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wc2026-banner__close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}


/* ============================================================
   2. MASCOTTE COIN BAS-DROITE
   ============================================================ */

.wc2026-mascot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    width: 140px;
    height: 140px;
    pointer-events: auto;
    animation: wc2026-mascot-float 4s ease-in-out infinite;
    transition: transform 0.3s ease, opacity 0.4s ease;
}

.wc2026-mascot.wc2026-hidden {
    opacity: 0;
    pointer-events: none;
}

.wc2026-mascot:hover {
    transform: scale(1.08) rotate(-3deg);
}

@keyframes wc2026-mascot-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.wc2026-mascot__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #FFFFFF;
    background: #FFFFFF;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Fallback affiché tant qu'aucun asset (image/vidéo) n'est fourni.
   Cercle tricolore + emoji coq, toujours visible. */
.wc2026-mascot__fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg,
        #0055A4 0%,    #0055A4 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #EF4135 66.66%, #EF4135 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border: 4px solid #FFFFFF;
    overflow: hidden;
    position: relative;
}

.wc2026-mascot__fallback::after {
    content: "🐓";
    font-size: 70px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    animation: wc2026-coq-bob 2.5s ease-in-out infinite;
}

@keyframes wc2026-coq-bob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-3px) rotate(3deg); }
}

.wc2026-mascot__caption {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0055A4 0%, #EF4135 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


/* ============================================================
   3. AJUSTEMENTS GLOBAUX
   ============================================================ */

/* Décale le contenu pour ne pas être masqué par le bandeau sticky */
body.wc2026-active {
    padding-top: 50px;
}

/* Décale le header sticky (#g-header) quand il passe en mode fixed
   via le plugin scrollToFixed (classe .scroll-to-fixed-fixed). */
body.wc2026-active #g-header.scroll-to-fixed-fixed {
    top: 50px !important;
}

html.wc2026-dismissed body.wc2026-active {
    padding-top: 0;
    transition: padding-top 0.4s ease;
}

html.wc2026-dismissed body.wc2026-active #g-header.scroll-to-fixed-fixed {
    top: 0 !important;
}


/* ============================================================
   4. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

    .wc2026-banner {
        height: 42px;
        padding: 0 50px 0 12px;
    }

    .wc2026-banner__content {
        font-size: 12px;
        padding: 4px 12px;
        gap: 8px;
    }

    .wc2026-banner__flag,
    .wc2026-banner__ball {
        font-size: 14px;
    }

    .wc2026-banner__close {
        width: 24px;
        height: 24px;
        right: 10px;
        font-size: 12px;
    }

    body.wc2026-active {
        padding-top: 42px;
    }

    body.wc2026-active #g-header.scroll-to-fixed-fixed {
        top: 42px !important;
    }

    html.wc2026-dismissed body.wc2026-active #g-header.scroll-to-fixed-fixed {
        top: 0 !important;
    }

    /* Coq masqué sur mobile (encombrement écran) */
    .wc2026-mascot {
        display: none !important;
    }
}


/* ============================================================
   5. RESPECT PRÉFÉRENCE UTILISATEUR (accessibilité)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .wc2026-banner,
    .wc2026-banner::before,
    .wc2026-banner__ball,
    .wc2026-mascot,
    .wc2026-mascot__fallback::after {
        animation: none !important;
    }
}
