/* ─── Carte de consentement (includes/consentement.php, landing.js) ───
   Au-dessus de la barre mobile (990) et de la navbar (1000), sous les modales (1050). */
.consentement[hidden], .consentement [hidden], .consentement-pastille[hidden] { display: none !important; }
.consentement {
    position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 1040;
    width: min(500px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: hidden auto; isolation: isolate;
    display: grid; gap: 18px; padding: 28px 28px 20px; border-radius: 24px;
    background: var(--white, #fff); color: var(--primary-blue, #13284b); font-family: "Plus Jakarta Sans", sans-serif;
    box-shadow: 0 28px 56px -20px rgba(19, 40, 75, .42), 0 0 0 1px rgba(19, 40, 75, .06);
    animation: consentementMonte .32s cubic-bezier(.2, .8, .2, 1);
}
.consentement__niveaux { position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; z-index: -1; opacity: .5; fill: none; stroke: var(--secondary-white, #ede5e1); stroke-width: 1.5; pointer-events: none; }
.consentement__niveaux .consentement__coeur { stroke: #ffb877; }
.consentement__haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consentement__marque { display: flex; align-items: center; gap: 10px; }
.consentement__marque img { width: 32px; height: 32px; }
.consentement__mot { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.consentement__mot b { color: var(--primary-orange, #fc8822); }
.consentement button { font-family: inherit; cursor: pointer; }
.consentement__sans { font-size: .88rem; font-weight: 600; color: inherit; background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.consentement__vue { display: grid; gap: 18px; }
body .consentement h2 { margin: 0; text-align: left; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; color: inherit; }
.consentement__surligne { background: linear-gradient(transparent 62%, #ffb877 62% 92%, transparent 92%); padding: 0 2px; }
.consentement p { margin: 0; font-size: 1rem; line-height: 1.6; color: #5b6577; }
.consentement__finalites { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.consentement__finalites li { font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--secondary-white, #ede5e1); }
.consentement__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consentement__actions button { flex: 1 1 0; min-width: 140px; padding: 15px 16px; border-radius: 14px; font-size: 1rem; font-weight: 700; border: 1.5px solid var(--primary-blue, #13284b); transition: transform .12s ease-out, background .15s; }
.consentement__actions button:active { transform: scale(.97); }
.consentement__secondaire { background: var(--white, #fff); color: var(--primary-blue, #13284b); }
.consentement__secondaire:hover { background: var(--secondary-white, #ede5e1); }
.consentement__principal { background: var(--primary-orange, #fc8822); border-color: var(--primary-orange, #fc8822) !important; color: var(--primary-blue, #13284b); }
.consentement__principal:hover { background: #ff9a3d; }
.consentement__pied { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; }
.consentement__pied a, .consentement__pied button { color: #5b6577; font-size: .84rem; font-weight: 500; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.consentement__pied a { margin-left: auto; }
.consentement__prefs { display: grid; gap: 8px; }
.consentement__ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--secondary-white, #ede5e1); }
.consentement__ligne strong { display: block; font-size: .98rem; }
.consentement__ligne small { display: block; margin-top: 3px; font-size: .86rem; line-height: 1.45; color: #5b6577; }
.consentement__toujours { padding-top: 2px; font-size: .74rem; font-weight: 700; color: #5b6577; white-space: nowrap; }
.consentement__interrupteur { position: relative; flex: none; margin-top: 2px; }
.consentement__interrupteur input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.consentement__interrupteur span { position: relative; display: block; width: 42px; height: 24px; border-radius: 999px; background: #b9b2ae; transition: background .2s; }
.consentement__interrupteur span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white, #fff); box-shadow: 0 1px 3px rgba(19, 40, 75, .3); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.consentement__interrupteur input:checked + span { background: var(--primary-orange, #fc8822); }
.consentement__interrupteur input:checked + span::after { transform: translateX(18px); }
.consentement button:focus-visible, .consentement a:focus-visible, .consentement__interrupteur input:focus-visible + span, .consentement-pastille:focus-visible { outline: 3px solid var(--primary-orange, #fc8822); outline-offset: 2px; }

/* Pastille de rappel : rouvre la carte une fois le choix fait. */
.consentement-pastille {
    position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 980;
    display: flex; align-items: center; height: 52px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--white, #fff); color: var(--primary-blue, #13284b); font: 700 .82rem "Plus Jakarta Sans", sans-serif;
    box-shadow: 0 12px 28px -10px rgba(19, 40, 75, .45), 0 0 0 1px rgba(19, 40, 75, .06);
}
.consentement-pastille span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s ease, margin .25s ease; }
.consentement-pastille:hover span, .consentement-pastille:focus-visible span { max-width: 160px; margin: 0 8px; }

@keyframes consentementMonte { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
/* Arrivée au chargement : la carte glisse après un temps, son contenu suit, les lignes de niveau s'ouvrent. */
.consentement--arrivee { transform-origin: bottom left; animation: consentementArrivee .7s cubic-bezier(.16, 1, .3, 1) .6s both; }
.consentement--arrivee .consentement__haut,
.consentement--arrivee .consentement__vue,
.consentement--arrivee .consentement__pied { animation: consentementContenu .45s ease-out both; }
.consentement--arrivee .consentement__haut { animation-delay: .85s; }
.consentement--arrivee .consentement__vue { animation-delay: .95s; }
.consentement--arrivee .consentement__pied { animation-delay: 1.05s; }
.consentement--arrivee .consentement__niveaux { transform-origin: center; animation: consentementOndes 1.2s cubic-bezier(.16, 1, .3, 1) .9s both; }
@keyframes consentementArrivee { from { opacity: 0; transform: translateY(48px) scale(.94); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes consentementContenu { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes consentementOndes { from { opacity: 0; transform: scale(.55); } to { opacity: .5; transform: none; } }
@media (max-width: 870px) {
    .consentement { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; max-height: calc(100vh - 24px); padding: 22px 20px 16px; gap: 16px; }
    body .consentement h2 { font-size: 1.5rem; }
    .consentement p { font-size: .95rem; }
    /* Au-dessus de la barre d'action mobile et du bouton fixe de la page cabinets. */
    .consentement-pastille { left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); height: 46px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .consentement, .consentement--arrivee, .consentement--arrivee * { animation: none !important; }
    .consentement-pastille span, .consentement__interrupteur span, .consentement__interrupteur span::after { transition: none; }
}
