/* Kastor Africa — consentement et pages de transparence */
:root {
    --kc-red: #b5141b;
    --kc-red-dark: #8f0e14;
    --kc-ink: #171717;
    --kc-muted: #626262;
    --kc-line: #dedede;
    --kc-surface: #ffffff;
    --kc-soft: #f6f3f2;
}

.kc-banner,
.kc-modal,
.kc-banner *,
.kc-modal * {
    box-sizing: border-box;
}

.kc-banner[hidden],
.kc-modal[hidden] {
    display: none !important;
}

.kc-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100000;
    padding: 0;
    color: var(--kc-ink);
    font-family: inherit;
    pointer-events: none;
}

/* Bandeau volontairement très discret : une vraie barre de pied de page,
   sans grande carte flottante qui masque le contenu. */
.kc-banner__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 7px clamp(12px, 2vw, 28px) max(7px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid rgba(23, 23, 23, .11);
    border-radius: 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.kc-banner__copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
    max-width: none;
    min-width: 0;
}

.kc-banner__copy h2,
.kc-modal__header h2 {
    margin: 0;
    color: var(--kc-ink);
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.2;
}

.kc-banner__copy h2 {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kc-banner__copy p,
.kc-modal__intro,
.kc-category p,
.kc-modal__footnote {
    margin: 8px 0 0;
    color: var(--kc-muted);
    font-size: 14px;
    line-height: 1.6;
}

.kc-banner__copy p {
    min-width: 0;
    margin: 0;
    font-size: 11.5px;
    line-height: 1.35;
}

.kc-banner a,
.kc-modal a,
.kp-legal a,
.kastor-form-privacy a {
    color: var(--kc-red-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kc-banner__actions,
.kc-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.kc-banner__actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.kc-button,
.kastor-external-media__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid var(--kc-red);
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.kc-banner .kc-button {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 750;
    white-space: nowrap;
}

.kc-button:hover,
.kastor-external-media__actions button:hover {
    transform: translateY(-1px);
}

.kc-button:focus-visible,
.kc-close:focus-visible,
.kc-switch input:focus-visible + .kc-switch__track,
.kastor-external-media__actions button:focus-visible,
[data-kastor-consent-open]:focus-visible {
    outline: 3px solid rgba(181, 20, 27, .28);
    outline-offset: 3px;
}

.kc-button--decision,
.kc-button--save,
.kastor-external-media__actions [data-kastor-enable-media] {
    background: var(--kc-red);
    color: #fff;
}

.kc-button--decision:hover,
.kc-button--save:hover,
.kastor-external-media__actions [data-kastor-enable-media]:hover {
    border-color: var(--kc-red-dark);
    background: var(--kc-red-dark);
    color: #fff;
}

.kc-button--secondary,
.kastor-external-media__actions [data-kastor-consent-open] {
    background: #fff;
    color: var(--kc-ink);
}

.kc-button--secondary:hover,
.kastor-external-media__actions [data-kastor-consent-open]:hover {
    background: var(--kc-soft);
    color: var(--kc-ink);
}

.kc-modal {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(10, 10, 10, .66);
    color: var(--kc-ink);
}

.kc-modal__dialog {
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    border-radius: 20px;
    background: var(--kc-surface);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .35);
}

.kc-modal__header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--kc-line);
    background: #fff;
}

.kc-close {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--kc-line);
    border-radius: 50%;
    background: #fff;
    color: var(--kc-ink);
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.kc-modal__body {
    padding: 22px 26px 4px;
}

.kc-modal__intro {
    margin-top: 0;
}

.kc-modal__notice {
    margin: 16px 0 0;
    padding: 11px 13px;
    border: 1px solid rgba(181, 20, 27, .22);
    border-radius: 10px;
    background: rgba(181, 20, 27, .07);
    color: var(--kc-red-dark);
    font-size: 13px;
    line-height: 1.5;
}

.kc-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--kc-line);
    border-radius: 14px;
    background: #fff;
}

.kc-category h3 {
    margin: 0;
    color: var(--kc-ink);
    font-size: 16px;
    line-height: 1.35;
}

.kc-category__status {
    display: inline-block;
    margin-left: 7px;
    color: #34713f;
    font-size: 12px;
    font-weight: 700;
}

.kc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 50px;
    cursor: pointer;
}

.kc-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.kc-switch__track {
    position: relative;
    display: block;
    width: 50px;
    height: 28px;
    border-radius: 999px;
    background: #a8a8a8;
    transition: background-color .2s ease;
}

.kc-switch__track::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
    transition: transform .2s ease;
}

.kc-switch input:checked + .kc-switch__track {
    background: var(--kc-red);
}

.kc-switch input:checked + .kc-switch__track::after {
    transform: translateX(22px);
}

.kc-switch input:disabled + .kc-switch__track {
    background: #34713f;
    cursor: not-allowed;
    opacity: .75;
}

.kc-modal__footnote {
    padding: 18px 26px 0;
}

.kc-modal__actions {
    position: sticky;
    bottom: 0;
    padding: 20px 26px 24px;
    border-top: 1px solid var(--kc-line);
    background: #fff;
}

body.kc-modal-open {
    overflow: hidden;
}

