/* Ochanta GDPR Consent Manager - Frontend Styles */

/* Bannière principale */
.ochanta-gdpr-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    animation: slideIn 0.3s ease-out;
}

.ochanta-gdpr-position-bottom {
    bottom: 0;
}

.ochanta-gdpr-position-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ochanta-gdpr-layout-bar .ochanta-gdpr-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ochanta-gdpr-layout-box {
    max-width: 400px;
    right: 20px;
    left: auto;
    border-radius: 8px;
}

.ochanta-gdpr-layout-box.ochanta-gdpr-position-bottom {
    bottom: 20px;
}

.ochanta-gdpr-layout-box.ochanta-gdpr-position-top {
    top: 20px;
}

.ochanta-gdpr-layout-box .ochanta-gdpr-container {
    flex-direction: column;
    gap: 15px;
}

.ochanta-gdpr-icon {
    flex-shrink: 0;
}

.ochanta-gdpr-icon svg {
    display: block;
}

.ochanta-gdpr-content {
    flex: 1;
}

.ochanta-gdpr-text {
    margin-bottom: 15px;
    line-height: 1.6;
}

.ochanta-gdpr-privacy-link {
    text-decoration: underline;
    margin-left: 5px;
}

.ochanta-gdpr-privacy-link:hover {
    opacity: 0.8;
}

.ochanta-gdpr-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ochanta-gdpr-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ochanta-gdpr-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ochanta-gdpr-btn:active {
    transform: translateY(0);
}

.ochanta-gdpr-btn-secondary {
    background: transparent;
    border: 2px solid currentColor;
}

/* Modal de personnalisation */
.ochanta-gdpr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.ochanta-gdpr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.ochanta-gdpr-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ochanta-gdpr-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ochanta-gdpr-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.ochanta-gdpr-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.ochanta-gdpr-modal-close:hover {
    background: #f0f0f0;
}

.ochanta-gdpr-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.ochanta-gdpr-cookie-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ochanta-gdpr-cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ochanta-gdpr-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.ochanta-gdpr-category-info {
    flex: 1;
}

.ochanta-gdpr-category-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.ochanta-gdpr-category-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

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

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

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

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

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

.ochanta-gdpr-switch-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ochanta-gdpr-switch-disabled .ochanta-gdpr-slider {
    cursor: not-allowed;
    background-color: #4CAF50;
}

/* Footer du modal */
.ochanta-gdpr-modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Bouton de révocation */
.ochanta-gdpr-revoke-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.ochanta-gdpr-revoke-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ochanta-gdpr-revoke-btn svg {
    flex-shrink: 0;
}

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

.ochanta-gdpr-position-top.ochanta-gdpr-banner {
    animation-name: slideInTop;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ochanta-gdpr-banner {
        padding: 15px;
    }
    
    .ochanta-gdpr-layout-bar .ochanta-gdpr-container {
        flex-direction: column;
        text-align: center;
    }
    
    .ochanta-gdpr-layout-box {
        max-width: 100%;
        right: 0;
        left: 0;
        bottom: 0 !important;
        top: auto !important;
        border-radius: 0;
    }
    
    .ochanta-gdpr-buttons {
        flex-direction: column;
    }
    
    .ochanta-gdpr-btn {
        width: 100%;
    }
    
    .ochanta-gdpr-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .ochanta-gdpr-category-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .ochanta-gdpr-revoke-btn {
        bottom: 10px;
        left: 10px;
        font-size: 12px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .ochanta-gdpr-modal-header h2 {
        font-size: 18px;
    }
    
    .ochanta-gdpr-modal-footer {
        flex-direction: column-reverse;
    }
    
    .ochanta-gdpr-modal-footer .ochanta-gdpr-btn {
        width: 100%;
    }
}
