/* ==========================================================================
   1. CONTENEUR GLOBAL DES DOCUMENTS LÉGAUX (RENDU PUBLIC)
   ========================================================================== */
.mcc-document-ml,
.mcc-document-pc,
.mcc-document-cookies {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3338;
    line-height: 1.7;
    font-size: 15px;
}

/* Titres des documents légaux */
.mcc-document-ml h1,
.mcc-document-pc h1,
.mcc-document-cookies h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1d2327;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.mcc-document-ml h2,
.mcc-document-pc h2,
.mcc-document-cookies h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.3rem;
    margin-bottom: 1rem;
    color: #1d2327;
}

.mcc-document-ml h3,
.mcc-document-pc h3,
.mcc-document-cookies h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1d2327;
}

/* Listes, puces et paragraphes */
.mcc-document-ml p,
.mcc-document-pc p,
.mcc-document-cookies p {
    margin-bottom: 1.2rem;
}

.mcc-document-ml ul,
.mcc-document-pc ul,
.mcc-document-cookies ul {
    margin: 0 0 1.5rem 1.5rem;
    padding: 0;
    list-style-type: disc;
}

.mcc-document-ml li,
.mcc-document-pc li,
.mcc-document-cookies li {
    margin-bottom: 0.5rem;
}

/* Balises de code (Noms techniques des cookies) */
.mcc-document-cookies code {
    background: #f0f6fc;
    color: #c93b2b;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

/* ==========================================================================
   2. TABLEAUX DE DONNÉES & DE COOKIES (PUBLIC)
   ========================================================================== */
.mcc-document-pc table,
.mcc-document-cookies table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 14px;
    text-align: left;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.mcc-document-pc th,
.mcc-document-cookies th {
    background-color: #f3f4f6;
    color: #1d2327;
    font-weight: 600;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
}

.mcc-document-pc td,
.mcc-document-cookies td {
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    vertical-align: top;
}

.mcc-document-pc tr:hover,
.mcc-document-cookies tr:hover {
    background-color: #f9fafb;
}

/* ==========================================================================
   3. ENCADRÉS DE CATÉGORIES DE COOKIES (PUBLIC)
   ========================================================================== */
.mcc-cookie-category-box {
    margin-top: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 25px;
}

/* Bordures de couleur selon la catégorie CNIL/RGPD */
.mcc-cookie-category-box.necessary { border-left: 4px solid #10b981; }
.mcc-cookie-category-box.analytics { border-left: 4px solid #3b82f6; }
.mcc-cookie-category-box.marketing { border-left: 4px solid #f59e0b; }

.mcc-cookie-category-box h3 {
    margin-top: 0;
}

.mcc-cookie-category-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
}

/* Structure des droits fondamentaux RGPD */
/* .mcc-rgpd-rights h3 {
    border-left: 3px solid #2271b1;
    padding-left: 10px;
    margin-top: 25px;
    font-size: 1.1rem;
} */

/* ==========================================================================
   4. BOUTON DE MODIFICATION DU CONSENTEMENT (PUBLIC)
   ========================================================================== */
.mcc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2271b1;
    color: #ffffff !important;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.15s ease-in-out;
}

.mcc-btn:hover {
    background-color: #135e96;
}

/* Responsive pour mobile */
@media screen and (max-width: 600px) {
    .mcc-document-pc table,
    .mcc-document-cookies table {
        display: block;
        overflow-x: auto;
    }
}

/* ==========================================================================
   5. INTERFACE D'ADMINISTRATION (BACK-OFFICE)
   ========================================================================== */
.mcc-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.mcc-service-card {
    background: #fff;
    padding: 15px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.mcc-service-card:hover {
    border-color: #2271b1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mcc-service-card input[type="checkbox"] {
    margin: 0;
}

.mcc-btn-settings-circle {
    position: fixed; bottom: 20px; left: 20px; width: 50px; height: 50px;
    background: #2563eb; color: #fff; border: none; border-radius: 50%;
    font-size: 22px; display: flex; align-items: center; justify-content: center;
    cursor: grab; z-index: 10; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    touch-action: none; user-select: none;
}
.mcc-btn-settings-circle:active { cursor: grabbing; transform: scale(0.95); }
.mcc-btn-settings-circle:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; background: #1d4ed8; }

.mcc-banner {
    --mcc-primary: #2563eb;
    box-sizing: border-box;
    position: fixed;
    top: 20px;
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 999999;
    width: min(420px, calc(100vw - 40px));
    max-width: none;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.mcc-banner.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mcc-banner .mcc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.mcc-banner .mcc-header h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 18px;
    line-height: 1.3;
    color: #222;
}

.mcc-banner .mcc-content p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #555;
}

.mcc-banner .mcc-options {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f9f9f9;
    border-radius: 8px;
}

.mcc-banner .mcc-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.mcc-banner .mcc-option:last-child {
    margin-bottom: 0;
}

.mcc-banner .mcc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mcc-banner .mcc-btn {
    flex: 1 1 6.5rem;
    min-width: 6.5rem;
    white-space: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mcc-banner .mcc-btn-accept {
    background: var(--mcc-primary, #2563eb);
    color: #fff !important;
    border-color: var(--mcc-primary, #2563eb);
}

.mcc-banner .mcc-btn-accept:hover {
    filter: brightness(0.92);
}

.mcc-banner .mcc-btn-save {
    background: transparent;
    color: #222 !important;
    border-color: #222;
}

.mcc-banner .mcc-btn-save:hover {
    background: #222;
    color: #fff !important;
}

.mcc-banner .mcc-btn-refuse {
    background: transparent;
    color: #555 !important;
    border-color: transparent;
}

.mcc-banner .mcc-btn-refuse:hover {
    background: #f3f4f6;
    color: #222 !important;
}

.mcc-banner .mcc-btn:focus-visible,
.mcc-banner .mcc-close-btn:focus-visible {
    outline: 2px solid var(--mcc-primary, #2563eb);
    outline-offset: 2px;
}

.mcc-banner .mcc-close-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #676767;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.mcc-banner .mcc-close-btn:hover {
    color: #222;
    background: #f3f4f6;
}

@media (max-width: 480px) {
    .mcc-banner .mcc-buttons {
        flex-direction: column;
    }
    .mcc-banner .mcc-btn {
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mcc-banner,
    .mcc-banner.is-open {
        transition: none;
        transform: translateX(-50%);
    }
}

.mcc-iframe-blocked { background: #f3f4f6; padding: 30px; border: 1px dashed #ccc; text-align: center; border-radius: 8px; margin: 20px 0; }