/**
 * KozaPartaz Cookies - Styles CSS
 * Version: 1.0.0
 */

/* ============================================
   BANNIÈRE DE COOKIES
   ============================================ */

.kozapartaz-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    padding: 25px 20px;
    animation: slideIn 0.5s ease;
}

.kozapartaz-cookie-bottom {
    bottom: 0;
}

.kozapartaz-cookie-top {
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
}

.cookie-icon {
    font-size: 48px;
    flex-shrink: 0;
    animation: rotate 2s infinite ease-in-out;
}

@keyframes rotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.cookie-message {
    flex: 1;
}

.cookie-message h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #2b2d42;
    font-weight: 700;
    font-family: 'Poppins', -apple-system, sans-serif;
}

.cookie-message p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.cookie-privacy-link {
    color: #00a86b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.cookie-privacy-link:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    font-family: 'Poppins', -apple-system, sans-serif;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #00a86b 0%, #00c97a 100%);
    color: white;
    border-color: #00a86b;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #008c5a 0%, #00a86b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

.cookie-btn-customize {
    background: white;
    color: #00a86b;
    border-color: #00a86b;
}

.cookie-btn-customize:hover {
    background: #f0f9f5;
    transform: translateY(-2px);
}

.cookie-btn-refuse {
    background: white;
    color: #6c757d;
    border-color: #dee2e6;
}

.cookie-btn-refuse:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.cookie-btn-outline {
    background: transparent;
    color: #00a86b;
    border-color: #00a86b;
}

.cookie-btn-outline:hover {
    background: #f0f9f5;
}

/* ============================================
   MODAL DE PERSONNALISATION
   ============================================ */

.kozapartaz-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000000;
    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: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f9f5;
    background: linear-gradient(135deg, #f0f9f5 0%, #ffffff 100%);
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2b2d42;
    font-weight: 700;
    font-family: 'Poppins', -apple-system, sans-serif;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #6c757d;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.cookie-modal-close:hover {
    background: #f8f9fa;
    color: #2b2d42;
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-intro {
    font-size: 14px;
    color: #495057;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #00a86b;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cookie-category-title h3 {
    margin: 0;
    font-size: 16px;
    color: #2b2d42;
    font-weight: 600;
}

.cookie-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cookie-badge-required {
    background: #00a86b;
    color: white;
}

.cookie-category-desc {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
}

/* Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #00a86b;
}

input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================
   BOUTON FLOTTANT PARAMÈTRES
   ============================================ */

.kozapartaz-cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid #00a86b;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 168, 107, 0.3);
    transition: all 0.3s;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kozapartaz-cookie-settings-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .kozapartaz-cookie-banner {
        padding: 20px 15px;
    }
    
    .cookie-icon {
        font-size: 36px;
    }
    
    .cookie-message h3 {
        font-size: 18px;
    }
    
    .cookie-message p {
        font-size: 13px;
    }
    
    .cookie-modal-header {
        padding: 20px;
    }
    
    .cookie-modal-header h2 {
        font-size: 20px;
    }
    
    .cookie-modal-body {
        padding: 20px;
    }
    
    .cookie-category {
        padding: 15px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
    
    .kozapartaz-cookie-settings-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .cookie-banner-content {
        gap: 15px;
    }
    
    .cookie-actions {
        gap: 8px;
    }
    
    .cookie-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

.cookie-btn:focus,
.cookie-modal-close:focus,
.kozapartaz-cookie-settings-btn:focus {
    outline: 3px solid #00a86b;
    outline-offset: 2px;
}

.cookie-switch input:focus + .cookie-slider {
    box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.2);
}
