/*
 * SCCT Cookie Notice - styles de base
 * Les couleurs sont injectées dynamiquement en inline depuis PHP.
 */

#scct-cookie-notice {
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
    animation: scctSlideIn 0.4s ease-out;
}

#scct-cookie-notice[hidden] {
    display: none !important;
}

#scct-cookie-notice * {
    box-sizing: border-box;
}

#scct-cookie-notice .scct-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

#scct-cookie-notice .scct-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px 0;
    width: 100%;
    color: inherit;
}

#scct-cookie-notice .scct-message {
    flex: 1 1 320px;
    margin: 0;
}

#scct-cookie-notice .scct-message p {
    margin: 0 0 8px 0;
    color: inherit;
}

#scct-cookie-notice .scct-message p:last-child {
    margin-bottom: 0;
}

#scct-cookie-notice .scct-privacy a {
    text-decoration: underline;
    opacity: 0.9;
}

#scct-cookie-notice .scct-privacy a:hover {
    opacity: 1;
}

#scct-cookie-notice .scct-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 0 0 auto;
}

#scct-cookie-notice .scct-btn {
    appearance: none;
    border: 0;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    line-height: 1.2;
    min-width: 120px;
}

#scct-cookie-notice .scct-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#scct-cookie-notice .scct-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

#scct-cookie-notice .scct-btn:active {
    transform: translateY(0);
}

/* Position : bandeau bas */
#scct-cookie-notice.scct-position-bottom {
    left: 0;
    right: 0;
    bottom: 0;
}

/* Position : bandeau haut */
#scct-cookie-notice.scct-position-top {
    left: 0;
    right: 0;
    top: 0;
    animation: scctSlideInTop 0.4s ease-out;
}

/* Position : modale centrée */
#scct-cookie-notice.scct-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 520px;
    width: calc(100% - 32px);
    border-radius: 12px;
    animation: scctFadeIn 0.3s ease-out;
}

#scct-cookie-notice.scct-position-center .scct-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 28px;
    gap: 18px;
}

#scct-cookie-notice.scct-position-center .scct-actions {
    justify-content: flex-end;
}

/* Backdrop pour la modale centrée */
#scct-cookie-notice.scct-position-center::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Responsive */
@media (max-width: 640px) {
    #scct-cookie-notice .scct-inner {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    #scct-cookie-notice .scct-actions {
        width: 100%;
        flex-direction: column-reverse;
    }

    #scct-cookie-notice .scct-btn {
        width: 100%;
    }

    #scct-cookie-notice.scct-position-center {
        transform: translate(-50%, -50%);
        max-height: 90vh;
        overflow-y: auto;
    }
}

@keyframes scctSlideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scctSlideInTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scctFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    #scct-cookie-notice,
    #scct-cookie-notice .scct-btn {
        animation: none !important;
        transition: none !important;
    }
}
