/**
 * header.css - UltraJeux "Bleu Signature"
 * Masthead bleu #005A9C, navbar bleu fonce #003d6b, mega-menu blanc
 * Copyright 2024 Ultra Jeux SARL
 */

/* ============================================================
   BASE
   ============================================================ */
body {
    padding: 0;
    margin: 0;
    background: white url(../../images/header/fond_header.jpg) repeat-x;
}

div#body {
    max-width: 1600px;
    margin: 0 auto;
}

#hdr {
    width: 100%;
    position: relative;
    z-index: 500;
}

/* Wrapper interne : centre le contenu a 1600px max */
#hdr .hdr-inner {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 22px;
    box-sizing: border-box;
}

/* Reset des regles globales de style.css :
   a:link { color:#00349C; text-decoration:underline; font-size:13px; }
   Ces regles ont une specificite (0,1,1). On les bat avec #hdr a:link (1,1,1).
*/
#hdr a,
#hdr a:link,
#hdr a:visited,
#hdr a:hover,
#hdr a:active {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif !important;
    font-size: inherit !important;
    text-decoration: none !important;
    color: inherit;
}
#hdr button,
#hdr input[type="text"] {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif !important;
    font-size: inherit !important;
}

/* ============================================================
   UTILITY BAR
   ============================================================ */
#hdr .hdr-util {
    background: #f0f4f8;
    border-bottom: 1px solid #dde4ed;
    font-size: 11.5px;
    color: #555;
}
#hdr .hdr-util .hdr-inner { justify-content: space-between; padding-top: 5px; padding-bottom: 5px; gap: 0; }
#hdr .hdr-util-l,
#hdr .hdr-util-r { display: flex; gap: 20px; }
#hdr .hdr-util a,
#hdr .hdr-util a:link,
#hdr .hdr-util a:visited { color: #555; }
#hdr .hdr-util a:hover { color: #005A9C; }

/* ============================================================
   MASTHEAD
   ============================================================ */
#hdr .hdr-mast {
    background: linear-gradient(to bottom, rgb(0, 90, 156) 0%, rgb(112, 153, 199) 100%);
}
#hdr .hdr-mast .hdr-inner { padding-top: 14px; padding-bottom: 14px; justify-content: space-between; column-gap: 20px;}

#hdr .hdr-logo { flex-shrink: 0; line-height: 0; }
#hdr .hdr-logo img { height: 70px; width: auto; border: 0; }

#hdr .hdr-search {
    flex: 1;
    max-width: 900px;
    display: flex;
    height: 46px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
#hdr .hdr-search input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px !important;
    color: #222;
    background: #fff;
    padding: 0 20px;
}
#hdr .hdr-search input[type="text"]::placeholder { color: #c0cad8; }
#hdr .hdr-search-btn {
    width: 100px;
    background: #EEB310;
    color: #003d6b;
    border: none;
    font-size: 13px !important;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background .14s;
    white-space: nowrap;
}
#hdr .hdr-search-btn:hover { background: #d4a010; }

/* Dropdown de recherche mobile - simple */
.hdr-search-modal {
    display: none;
}
.hdr-search-modal.open {
    display: block;
}
.hdr-search-modal-overlay {
    display: none;
}
.hdr-search-modal-content {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9000;
    border-radius: 0 0 10px 10px;
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hdr-search-modal-input-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    transition: border-color .2s;
}
.hdr-search-modal-input-wrapper:focus-within {
    border-color: #005A9C;
    background: #fff;
}
.hdr-search-modal-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 7px 20px;
    font-size: 15px !important;
    color: #333;
    background: transparent;
}
.hdr-search-modal-input-wrapper input::placeholder {
    color: #999;
}
.hdr-search-modal-submit {
    width: 50px;
    height: 35px;
    background: #EEB310;
    color: #003d6b;
    border: none;
    font-size: 13px !important;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background .14s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hdr-search-modal-submit:active {
    opacity: 0.6;
}

#hdr .hdr-acts {
    display: flex;
}
#hdr .hdr-act,
#hdr .hdr-act:link,
#hdr .hdr-act:visited {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 13px;
    border-radius: 7px;
    background: none;
    border: none;
    color: rgba(255,255,255,.9) !important;
    font-weight: 600;
    transition: background .14s;
    position: relative;
    cursor: pointer;
}
#hdr .hdr-act:hover { background: rgba(0,0,0,.15); color: #fff !important; }
#hdr .hdr-svg { height: 30px; width: auto; display: block; }
#hdr .hdr-badge {
    position: absolute;
    top: 3px;
    right: 22px;
    background: #EEB310;
    color: #003d6b;
    font-size: 9px;
    font-weight: 800;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================================
   NAVBAR + MEGA-MENU
   Structure : .hdr-nav > .hdr-cat > .hdr-cat-link + .hdr-mega
   Le mega s'ouvre toujours au meme endroit (centre sous .hdr-nav,
   largeur 1600px) et contient jusqu'a 4 blocs :
   .hdr-primary (col 1), .hdr-secondary (col 2), .hdr-tertiary (col 3),
   .hdr-event (bloc droit). Chaque bloc : min-width 350px, flex equitable.
   ============================================================ */

/* -- Barre nav -- */
#hdr .hdr-nav {
    background: #2a5d93;
    position: relative;
}

