/* Version: 31-05-2026-16-39 */
.welcome-to-windows {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, calc(100vw - 32px));
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    /* Fond page portfolio (opaque), pas de verre / transparent */
    color: var(--portfolios-theme-text-main, #222);
    background: var(--portfolios-theme-bg-main);
    border-radius: var(--portfolios-border-radius-m);
    border: 1px solid var(--portfolios-thumbnail-border-color, rgba(0,0,0,0.06));
    box-shadow: var(--portfolios-thumbnail-box-shadow, 0 6px 24px rgba(0,0,0,0.08));
    z-index: 720;
}

.welcome-to-windows::before {
  display: none;
}



#welcome-to-blur {
  position: fixed;
  inset: 0;
  display: block;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 700;
  transition: background 360ms ease, opacity 360ms ease;
}

#welcome-to article {
    padding: 0;
}

#welcome-to svg {
    width: 48px;
    margin-bottom: 18px;
    display: inline-block;
    vertical-align: middle;
}

.welcome-to-windows #welcome-to-text {
    max-height: 150px;
    overflow-y: auto;
}

#welcome-to h3, #welcome-to p {
    padding-bottom: 0px;
    margin-bottom: 16px;
}

/* Actions : boutons thème portfolio (.folio_button), pas arkt-promo */
#welcome-to #welcome-to-actions {
    margin-top: 8px;
}

.cookie-modal-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.cookie-modal-actions__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

