/* Personnalisation Tarteaucitron aux couleurs Kerstic */

/* Remplacer le jaune par le vert Kerstic #2aaf52 */

/* Masquer le bandeau par défaut pour éviter le flicker */
#tarteaucitronAlertBig:not([data-kerstic-customized]):not([style*="display: none"]) {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Structure du bandeau avec image */
#tarteaucitronAlertBig[style*="display: block"],
#tarteaucitronAlertBig:not([style*="display"]) {
    display: flex !important;
}

#tarteaucitronAlertBig {
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 40px !important;
    min-height: 120px !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    gap: 20px !important;
}

/* Wrapper du contenu (disclaimer + boutons) avec max-width */
#tarteaucitronAlertBig .tarteaucitron-content-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    max-width: 1400px;
    width: 100%;
}

#tarteaucitronAlertBig::before {
    flex-shrink: 0;
}

/* Afficher le bandeau une fois personnalisé */
#tarteaucitronAlertBig[data-kerstic-customized="true"] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Image de cookie */
#tarteaucitronAlertBig::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    min-width: 60px;
    background-image: url('/img/front/cookies.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Zone de texte */
#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
    flex: 1;
    margin: 0 !important;
}

/* Conteneur des boutons */
#tarteaucitronAlertBig .tarteaucitron-buttons-wrapper {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

/* Style des boutons selon le design Kerstic */
#tarteaucitronAlertBig button {
    background: #194d4d !important;
    border: 2px solid #194d4d !important;
    border-radius: 32px !important;
    padding: 10px 40px !important;
    color: white !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: 0.25s !important;
    box-shadow: none !important;
}

#tarteaucitronAlertBig button:hover {
    background: #173f41 !important;
    border-color: #173f41 !important;
}

/* Bouton "Tout autoriser" - Style vert comme "Ajouter au panier" */
#tarteaucitronAlertBig #tarteaucitronPersonalize,
#tarteaucitronAllAllowed {
    background: #194d4d !important;
    border: 2px solid #194d4d !important;
    border-radius: 32px !important;
    padding: 10px 40px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

#tarteaucitronAlertBig #tarteaucitronPersonalize:hover,
#tarteaucitronAllAllowed:hover {
    background: #173f41 !important;
    border-color: #173f41 !important;
}

#tarteaucitronAlertBig button.secondaire {
    background: white !important;
    border: 1px solid #787878 !important;
    color: #787878 !important;
}

#tarteaucitronAlertBig button.secondaire:hover {
    background: #f0f0f0 !important;
    border: 1px solid #1b1b1b !important;
    color: #1b1b1b !important;
}

/* Lien "Continuer sans accepter" */
#tarteaucitronAlertBig .continuer-sans-accepter {
    display: block;
    text-align: left;
    margin: 0 !important;
    padding-top: 0 !important;
    color: #1b1b1b !important;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

#tarteaucitronAlertBig .continuer-sans-accepter:hover {
    color: #2aaf52 !important;
}

/* Cacher les éléments non voulus */
#tarteaucitronAlertBig .tarteaucitronCheck,
#tarteaucitronAlertBig .tarteaucitronCross {
    display: none !important;
}

/* Masquer le bouton "tout refuser" */
#tarteaucitronAllDenied {
    display: none !important;
}

/* Responsive mobile */
@media (max-width: 768px) {
    #tarteaucitronAlertBig {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 15px !important;
    }
    #tarteaucitronAlertBig .tarteaucitron-content-wrapper {
        flex-direction: column !important;
    }
    #tarteaucitronAlertBig::before {
        display:none;
    }

    #tarteaucitronAlertBig .tarteaucitron-buttons-wrapper {
        flex-direction: row !important;
        width: calc(100% - 80px);
        margin-right:40px;
        gap: 10px;
    }

    #tarteaucitronAlertBig button {
        width: 100% !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
    }

    #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
        font-size: 14px !important;
    }

    #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong {
        display:none;
    }
    #tarteaucitronRoot .tarteaucitronH1 img {
        display:none;
    }
}

