/*
 * Gestion des cookies (bannière + préférences) — Inkwell
 */

/* ==========================================================================
   BANNIÈRE (première visite, tant qu'aucun choix n'a été enregistré)
   Barre pleine largeur, disposition horizontale sur desktop
   ========================================================================== */

.bandeau-cookies {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 700;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -8px 32px rgba(38, 53, 60, 0.18);
    padding: 28px 0;
    display: none;
    font-family: var(--police-corps);
}

.bandeau-cookies--visible {
    display: block;
    animation: bandeau-cookies-apparition 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bandeau-cookies-apparition {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bandeau-cookies__interieur {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.bandeau-cookies__texte-bloc {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.bandeau-cookies__icone {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--couleur-corail);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.bandeau-cookies__titre {
    font-family: var(--police-titres);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--couleur-anthracite);
    margin-bottom: 6px;
}

.bandeau-cookies__texte {
    font-size: 0.92rem;
    color: rgba(38, 53, 60, 0.72);
    line-height: 1.55;
    max-width: 640px;
}

.bandeau-cookies__texte a {
    color: var(--couleur-corail);
    font-weight: 600;
    text-decoration: underline;
}

.bandeau-cookies__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.bandeau-cookies__actions .bouton {
    white-space: nowrap;
}

/* ==========================================================================
   RESPONSIVE — la bannière se réorganise verticalement en dessous de 992px
   ========================================================================== */

@media (max-width: 992px) {
    .bandeau-cookies__interieur {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 0 24px;
    }

    .bandeau-cookies__actions {
        width: 100%;
    }

    .bandeau-cookies__actions .bouton {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .bandeau-cookies {
        padding: 22px 0;
    }

    .bandeau-cookies__interieur {
        padding: 0 18px;
        gap: 16px;
    }

    .bandeau-cookies__texte-bloc {
        gap: 14px;
    }

    .bandeau-cookies__icone {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .bandeau-cookies__titre {
        font-size: 1.02rem;
    }

    .bandeau-cookies__texte {
        font-size: 0.85rem;
    }

    .bandeau-cookies__actions {
        flex-direction: column;
    }
}

/* ==========================================================================
   INTERRUPTEURS (toggles) — utilisés dans le panneau de préférences détaillées
   ========================================================================== */

.interrupteur-ligne {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(38, 53, 60, 0.08);
}

.interrupteur-ligne:last-child {
    border-bottom: none;
}

.interrupteur-ligne__contenu {
    flex: 1;
}

.interrupteur-ligne__titre {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--couleur-anthracite);
    margin-bottom: 3px;
}

.interrupteur-ligne__description {
    font-size: 0.8rem;
    color: rgba(38, 53, 60, 0.6);
    line-height: 1.45;
}

.interrupteur {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    cursor: pointer;
}

.interrupteur input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.interrupteur__piste {
    position: absolute;
    inset: 0;
    background-color: rgba(38, 53, 60, 0.2);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.interrupteur__piste::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.interrupteur input:checked ~ .interrupteur__piste {
    background-color: var(--couleur-corail);
}

.interrupteur input:checked ~ .interrupteur__piste::after {
    transform: translateX(18px);
}

.interrupteur input:disabled ~ .interrupteur__piste {
    background-color: var(--couleur-vert-emeraude);
    opacity: 0.6;
    cursor: not-allowed;
}

.interrupteur input:focus-visible ~ .interrupteur__piste {
    box-shadow: 0 0 0 3px rgba(255, 103, 106, 0.25);
}

/* ==========================================================================
   LIEN DISCRET "Gérer les cookies" (footer)
   ========================================================================== */

.lien-gerer-cookies {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}