/* -- Lien de categorie -- */
#hdr .hdr-cat-link,
#hdr .hdr-cat-link:link,
#hdr .hdr-cat-link:visited {
    display: block;
    padding: 14px 18px;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px !important;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
#hdr .hdr-cat-link:hover,
#hdr .hdr-cat:hover .hdr-cat-link {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    border-bottom-color: #EEB310;
}
#hdr .hdr-arr {
    display: inline-block;
    margin-left: .35em;
    font-size: .6em;
    transform: rotate(-90deg);
    transition: transform .2s;
}
#hdr .hdr-cat:hover .hdr-arr {
    transform: rotate(0deg);
}

/* -- Panneau deroulant (mega) : centre sous la nav, 1600px de large -- */
#hdr .hdr-mega {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1600px;
    width: 100%;
    max-height: 510px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    border-radius: 0 0 6px 6px;
    z-index: 1000;
}
#hdr .hdr-cat:hover .hdr-mega {
    display: flex;
}

/* -- Chaque bloc du mega : min-width 350px, flex equitable -- */
#hdr .hdr-primary,
#hdr .hdr-secondary,
#hdr .hdr-tertiary,
#hdr .hdr-event {
    width: 350px;
    padding: 14px 20px;
    min-height: 0;
    box-sizing: border-box;
}

/* -- Titres h5 (en-tete de bloc) + .hdr-jeu-tag (badge nom du jeu actif) -- */
#hdr .hdr-mega h5,
#hdr .hdr-mega .hdr-jeu-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #999;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
#hdr .hdr-mega h5::after,
#hdr .hdr-mega .hdr-jeu-tag::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ececec;
}

/* -- Col 1 (.hdr-primary) -- */
#hdr .hdr-primary {
    background: #fafafa;
    border-right: 1px solid #eee;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
}
#hdr .hdr-primary > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#hdr .hdr-primary li {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #141414;
    font-weight: 500;
    transition: color .15s;
}
#hdr .hdr-primary li:hover,
#hdr .hdr-primary li.active {
    color: #005A9C;
}
#hdr .hdr-primary li a,
#hdr .hdr-primary li a:link,
#hdr .hdr-primary li a:visited {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: inherit;
    width: 100%;
    font-size: 13px !important;
}

/* -- Col 1 mode texte (aucun logo trouve) : items alignes a gauche, pas de retour ligne -- */
#hdr .hdr-primary--text li {
    justify-content: flex-start;
    white-space: nowrap;
}

/* -- Col 1 logo (image PNG dans images/jeux/logo/) -- */
#hdr .hdr-primary .sl-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* Hauteur fluide sur toute la plage desktop :
         26px a 1025px (apparition du menu desktop)
         30px a 1260px (passe a 30.09px, l'ancre d'origine)
         36px a 1600px (max-width de .hdr-inner : au-dela la barre ne grandit plus)
       Bornee aux deux extremites. */
    height: clamp(26px, calc(1.7391vw + 8.174px), 36px);
}

#hdr .hdr-primary .sl-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: opacity(1);
}
#hdr .hdr-primary li.active .sl-logo img {
    filter: opacity(0.5) drop-shadow(0 4px 2px rgba(0, 70, 98, 0.2));
}

/* -- Col 2 (.hdr-secondary) et col 3 (.hdr-tertiary) -- */
#hdr .hdr-secondary > ul,
#hdr .hdr-tertiary > ul {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}
#hdr .hdr-secondary > ul.active,
#hdr .hdr-tertiary > ul.active {
    display: block;
}

/* -- Toutes les colonnes "type" / "sous-type" (col 1, 2 ou 3) : la liste se repartit
   en colonnes (wrap vertical) et le bloc s'elargit en consequence.
   Primary a un seul <ul> (toujours visible) ; secondary/tertiary ont <ul.active>. -- */
#hdr .hdr-mega [data-kind="type"],
#hdr .hdr-mega [data-kind="sous_type"] {
    width: auto;
    flex-shrink: 0; /* jamais comprimees tant que le carrousel est affiche (voir plus bas) */
}
#hdr .hdr-primary[data-kind="type"] > ul,
#hdr .hdr-primary[data-kind="sous_type"] > ul,
#hdr .hdr-secondary[data-kind="type"] > ul.active,
#hdr .hdr-secondary[data-kind="sous_type"] > ul.active,
#hdr .hdr-tertiary[data-kind="type"] > ul.active,
#hdr .hdr-tertiary[data-kind="sous_type"] > ul.active {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    max-height: 320px;
    column-gap: 28px;
}
#hdr .hdr-secondary li,
#hdr .hdr-tertiary li {
    padding: 0;
}
#hdr .hdr-secondary li:last-child,
#hdr .hdr-tertiary li:last-child {
    border-bottom: none;
}
#hdr .hdr-secondary li a,
#hdr .hdr-secondary li a:link,
#hdr .hdr-secondary li a:visited,
#hdr .hdr-tertiary li a,
#hdr .hdr-tertiary li a:link,
#hdr .hdr-tertiary li a:visited {
    display: flex;
    align-items: center;
    padding: 8px;
    color: #1a1a1a;
    font-size: 13px !important;
    font-weight: 500;
    text-decoration: none;
    transition: color .15s, padding-left .15s;
}
#hdr .hdr-secondary li a::before,
#hdr .hdr-tertiary li a::before,
#hdr .hdr-primary--text li a::before,
#hdr .hdr-primary li.hdr-flag-nouv > a::before,
#hdr .hdr-primary li.hdr-flag-preco > a::before,
#hdr .hdr-primary li.hdr-flag-unite > a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d0d0d0;
    margin-right: 10px;
    transition: background .15s, transform .15s;
}
#hdr .hdr-tertiary li a:hover,
#hdr .hdr-secondary li a:hover,
#hdr .hdr-primary--text li a:hover {
    color: #005A9C !important;
}
#hdr .hdr-secondary li a:hover::before,
#hdr .hdr-tertiary li a:hover::before,
#hdr .hdr-primary--text li a:hover::before,
#hdr .hdr-primary li.hdr-flag-nouv > a:hover::before,
#hdr .hdr-primary li.hdr-flag-preco > a:hover::before,
#hdr .hdr-primary li.hdr-flag-unite > a:hover::before {
    background: #EEB310;
    transform: scale(1.5);
}

