/* =========================================================================
   Tarteaucitron — bandeau bas style Worthy (URL Concept)
   Palette : #1F5FBF primaire
   Conforme CNIL : Refuser et Accepter equivalents visuellement
   ========================================================================= */

/* -------- Pas de voile sombre en mode bandeau bas -------- */
#tarteaucitronBack {
    display: none !important;
}

/* -------- Bandeau bas plein largeur --------
   IMPORTANT : on NE MET PAS display: flex !important sur l'ID seul,
   car Tarteaucitron utilise element.style.display = 'none' (inline)
   pour fermer le bandeau apres clic. Mon !important bloquerait la fermeture.
   On applique le flex uniquement quand le style inline = display: block. */
#tarteaucitronAlertBig {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: none !important;
    border-top: 3px solid #1F5FBF !important;
    border-radius: 0 !important;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18) !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    transform: none !important;
    padding: 18px 24px !important;
    margin: 0 !important;
    font-family: 'Lexend Deca', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    text-align: left !important;
    z-index: 9999;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* box-sizing herite sur tous les enfants pour eviter tout debordement */
#tarteaucitronAlertBig *,
#tarteaucitronAlertBig *::before,
#tarteaucitronAlertBig *::after {
    box-sizing: border-box !important;
}

/* Layout flex : applique seulement quand Tarteaucitron veut afficher le bandeau */
#tarteaucitronAlertBig[style*="display: block"],
#tarteaucitronAlertBig[style*="display:block"] {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    animation: urlc-tac-slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

@keyframes urlc-tac-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* Icone cookie en pastille bleue */
#tarteaucitronAlertBig::before {
    content: "";
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/><circle cx='9' cy='10' r='1'/><circle cx='15' cy='9' r='1'/><circle cx='13' cy='14' r='1'/></svg>") center / 28px 28px no-repeat,
        linear-gradient(135deg, #1F5FBF 0%, #2B73D9 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(31, 95, 191, 0.32);
    align-self: center;
}

/* Texte d'introduction */
#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
    flex: 1 1 360px !important;
    min-width: 280px !important;
    color: #4b5563 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    display: block !important;
}

#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong {
    color: #1a1a1a !important;
    font-weight: 600 !important;
}

#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert a,
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
    color: #1F5FBF !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
}

/* -------- Boutons : style outline-primary uniforme --------
   Nomenclature Tarteaucitron (trompeuse) sur bandeau bas :
   - #tarteaucitronPersonalize2 = bouton "Tout accepter" (.tarteaucitronAllow)
   - #tarteaucitronAllDenied2   = bouton "Tout refuser" (.tarteaucitronDeny)
   - #tarteaucitronCloseAlert   = bouton "Personnaliser"
   Les 3 sont harmonises en style btn-outline-primary (fond blanc, bordure
   bleue, hover bleu plein). Conforme CNIL : Refuser et Accepter ont
   strictement la meme proeminence visuelle. */

#tarteaucitronAlertBig button {
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#tarteaucitronAlertBig #tarteaucitronPersonalize2,
#tarteaucitronAlertBig #tarteaucitronAllDenied2,
#tarteaucitronAlertBig #tarteaucitronCloseAlert {
    background: #ffffff !important;
    color: #1F5FBF !important;
    border: 2px solid #1F5FBF !important;
    border-radius: 4px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    margin: 4px !important;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease !important;
    font-family: 'Lexend Deca', 'Roboto', sans-serif !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
    text-decoration: none !important;
}

#tarteaucitronAlertBig #tarteaucitronPersonalize2:hover,
#tarteaucitronAlertBig #tarteaucitronAllDenied2:hover,
#tarteaucitronAlertBig #tarteaucitronCloseAlert:hover {
    background: #1F5FBF !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Lien "Politique de confidentialite" (#tarteaucitronPrivacyUrl) reste un lien */
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
    background: transparent !important;
    color: #1F5FBF !important;
    border: none !important;
    text-decoration: underline !important;
    padding: 10px 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 4px !important;
    cursor: pointer !important;
    font-family: 'Lexend Deca', 'Roboto', sans-serif !important;
}
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl:hover {
    color: #174a96 !important;
}

