/* =========================================================
   BANDEAU FLOTTANT OPERATEUR
   jeu-argent.be
   ========================================================= */


/* =========================================================
   STYLE DE BASE
   ========================================================= */

.operateur-sticky {
    position: fixed;

    left: 50%;
    bottom: 18px;

    width: calc(100% - 48px);
    max-width: 900px;

    z-index: 550;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, 120px);

    transition:
        transform 300ms ease,
        opacity 250ms ease,
        visibility 250ms;
}


/* Etat visible */

.operateur-sticky.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate(-50%, 0);
}


/* =========================================================
   DESKTOP
   1000 px et plus
   ========================================================= */

@media only screen and (min-width: 1000px) {

    .operateur-sticky {
        max-width: 650px;
    }

}


/* =========================================================
   CONTENU DU BANDEAU
   ========================================================= */

.operateur-sticky__inner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 72px;

    padding: 10px 14px 10px 24px;

    background-color: #f6f6f6;

    border: 1px solid #d6d6d6;
    border-radius: 4px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .20);
}


/* =========================================================
   LOGO
   ========================================================= */

.operateur-sticky__logo {
    display: flex;
    align-items: center;

    min-width: 0;

    margin-right: 24px;
}


.operateur-sticky__logo a {
    display: flex;
    align-items: center;
}


.operateur-sticky__logo img {
    display: block;

    width: auto;
    height: auto;

    max-width: 150px;
    max-height: 48px;

    margin-bottom: 0;
}


/*
 * Annule la marge du logo original
 * si push--bottom a été conservé.
 */

.operateur-sticky__logo .push--bottom {
    margin-bottom: 0;
}


/* =========================================================
   BOUTON OPERATEUR
   FICHE OPERATEUR
   ========================================================= */

.operateur-sticky__button {
    flex: 0 0 220px;

    width: 220px;
}


.operateur-sticky__button .btn {
    width: 100%;
}


/*
 * Sécurité au cas où btn--overlap
 * serait encore présent dans le clone.
 */

.operateur-sticky__button .btn--overlap {
    position: static !important;

    left: auto;
    right: auto;
    bottom: auto;

    width: 100%;
}


/* =========================================================
   MOBILE PORTRAIT
   599 px et moins
   ========================================================= */

@media only screen and (max-width: 599px) {

    .operateur-sticky {
        left: 50%;
        bottom: 0;

        width: 100%;
        max-width: none;

        transform: translate(-50%, 120px);
    }


    .operateur-sticky.active {
        transform: translate(-50%, 0);
    }


    .operateur-sticky__inner {
        display: grid;

        /*
         * 3 zones :
         *
         * 100px = logo
         * 1fr   = bouton opérateur centré
         * 75px  = zone réservée au bouton retour haut
         */

        grid-template-columns: 100px 1fr 75px;

        align-items: center;

        min-height: 64px;

        padding-top: 8px;
        padding-right: 8px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        padding-left: 14px;

        border-left: 0;
        border-right: 0;
        border-bottom: 0;

        border-radius: 0;
    }


    /* Logo */

    .operateur-sticky__logo {
        grid-column: 1;

        display: flex;
        align-items: center;
        justify-content: flex-start;

        min-width: 0;

        margin-right: 0;
    }


    .operateur-sticky__logo img {
        width: auto;
        height: auto;

        max-width: 95px;
        max-height: 38px;
    }


    /* Bouton opérateur */

    .operateur-sticky__button {
        grid-column: 2;

        justify-self: center;

        width: 145px;

        flex: none;
    }


    .operateur-sticky__button .btn {
        width: 100%;

        padding-left: 8px;
        padding-right: 8px;
    }

}


/* =========================================================
   PETITS MOBILES PORTRAIT
   360 px et moins
   ========================================================= */