/* -- Flags speciaux dans n'importe quelle col de type (col 1, 2 ou 3) :
   Nouveautes / Precommandes / Cartes a l'unite. Mis en jaune + gras
   pour se demarquer. -- */
#hdr .hdr-flag-nouv > a,
#hdr .hdr-flag-nouv > a:link,
#hdr .hdr-flag-nouv > a:visited,
#hdr .hdr-flag-preco > a,
#hdr .hdr-flag-preco > a:link,
#hdr .hdr-flag-preco > a:visited,
#hdr .hdr-flag-unite > a,
#hdr .hdr-flag-unite > a:link,
#hdr .hdr-flag-unite > a:visited {
    color: #00349c !important;
}
#hdr .hdr-flag-nouv > a:hover,
#hdr .hdr-flag-preco > a:hover,
#hdr .hdr-flag-unite > a:hover {
    color: #ca7800 !important;
}
/* Puce de col 2/3 : on garde, mais coloree jaune sur les flags pour rester coherent */
#hdr .hdr-secondary li.hdr-flag-nouv > a::before,
#hdr .hdr-secondary li.hdr-flag-preco > a::before,
#hdr .hdr-secondary li.hdr-flag-unite > a::before,
#hdr .hdr-tertiary li.hdr-flag-nouv > a::before,
#hdr .hdr-tertiary li.hdr-flag-preco > a::before,
#hdr .hdr-tertiary li.hdr-flag-unite > a::before,
#hdr .hdr-primary li.hdr-flag-nouv > a::before,
#hdr .hdr-primary li.hdr-flag-preco > a::before,
#hdr .hdr-primary li.hdr-flag-unite > a::before {
    background: #EEB310;
}
/* Pas de puce devant les jeux (logo ou nom en gras) de la liste "Voir plus" de col 2 */
#hdr .hdr-secondary li.hdr-plus-jeu > a::before {
    content: none;
}

/* -- Separateur visuel entre col 2 et col 3 en mode 3 colonnes -- */
#hdr .hdr-mega--cols3 .hdr-secondary {
    border-right: 1px solid #eef0f4;
}

/* -- Bloc 1 = jeu : col 1 passe en row (logos en ligne) et se place
   en pleine largeur au-dessus de col 2 (secondary) et col 3 (tertiary).
   Cible : mega ayant le marqueur --p1 mais PAS le marqueur --p1-nojeu. -- */
#hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) {
    flex-wrap: wrap;
}
#hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-primary {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}
#hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-primary > ul {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* -- Conteneur du bloc carrousel (a droite du mega-menu) : empile h5 + .hdr-evc -- */
#hdr .hdr-event {
    display: flex;
    flex-direction: column;
}
/* -- cat=1 : bloc Evenements masque au survol de "Voir plus" -- */
#hdr .hdr-mega--plus[data-cat="1"] .hdr-event {
    display: none;
}

/* -- Place insuffisante (fenetre etroite) : gere par assets/js/formulaire.js.
   Le carrousel prend la place laissee par les listes. S'il ne peut plus afficher
   une carte entiere, le script pose .hdr-mega--evc-off : le carrousel est masque
   et les listes peuvent se reduire ; le script masque alors les colonnes entieres
   qui ne tiennent plus (.hdr-col-off). -- */
#hdr .hdr-mega--evc-off .hdr-event--carousel {
    display: none;
}
#hdr .hdr-mega--evc-off [data-kind="type"],
#hdr .hdr-mega--evc-off [data-kind="sous_type"],
#hdr .hdr-mega--plus [data-kind="type"] {
    flex-shrink: 1;
}
#hdr .hdr-mega .hdr-col-off {
    display: none;
}
/* -- cat=1 : le carrousel reste sur la ligne des types, avec moins de cartes, au
   lieu de passer dessous et de deborder du panneau (max-height 510px). -- */
#hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-event--carousel {
    flex: 1 1 0;
    max-width: calc(var(--evc-visible) * var(--evc-card-w) + (var(--evc-visible) - 1) * var(--evc-gap) + 40px);
}

