/* ==================== LEGAL PAGES CSS ==================== */

/* Conteneur principal */
.legal-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

/* En-tête légal */
.legal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 10px;
    margin-bottom: 40px;
    text-align: center;
}

.legal-header h1 {
    margin: 0;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.legal-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Contenu légal */
.legal-content {
    line-height: 1.8;
}

/* Sections */
.legal-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.legal-section h2 {
    color: #333;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section h3 {
    color: #555;
    font-size: 1.2em;
    margin-top: 15px;
    margin-bottom: 10px;
}

.legal-info {
    color: #666;
    font-size: 1em;
}

.legal-info p {
    margin-bottom: 15px;
}

.legal-info ul {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-info li {
    margin-bottom: 8px;
}

/* Types de cookies */
.cookie-type {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.cookie-type h3 {
    margin-top: 0;
    color: #667eea;
}

.cookie-type ul {
    margin: 10px 0;
}

.cookie-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 10px;
}

.cookie-status.always_enabled {
    background: #d4edda;
    color: #155724;
}

.cookie-status.optional {
    background: #fff3cd;
    color: #856404;
}

/* Navigation légale */
.legal-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.legal-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #667eea;
    transition: all 0.3s ease;
}

.legal-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.legal-link i {
    font-size: 1.2em;
}

.legal-link span {
    font-weight: 500;
}

/* Footer */
.legal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-back:hover {
    background: #764ba2;
    transform: translateX(-3px);
}

/* ==================== COOKIE BANNER ==================== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: none;
    padding: 20px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

#cookie-banner.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.cookie-banner-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #333;
}

.cookie-banner-text p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #667eea;
    color: white;
}

.cookie-btn-accept:hover {
    background: #764ba2;
}

.cookie-btn-reject {
    background: #e0e0e0;
    color: #333;
}

.cookie-btn-reject:hover {
    background: #d0d0d0;
}

.cookie-btn-settings {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.cookie-btn-settings:hover {
    background: #667eea;
    color: white;
}

/* ==================== COOKIE PREFERENCES MODAL ==================== */

.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
}

.cookie-modal-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    padding: 40px;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.cookie-modal-header h2 {
    margin: 0;
    color: #333;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.cookie-modal-close:hover {
    color: #333;
}

.cookie-preferences {
    margin-bottom: 30px;
}

.cookie-preference-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    gap: 15px;
}

.cookie-preference-label {
    flex: 1;
}

.cookie-preference-label h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1em;
}

.cookie-preference-label p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.cookie-preference-toggle {
    width: 50px;
    height: 28px;
    background: #ccc;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
}

.cookie-preference-toggle.enabled {
    background: #667eea;
}

.cookie-preference-toggle::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease;
}

.cookie-preference-toggle.enabled::after {
    left: 24px;
}

.cookie-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.cookie-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-modal-btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.cookie-modal-btn-cancel:hover {
    background: #d0d0d0;
}

.cookie-modal-btn-save {
    background: #667eea;
    color: white;
}

.cookie-modal-btn-save:hover {
    background: #764ba2;
}

/* ==================== APP FOOTER ==================== */

.app-footer {
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 2001;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-section h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 0.95em;
}

.footer-section p {
    margin: 0;
    color: #666;
    font-size: 0.85em;
    line-height: 1.4;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a,
.footer-link-btn {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    font-size: 0.95em;
}

.footer-links a:hover,
.footer-link-btn:hover {
    color: #764ba2;
    transform: translateX(5px);
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin: 0;
    color: #999;
    font-size: 0.85em;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: center;
    }

    .footer-info {
        text-align: center;
    }

    .cookie-banner-content {
        grid-template-columns: 1fr;
    }

    .cookie-banner-buttons {
        justify-content: center;
    }

    .cookie-modal-content {
        padding: 20px;
    }

    .legal-container {
        padding: 15px;
    }

    .legal-header {
        padding: 20px 15px;
    }

    .legal-header h1 {
        font-size: 1.8em;
    }

    .legal-nav {
        grid-template-columns: 1fr;
    }
}

.cookie-preference-toggle.enabled::after {
    left: 24px;
}

.cookie-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .legal-header {
        padding: 30px 15px;
    }

    .legal-header h1 {
        font-size: 1.8em;
    }

    .legal-nav {
        grid-template-columns: 1fr;
    }

    .cookie-banner-content {
        grid-template-columns: 1fr;
    }

    .cookie-banner-buttons {
        justify-content: flex-start;
    }

    .cookie-modal-content {
        padding: 25px;
    }

    .legal-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .legal-header h1 {
        font-size: 1.4em;
    }

    .legal-section h2 {
        font-size: 1.2em;
    }

    #cookie-banner {
        padding: 15px;
    }

    .cookie-banner-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        padding: 20px;
    }
}

/* ==================== LANGUAGE SELECTOR ==================== */

.legal-lang-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.legal-lang-selector select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.legal-lang-selector select:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.legal-lang-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Responsif - tablettes */
@media (max-width: 768px) {
    .legal-lang-selector {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
    }
    
    .legal-lang-selector select {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Responsif - mobile */
@media (max-width: 480px) {
    .legal-lang-selector {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .legal-lang-selector select {
        font-size: 12px;
        padding: 5px 8px;
    }
}
