/**
 * DG Cookie Consent - Styles
 * Design moderne et responsive
 */

/* Variables CSS */
:root {
    --dgcc-primary: #007bff;
    --dgcc-primary-hover: #0056b3;
    --dgcc-text: #333333;
    --dgcc-bg-light: #ffffff;
    --dgcc-bg-dark: #1a1a1a;
    --dgcc-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --dgcc-radius: 12px;
    --dgcc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bannière principale */
.dgcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 20px;
    animation: dgcc-slide-in 0.4s ease-out;
}

.dgcc-position-bottom {
    bottom: 0;
}

.dgcc-position-top {
    top: 0;
}

.dgcc-position-center {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    max-width: 600px;
    padding: 0;
}

/* Overlay pour le mode center */
.dgcc-position-center .dgcc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: -1;
}

/* Container */
.dgcc-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--dgcc-bg-light);
    border-radius: var(--dgcc-radius);
    box-shadow: var(--dgcc-shadow);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dgcc-theme-dark .dgcc-container {
    background: var(--dgcc-bg-dark);
    color: #ffffff;
}

/* Content */
.dgcc-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.dgcc-icon {
    flex-shrink: 0;
    color: var(--dgcc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dgcc-text {
    flex: 1;
}

.dgcc-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--dgcc-text);
}

.dgcc-theme-dark .dgcc-title {
    color: #ffffff;
}

.dgcc-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.dgcc-theme-dark .dgcc-description {
    color: #cccccc;
}

/* Actions */
.dgcc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Boutons */
.dgcc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--dgcc-transition);
    white-space: nowrap;
}

.dgcc-btn-primary {
    background: var(--dgcc-primary);
    color: white;
}

.dgcc-btn-primary:hover {
    background: var(--dgcc-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.dgcc-btn-secondary {
    background: #f8f9fa;
    color: var(--dgcc-text);
    border: 1px solid #dee2e6;
}

.dgcc-theme-dark .dgcc-btn-secondary {
    background: #2d2d2d;
    color: #ffffff;
    border-color: #444;
}

.dgcc-btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.dgcc-theme-dark .dgcc-btn-secondary:hover {
    background: #3d3d3d;
}

.dgcc-btn-settings {
    background: transparent;
    color: var(--dgcc-primary);
    border: 1px solid var(--dgcc-primary);
}

.dgcc-btn-settings:hover {
    background: var(--dgcc-primary);
    color: white;
    transform: translateY(-1px);
}

/* Modal */
.dgcc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: dgcc-fade-in 0.3s ease-out;
}

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

.dgcc-modal-container {
    position: relative;
    background: var(--dgcc-bg-light);
    border-radius: var(--dgcc-radius);
    box-shadow: var(--dgcc-shadow);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: dgcc-scale-in 0.3s ease-out;
}

.dgcc-theme-dark .dgcc-modal-container {
    background: var(--dgcc-bg-dark);
    color: #ffffff;
}

.dgcc-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dgcc-theme-dark .dgcc-modal-header {
    border-bottom-color: #333;
}

.dgcc-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.dgcc-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--dgcc-transition);
    color: #666;
}

.dgcc-theme-dark .dgcc-modal-close {
    color: #ccc;
}

.dgcc-modal-close:hover {
    background: #f8f9fa;
}

.dgcc-theme-dark .dgcc-modal-close:hover {
    background: #2d2d2d;
}

.dgcc-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.dgcc-modal-footer {
    padding: 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.dgcc-theme-dark .dgcc-modal-footer {
    border-top-color: #333;
}

/* Catégories */
.dgcc-category {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: var(--dgcc-transition);
}

.dgcc-theme-dark .dgcc-category {
    background: #2d2d2d;
}

.dgcc-category:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dgcc-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dgcc-category-info h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
}

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

.dgcc-theme-dark .dgcc-category-info p {
    color: #aaa;
}

/* Toggle Switch */
.dgcc-toggle {
    position: relative;
    flex-shrink: 0;
}

.dgcc-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dgcc-toggle label {
    display: block;
    width: 50px;
    height: 28px;
    background: #ccc;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--dgcc-transition);
    position: relative;
}

.dgcc-toggle label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: var(--dgcc-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dgcc-toggle input[type="checkbox"]:checked + label {
    background: var(--dgcc-primary);
}

.dgcc-toggle input[type="checkbox"]:checked + label::after {
    left: 25px;
}

.dgcc-toggle-disabled label {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Bouton réouverture */
.dgcc-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--dgcc-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--dgcc-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dgcc-transition);
    z-index: 999998;
    animation: dgcc-fade-in 0.3s ease-out;
}

.dgcc-reopen:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
}

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

.dgcc-position-top {
    animation: dgcc-slide-in-top 0.4s ease-out;
}

@keyframes dgcc-slide-in-top {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes dgcc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dgcc-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dgcc-content {
        flex-direction: column;
    }
    
    .dgcc-icon {
        display: none;
    }
    
    .dgcc-actions {
        flex-direction: column;
    }
    
    .dgcc-btn {
        width: 100%;
        text-align: center;
    }
    
    .dgcc-position-center {
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        max-width: none;
        padding: 20px;
    }
    
    .dgcc-modal-container {
        max-height: 90vh;
    }
    
    .dgcc-modal-footer {
        flex-direction: column-reverse;
    }
    
    .dgcc-modal-footer .dgcc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dgcc-banner {
        padding: 16px;
    }
    
    .dgcc-container {
        padding: 20px;
    }
    
    .dgcc-title {
        font-size: 18px;
    }
    
    .dgcc-description {
        font-size: 13px;
    }
}

/* Accessibilité */
.dgcc-btn:focus,
.dgcc-toggle input:focus + label,
.dgcc-modal-close:focus {
    outline: 2px solid var(--dgcc-primary);
    outline-offset: 2px;
}

/* Print */
@media print {
    .dgcc-banner,
    .dgcc-modal,
    .dgcc-reopen {
        display: none !important;
    }
}
