/* LEAVAH PARIS — Consentement cookies (bandeau + panneau de préférences)
   Même langage que le popup d'intro quiz et les emails : fond blanc, filet
   noir, serif, capitales espacées.
   Règle CNIL : « Tout refuser » et « Tout accepter » ont le même style.
   Cf. templates/front/partials/_cookie_consent.html.twig
       assets/js/cookie-consent.js */

/* ─── Boutons ─────────────────────────────────────────────────────────── */

.cookie-btn {
    display: inline-block;
    padding: 13px 22px;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: background var(--transition, 0.3s ease), color var(--transition, 0.3s ease);
}
.cookie-btn:hover,
.cookie-btn:focus-visible {
    background: #1a1a1a;
    color: #ffffff;
}

/* Action principale du panneau (enregistrer) */
.cookie-btn--primary {
    background: #1a1a1a;
    color: #ffffff;
}
.cookie-btn--primary:hover,
.cookie-btn--primary:focus-visible {
    background: #ffffff;
    color: #1a1a1a;
}

/* « Personnaliser » : lien discret, sans cadre */
.cookie-btn--link {
    padding: 13px 4px;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cookie-btn--link:hover,
.cookie-btn--link:focus-visible {
    background: transparent;
    color: var(--gold, #b8960c);
}

/* ─── Bandeau ─────────────────────────────────────────────────────────── */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    background: #ffffff;
    border-top: 1px solid #1a1a1a;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.06);
    animation: cookieBannerIn 0.4s ease both;
}
/* [hidden] doit l'emporter sur display: flex des enfants */
.cookie-banner[hidden] { display: none; }

@keyframes cookieBannerIn {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 32px;
    box-sizing: border-box;
}

.cookie-banner__body { flex: 1; }

.cookie-banner__title {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #1a1a1a;
}

.cookie-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #444444;
}

.cookie-banner__link {
    color: #1a1a1a;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cookie-banner__link:hover { color: var(--gold, #b8960c); }

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ─── Panneau de préférences (<dialog>) ───────────────────────────────── */

.cookie-prefs {
    border: none;
    padding: 0;
    background: transparent;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin: auto;
}
.cookie-prefs::backdrop {
    background: rgba(20, 18, 15, 0.55);
    backdrop-filter: blur(2px);
}

.cookie-prefs__box {
    position: relative;
    width: min(92vw, 560px);
    max-height: 88vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 46px 40px 36px;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    font-family: var(--font-body, 'Lusitana', Georgia, serif);
}
.cookie-prefs[open] .cookie-prefs__box {
    animation: cookiePrefsIn 0.35s ease both;
}
@keyframes cookiePrefsIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.cookie-prefs__close {
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 4px 8px;
    font-size: 26px;
    line-height: 1;
    color: #aaaaaa;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition, 0.3s ease);
}
.cookie-prefs__close:hover { color: #1a1a1a; }

.cookie-prefs__eyebrow {
    margin: 0 0 16px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.42em;
    text-transform: uppercase;
}

.cookie-prefs__title {
    margin: 0 0 12px;
    text-align: center;
    font-family: var(--font-title, 'Lusitana', Georgia, serif);
    font-style: italic;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.3;
}

.cookie-prefs__intro {
    margin: 0 0 26px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
}

.cookie-prefs__list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    border-top: 1px solid #eaeaea;
}

.cookie-prefs__item {
    padding: 18px 0;
    border-bottom: 1px solid #eaeaea;
}

.cookie-prefs__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.cookie-prefs__label {
    font-size: 15px;
    color: #1a1a1a;
}

.cookie-prefs__always {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888888;
    white-space: nowrap;
}

.cookie-prefs__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666666;
}

.cookie-prefs__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cookie-prefs__actions .cookie-btn { flex: 1 1 140px; }

/* ─── Interrupteur ────────────────────────────────────────────────────── */

.cookie-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

/* Case native invisible mais focusable (clavier + lecteurs d'écran) */
.cookie-switch__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.cookie-switch__track {
    position: relative;
    width: 42px;
    height: 22px;
    border: 1px solid #1a1a1a;
    background: #ffffff;
    transition: background var(--transition, 0.3s ease);
}
.cookie-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #1a1a1a;
    transition: transform var(--transition, 0.3s ease), background var(--transition, 0.3s ease);
}
.cookie-switch__input:checked + .cookie-switch__track { background: #1a1a1a; }
.cookie-switch__input:checked + .cookie-switch__track::after {
    transform: translateX(20px);
    background: #ffffff;
}
.cookie-switch__input:focus-visible + .cookie-switch__track {
    outline: 2px solid var(--gold, #b8960c);
    outline-offset: 2px;
}

/* ─── Lien « Gestion des cookies » du footer (bouton stylé en lien) ──── */

.footer-cookie-settings {
    padding: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 300;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition);
}
.footer-cookie-settings:hover { color: var(--gold); }

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px 20px;
    }
    .cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .cookie-banner__actions .cookie-btn--link { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .cookie-prefs__box { padding: 42px 22px 26px; }
    .cookie-prefs__title { font-size: 21px; }
}