/* ============================================================
   Bloc event en mode carrousel (cat=1) : a droite de secondary/tertiary, pousse en end.
   >>> Toutes les dimensions du bloc se reglent ICI, via les variables : <<<
       --evc-card-w   largeur d'une carte
       --evc-card-h   hauteur d'une carte
       --evc-gap      ecart entre deux cartes
       --evc-visible  nombre MAX de cartes visibles (reduit par le JS selon la place)
   La largeur du viewport et l'image (carree) en decoulent automatiquement.
   ============================================================ */
#hdr .hdr-event--carousel {
    --evc-card-w: 185px;
    --evc-card-h: 280px;
    --evc-gap: 16px;
    --evc-visible: 3;
    width: auto;
    margin-left: auto;
    min-width: 0;
}
#hdr .hdr-evc {
    position: relative;
    width: calc(var(--evc-visible) * var(--evc-card-w) + (var(--evc-visible) - 1) * var(--evc-gap));
    max-width: 100%;
}

#hdr .hdr-evc-viewport {
    width: 102%;
    /* overflow-x: clip retire les cartes hors-champ du calcul de mise en page
       (evite la barre horizontale au niveau de la page quand le carrousel a
       beaucoup d'items) ; overflow-y reste visible pour ne pas tronquer l'ombre
       portee des cartes. */
    overflow-x: clip;
    overflow-y: visible;
}
#hdr .hdr-evc-track {
    display: flex;
    flex-direction: row;
    gap: var(--evc-gap);
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}
#hdr .hdr-evc-card,
#hdr .hdr-evc-card:link,
#hdr .hdr-evc-card:visited {
    flex: 0 0 var(--evc-card-w);
    height: var(--evc-card-h);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #1b1f24;
    transition: transform .2s ease, border-color .2s ease;
}
#hdr .hdr-evc-card:hover {
    border-color: #d4dae2;
    transform: translateY(-4px);
}
#hdr .hdr-evc-img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* carree : s'adapte a la largeur de la carte */
    flex: 0 0 auto;
    overflow: hidden;
    padding: 10px;
    background: #f5f7fa;
}
#hdr .hdr-evc-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
#hdr .hdr-evc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
}
#hdr .hdr-evc-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    min-height: 34px;
    color: #1b1f24;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#hdr .hdr-evc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}
#hdr .hdr-evc-price {
    font-size: 15px;
    font-weight: 800;
    color: #005A9C;
    white-space: nowrap;
}
#hdr .hdr-evc-btn {
    flex: 0 0 auto;
    background: #EEB310;
    color: #003d6b;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 6px;
}
/* -- Fleches : boutons ronds flottants par-dessus les bords des cartes -- */
#hdr .hdr-evc-nav {
    position: absolute;
    top: calc(70px + var(--evc-card-w) / 2); /* centre sur l'image carree */
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 40, 70, 0.22);
    cursor: pointer;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
#hdr .hdr-evc-prev { left: 8px; }
#hdr .hdr-evc-next { right: 8px; }
#hdr .hdr-evc-nav::before {
    content: '';
    width: 9px;
    height: 9px;
    border: solid #005A9C;
    border-width: 2px 2px 0 0;
    transition: border-color .18s ease;
}
#hdr .hdr-evc-prev::before { transform: rotate(-135deg); margin-left: 4px; }
#hdr .hdr-evc-next::before { transform: rotate(45deg); margin-right: 4px; }
#hdr .hdr-evc-nav:hover {
    background: #EEB310;
    box-shadow: 0 5px 16px rgba(0, 40, 70, 0.30);
    transform: translateY(-50%) scale(1.06);
}
#hdr .hdr-evc-nav:hover::before { border-color: #003d6b; }
#hdr .hdr-evc-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* -- Etat vide : message affiche quand aucun produit/evenement n'est disponible -- */
#hdr .hdr-evc-empty {
    flex: 1;
    padding: 28px 12px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

/* -- Points de pagination : une pastille par "page" de N cartes visibles (gere en JS via syncDots) -- */
#hdr .hdr-evc-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
#hdr .hdr-evc-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #c7d0da;
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}
#hdr .hdr-evc-dot.on {
    background: #005A9C;
    width: 20px;
    border-radius: 4px;
}

/* ============================================================
   RESPONSIVE -- DESKTOP : tout appareil qui n'est PAS tactile
   (souris, pave tactile), quelle que soit la largeur : une fenetre
   reduite sur ordinateur garde le header desktop.
   ============================================================ */
@media not all and (hover: none) and (pointer: coarse) {
    .hdr-mob-only  { display: none !important; }
    .hdr-screen    { display: flex; }
    .hdr-mob-drawer,
    .hdr-mob-overlay,
    .hdr-search-modal { display: none !important; }
}
/* ============================================================
   DESKTOP etroit (< 1200px) : base sur la largeur (fenetre reduite
   sur ordinateur). A partir de 1200px, aucune taille ne change.
   Ces regles ne visent que le header desktop (.hdr-screen), masque
   sur les appareils tactiles : aucun effet sur le header mobile.
   ============================================================ */
