/* Bandeau de consentement aux cookies de mesure d'audience.
   Composant maison, injecté par Views/Shared/_ClarityScript.cshtml. */

.nc-cc {
    position: fixed;
    bottom: 20px;
    left: 50%;
    /* Sous les modales Bootstrap (1050/1055) : la réacceptation des CGU reste prioritaire. */
    z-index: 1040;
    box-sizing: border-box;
    width: calc(100% - 32px);
    /* Largeur fluide : suit la taille de l'écran, entre 380 px (petit portable)
       et 620 px (grand écran), au lieu d'une largeur figée. */
    max-width: clamp(380px, 38vw, 620px);
    padding: 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(30, 30, 60, .18);
    font-family: inherit;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .22s ease-out, transform .22s ease-out;
}

.nc-cc.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.nc-cc__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #1f1f28;
}

.nc-cc__desc {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #55555f;
}

.nc-cc__link {
    color: #474f8d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nc-cc__link:hover,
.nc-cc__link:focus {
    color: #3c3489;
}

.nc-cc__actions {
    display: flex;
    gap: 10px;
    /* Sur un pavé large, les boutons restent groupés à droite plutôt que de s'étirer. */
    justify-content: flex-end;
}

.nc-cc__btn {
    flex: 1 1 0;
    max-width: 200px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease-out, border-color .15s ease-out;
}

.nc-cc__btn:focus-visible {
    outline: 2px solid #474f8d;
    outline-offset: 2px;
}

/* « Refuser » et « Accepter » ont la même taille et le même emplacement (exigence CNIL) ;
   seul le remplissage distingue l'action principale. */
.nc-cc__btn--secondary {
    background: #ffffff;
    border-color: #d5d5e0;
    color: #474f8d;
}

.nc-cc__btn--secondary:hover {
    background: #f6f6fb;
    border-color: #474f8d;
}

.nc-cc__btn--primary {
    background: #474f8d;
    border-color: #474f8d;
    color: #ffffff;
}

.nc-cc__btn--primary:hover {
    background: #3c3489;
    border-color: #3c3489;
}

@media (max-width: 480px) {
    .nc-cc {
        bottom: 16px;
        width: calc(100% - 24px);
        padding: 18px;
    }

    /* Cible tactile confortable sur mobile, et boutons à pleine largeur. */
    .nc-cc__btn {
        min-height: 44px;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nc-cc {
        transition: none;
    }
}