#portfolio_page #welcome-to .cookie-modal-actions .folio_button,
#portfolio_page #welcome-to .cookie-modal-actions .folio-button {
    -webkit-appearance: none;
    appearance: none;
    color: var(--portfolios-button-text-color, #fff) !important;
    background: var(--portfolios-button-background-color, #222) !important;
    border-width: var(--portfolios-button-border-width, 0px);
    border-color: var(--portfolios-button-border-color, #222) !important;
    border-radius: var(--portfolios-button-radius, 0px);
    box-shadow: var(--portfolios-button-box-shadow, none);
    text-decoration: none !important;
    list-style: none;
    border-style: solid;
    text-align: center;
    font-family: var(--portfolios-button-font-family, inherit);
    font-size: var(--portfolios-button-font-size, 1rem);
    font-weight: var(--portfolios-button-font-weight, 500);
    letter-spacing: var(--portfolios-button-letter-spacing, normal);
    text-transform: none;
    transition: box-shadow 0.2s, border 0.2s, background 0.2s, color 0.2s, filter 0.18s, transform 0.18s;
}

#portfolio_page #welcome-to .cookie-modal-actions .folio_button:hover,
#portfolio_page #welcome-to .cookie-modal-actions .folio-button:hover {
    color: var(--portfolios-button-hover-text-color, var(--portfolios-button-text-color, #fff)) !important;
    background: var(--portfolios-button-hover-background, var(--portfolios-button-background-color, #222)) !important;
    box-shadow: var(--portfolios-button-hover-box-shadow, var(--portfolios-button-box-shadow, none));
    transform: var(--portfolios-button-hover-transform, none);
    filter: var(--portfolios-button-hover-filter, brightness(100%)) !important;
}

#portfolio_page #welcome-to .cookie-modal-actions .folio_button:active,
#portfolio_page #welcome-to .cookie-modal-actions .folio-button:active {
    color: var(--portfolios-button-click-text-color, var(--portfolios-button-hover-text-color, #fff)) !important;
    background: var(--portfolios-button-click-background, var(--portfolios-button-hover-background, #333)) !important;
    box-shadow: var(--portfolios-button-click-effect, none);
    transform: var(--portfolios-button-click-transform, scale(0.95));
}

/* Secondaire : contour / fond discret, même famille de variables */
#portfolio_page #welcome-to .cookie-modal-actions__secondary.folio_button,
#portfolio_page #welcome-to .cookie-modal-actions__secondary.folio-button {
    color: var(--portfolios-theme-text-main, #222) !important;
    background: transparent !important;
    border-width: var(--portfolios-button-border-width, 1px);
    border-style: var(--portfolios-button-border-type, solid);
    border-color: var(--portfolios-button-border-color, var(--portfolios-theme-border, rgba(0, 0, 0, 0.2))) !important;
    box-shadow: none !important;
}

#portfolio_page #welcome-to .cookie-modal-actions__secondary.folio_button:hover,
#portfolio_page #welcome-to .cookie-modal-actions__secondary.folio-button:hover {
    color: var(--portfolios-button-text-color, #fff) !important;
    background: var(--portfolios-button-background-color, #222) !important;
    border-color: var(--portfolios-button-border-color, #222) !important;
    filter: var(--portfolios-button-hover-filter, brightness(100%)) !important;
}

#welcome-to #welcome-to-actions #refusewelcome {
    cursor: pointer;
    margin-top: 0;
}

@media screen and (max-width: 520px) {
    .cookie-modal-actions__row {
        flex-direction: column;
        align-items: stretch;
    }

    #portfolio_page #welcome-to .cookie-modal-actions .folio_button,
    #portfolio_page #welcome-to .cookie-modal-actions .folio-button {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

#welcome-to article ul li::before {
    display: none;
}

#welcome-to article span {
    display: inline-block;
}

/* Préférences cookies — interrupteurs (tokens portfolio : bouton, surfaces, bordures) */
.cookie-preferences-form {
    --cookie-toggle-w: 56px;
    --cookie-toggle-h: 32px;
    --cookie-toggle-thumb: 26px;
    --cookie-toggle-pad: 3px;
    --cookie-toggle-travel: calc(var(--cookie-toggle-w) - var(--cookie-toggle-thumb) - (2 * var(--cookie-toggle-pad)));
    --cookie-toggle-radius: calc(var(--cookie-toggle-h) / 2);
    --cookie-toggle-track-off: linear-gradient(
        180deg,
        color-mix(in srgb, var(--portfolios-theme-bg-main, #f8f8f8) 88%, var(--portfolios-theme-text-main, #555) 6%) 0%,
        color-mix(in srgb, var(--portfolios-theme-text-main, #666) 12%, var(--portfolios-theme-bg-alt, #ececec) 100%) 100%
    );
    --cookie-toggle-track-on: linear-gradient(
        180deg,
        color-mix(in srgb, var(--portfolios-button-background-color, #222) 90%, #ffffff) 0%,
        var(--portfolios-button-background-color, var(--portfolios-heading-secondary-color, #222)) 100%
    );
    --cookie-toggle-focus-ring: color-mix(in srgb, var(--portfolios-button-background-color, #666) 35%, transparent);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.cookie-preferences-form .cookie-action label.toggle-switch,
.cookie-preferences-form .cookie-action label.toggle-switch.selected-label {
    border: none !important;
}

.cookie-preferences-form .cookie-action input[type="checkbox"] + label.toggle-switch:hover {
    border-color: color-mix(in srgb, var(--portfolios-thumbnail-border-color, rgba(0, 0, 0, 0.12)) 80%, var(--portfolios-theme-text-main, #666) 12%) !important;
    background: var(--cookie-toggle-track-off) !important;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
}

.cookie-preferences-form .cookie-action input[type="checkbox"]:checked + label.toggle-switch {
    border: none !important;
    background: var(--cookie-toggle-track-on) !important;
    border-color: color-mix(in srgb, var(--portfolios-button-background-color, #222) 25%, transparent) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 2px 10px color-mix(in srgb, var(--portfolios-button-background-color, #222) 42%, transparent),
        0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.cookie-preferences-form .cookie-action input[type="checkbox"]:checked + label.toggle-switch:hover {
    border-color: color-mix(in srgb, var(--portfolios-button-background-color, #222) 35%, transparent) !important;
    background: var(--cookie-toggle-track-on) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 3px 14px color-mix(in srgb, var(--portfolios-button-background-color, #222) 48%, transparent),
        0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.cookie-preferences-form .cookie-action input[type="checkbox"]:disabled + label.toggle-switch:hover {
    opacity: 0.55 !important;
    background: var(--portfolios-theme-bg-alt, #e8e8e8) !important;
    border-color: var(--portfolios-thumbnail-border-color, #ccc) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transform: none !important;
}

.cookie-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.cookie-info {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}

.cookie-info h2 {
    color: var(--portfolios-theme-fill, #0f0f0f);
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.cookie-info p {
    color: var(--portfolios-theme-text-main, #555);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.45;
    opacity: 0.95;
}

.cookie-action {
    flex-shrink: 0;
    position: relative;
    width: var(--cookie-toggle-w);
    height: var(--cookie-toggle-h);
    align-self: flex-start;
    margin-top: 2px;
}

.cookie-action input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: none;
}

.cookie-action input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.cookie-action input[type="checkbox"]:focus {
    outline: none;
}

.cookie-action input[type="checkbox"]:focus-visible + .toggle-switch {
    outline: none;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 0 0 3px var(--cookie-toggle-focus-ring);
}

.cookie-action input:checked:focus-visible + .toggle-switch {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 2px 10px color-mix(in srgb, var(--portfolios-button-background-color, #222) 42%, transparent),
        0 0 0 3px var(--cookie-toggle-focus-ring);
}

.cookie-action .toggle-switch {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: var(--cookie-toggle-w);
    height: var(--cookie-toggle-h);
    pointer-events: none;
    background: var(--cookie-toggle-track-off);
    border-radius: var(--cookie-toggle-radius);
    border: 1px solid color-mix(in srgb, var(--portfolios-thumbnail-border-color, rgba(0, 0, 0, 0.12)) 90%, var(--portfolios-theme-text-main, #666) 8%);
    box-sizing: border-box;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.06);
    transition:
        background 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        opacity 0.24s ease;
}

.cookie-action .toggle-switch::after {
    content: "";
    position: absolute;
    top: var(--cookie-toggle-pad);
    left: var(--cookie-toggle-pad);
    width: var(--cookie-toggle-thumb);
    height: var(--cookie-toggle-thumb);
    border-radius: var(--portfolios-border-radius-full, 50%);
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--portfolios-theme-bg-alt, #f0f0f0) 40%, #ffffff) 100%);
    border: 1px solid color-mix(in srgb, var(--portfolios-thumbnail-border-color, rgba(0, 0, 0, 0.12)) 70%, rgba(0, 0, 0, 0.08));
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.24s ease;
}

.cookie-action input:checked + .toggle-switch {
    background: var(--cookie-toggle-track-on) !important;
    border-color: color-mix(in srgb, var(--portfolios-button-background-color, #222) 25%, transparent) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 2px 10px color-mix(in srgb, var(--portfolios-button-background-color, #222) 42%, transparent),
        0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.cookie-action input:checked + .toggle-switch::after {
    transform: translateX(var(--cookie-toggle-travel));
    border-color: color-mix(in srgb, #ffffff 40%, var(--portfolios-theme-text-main, #666) 60%);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.45) inset;
}

.cookie-action input:disabled + .toggle-switch {
    opacity: 0.58;
    cursor: not-allowed;
    background: color-mix(in srgb, var(--portfolios-theme-bg-alt, #e8e8e8) 92%, var(--portfolios-theme-text-main, #999) 8%) !important;
    border-color: var(--portfolios-thumbnail-border-color, #ccc) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.cookie-action input:disabled + .toggle-switch::after {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cookie-action input:disabled:checked + .toggle-switch {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--portfolios-theme-text-main, #999) 70%, #ffffff) 0%,
        var(--portfolios-theme-text-main, #888) 100%
    ) !important;
    border-color: var(--portfolios-thumbnail-border-color, #bbb) !important;
    opacity: 0.88;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

@media screen and (max-width: 600px) {

    .cookie-preferences-form {
        --cookie-toggle-w: 52px;
        --cookie-toggle-h: 30px;
        --cookie-toggle-thumb: 24px;
        --cookie-toggle-pad: 3px;
    }

    .cookie-group {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .cookie-info h2 {
        font-size: 1rem;
    }

    .cookie-info p {
        font-size: 0.875rem;
    }

    .cookie-action {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cookie-action .toggle-switch,
    .cookie-action .toggle-switch::after {
        transition: none;
    }
}

/* Aperçu éditeur (portfolio-editor) : même pile que le hub */
.portfolio-editor .cookie-action input[type="checkbox"] {
    z-index: 2;
}

.portfolio-editor .cookie-action .toggle-switch {
    z-index: 1;
}
