/**
 * Bandeau et panneau « Cookies » — voir public/js/mvx-cookies.js.
 *
 * Les couleurs passent par les variables de thème quand la page en définit
 * (espaces /limo, thème sombre compris) et retombent sur la palette du site
 * vitrine sinon. Rien n'est posé en style inline : le CSP est bloquant.
 */

.mvx-ck {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;           /* au-dessus des modales de l'application */
    display: none;
    padding: 12px;
    box-sizing: border-box;
}

.mvx-ck.is-open { display: block; }

.mvx-ck-card {
    max-width: 780px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--border, #e7e9f2);
    background: var(--bg-card, #fff);
    color: var(--text-2, #4a5670);
    box-shadow: 0 18px 50px rgba(11, 31, 58, .18);
    font-size: 13px;
    line-height: 1.55;
}

.mvx-ck-txt { flex: 1 1 320px; min-width: 0; }

.mvx-ck-txt strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13.5px;
    color: var(--text-1, #12233d);
}

.mvx-ck-txt a { color: var(--brand-accent, #2977ec); font-weight: 600; }

.mvx-ck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.mvx-ck-btn {
    appearance: none;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid var(--border, #e7e9f2);
    background: transparent;
    color: var(--text-2, #4a5670);
    cursor: pointer;
    transition: .18s;
}

.mvx-ck-btn:hover { border-color: var(--brand-accent, #2977ec); color: var(--brand-accent, #2977ec); }

.mvx-ck-btn-main {
    border-color: transparent;
    background: var(--brand-accent, #2977ec);
    color: var(--brand-on-accent,#fff);
}

.mvx-ck-btn-main:hover { background: var(--brand-accent-dim, #195fc8); color: var(--brand-on-accent,#fff); }

/* « En savoir plus » : un lien vers /cookies, présenté comme les autres choix. */
a.mvx-ck-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* Panneau « Personnaliser » : une modale plein écran sur mobile, centrée au-delà. */
.mvx-ck-panel {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: none;
    place-items: center;
    padding: 12px;
    background: rgba(11, 31, 58, .45);
}

.mvx-ck-panel.is-open { display: grid; }

.mvx-ck-panel-card {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--border, #e7e9f2);
    background: var(--bg-card, #fff);
    color: var(--text-2, #4a5670);
    font-size: 13px;
    line-height: 1.6;
}

.mvx-ck-panel-card h2 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--text-1, #12233d);
}

.mvx-ck-group {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border, #e7e9f2);
    background: var(--bg-card2, #f7f8fc);
}

.mvx-ck-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
    color: var(--text-1, #12233d);
}

.mvx-ck-lock { font-size: 11.5px; font-weight: 600; color: var(--text-3, #667085); }

.mvx-ck-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

.mvx-ck-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

/* Téléphone : le bandeau ne doit pas cacher le haut de la page (il en couvrait
   la moitié à 320 px). Texte resserré, phrase des cookies indispensables
   masquée (reprise sur la page Cookies), les trois choix sur une seule rangée. */
@media (max-width: 560px) {
    .mvx-ck { padding: 8px; }
    .mvx-ck-card { padding: 12px 14px; gap: 10px; border-radius: 14px; font-size: 12px; line-height: 1.45; }
    .mvx-ck-txt strong { margin-bottom: 2px; font-size: 13px; }
    .mvx-ck-nec { display: none; }
    .mvx-ck-actions { width: 100%; }
    .mvx-ck-btn { flex: 1 1 auto; text-align: center; padding: 9px 6px; font-size: 12px; line-height: 1.2; }

    /* Refuser et Accepter côte à côte, même largeur ; « En savoir plus » à leur suite. */
    .mvx-ck-actions-audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .mvx-ck-actions-audience .mvx-ck-btn-link { order: 3; }
}

/* 320 px : « En savoir plus » tient sur une ligne, la rangée garde sa hauteur. */
@media (max-width: 360px) {
    .mvx-ck-btn { padding: 9px 2px; font-size: 11.5px; letter-spacing: -.01em; }
}