@media only screen and (max-width: 1199px) {
    /* La hauteur des logos est desormais fluide sur toute la plage desktop
       (voir le clamp sur #hdr .hdr-primary .sl-logo) : plus de palier ici. */

    /* Logo, boutons compte / panier et pastille du panier : diminuent
       progressivement de 1200px (70px ; marges 13px ; 22px) a 700px
       (56px ; 8px ; 17px), puis restent fixes. */
    #hdr .hdr-logo img { height: clamp(56px, calc(2.8vw + 36.4px), 70px); }
    #hdr .hdr-act, #hdr .hdr-act:link, #hdr .hdr-act:visited { padding: 7px clamp(8px, calc(1vw + 1px), 13px); }
    #hdr .hdr-mast .hdr-badge { right: clamp(17px, calc(1vw + 10px), 22px); }

    /* Categories : police et marges diminuent progressivement de 1200px
       (16px ; 14px 18px) a 700px (10px ; 7px 6px), puis restent fixes. */
    #hdr .hdr-cat-link, #hdr .hdr-cat-link:link, #hdr .hdr-cat-link:visited {
        padding: clamp(7px, calc(1.4vw - 2.8px), 14px) clamp(6px, calc(2.4vw - 10.8px), 18px);
        font-size: clamp(10px, calc(1.2vw + 1.6px), 16px) !important;
    }

    /* Mega-menu, ligne "Les jeux" : logos, noms et marges diminuent
       progressivement de 1200px (29px ; 13px ; 10px) a 700px (20px ; 11px ;
       4px). Une seule ligne : les derniers jeux qui ne tiennent pas sont
       masques par assets/js/formulaire.js, "Voir plus" reste visible. */
    #hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-primary > ul { flex-wrap: nowrap; }
    #hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-primary li {
        flex-shrink: 0;
        padding-left: clamp(4px, calc(1.2vw - 4.4px), 10px);
        padding-right: clamp(4px, calc(1.2vw - 4.4px), 10px);
    }
    #hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-primary .sl-logo { height: clamp(20px, calc(1.8086vw + 7.34px), 29.04px); }
    #hdr .hdr-mega--p1:not(.hdr-mega--p1-nojeu) .hdr-primary li a { font-size: clamp(11px, calc(0.4vw + 8.2px), 13px) !important; }
}
/* DESKTOP etroit (<= 800px) : la recherche passe sur sa propre ligne, en
   pleine largeur (marges laterales de .hdr-inner : 0 22px). */
@media only screen and (max-width: 800px) {
    #hdr .hdr-mast .hdr-inner { flex-wrap: wrap; row-gap: 14px; }
    #hdr .hdr-search { order: 3; flex: 0 0 100%; max-width: none; }
}

/* ============================================================
   RESPONSIVE -- MOBILE : appareil tactile sans survol (telephone,
   tablette), quelle que soit sa resolution. Exact complement du bloc
   DESKTOP ci-dessus : un appareil recoit l'un ou l'autre, jamais les deux.
   ============================================================ */