/* Links dans le bandeau */
#tarteaucitronAlertBig a,
#tarteaucitronAlertSmall a {
    color: #194d4d !important;
}

/* Bordure du popup de gestion */
#tarteaucitron {
    border-color: #2aaf52 !important;
}

/* Boutons de fermeture et navigation */
#tarteaucitronBack,
#tarteaucitronClosePanel {
    background-color: #194d4d !important;
    color: white !important;
}

#tarteaucitronBack:hover,
#tarteaucitronClosePanel:hover {
    background-color: #173f41 !important;
}

/* Bouton "Continuer sans accepter" */
#tarteaucitronAlertBig #tarteaucitronCloseAlert,
.tarteaucitronDeny,
#tarteaucitronSave #tarteaucitronSaveButton {
    background-color: white !important;
    border-color: black !important;
    color: black !important;
}

#tarteaucitronAlertBig #tarteaucitronCloseAlert:hover,
.tarteaucitronDeny:hover,
#tarteaucitronSave #tarteaucitronSaveButton:hover {
    background-color: #595959 !important;
    border-color: #595959 !important;
}

/* Services actifs - indicateur vert */
.tarteaucitronIsAllowed .tarteaucitronH2:before {
    background-color: #2aaf52 !important;
}

/* Remplacer le picto de tarte au citron en bas à gauche */
#tarteaucitronIcon #tarteaucitronManager img {
    content: url('/img/front/cookies.png') !important;
    width: 50px !important;
    height: 50px !important;
}

#tarteaucitronRoot .tarteaucitronH1 {text-align:left;margin:15px 20px;font-size:16px;border-bottom:1px solid gray;padding-bottom:10px;}
#tarteaucitronRoot .tarteaucitronH1 img {position:relative;top:5px;left:10px;}
div#tarteaucitronInfo {border:none;text-align:left;margin:0 0 20px 20px !important;padding:0 !important;}
div#tarteaucitronInfo a {color:inherit !important;font-size:inherit !important;font-weight: inherit !important;}
#tarteaucitronRoot #tarteaucitronInfo p {display: block;text-align: left;}
#tarteaucitronRoot #tarteaucitronInfo p strong {font-weight:700;font-size:inherit;}

/* Bouton de fermeture (croix) du popup de préférences */
#tarteaucitronClosePanel {
    position: absolute !important;
    top: 25px !important;
    right: 25px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #000 !important;
    font-size: 32px !important;
    line-height: 32px !important;
    cursor: pointer !important;
    font-weight: 300 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index:1;
}

#tarteaucitronClosePanel:hover {
    color: #666 !important;
    background: transparent !important;
}

/* Toggle switch moderne pour les préférences de cookies */
.tarteaucitron-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.tarteaucitron-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tarteaucitron-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.tarteaucitron-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.tarteaucitron-toggle-input:checked + .tarteaucitron-toggle-slider {
    background-color: #194d4d;
}

.tarteaucitron-toggle-input:checked + .tarteaucitron-toggle-slider:before {
    transform: translateX(24px);
}

.tarteaucitron-toggle-input:focus + .tarteaucitron-toggle-slider {
    box-shadow: 0 0 1px #194d4d;
}

/* Alignement du toggle dans la ligne */
.tarteaucitronAsk {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
#tarteaucitronScrollbarAdjust {display:block;}

/* Masquer les anciens boutons Autoriser/Interdire des services individuels */
/* MAIS PAS le bouton "Tout autoriser" du bandeau principal */
.tarteaucitronAllow,
.tarteaucitronDeny {
    display: none !important;
}
#tarteaucitronSave .tarteaucitronAllow {
    display: block !important;
    background: #194d4d !important;
    border: 2px solid #194d4d !important;
    border-radius: 32px !important;
    padding: 10px 40px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin:auto !important;
}
#tarteaucitronAllAllowed {
    display: inline-block !important;
}

#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk { width: auto; }