/* Bandeau de consentement aux traceurs (assets/js/consent/consent.js).
   En bas à gauche, au-dessus du client et de la modale du center ; la proposition de notifications
   push (_push.css) occupe le bas à droite. « Tout refuser » et « Tout accepter » ont volontairement
   le même style : la CNIL exige que refuser soit aussi simple et visible qu'accepter. */
.city-consent {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 100001;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 16px 18px;
    background: var(--box-color, #FFFFFF);
    color: var(--text-color, #0E1320);
    border: 1px solid var(--border-color, #C4CEE2);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    line-height: 1.45;
    animation: city-consent-in 0.25s ease-out;
}

.city-consent[hidden] {
    display: none;
}

@keyframes city-consent-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.city-consent__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.city-consent__text {
    margin: 0 0 12px;
}

.city-consent__more {
    color: var(--color-blue, #1E7CF2) !important;
    text-decoration: underline;
}

.city-consent__details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.city-consent__details[hidden] {
    display: none;
}

.city-consent__cat {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #C4CEE2);
    border-radius: 8px;
}

.city-consent__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.city-consent__cat-title {
    font-weight: 700;
    cursor: pointer;
}

.city-consent__cat-text {
    margin: 4px 0 0;
    opacity: 0.85;
}

.city-consent__switch {
    position: relative;
    flex: none;
    width: 40px;
    height: 22px;
}

.city-consent__switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.city-consent__switch input:disabled {
    cursor: not-allowed;
}

.city-consent__slider {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: var(--border-color, #C4CEE2);
    transition: background 0.15s;
}

.city-consent__slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFFFFF;
    transition: transform 0.15s;
}

.city-consent__switch input:checked + .city-consent__slider {
    background: var(--color-green, #2EAA4E);
}

.city-consent__switch input:checked + .city-consent__slider::after {
    transform: translateX(18px);
}

.city-consent__switch input:disabled + .city-consent__slider {
    opacity: 0.6;
}

.city-consent__switch input:focus-visible + .city-consent__slider {
    outline: 2px solid var(--color-blue, #1E7CF2);
    outline-offset: 2px;
}

.city-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.city-consent__btn {
    font: inherit;
    cursor: pointer;
    border-radius: 6px;
}

.city-consent__btn:focus-visible {
    outline: 2px solid var(--color-blue, #1E7CF2);
    outline-offset: 2px;
}

/* Mêmes couleurs, même taille pour refuser et accepter */
.city-consent__btn--choice {
    flex: 1 1 120px;
    padding: 9px 14px;
    border: none;
    background: var(--button-green, #2EAA4E);
    /* Texte foncé dans les deux thèmes : le blanc de --button-green-text (thème sombre) n'atteint
       qu'environ 2:1 de contraste sur ce vert */
    color: #06301C;
    font-weight: 700;
}

.city-consent__btn--choice:hover {
    background: var(--button-green-hover, #25913F);
}

.city-consent__btn--link {
    padding: 9px 10px;
    border: 1px solid var(--border-color, #C4CEE2);
    background: transparent;
    color: inherit;
}

.city-consent__btn--save,
.city-consent--details [data-consent-action="customize"] {
    display: none;
}

.city-consent--details .city-consent__btn--save {
    display: inline-block;
}

@media (max-width: 600px) {
    .city-consent {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
    }
}

/* Vidéo YouTube en attente de consentement (App\Objects\Consent\Consent::deferEmbeds) */
.city-embed {
    position: relative;
    width: 100%;
    max-width: 750px;
    aspect-ratio: 16 / 9;
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #111 linear-gradient(135deg, #1B1F2A, #0B0D12);
    color: #FFFFFF;
}

.city-embed__box {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    text-align: center;
    font-size: 13px;
}

.city-embed__title {
    margin: 0;
    font-weight: 700;
    font-size: 15px;
}

.city-embed__text {
    margin: 0;
    max-width: 460px;
    opacity: 0.85;
}

.city-embed__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.city-embed__actions button {
    font: inherit;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #FFFFFF;
}

.city-embed__actions .city-embed__load {
    border-color: transparent;
    background: #E62117;
    font-weight: 700;
}

.city-embed__link {
    color: #FFFFFF !important;
    font-size: 12px;
    opacity: 0.75;
    text-decoration: underline;
}

.city-embed__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Tableaux de la section « Cookies et traceurs » des CGU (website/cgu/cgu.php#cookies) */
.city-cookie-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.city-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.4;
}

.city-cookie-table th,
.city-cookie-table td {
    padding: 8px 10px;
    border: 1px solid var(--border-color, #C4CEE2);
    text-align: left;
    vertical-align: top;
}

.city-cookie-table th {
    font-weight: 700;
    background: var(--box-color-double, rgba(0, 0, 0, 0.05));
}

.city-cookie-table td:first-child {
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .city-cookie-table td:first-child {
        white-space: normal;
    }
}
