/* Solifestival — CMP (gestion des cookies), porté de focus-live/cmp/cmp.css
   Couleurs reprises de css/style.css : --primaire (jaune), --secondaire (violet), --tiers (rose) */

#cmp-banner,
#cmp-banner * {
    box-sizing: border-box;
}

.cmp-banner {
    display: none; /* affiché via JS (style.display), voir cmp.js showEl()/hideEl() */
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px 40px;
    background: rgba(44, 24, 59, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: #ffffff;
    font-family: system-ui, sans-serif;
    border-top: 1px solid rgba(248, 233, 36, 0.35);
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.35);
    animation: cmp-banner-in 0.4s ease;
    scrollbar-width: thin;
}
.cmp-banner::-webkit-scrollbar {
    width: 5px;
}
.cmp-banner::-webkit-scrollbar-thumb {
    background-color: rgba(248, 233, 36, 0.4);
    border-radius: 10px;
}

@keyframes cmp-banner-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .cmp-banner {
        padding: 18px 20px;
        border-radius: 15px 15px 0 0;
    }
}

.cmp-banner-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}
.cmp-banner-compact > i {
    flex-shrink: 0;
    font-size: 2rem;
    color: rgb(248, 233, 36);
}
.cmp-banner-text {
    flex: 1 1 auto;
    min-width: 0;
}
.cmp-banner-text strong {
    display: block;
    margin-bottom: 4px;
    font-family: "frijole", system-ui, sans-serif;
    letter-spacing: 0.3px;
}
.cmp-banner-text p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
}
.cmp-banner-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 800px) {
    .cmp-banner-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .cmp-banner-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .cmp-banner-actions .cmp-btn {
        flex: 1 1 auto;
    }
}

/* --- Boutons --- */
.cmp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-family: "frijole", system-ui, sans-serif;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.cmp-btn-solid {
    background-color: rgb(224, 28, 85);
    color: #ffffff;
}
.cmp-btn-solid:hover {
    background-color: rgb(248, 233, 36);
    color: rgb(44, 24, 59);
}
.cmp-btn-outline {
    background: transparent;
    border: 1px solid rgba(248, 233, 36, 0.6);
    color: #ffffff;
}
.cmp-btn-outline:hover {
    background-color: rgba(248, 233, 36, 0.15);
    border-color: rgb(248, 233, 36);
}
.cmp-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 14px;
}
.cmp-btn-ghost:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* --- Panneau détaillé --- */
.cmp-detail {
    display: none; /* affiché via JS (style.display) quand "Personnaliser" est cliqué */
    flex-direction: column;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cmp-intro {
    margin: 0 0 15px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* Chaque catégorie : en-tête compact toujours visible (config rapide),
   détail complet replié par défaut (config complète, à la demande) */
.cmp-category {
    margin-bottom: 10px;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}
.cmp-category-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.cmp-category-info {
    flex: 1 1 auto;
    min-width: 0;
}
.cmp-category-info h4 {
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cmp-category-info p {
    margin: 2px 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.6);
}

.cmp-category-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.7rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.cmp-category-toggle:hover {
    background-color: rgba(248, 233, 36, 0.2);
    color: #ffffff;
}
.cmp-category-toggle i {
    transition: transform 0.25s ease;
}
.cmp-category-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.cmp-category-details {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cmp-category-details.open {
    display: block;
}
.cmp-locked-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 10px;
    background-color: rgba(248, 233, 36, 0.2);
    color: rgb(248, 233, 36);
    font-weight: normal;
}

/* Switch style iOS */
.cmp-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.cmp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cmp-switch-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    transition: background-color 0.3s ease;
}
.cmp-switch-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}
.cmp-switch input:checked + .cmp-switch-slider {
    background-color: rgb(224, 28, 85);
}
.cmp-switch input:checked + .cmp-switch-slider::before {
    transform: translateX(20px);
}
.cmp-switch input:disabled + .cmp-switch-slider {
    background-color: rgba(248, 233, 36, 0.5);
    cursor: not-allowed;
}

/* Table des cookies */
.cmp-cookie-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.cmp-cookie-table th,
.cmp-cookie-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cmp-cookie-table th {
    color: rgb(248, 233, 36);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.7rem;
}
.cmp-cookie-table td {
    color: rgba(255, 255, 255, 0.85);
}
.cmp-status {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.4) !important;
}
.cmp-status.is-present {
    color: rgb(248, 233, 36) !important;
    font-weight: bold;
}

@media (max-width: 800px) {
    .cmp-cookie-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Cookies non catalogués (transparence) — masqué (display:none) tant qu'aucun n'est détecté */
.cmp-installed {
    display: none;
    flex-direction: column;
    margin: 5px 0 15px;
    padding: 12px 15px;
    background-color: rgba(248, 233, 36, 0.08);
    border-radius: 15px;
    font-size: 0.75rem;
}
.cmp-installed ul {
    margin: 8px 0 0;
    padding-left: 18px;
}
.cmp-installed-warning {
    margin: 0;
    color: rgb(248, 233, 36);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Footer du panneau */
.cmp-detail-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}
.cmp-detail-footer-secondary {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

.cmp-links {
    margin: 15px 0 0;
    font-size: 0.75rem;
}
.cmp-links a {
    color: rgb(248, 233, 36);
}
.cmp-links a:hover {
    color: #ffffff;
}

/* --- Contenus tiers bloqués (cartes Google Maps aujourd'hui, futurs widgets sociaux/vidéos
   demain) : voir cmp.js activateEmbeds(). Le conteneur parent (ex. .maplarge) doit avoir
   position:relative + une hauteur définie pour que ce bloc en absolute le remplisse. */
.cmp-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.cmp-embed iframe {
    min-width: 100%;
    height: 100%;
    border: 0;
}
.cmp-embed-blocked {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    background: rgba(44, 24, 59, 0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: default;
}
.cmp-embed-blocked i {
    font-size: 2rem;
    color: rgb(248, 233, 36);
    margin-bottom: 10px;
}
.cmp-embed-blocked p {
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 0 20px;
}
.cmp-embed-blocked-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.cmp-embed-blocked-actions button {
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.cmp-embed-allow {
    background-color: rgb(224, 28, 85);
    color: #ffffff;
}
.cmp-embed-allow:hover {
    background-color: rgb(248, 233, 36);
    color: rgb(44, 24, 59);
}
.cmp-embed-manage {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #ffffff;
}
.cmp-embed-manage:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #ffffff !important;
}

/* --- Raccourci admin (bump cache), visible seulement si connecté --- */
.cmp-admin-tools {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    background-color: rgba(224, 28, 85, 0.12);
    border: 1px dashed rgba(224, 28, 85, 0.5);
    border-radius: 15px;
}
.cmp-admin-tools-label {
    margin: 0;
    width: 100%;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}
.cmp-admin-bump-result {
    font-size: 0.75rem;
    color: rgb(248, 233, 36);
}
