/* ============================================================
   consent.css — Bannière & modale RGPD CPage TV
   Cohérent avec cpage-tv.css (variables, palette, glassmorphism)
   ============================================================ */

/* ── Accessibilité ─────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Bannière ──────────────────────────────────────────────── */
#consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 1rem 1.5rem;
    background: rgba(5, 20, 40, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);

    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.20, 0.64, 1),
                opacity 0.3s ease;
}

#consent-banner.consent-banner--visible {
    transform: translateY(0);
    opacity: 1;
}

.consent-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.consent-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 280px;
}

.consent-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.consent-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.consent-banner-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0;
}

.consent-link {
    color: #94d2ae;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-link:hover {
    color: #b8e8ce;
}

.consent-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Boutons communs ───────────────────────────────────────── */
.consent-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.consent-btn-settings {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
}

.consent-btn-settings:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.consent-btn-refuse {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.consent-btn-refuse:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.consent-btn-accept {
    background: #94d2ae;
    color: #0b1e33;
    border: none;
}

.consent-btn-accept:hover {
    background: #b8e8ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(148, 210, 174, 0.4);
}

/* ── Modale ────────────────────────────────────────────────── */
#consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;

    opacity: 0;
    transition: opacity 0.3s ease;
}

#consent-modal.consent-modal--visible {
    opacity: 1;
}

.consent-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.consent-modal-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(8, 22, 42, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);

    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.20, 0.64, 1);
}

#consent-modal.consent-modal--visible .consent-modal-box {
    transform: scale(1) translateY(0);
}

.consent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.consent-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.consent-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 0;
}

.consent-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.consent-modal-body {
    padding: 1.25rem 1.5rem;
}

.consent-modal-intro {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ── Finalités ─────────────────────────────────────────────── */
.consent-purpose {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.consent-purpose--always-on {
    border-color: rgba(148, 210, 174, 0.2);
    background: rgba(148, 210, 174, 0.04);
}

.consent-purpose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.consent-purpose-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.consent-purpose-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.consent-purpose-required {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94d2ae;
    background: rgba(148, 210, 174, 0.15);
    border: 1px solid rgba(148, 210, 174, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
}

.consent-purpose-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin: 0;
}

.consent-purpose-note {
    font-size: 0.72rem;
    font-style: italic;
    color: rgba(255, 186, 66, 0.75);
    line-height: 1.5;
    margin: 0.4rem 0 0;
}

.consent-purpose-desc strong {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Toggle switch ─────────────────────────────────────────── */
.consent-toggle {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.consent-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle-track {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    transition: background 0.25s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.consent-toggle-track--on,
.consent-toggle-input:checked + .consent-toggle-track {
    background: #94d2ae;
    border-color: #94d2ae;
}

.consent-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.consent-toggle-input:checked ~ .consent-toggle-thumb,
.consent-toggle-input:checked + .consent-toggle-track .consent-toggle-thumb {
    transform: translateX(20px);
}

/* Trick : le thumb est enfant du track */
.consent-toggle-track .consent-toggle-thumb {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.consent-toggle-input:checked + .consent-toggle-track .consent-toggle-thumb {
    transform: translateX(20px);
}

.consent-toggle--disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ── Footer modale ─────────────────────────────────────────── */
.consent-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .consent-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .consent-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .consent-btn {
        padding: 0.55rem 1rem;
        font-size: 0.8rem;
    }

    .consent-modal-box {
        max-height: 95vh;
    }

    .consent-modal-footer {
        flex-direction: column;
    }

    .consent-modal-footer .consent-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==================== Footer confidentialité ==================== */
/* Ces styles sont dans consent.css pour être disponibles sur toutes les pages
   (cpage-tv.php/gallery-view.php et player.php) sans dépendre de cpage-tv.css */

.privacy-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.privacy-footer-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.privacy-footer-copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

.privacy-footer-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.privacy-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s ease;
}

.privacy-footer-link:hover {
    color: #94d2ae;
}

.privacy-footer-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.privacy-footer-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .privacy-footer-inner {
        justify-content: center;
        text-align: center;
    }
    .privacy-footer-copy {
        width: 100%;
        text-align: center;
    }
}
