/**
 * Bannière Cookies RGPD
 * QuantisDigitale
 */

/* BANNIÈRE PRINCIPALE */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0B0F0E 0%, #0E1412 100%);
    border-top: 2px solid #3BFF7A;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    transition: opacity 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 30px;
}

.cookie-consent-content h3 {
    color: #3BFF7A;
    font-size: 22px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-consent-content h3 i {
    font-size: 24px;
}

.cookie-consent-content p {
    color: #F1F5F4;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.cookie-consent-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-consent-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-buttons .btn-primary {
    background: #3BFF7A;
    color: #0B0F0E;
}

.cookie-consent-buttons .btn-primary:hover {
    background: #32e06a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 255, 122, 0.3);
}

.cookie-consent-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #F1F5F4;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #3BFF7A;
}

.cookie-consent-buttons .btn-tertiary {
    background: transparent;
    color: rgba(241, 245, 244, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-consent-buttons .btn-tertiary:hover {
    color: #F1F5F4;
    border-color: rgba(255, 255, 255, 0.3);
}

/* MODAL PRÉFÉRENCES */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal-content {
    background: linear-gradient(135deg, #0B0F0E 0%, #0E1412 100%);
    border: 2px solid #3BFF7A;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #F1F5F4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.cookie-modal-close:hover {
    background: rgba(255, 77, 109, 0.2);
    border-color: #FF4D6D;
    color: #FF4D6D;
    transform: rotate(90deg);
}

.cookie-modal-content h3 {
    color: #3BFF7A;
    font-size: 24px;
    margin: 0 0 30px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-modal-content h3 i {
    font-size: 26px;
}

/* CATÉGORIES COOKIES */

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 255, 122, 0.3);
}

.cookie-category-header {
    margin-bottom: 12px;
}

.cookie-category-header label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #F1F5F4;
    font-size: 16px;
}

.cookie-category-header label:has(input:disabled) {
    cursor: default;
}

.cookie-category-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3BFF7A;
}

.cookie-category-header input[type="checkbox"]:disabled {
    cursor: default;
    opacity: 0.6;
}

.cookie-category-header i {
    font-size: 20px;
    color: #3BFF7A;
}

.cookie-category-desc {
    color: rgba(241, 245, 244, 0.7);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding-left: 44px;
}

/* BOUTONS MODAL */

.cookie-modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cookie-modal-buttons button {
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.cookie-modal-buttons .btn-primary {
    background: #3BFF7A;
    color: #0B0F0E;
}

.cookie-modal-buttons .btn-primary:hover {
    background: #32e06a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 255, 122, 0.3);
}

.cookie-modal-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #F1F5F4;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-modal-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #3BFF7A;
}

/* LIEN POLITIQUE */

.cookie-policy-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3BFF7A;
    text-decoration: none;
    font-size: 14px;
    margin-top: 25px;
    transition: all 0.3s ease;
    padding: 10px 0;
}

.cookie-policy-link:hover {
    color: #32e06a;
    gap: 12px;
}

.cookie-policy-link i {
    font-size: 16px;
}

/* SCROLLBAR MODAL */

.cookie-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.cookie-modal-content::-webkit-scrollbar-thumb {
    background: #3BFF7A;
    border-radius: 10px;
}

.cookie-modal-content::-webkit-scrollbar-thumb:hover {
    background: #32e06a;
}

/* ========================================
   BOUTON PERMANENT COOKIES (BAS GAUCHE)
   ======================================== */

#cookie-settings-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9998;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3BFF7A 0%, #32e06a 100%);
    border: 3px solid rgba(59, 255, 122, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 255, 122, 0.4);
    transition: all 0.3s ease;
    animation: pulse-cookie 2s infinite;
}

#cookie-settings-button:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 30px rgba(59, 255, 122, 0.6);
    background: linear-gradient(135deg, #32e06a 0%, #3BFF7A 100%);
}

#cookie-settings-button i {
    font-size: 28px;
    color: #0B0F0E;
    animation: rotate-cookie 4s linear infinite;
}

#cookie-settings-button:hover i {
    animation-play-state: paused;
}

/* Animation pulse */
@keyframes pulse-cookie {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(59, 255, 122, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(59, 255, 122, 0.6), 
                    0 0 0 10px rgba(59, 255, 122, 0.1);
    }
}

/* Animation rotation douce */
@keyframes rotate-cookie {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(-10deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Tooltip au survol */
#cookie-settings-button::before {
    content: 'Gérer les cookies';
    position: absolute;
    left: 75px;
    background: #0B0F0E;
    color: #3BFF7A;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 255, 122, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#cookie-settings-button::after {
    content: '';
    position: absolute;
    left: 65px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #0B0F0E;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

#cookie-settings-button:hover::before,
#cookie-settings-button:hover::after {
    opacity: 1;
}

/* Masquer le bouton si bannière visible */
#cookie-consent-banner ~ #cookie-settings-button {
    display: none;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    #cookie-settings-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }

    #cookie-settings-button i {
        font-size: 24px;
    }

    #cookie-settings-button::before {
        left: 65px;
        font-size: 12px;
        padding: 8px 12px;
    }

    #cookie-settings-button::after {
        left: 55px;
    }
}

@media (max-width: 480px) {
    #cookie-settings-button {
        width: 45px;
        height: 45px;
        bottom: 15px;
        left: 15px;
    }

    #cookie-settings-button i {
        font-size: 20px;
    }

    /* Masquer le tooltip sur très petits écrans */
    #cookie-settings-button::before,
    #cookie-settings-button::after {
        display: none;
    }
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .cookie-consent-container {
        padding: 20px;
    }

    .cookie-consent-content h3 {
        font-size: 18px;
    }

    .cookie-consent-content p {
        font-size: 14px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-consent-buttons button {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-content {
        padding: 30px 20px;
        max-height: 85vh;
    }

    .cookie-modal-content h3 {
        font-size: 20px;
    }

    .cookie-modal-buttons {
        flex-direction: column;
    }

    .cookie-modal-buttons button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-consent-container {
        padding: 15px;
    }

    .cookie-consent-content h3 {
        font-size: 16px;
    }

    .cookie-consent-content p {
        font-size: 13px;
    }

    .cookie-modal-content {
        padding: 25px 15px;
    }

    .cookie-category {
        padding: 15px;
    }
}