/* Cookie Consent - Module interne */

/* ============================================
   OVERLAY
   ============================================ */
#cc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999999;
}
#cc-overlay.cc-visible {
    display: block;
}

html.cc-no-scroll {
    overflow: hidden;
}

/* ============================================
   BANNIÈRE (popup centrée)
   ============================================ */
#cc-banner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 520px;
    width: calc(100% - 32px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    font-family: Arial, Helvetica, sans-serif;
    padding: 15px 25px;
    z-index: 1000000;
    box-sizing: border-box;
}
#cc-banner.cc-visible {
    display: block;
}

/* Logo */
#cc-logo {
    text-align: center;
    margin: 15px auto 0;
}
#cc-logo img {
    height: 50px;
    object-fit: contain;
}

/* Lien "Continuer sans accepter" */
#cc-deny-link {
    display: block;
    text-align: center;
    color: #999;
    font-size: 13px;
    text-decoration: underline;
    margin: 10px 0 0;
    cursor: pointer;
}
#cc-deny-link:hover {
    color: #666;
}

/* Description */
#cc-description {
    margin: 30px 0 20px;
    text-align: left;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    padding: 0 10px;
}

/* Boutons bannière */
#cc-banner-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 0 10px;
}
#cc-btn-choose,
#cc-btn-accept {
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
}
#cc-btn-choose {
    background: #fff;
    color: #e87a1e;
    border: 2px solid #e87a1e;
}
#cc-btn-choose:hover {
    background: #fef4ec;
}
#cc-btn-accept {
    background: #e87a1e;
    color: #fff;
    border: 2px solid #e87a1e;
}
#cc-btn-accept:hover {
    background: #d06a10;
    border-color: #d06a10;
}

/* Liens bas de bannière */
#cc-banner-links {
    display: flex;
    justify-content: center;
    gap: 6px 16px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-bottom: 10px;
    text-align: center;
}
.cc-footer-link {
    color: #999;
    font-size: 13px;
    text-decoration: underline;
    white-space: nowrap;
}
.cc-footer-link:hover {
    color: #666;
}

/* ============================================
   PANNEAU DE PARAMÈTRES
   ============================================ */
#cc-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    font-family: Arial, Helvetica, sans-serif;
    z-index: 1000000;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
#cc-panel.cc-visible {
    display: flex;
}

/* Header */
#cc-panel-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #eee;
}
#cc-panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0;
}

/* Body (scrollable) */
#cc-panel-body {
    overflow-y: auto;
    flex: 1;
}

/* Ligne de service */
.cc-service {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}
.cc-service-info {
    flex: 1;
    min-width: 0;
}
.cc-service-info h3 {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    margin: 0;
}
.cc-service-info p {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    margin: 6px 0 0;
}

/* Mandatory */
.cc-service.cc-mandatory {
    opacity: 0.8;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.cc-toggle {
    flex-shrink: 0;
    position: relative;
    width: 52px;
    height: 28px;
    min-width: 52px;
    background: #ccc;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
    margin-top: 2px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.cc-toggle::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}
.cc-toggle.cc-toggle-on {
    background: #e87a1e;
}
.cc-toggle.cc-toggle-on::after {
    transform: translateX(24px);
}
.cc-toggle.cc-toggle-disabled {
    opacity: 0.6;
    cursor: default;
}

/* ============================================
   BOUTONS ANNULER / ENREGISTRER
   ============================================ */
#cc-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    gap: 12px;
}
#cc-btn-cancel {
    background: #fff;
    color: #333;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 30px;
    cursor: pointer;
    letter-spacing: 0.5px;
}
#cc-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #999;
}
#cc-btn-save {
    background: #e87a1e;
    color: #fff;
    border: 2px solid #e87a1e;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 30px;
    cursor: pointer;
    letter-spacing: 0.5px;
}
#cc-btn-save:hover {
    background: #d06a10;
    border-color: #d06a10;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    #cc-banner {
        padding: 10px 15px;
    }
    #cc-description {
        font-size: 13px;
        margin: 20px 0 15px;
        padding: 0 5px;
    }
    #cc-banner-buttons {
        flex-direction: column;
        padding: 0;
    }
    #cc-btn-choose,
    #cc-btn-accept {
        max-width: none;
        font-size: 14px;
    }
    .cc-service {
        padding: 12px 15px;
    }
    #cc-panel-footer {
        flex-direction: column-reverse;
    }
    #cc-btn-cancel,
    #cc-btn-save {
        width: 100%;
        text-align: center;
    }
}