@media (hover: none) and (pointer: coarse) {

    .hdr-screen { display: none !important; }

    div#body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Pas de zoom au double tap (le zoom a deux doigts reste possible sur iPhone) */
    html { touch-action: manipulation; }

    #hdr {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Masthead mobile fixe */
    #hdr .hdr-mob-mast {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: linear-gradient(to bottom, rgb(0, 90, 156) 0%, rgb(112, 153, 199) 100%);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        gap: 2px;
        z-index: 10000;
        box-shadow: 0 2px 8px rgba(0,0,0,.2);
    }
    #hdr .hdr-mob-logo {
        line-height: 0;
        min-width: 0;
    }
    #hdr .hdr-mob-logo img { max-height: 36px; max-width: 100%; height: auto; width: auto; border: 0; }
    #hdr .hdr-mbtn,
    #hdr .hdr-mbtn:link,
    #hdr .hdr-mbtn:visited {
        background: none;
        border: none;
        flex-shrink: 0;
        height: 38px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px !important;
        color: rgba(255,255,255,.9) !important;
        cursor: pointer;
        transition: background .12s;
        position: relative;
    }
    #hdr .hdr-svg { height: 22px; width: auto; }
    #hdr .hdr-mob-badge {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 15px;
        height: 15px;
        font-size: 8px !important;
    }

    /* Overlay drawer */
    .hdr-mob-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,.55);
        z-index: 10001;
    }
    .hdr-mob-overlay.open { display: block; }

    /* Drawer : containeur fixe pleine hauteur. Scroll gere par les panneaux internes
       (overflow: hidden ici pour permettre le slide horizontal des panneaux).
       translateX(-101%) au repos : evite que la fin de la transition laisse un mince
       trait du drawer visible sur le bord (artefact subpixel). */
    .hdr-mob-drawer {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        background: #fff;
        z-index: 10002;
        transform: translateX(-101%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .hdr-mob-drawer.open { transform: translateX(0); }

    #hdr .hdr-mob-drawer-head {
        background: linear-gradient(to bottom, rgb(0, 90, 156) 0%, rgb(112, 153, 199) 100%);
        padding: 10px 14px;
        display: flex;
        align-items: center;
    justify-content: space-between;
    }
    #hdr .hdr-mob-drawer-head img { height: 36px; width: auto; border: 0; }
    #hdr .hdr-mob-close {
        background: none;
        border: none;
        color: rgba(255,255,255,.85) !important;
        font-size: 22px !important;
        font-weight: 700;
        cursor: pointer;
        line-height: 1;
        padding: 4px 6px;
        border-radius: 5px;
        transition: background .12s;
    }
    #hdr .hdr-mob-close:hover { background: rgba(0,0,0,.2); color: #fff !important; }

    /* .hdr-mob-menu = zone restante sous le header du drawer, conteneur des panneaux. */
    #hdr .hdr-mob-menu {
        list-style: none;
        margin: 0;
        padding: 0;
        flex: 1;
        position: relative;
        overflow: hidden;
    }
    #hdr .hdr-mob-menu ul { list-style: none; margin: 0; padding: 0; }

    /* Panneaux drill : chaque vue (root, drill par item col1) est un panneau absolu
       qui glisse depuis la droite. Le panneau actif est translateX(0), les autres a 100%. */
    #hdr .hdr-mob-panel {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform .25s cubic-bezier(.4,0,.2,1);
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge legacy */
    }
    #hdr .hdr-mob-panel::-webkit-scrollbar { display: none; } /* Chrome/Safari */
    #hdr .hdr-mob-panel--active { transform: translateX(0); }

    /* Header de panneau drill : bouton retour */
    #hdr .hdr-mob-panel-head {
        position: sticky;
        top: 0;
        background: #fff;
        border-bottom: 1px solid #f0f3f7;
        z-index: 1;
    }
    #hdr .hdr-mob-back {
        background: none;
        border: none;
        width: 100%;
        text-align: left;
        padding: 13px 16px;
        font-size: 13px !important;
        font-weight: 600;
        color: #005A9C !important;
        cursor: pointer;
        transition: background .1s;
    }
    #hdr .hdr-mob-back:hover { background: #f4f8fc; }
    #hdr .hdr-mob-panel-title {
        margin: 0;
        padding: 14px 16px 8px;
        font-size: 16px;
        font-weight: 700;
        color: #141414;
    }

    /* Item col1 avec drill : chevron a droite pour indiquer la sous-liste */
    #hdr .hdr-mob-submenu a.hdr-mob-drill {
        justify-content: space-between;
        display: flex;
        align-items: center;
    }
    #hdr .hdr-arr-r {
        font-size: 10px;
        opacity: .5;
        margin-left: 8px;
    }

    /* Un seul filet de separation, sous Promotions */
    #hdr .hdr-mob-sep { border-bottom: 4px solid #f0f3f7; }
    #hdr .hdr-mob-ml,
    #hdr .hdr-mob-ml:link,
    #hdr .hdr-mob-ml:visited {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 16px;
        font-size: 14px !important;
        font-weight: 600;
        color: #222 !important;
        transition: background .1s, color .1s;
    }
    #hdr .hdr-mob-ml:hover { background: #f4f8fc; color: #005A9C !important; }

    /* Categories expandables (details/summary) */
    #hdr .hdr-mob-expandable { display: block; }
    #hdr .hdr-mob-expandable > summary {
        list-style: none;
        cursor: pointer;
        user-select: none;
    }
    #hdr .hdr-mob-expandable > summary::-webkit-details-marker { display: none; }
    #hdr .hdr-mob-expandable > summary::marker { content: ''; }
    #hdr .hdr-mob-expandable > summary .hdr-arr {
        font-size: 10px;
        opacity: .6;
        transform: rotate(-90deg);
        transition: transform .2s;
        display: inline-block;
    }
    #hdr .hdr-mob-expandable[open] > summary .hdr-arr {
        transform: rotate(0deg);
        opacity: 1;
    }
    #hdr .hdr-mob-submenu {
        background: #f8fafd;
        border-top: 1px solid #eef2f7;
    }
    #hdr .hdr-mob-submenu li { border-bottom: 1px solid #eef2f7; }
    #hdr .hdr-mob-submenu li:last-child { border-bottom: none; }
    #hdr .hdr-mob-submenu a,
    #hdr .hdr-mob-submenu a:link,
    #hdr .hdr-mob-submenu a:visited {
        display: block;
        padding: 11px 16px 11px 32px;
        font-size: 13px !important;
        color: #444 !important;
        text-decoration: none;
        transition: background .1s, color .1s;
    }
    #hdr .hdr-mob-submenu a:hover { background: #eef4fa; color: #005A9C !important; }
    /* Cartes a l'unite dans l'ecran d'un jeu : en gras et en bleu, pour se demarquer des types */
    #hdr .hdr-mob-submenu li.hdr-flag-unite > a,
    #hdr .hdr-mob-submenu li.hdr-flag-unite > a:link,
    #hdr .hdr-mob-submenu li.hdr-flag-unite > a:visited { color: #005A9C !important; font-weight: 700 !important; }

    /* Sous-titre dans submenu (ex: "Par pourcentage" / "Par categorie" des Promotions) */
    #hdr .hdr-mob-submenu li.hdr-mob-sub-h5 {
        padding: 10px 16px 4px;
        font-size: 10px !important;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: #999;
        background: transparent;
        border-bottom: none;
        pointer-events: none;
    }

    #hdr .hdr-mob-drawer-links {
        padding: 14px 16px;
        border-top: 1px solid #eef2f7;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    #hdr .hdr-mob-drawer-links a,
    #hdr .hdr-mob-drawer-links a:link,
    #hdr .hdr-mob-drawer-links a:visited {
        font-size: 12px !important;
        color: #888 !important;
        transition: color .1s;
    }
    #hdr .hdr-mob-drawer-links a:hover { color: #005A9C !important; }

    /* padding-top compense la hauteur de la mast fixe (56px) puisque la barre d'onglets
       qui servait de spacer naturel a ete supprimee. */
    .hdr-mob-wrap {
        display: block;
        padding-top: 56px;
    }
}

