/* ===== Cookie Consent Banner - Style gibgib.ch ===== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-top: 2px solid #008B8B;
    box-shadow: 0 -8px 32px rgba(0, 139, 139, 0.15);
    z-index: 9999;
    animation: slideUpGibgib 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-bs-theme="dark"] .cookie-consent-banner {
    background: rgba(33, 37, 41, 0.98);
    border-top: 2px solid #20B2AA;
    box-shadow: 0 -8px 32px rgba(32, 178, 170, 0.2);
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
    position: relative;
}

.cookie-consent-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2.5rem;
}

.cookie-consent-text {
    min-width: 0; /* Permet la troncature */
}

.cookie-consent-title {
    color: #008B8B;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
}

[data-bs-theme="dark"] .cookie-consent-title {
    color: #20B2AA;
}

.cookie-consent-description {
    margin-bottom: 0;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
}

[data-bs-theme="dark"] .cookie-consent-description {
    color: #ADB5BD;
}

.cookie-consent-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.cookie-consent-buttons .btn {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: none;
    letter-spacing: 0.025em;
}

.cookie-consent-buttons .btn-primary {
    background: linear-gradient(135deg, #008B8B 0%, #20B2AA 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.cookie-consent-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #006666 0%, #008B8B 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 139, 139, 0.4);
}

.cookie-consent-buttons .btn-secondary {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    color: #495057;
}

.cookie-consent-buttons .btn-secondary:hover {
    background: #E9ECEF;
    border-color: #008B8B;
    color: #008B8B;
    transform: translateY(-1px);
}

.cookie-consent-buttons .btn-outline-secondary {
    border: 1px solid #CED4DA;
    color: #6C757D;
    background: transparent;
}

.cookie-consent-buttons .btn-outline-secondary:hover {
    background: #008B8B;
    border-color: #008B8B;
    color: white;
    transform: translateY(-1px);
}

.cookie-consent-links {
    text-align: right;
}

.cookie-consent-links a {
    color: #6C757D;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-consent-links a:hover {
    color: #008B8B;
    text-decoration: underline;
}

.cookie-consent-close {
    position: absolute;
    top: 1.25rem;
    left : 80rem;
    background: rgba(108, 117, 125, 0.1);
    border: none;
    color: #6C757D;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-consent-close:hover {
    background: rgba(0, 139, 139, 0.1);
    color: #008B8B;
    transform: rotate(90deg);
}

/* ===== Cookie Settings Float Button - Style gibgib.ch ===== */

.cookie-settings-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: bounceInGibgib 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-settings-float .btn {
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #008B8B 0%, #20B2AA 100%);
    border: 2px solid white;
    color: white;
    font-size: 0.7rem;
    box-shadow: 0 6px 20px rgba(0, 139, 139, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cookie-settings-float .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 139, 139, 0.4);
    background: linear-gradient(135deg, #006666 0%, #008B8B 100%);
}

[data-bs-theme="dark"] .cookie-settings-float .btn {
    border-color: #212529;
    box-shadow: 0 6px 20px rgba(32, 178, 170, 0.4);
}

/* ===== Cookie Categories - Style gibgib.ch ===== */

.cookie-category {
    padding: 1.5rem;
    border: 2px solid #F1F3F4;
    border-radius: 1rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.cookie-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #008B8B 0%, #20B2AA 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.cookie-category:hover {
    border-color: #008B8B;
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.15);
    transform: translateY(-2px);
}

.cookie-category:hover::before {
    transform: scaleY(1);
}

.cookie-category h6 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.cookie-category .form-check-input {
    width: 3rem;
    height: 1.5rem;
    border-radius: 1rem;
    border: 2px solid #DEE2E6;
    transition: all 0.3s ease;
}

.cookie-category .form-check-input:checked {
    background-color: #008B8B;
    border-color: #008B8B;

}

.cookie-category .form-check-input:checked:disabled {
    background-color: #51CF66;
    border-color: #51CF66;
}

.cookie-category .form-check-input:disabled {
    opacity: 0.8;
    background-color: #51CF66;
    border-color: #51CF66;
}

.cookie-category .form-check-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.cookie-category .small {
    color: #6C757D;
    line-height: 1.5;
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .cookie-category {
    background: linear-gradient(135deg, #343A40 0%, #495057 100%);
    border-color: #495057;
}

[data-bs-theme="dark"] .cookie-category:hover {
    border-color: #20B2AA;
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.2);
}

/* ===== Responsive Design - Mobile First ===== */

/* Tablettes et petits écrans */
@media (max-width: 992px) {
    .cookie-consent-container {
        padding: 1.5rem;
    }

    .cookie-consent-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .cookie-consent-actions {
        align-items: center;
    }

    .cookie-consent-links {
        text-align: center;
    }
}

/* Smartphones */
@media (max-width: 768px) {
    .cookie-consent-container {
        padding: 1.25rem;
    }

    .cookie-consent-title {
        font-size: 1.1rem;
    }

    .cookie-consent-description {
        font-size: 0.9rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .cookie-consent-buttons .btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .cookie-consent-close {
        top: 1rem;
        right: 1rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .cookie-settings-float {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .cookie-settings-float .btn {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }

    .cookie-category {
        padding: 1.25rem;
    }
}

/* Très petits écrans */
@media (max-width: 576px) {
    .cookie-consent-container {
        padding: 1rem;
    }

    .cookie-consent-title {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-consent-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .cookie-consent-buttons .btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        border-radius: 0.75rem;
    }

    .cookie-settings-float {
        bottom: 1rem;
        right: 1rem;
    }

    .cookie-settings-float .btn {
        width: 25px;
        height: 25px;
    }

    .cookie-category {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .cookie-category h6 {
        font-size: 1rem;
    }
}

/* Écrans très larges */
@media (min-width: 1400px) {
    .cookie-consent-container {
        padding: 2rem 2.5rem;
    }

    .cookie-consent-content {
        gap: 3rem;
    }

    .cookie-consent-title {
        font-size: 1.375rem;
    }

    .cookie-consent-description {
        font-size: 1rem;
    }
}

/* ===== Animations gibgib.ch ===== */

@keyframes slideUpGibgib {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    60% {
        transform: translateY(-8px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceInGibgib {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes pulseGibgib {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 139, 139, 0.3);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 139, 139, 0.5);
    }
}

/* ===== Dark Mode - Style gibgib.ch ===== */

[data-bs-theme="dark"] .cookie-consent-description {
    color: #CED4DA;
}

[data-bs-theme="dark"] .cookie-consent-buttons .btn-secondary {
    background: #495057;
    border-color: #6C757D;
    color: #F8F9FA;
}

[data-bs-theme="dark"] .cookie-consent-buttons .btn-secondary:hover {
    background: #6C757D;
    border-color: #20B2AA;
    color: #20B2AA;
}

[data-bs-theme="dark"] .cookie-consent-buttons .btn-outline-secondary {
    border-color: #6C757D;
    color: #ADB5BD;
}

[data-bs-theme="dark"] .cookie-consent-buttons .btn-outline-secondary:hover {
    background: #20B2AA;
    border-color: #20B2AA;
    color: #212529;
}

[data-bs-theme="dark"] .cookie-consent-links a {
    color: #ADB5BD;
}

[data-bs-theme="dark"] .cookie-consent-links a:hover {
    color: #20B2AA;
}

[data-bs-theme="dark"] .cookie-consent-close {
    background: rgba(173, 181, 189, 0.1);
    color: #ADB5BD;
}

[data-bs-theme="dark"] .cookie-consent-close:hover {
    background: rgba(32, 178, 170, 0.2);
    color: #20B2AA;
}

[data-bs-theme="dark"] .cookie-category .small {
    color: #ADB5BD;
}

/* ===== Accessibility - WCAG 2.1 AA ===== */

.cookie-consent-banner:focus-within {
    outline: 3px solid #008B8B;
    outline-offset: -3px;
}

.cookie-consent-close:focus,
.cookie-consent-buttons .btn:focus,
.cookie-settings-float .btn:focus {
    outline: 3px solid #008B8B;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 139, 139, 0.2);
}

.cookie-category .form-check-input:focus {
    outline: 3px solid #008B8B;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 139, 139, 0.2);
}

/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        animation: none;
    }

    .cookie-settings-float {
        animation: none;
    }

    .cookie-consent-buttons .btn,
    .cookie-category,
    .cookie-consent-close {
        transition: none;
    }
}

/* ===== Print Styles ===== */

@media print {
    .cookie-consent-banner,
    .cookie-settings-float {
        display: none !important;
    }
}

/* ===== High Contrast Mode ===== */

@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 3px solid #000000;
        background: #FFFFFF;
    }

    .cookie-consent-title {
        color: #000000;
    }

    .cookie-consent-description {
        color: #000000;
    }

    .cookie-consent-buttons .btn-primary {
        background: #000000;
        border-color: #000000;
    }
}