.kastor-external-media {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 340px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 78% 16%, rgba(181, 20, 27, .30), transparent 34%),
        linear-gradient(145deg, #262626, #111);
    color: #fff;
}

.maison-video-wrapper > .kastor-external-media {
    position: absolute;
    inset: 0;
    min-height: 0;
    border-radius: inherit;
}

.kastor-external-media iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 0;
}

.maison-video-wrapper > .kastor-external-media iframe {
    min-height: 0;
}

.kastor-external-media__placeholder {
    max-width: 620px;
    padding: 34px 28px;
    text-align: center;
}

.kastor-external-media__placeholder strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: clamp(19px, 2.2vw, 25px);
}

.kastor-external-media__placeholder p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    line-height: 1.6;
}

.kastor-external-media__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.kastor-form-privacy {
    max-width: 660px;
    margin: 14px 0 0;
    color: #666;
    font-size: 12px;
    line-height: 1.55;
}

.kp-legal {
    padding: 72px 0 88px;
    color: #2c2c2c;
}

.kp-legal__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 58px;
    align-items: start;
}

.kp-legal__content {
    min-width: 0;
}

.kp-legal__lead {
    margin: 0 0 36px;
    padding: 22px 24px;
    border-left: 4px solid var(--kc-red);
    border-radius: 0 14px 14px 0;
    background: var(--kc-soft);
    color: #444;
    font-size: 16px;
    line-height: 1.72;
}

.kp-legal__section {
    scroll-margin-top: 110px;
    margin-top: 42px;
}

.kp-legal__section:first-of-type {
    margin-top: 0;
}

.kp-legal h2 {
    margin: 0 0 15px;
    color: var(--kc-ink);
    font-size: clamp(1.35rem, 1.8vw, 1.75rem);
    line-height: 1.25;
}

.kp-legal h3 {
    margin: 25px 0 9px;
    color: var(--kc-ink);
    font-size: 18px;
}

.kp-legal p,
.kp-legal li,
.kp-legal address {
    color: #555;
    font-size: 15px;
    line-height: 1.76;
}

.kp-legal code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #f1eeee;
    color: #651015;
    font-size: .9em;
}

.kp-legal p {
    margin: 0 0 14px;
}

.kp-legal ul {
    margin: 12px 0 18px;
    padding-left: 22px;
}

.kp-legal li + li {
    margin-top: 8px;
}

.kp-legal address {
    margin: 0;
    font-style: normal;
}

.kp-legal__aside {
    position: sticky;
    top: 105px;
    padding: 22px;
    border: 1px solid var(--kc-line);
    border-radius: 16px;
    background: #fff;
}

.kp-legal__aside strong {
    display: block;
    margin-bottom: 12px;
    color: var(--kc-ink);
    font-size: 14px;
}

.kp-legal__aside a,
.kp-legal__aside button {
    display: block;
    width: 100%;
    padding: 8px 0;
    border: 0;
    background: none;
    color: #555;
    font: inherit;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.kp-legal__aside a:hover,
.kp-legal__aside button:hover {
    color: var(--kc-red-dark);
}

.kp-legal__updated {
    margin-top: 12px;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
}

@media (max-width: 991.98px) {
    .kc-banner__panel {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .kc-banner__copy h2 {
        display: none;
    }

    .kc-banner__actions {
        justify-content: flex-end;
    }

    .kp-legal__layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .kp-legal__aside {
        position: static;
        order: -1;
    }
}

@media (max-width: 640px) {
    .kc-banner {
        padding: 0;
    }

    .kc-banner__panel {
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
        padding: 6px 8px max(6px, env(safe-area-inset-bottom));
        border-radius: 0;
        gap: 5px;
    }

    .kc-banner__copy {
        display: block;
        text-align: center;
    }

    .kc-banner__copy h2 {
        display: none;
    }

    .kc-banner__copy p {
        margin: 0;
        font-size: 10.5px;
        line-height: 1.25;
    }

    .kc-banner__actions,
    .kc-modal__actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 5px;
        margin-top: 0;
    }

    .kc-banner .kc-button {
        width: 100%;
        min-width: 0;
        min-height: 29px;
        padding: 0 4px;
        border-radius: 6px;
        font-size: 9.5px;
        white-space: nowrap;
    }

    .kc-modal__actions {
        grid-template-columns: 1fr;
    }

    .kc-modal__actions .kc-button {
        width: 100%;
    }

    .kc-modal {
        padding: 8px;
    }

    .kc-modal__dialog {
        max-height: calc(100vh - 16px);
        border-radius: 15px;
    }

    .kc-modal__header,
    .kc-modal__body,
    .kc-modal__actions {
        padding-right: 18px;
        padding-left: 18px;
    }

    .kc-category {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 15px;
    }

    .kastor-external-media,
    .kastor-external-media iframe {
        min-height: 270px;
    }

    .maison-video-wrapper > .kastor-external-media,
    .maison-video-wrapper > .kastor-external-media iframe {
        min-height: 0;
    }

    .kastor-external-media__placeholder {
        padding: 22px 16px;
    }

    .kastor-external-media__actions {
        display: grid;
    }

    .kp-legal {
        padding: 50px 0 62px;
    }

    .kp-legal__lead {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kc-button,
    .kc-switch__track,
    .kc-switch__track::after,
    .kastor-external-media__actions button {
        transition: none;
    }
}