/* ============================================================
   RECHERCHE : bouton loupe a la place du texte "Rechercher"
   (bureau et mobile).
   ============================================================ */
#hdr .hdr-search-btn { width: 64px; display: flex; align-items: center; justify-content: center; padding: 0; }
#hdr .hdr-search-btn .hdr-search-ico { width: 22px; height: 22px; display: block; }

/* ============================================================
   MOBILE (tactile) -- bandeau et barre de recherche.
   Telephone en portrait : barre de recherche sous le bandeau du logo,
   icones reparties sur tout le bandeau. Contenu limite a 1600px et
   centre, comme .hdr-inner sur bureau.
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    #hdr .hdr-mob-mast {
        background: linear-gradient(to bottom, rgb(0, 90, 156) 0%, rgb(56, 122, 178) 100%);
        box-shadow: none;
        padding-left: max(14px, calc((100% - 1600px) / 2 + 22px));
        padding-right: max(14px, calc((100% - 1600px) / 2 + 22px));
    }
    #hdr .hdr-mob-search {
        position: absolute; top: 56px; left: 0; right: 0;
        padding: 6px 12px 12px;
        background: linear-gradient(to bottom, rgb(56, 122, 178) 0%, rgb(112, 153, 199) 100%);
        box-shadow: 0 2px 8px rgba(0,0,0,.2);
    }
    #hdr .hdr-mob-search .hdr-search { max-width: none; height: 42px; margin: 0 auto; }
    /* 16px : en dessous, l'iPhone zoome sur la page quand on touche le champ */
    #hdr .hdr-mob-search .hdr-search input[type="text"] { font-size: 16px !important; padding: 0 14px; min-width: 0; }
    #hdr .hdr-mob-search .hdr-search-btn { width: 54px; }
    .hdr-mob-wrap { padding-top: 116px; }
}
/* A partir de 700px de large, ou ecran plus large que 5:7 (tablette, paysage) :
   logo a gauche, recherche centree (900px maxi), icones a droite, sur une seule ligne. */
@media (hover: none) and (pointer: coarse) and (min-width: 700px),
       (hover: none) and (pointer: coarse) and (min-aspect-ratio: 5/7) {
    #hdr .hdr-mob-mast {
        background: linear-gradient(to bottom, rgb(0, 90, 156) 0%, rgb(112, 153, 199) 100%);
        box-shadow: 0 2px 8px rgba(0,0,0,.2);
        justify-content: flex-start;
        gap: 14px;
    }
    #hdr .hdr-mob-mast .hdr-mob-logo { flex-shrink: 0; }
    #hdr .hdr-mob-search {
        position: static; flex: 1; min-width: 0;
        display: flex; justify-content: center;
        margin: 0 10px; padding: 0; background: none; box-shadow: none;
    }
    #hdr .hdr-mob-search .hdr-search { height: 40px; width: 100%; max-width: 900px; }
    .hdr-mob-wrap { padding-top: 56px; }
}

