
/* =============================================
   MODULE COOKIE RGPD
   ============================================= */

/* Bandeau Cookie */
.cookie-banner {
    position: fixed;
    z-index: 99999;
    width: 100%;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.cookie-banner.cookie-show {
    opacity: 1;
    transform: translateY(0);
}

/* Positions */
.cookie-position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.cookie-position-top {
    top: 0;
    left: 0;
    right: 0;
}

.cookie-position-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 450px;
    width: auto;
    border-radius: 12px;
}

.cookie-position-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 450px;
    width: auto;
    border-radius: 12px;
}

/* Thèmes */
.cookie-theme-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
}

.cookie-theme-light {
    background: #ffffff;
    color: #333333;
    border-top: 1px solid #e0e0e0;
}

.cookie-theme-light.cookie-position-bottom-left,
.cookie-theme-light.cookie-position-bottom-right {
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Container */
.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Content */
.cookie-content {
    flex: 1;
}

.cookie-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-message {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
}

.cookie-links {
    font-size: 0.8rem;
}

.cookie-link {
    color: #42a5f5;
    text-decoration: none;
    transition: color 0.2s;
}

.cookie-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.cookie-theme-light .cookie-link {
    color: #0f3460;
}

.cookie-theme-light .cookie-link:hover {
    color: #42a5f5;
}

.cookie-separator {
    margin: 0 10px;
    opacity: 0.5;
}

/* Actions */
.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Boutons */
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #42a5f5 0%, #1d4ed8 100%);
    color: white;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #42a5f5 100%);
}

.cookie-btn-essential {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-theme-light .cookie-btn-essential {
    border-color: #ddd;
    color: #333;
}

.cookie-btn-essential:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-theme-light .cookie-btn-essential:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.cookie-btn-customize {
    background: transparent;
    color: inherit;
    text-decoration: underline;
    padding: 10px 15px;
}

.cookie-btn-customize:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
}

.cookie-btn-save {
    background: linear-gradient(135deg, #42a5f5 0%, #1d4ed8 100%);
    color: white;
    padding: 12px 30px;
}

/* Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-modal-header h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cookie-modal-close:hover {
    opacity: 1;
}

.cookie-modal-body {
    padding: 25px;
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

/* Options */
.cookie-option {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    gap: 15px;
}

.cookie-option-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.cookie-option-info p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
    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: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background: linear-gradient(135deg, #42a5f5 0%, #1d4ed8 100%);
}

input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation d'entrée */
@keyframes cookieSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cookieSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-position-bottom.cookie-show {
    animation: cookieSlideUp 0.4s ease;
}

.cookie-position-top.cookie-show {
    animation: cookieSlideDown 0.4s ease;
}

/* Responsive */
@media (max-width: 480px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-position-bottom-left,
    .cookie-position-bottom-right {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-modal-content {
        margin: 10px;
    }
}

/* =============================================
   MODULE COOKIE RGPD
   ============================================= */

/* Bandeau Cookie */
.cookie-banner {
    position: fixed;
    z-index: 99999;
    width: 100%;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.cookie-banner.cookie-show {
    opacity: 1;
    transform: translateY(0);
}

/* Positions */
.cookie-position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.cookie-position-top {
    top: 0;
    left: 0;
    right: 0;
}

.cookie-position-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 450px;
    width: auto;
    border-radius: 12px;
}

.cookie-position-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 450px;
    width: auto;
    border-radius: 12px;
}

/* Thèmes */
.cookie-theme-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
}

.cookie-theme-light {
    background: #ffffff;
    color: #333333;
    border-top: 1px solid #e0e0e0;
}

.cookie-theme-light.cookie-position-bottom-left,
.cookie-theme-light.cookie-position-bottom-right {
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Container */
.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Content */
.cookie-content {
    flex: 1;
}

.cookie-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-message {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
}

.cookie-links {
    font-size: 0.8rem;
}

.cookie-link {
    color: #42a5f5;
    text-decoration: none;
    transition: color 0.2s;
}

.cookie-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.cookie-theme-light .cookie-link {
    color: #0f3460;
}

.cookie-theme-light .cookie-link:hover {
    color: #42a5f5;
}

.cookie-separator {
    margin: 0 10px;
    opacity: 0.5;
}

/* Actions */
.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Boutons */
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #42a5f5 0%, #1d4ed8 100%);
    color: white;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #42a5f5 100%);
}

.cookie-btn-essential {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-theme-light .cookie-btn-essential {
    border-color: #ddd;
    color: #333;
}

.cookie-btn-essential:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-theme-light .cookie-btn-essential:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.cookie-btn-customize {
    background: transparent;
    color: inherit;
    text-decoration: underline;
    padding: 10px 15px;
}

.cookie-btn-customize:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
}

.cookie-btn-save {
    background: linear-gradient(135deg, #42a5f5 0%, #1d4ed8 100%);
    color: white;
    padding: 12px 30px;
}

/* Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-modal-header h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cookie-modal-close:hover {
    opacity: 1;
}

.cookie-modal-body {
    padding: 25px;
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

/* Options */
.cookie-option {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    gap: 15px;
}

.cookie-option-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.cookie-option-info p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
    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: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background: linear-gradient(135deg, #42a5f5 0%, #1d4ed8 100%);
}

input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation d'entrée */
@keyframes cookieSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cookieSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-position-bottom.cookie-show {
    animation: cookieSlideUp 0.4s ease;
}

.cookie-position-top.cookie-show {
    animation: cookieSlideDown 0.4s ease;
}

/* Responsive */
@media (max-width: 480px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-position-bottom-left,
    .cookie-position-bottom-right {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-modal-content {
        margin: 10px;
    }
}