/* Conteneur boutons (margin droite) */
#tarteaucitronAlertBig #tarteaucitronCloseAlert {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    margin-right: 24px !important;
}

/* =========================================================================
   Panneau detaille des services (mode "Personnaliser")
   ========================================================================= */
#tarteaucitron {
    background: #f8fafc !important;
    border-radius: 12px !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.4) !important;
    font-family: 'Lexend Deca', 'Roboto', sans-serif !important;
    overflow: hidden !important;
    max-width: 760px !important;
    width: calc(100% - 32px) !important;
}

#tarteaucitron #tarteaucitronServices {
    background: #f8fafc !important;
}

#tarteaucitron .tarteaucitronTitle button {
    background: #1F5FBF !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
    padding: 18px 24px !important;
    font-size: 16px !important;
    font-family: inherit !important;
}

#tarteaucitron #tarteaucitronClosePanel {
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    padding: 6px 14px !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
}
#tarteaucitron #tarteaucitronClosePanel:hover {
    background: rgba(255,255,255,0.15) !important;
}

#tarteaucitron .tarteaucitronMainLine {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 16px 24px !important;
}

#tarteaucitron .tarteaucitronBorder {
    border: none !important;
    background: transparent !important;
}

#tarteaucitron ul.tarteaucitronLine {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    margin: 12px 16px !important;
    padding: 14px 18px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
    transition: box-shadow 0.15s ease !important;
}
#tarteaucitron ul.tarteaucitronLine:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

#tarteaucitron .tarteaucitronName,
#tarteaucitron .tarteaucitronName b {
    color: #1a1a1a !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

#tarteaucitron .tarteaucitronName .tacCurrentStatus {
    color: #6b7280 !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
}

#tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk {
    display: flex !important;
    gap: 6px !important;
}

#tarteaucitronServices .tarteaucitronLine .tarteaucitronAllow,
#tarteaucitronServices .tarteaucitronLine .tarteaucitronDeny {
    border-radius: 4px !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    border: 2px solid transparent !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
}

#tarteaucitronServices .tarteaucitronLine .tarteaucitronAllow {
    background: #1F5FBF !important;
    color: #ffffff !important;
    border-color: #1F5FBF !important;
}
#tarteaucitronServices .tarteaucitronLine .tarteaucitronAllow:hover {
    background: #174a96 !important;
    border-color: #174a96 !important;
}

#tarteaucitronServices .tarteaucitronLine .tarteaucitronDeny {
    background: #ffffff !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
}
#tarteaucitronServices .tarteaucitronLine .tarteaucitronDeny:hover {
    background: #f3f4f6 !important;
    color: #1a1a1a !important;
}

#tarteaucitron #tarteaucitronAllAllowed,
#tarteaucitron #tarteaucitronAllDenied {
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 9px 16px !important;
    margin: 4px !important;
    font-family: inherit !important;
    border: 2px solid transparent !important;
    transition: all 0.15s ease !important;
}

#tarteaucitron #tarteaucitronAllAllowed {
    background: #1F5FBF !important;
    color: #ffffff !important;
    border-color: #1F5FBF !important;
}
#tarteaucitron #tarteaucitronAllDenied {
    background: #ffffff !important;
    color: #1F5FBF !important;
    border-color: #1F5FBF !important;
}

/* =========================================================================
   Mobile : stack vertical
   ========================================================================= */
@media (max-width: 768px) {
    #tarteaucitronAlertBig {
        padding: 16px !important;
    }
    #tarteaucitronAlertBig[style*="display: block"],
    #tarteaucitronAlertBig[style*="display:block"] {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        gap: 12px !important;
    }
    #tarteaucitronAlertBig::before {
        margin: 0 auto !important;
        width: 40px !important;
        height: 40px !important;
    }
    #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert {
        text-align: center !important;
        flex: none !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        word-wrap: break-word !important;
    }
    #tarteaucitronAlertBig #tarteaucitronPersonalize2,
    #tarteaucitronAlertBig #tarteaucitronAllDenied2,
    #tarteaucitronAlertBig #tarteaucitronCloseAlert {
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px 0 !important;
        padding: 12px 18px !important;
        display: block !important;
    }
    #tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
        display: inline-block !important;
        margin: 6px auto !important;
    }
}