/* ============================================================
   MOBILE (tactile) -- tiroir du menu burger.
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    /* Lignes : icone, titre, chevron a droite ; lignes plus serrees */
    #hdr .hdr-mob-ml,
    #hdr .hdr-mob-ml:link,
    #hdr .hdr-mob-ml:visited { justify-content: flex-start; gap: 10px; padding-top: 9px; padding-bottom: 9px; }
    #hdr .hdr-mob-ml .hdr-arr { margin-left: auto; }
    #hdr .hdr-mob-expandable > summary .hdr-arr { font-size: inherit; opacity: 1; }
    #hdr .hdr-chev { width: 15px; height: 15px; display: block; color: #005A9C; }

    /* Icones : pictogramme bleu au trait sur toutes les lignes */
    #hdr .hdr-mob-ico {
        flex: 0 0 32px; width: 32px; height: 24px;
        border-radius: 5px; overflow: hidden;
        display: flex; align-items: center; justify-content: center;
    }
    #hdr .hdr-mob-ico svg { display: block; }
    #hdr .hdr-mob-ico--trait { color: #005A9C; }
    #hdr .hdr-mob-ico--trait svg { width: 20px; height: 20px; }

    /* Sous-menus qui ouvrent un panneau : '.hdr-mob-submenu a:link' (display: block) ecrasait
       'a.hdr-mob-drill' (display: flex) ; on retablit la ligne */
    #hdr .hdr-mob-submenu a.hdr-mob-drill,
    #hdr .hdr-mob-submenu a.hdr-mob-drill:link,
    #hdr .hdr-mob-submenu a.hdr-mob-drill:visited { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
    #hdr .hdr-arr-r { margin-left: auto; opacity: .8; font-size: inherit; }

    /* Jeux : deux logos par ligne, sans fleche ; "Tout voir" en derniere case */
    #hdr .hdr-mob-submenu.hdr-mob-jeux { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px 12px; }
    #hdr .hdr-mob-submenu.hdr-mob-jeux li { border-bottom: none; min-width: 0; }
    #hdr .hdr-mob-submenu.hdr-mob-jeux li a,
    #hdr .hdr-mob-submenu.hdr-mob-jeux li a:link,
    #hdr .hdr-mob-submenu.hdr-mob-jeux li a:visited {
        display: flex; align-items: center; justify-content: center;
        height: 58px; padding: 6px 10px; background: #fff;
        border: 1px solid #e3eaf2; border-radius: 8px; text-align: center; font-weight: 700;
    }
    #hdr .hdr-mob-submenu.hdr-mob-jeux li a:hover { border-color: #005A9C; background: #fff; }
    #hdr .hdr-mob-jlogo { display: block; height: auto; max-height: 42px; max-width: 100%; object-fit: contain; }
    #hdr .hdr-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

    /* Liens du bas avec icone */
    #hdr .hdr-mob-drawer-links { gap: 12px; }
    #hdr .hdr-mob-drawer-links a,
    #hdr .hdr-mob-drawer-links a:link,
    #hdr .hdr-mob-drawer-links a:visited { display: flex; align-items: center; gap: 10px; font-size: 13px !important; color: #555 !important; }
    #hdr .hdr-mob-lien-ico { width: 18px; height: 18px; flex: 0 0 18px; color: #005A9C; }

    /* Menu : fond gris du site ; bloc Nouveautes, Precommandes, Promotions en blanc */
    #hdr .hdr-mob-racine { background: #f0f3f7; }
    #hdr .hdr-mob-une { background: #fff; padding: 4px 0; }
    #hdr .hdr-mob-une .hdr-mob-ml,
    #hdr .hdr-mob-une .hdr-mob-ml:link,
    #hdr .hdr-mob-une .hdr-mob-ml:visited { gap: 11px; padding: 8px 16px; font-size: 14px !important; font-weight: 700; color: #222 !important; }
    #hdr .hdr-mob-une .hdr-mob-ml .hdr-mob-ico { flex: 0 0 21px; width: 21px; height: 21px; }
    #hdr .hdr-mob-une .hdr-mob-submenu a,
    #hdr .hdr-mob-une .hdr-mob-submenu a:link,
    #hdr .hdr-mob-une .hdr-mob-submenu a:visited { padding-left: 48px; }
    #hdr .hdr-mob-une .hdr-mob-submenu li.hdr-mob-sub-h5 { padding-left: 48px; }

    /* Rayons en tuiles, deux par ligne ; pictogramme au-dessus du nom */
    #hdr .hdr-mob-tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 12px 14px; }
    #hdr .hdr-mob-tuile,
    #hdr .hdr-mob-tuile:link,
    #hdr .hdr-mob-tuile:visited {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        min-width: 0; padding: 10px 10px 9px;
        border: 1px solid #e3eaf2; border-radius: 10px; background: #fff;
        font-size: 12.5px !important; font-weight: 700; line-height: 1.2; text-align: center;
        color: #222 !important; text-decoration: none;
    }
    #hdr .hdr-mob-tuile:hover { border-color: #005A9C; background: #f4f8fc; }
    #hdr .hdr-mob-tuile .hdr-mob-ico { flex: 0 0 auto; width: 22px; height: 22px; }
    #hdr .hdr-mob-tuile .hdr-mob-ico svg { width: 22px; height: 22px; }
    #hdr .hdr-mob-tuile--noel,
    #hdr .hdr-mob-tuile--noel:link,
    #hdr .hdr-mob-tuile--noel:visited { background: #ad0000; border-color: #ad0000; color: #ffffff !important; }
    #hdr .hdr-mob-tuile--noel:hover { background: #8f0000; border-color: #8f0000; }
    #hdr .hdr-mob-tuile--noel .hdr-mob-ico--trait { color: #ffffff; }

    /* Infos du bas : sur une seule ligne */
    #hdr .hdr-mob-racine .hdr-mob-drawer-links {
        flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center;
        gap: 12px; padding: 12px 16px 16px; border-top: 1px solid #e3eaf2;
    }
    #hdr .hdr-mob-racine .hdr-mob-drawer-links a,
    #hdr .hdr-mob-racine .hdr-mob-drawer-links a:link,
    #hdr .hdr-mob-racine .hdr-mob-drawer-links a:visited { white-space: nowrap; font-size: 12.5px !important; }
    #hdr .hdr-mob-racine .hdr-mob-lien-ico { width: 17px; height: 17px; flex-basis: 17px; }

    /* Ecrans des rayons : titre avec pictogramme, liste sur fond blanc sans retrait */
    #hdr .hdr-mob-panel-title { display: flex; align-items: center; gap: 10px; }
    #hdr .hdr-mob-panel > .hdr-mob-submenu { background: #fff; }
    #hdr .hdr-mob-panel > .hdr-mob-submenu:not(.hdr-mob-jeux) a,
    #hdr .hdr-mob-panel > .hdr-mob-submenu:not(.hdr-mob-jeux) a:link,
    #hdr .hdr-mob-panel > .hdr-mob-submenu:not(.hdr-mob-jeux) a:visited { padding: 8px 16px; font-weight: 600; color: #222; }
    #hdr .hdr-mob-panel > .hdr-mob-submenu li.hdr-mob-tout a,
    #hdr .hdr-mob-panel > .hdr-mob-submenu li.hdr-mob-tout a:link,
    #hdr .hdr-mob-panel > .hdr-mob-submenu li.hdr-mob-tout a:visited { font-weight: 700; color: #005A9C !important; }
}

