/* =========================================
   STYLES POUR PAGES LÉGALES
   ========================================= */

/* Hero Section */
.legal-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 5rem 2rem 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.legal-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.legal-hero-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: float 3s ease-in-out infinite;
}

.legal-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.legal-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.6;
}

.legal-hero-meta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Content Section */
.legal-content {
    padding: 4rem 0;
    background: #f8f9fa;
}

.legal-section {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.legal-section:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.legal-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.legal-section-number {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.legal-section-icon {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 45px;
}

.legal-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    flex: 1;
}

.legal-section-content {
    color: #495057;
    line-height: 1.8;
    font-size: 1rem;
}

.legal-section-content p {
    margin-bottom: 1rem;
}

.legal-section-content p:last-child {
    margin-bottom: 0;
}

/* Lists Styles */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.legal-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.legal-list-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.legal-list-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
    min-width: 24px;
    margin-top: 0.15rem;
}

.legal-list-content {
    flex: 1;
}

.legal-list-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

.legal-list-description {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* Numbered List */
.legal-numbered-list {
    counter-reset: legal-counter;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.legal-numbered-list li {
    counter-increment: legal-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

.legal-numbered-list li::before {
    content: counter(legal-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Alert Boxes */
.legal-alert {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 5px solid;
    animation: slideIn 0.5s ease-out;
}

.legal-alert-info {
    background: linear-gradient(135deg, #e7f3ff 0%, #d0e7ff 100%);
    border-color: #2196F3;
    color: #0d47a1;
}

.legal-alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4CAF50;
    color: #1b5e20;
}

.legal-alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #FFC107;
    color: #f57f17;
}

.legal-alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #b71c1c;
}

.legal-alert.top-margin {
    margin-top: 2rem;
}

.legal-alert-icon {
    font-size: 2rem;
    min-width: 40px;
}

.legal-alert-content {
    flex: 1;
}

.legal-alert-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    display: block;
}

.legal-alert-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Table of Contents */
.legal-toc {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.legal-toc-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.legal-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-toc-item {
    margin-bottom: 0.75rem;
}

.legal-toc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.legal-toc-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: translateX(5px);
}

.legal-toc-icon {
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* Definition Box */
.legal-definition {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.legal-definition-term {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-definition-term i {
    font-size: 1.25rem;
}

.legal-definition-text {
    color: #495057;
    line-height: 1.7;
    margin: 0;
}

/* Contact Box */
.legal-contact-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 15px;
    padding: 2.5rem;
    color: white;
    margin-top: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.legal-contact-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.legal-contact-text {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.legal-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.legal-contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.legal-contact-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

.legal-contact-icon {
    font-size: 1.5rem;
}

.legal-contact-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.legal-contact-link:hover {
    text-decoration: underline;
}

/* Data Rights Cards */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.right-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.right-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.right-card:hover::before {
    transform: scaleX(1);
}

.right-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.right-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.right-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.right-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Footer Navigation */
.legal-footer-nav {
    background: white;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
}

.legal-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.legal-footer-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-footer-link:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .legal-hero-title {
        font-size: 2.5rem;
    }

    .legal-toc {
        position: static;
    }

    .rights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-hero {
        padding: 4rem 1.5rem 3rem;
    }

    .legal-hero-icon {
        font-size: 3rem;
    }

    .legal-hero-title {
        font-size: 2rem;
    }

    .legal-hero-subtitle {
        font-size: 1.1rem;
    }

    .legal-content {
        padding: 2rem 0;
    }

    .legal-section {
        padding: 1.5rem;
    }

    .legal-section-header {
        flex-direction: column;
        text-align: center;
    }

    .legal-section-title {
        font-size: 1.5rem;
    }

    .legal-contact-box {
        padding: 2rem 1.5rem;
    }

    .legal-contact-title {
        font-size: 1.75rem;
    }

    .legal-footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Print Styles */
@media print {
    .legal-hero {
        background: white;
        color: var(--dark-color);
        padding: 2rem;
    }

    .legal-content {
        background: white;
    }

    .legal-section {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }

    .legal-contact-box {
        background: #f8f9fa;
        color: var(--dark-color);
    }

    .legal-toc {
        display: none;
    }
}