@media only screen and (max-width: 360px) {

    .operateur-sticky__inner {

        /*
         * Même principe mais avec
         * des dimensions réduites.
         */

        grid-template-columns: 82px 1fr 68px;

        padding-left: 8px;
        padding-right: 5px;
    }


    .operateur-sticky__logo img {
        max-width: 78px;
        max-height: 34px;
    }


    .operateur-sticky__button {
        width: 130px;
    }


    .operateur-sticky__button .btn {
        padding-left: 5px;
        padding-right: 5px;

        font-size: 90%;
    }

}


/* =========================================================
   MOBILE PAYSAGE
   De 600 px à 999 px
   ========================================================= */

@media only screen
and (min-width: 600px)
and (max-width: 999px)
and (orientation: landscape) {

    .operateur-sticky {
        left: 50%;
        bottom: 0;

        width: 100%;
        max-width: none;

        transform: translate(-50%, 120px);
    }


    .operateur-sticky.active {
        transform: translate(-50%, 0);
    }


    .operateur-sticky__inner {
        display: grid;

        /*
         * 3 zones :
         *
         * 140px = logo
         * 1fr   = bouton opérateur centré
         * 90px  = zone réservée au bouton retour haut
         */

        grid-template-columns: 140px 1fr 90px;

        align-items: center;

        min-height: 64px;

        padding-top: 8px;
        padding-right: 10px;
        padding-bottom: 8px;
        padding-left: 18px;

        border-left: 0;
        border-right: 0;
        border-bottom: 0;

        border-radius: 0;
    }


    /* Logo */

    .operateur-sticky__logo {
        grid-column: 1;

        display: flex;
        align-items: center;
        justify-content: flex-start;

        min-width: 0;

        margin-right: 0;
    }


    .operateur-sticky__logo img {
        width: auto;
        height: auto;

        max-width: 120px;
        max-height: 42px;
    }


    /* Bouton opérateur */

    .operateur-sticky__button {
        grid-column: 2;

        justify-self: center;

        width: 190px;

        flex: none;
    }


    .operateur-sticky__button .btn {
        width: 100%;

        padding-left: 8px;
        padding-right: 8px;
    }

}


/* =========================================================
   PAGES ACTUALITES
   Bloc opérateur à deux boutons
   ========================================================= */

/*
 * Sur les actualités, on clone :
 *
 * .buttons__group
 *
 * contenant :
 * - Site de ...
 * - Fiche détaillée
 */

.operateur-sticky--article .operateur-sticky__button {
    width: 190px;

    flex: 0 0 190px;
}


.operateur-sticky--article .buttons__group {
    width: 190px;

    margin: 0;

    position: static;

    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
}


.operateur-sticky--article .buttons__group a {
    display: block;

    width: 100%;
}


/*
 * Sécurité si justify--item était encore
 * présent dans un clone.
 */

.operateur-sticky--article .justify--item {
    position: static;

    top: auto;
}


/* =========================================================
   ACTUALITES - MOBILE PORTRAIT
   ========================================================= */

@media only screen and (max-width: 599px) {

    .operateur-sticky--article .operateur-sticky__button {
        grid-column: 2;

        justify-self: center;

        width: 155px;

        flex: none;
    }


    .operateur-sticky--article .buttons__group {
        width: 155px;
    }


    .operateur-sticky--article .buttons__group a {
        width: 100%;

        padding-left: 5px;
        padding-right: 5px;
    }

}


/* =========================================================
   ACTUALITES - PETITS MOBILES
   ========================================================= */

@media only screen and (max-width: 360px) {

    .operateur-sticky--article .operateur-sticky__button {
        width: 130px;
    }


    .operateur-sticky--article .buttons__group {
        width: 130px;
    }


    .operateur-sticky--article .buttons__group a {
        padding-left: 4px;
        padding-right: 4px;
    }

}


/* =========================================================
   ACTUALITES - MOBILE PAYSAGE
   ========================================================= */

@media only screen
and (min-width: 600px)
and (max-width: 999px)
and (orientation: landscape) {

    .operateur-sticky--article .operateur-sticky__button {
        grid-column: 2;

        justify-self: center;

        width: 190px;

        flex: none;
    }


    .operateur-sticky--article .buttons__group {
        width: 190px;
    }

}