:root {
    --primary-color: #9c5096;
    --accent-color: #00f5ca;
    --dark-bg: #111111;
    --light-bg: #ffffff;
    --card-bg: #1a1a1a;
    --text-light: #f5f5f5;
    --text-dark: #333333;
    --text-muted: #a0a0a0;
    --header-bg: rgba(17, 17, 17, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

/* === LOADING ANIMATION === */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a0a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader::before {
    content: '';
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* === FIREFLY BACKGROUND === */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.firefly {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: fly 25s linear infinite, pulse 4s ease-in-out infinite alternate;
}

.firefly.large.fixed {
    width: 300px;
    height: 300px;
    filter: blur(100px);
    animation: pulse 6s ease-in-out infinite alternate;
}

.firefly:not(.large) {
    width: 4px;
    height: 4px;
    box-shadow: 0 0 20px currentColor;
}

#glow1 {
    top: 10%;
    left: 15%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    animation-delay: 0s;
}

#glow2 {
    bottom: 15%;
    right: 20%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    animation-delay: 3s;
}

.firefly:nth-child(3) { color: var(--primary-color); top: 20%; left: 10%; animation-delay: 0s; }
.firefly:nth-child(4) { color: var(--accent-color); top: 60%; left: 80%; animation-delay: 2s; }
.firefly:nth-child(5) { color: var(--primary-color); top: 30%; left: 70%; animation-delay: 4s; }
.firefly:nth-child(6) { color: var(--accent-color); top: 80%; left: 20%; animation-delay: 6s; }
.firefly:nth-child(7) { color: var(--primary-color); top: 40%; left: 90%; animation-delay: 8s; }
.firefly:nth-child(8) { color: var(--accent-color); top: 70%; left: 40%; animation-delay: 10s; }
.firefly:nth-child(9) { color: var(--primary-color); top: 15%; left: 50%; animation-delay: 12s; }
.firefly:nth-child(10) { color: var(--accent-color); top: 85%; left: 60%; animation-delay: 14s; }
.firefly:nth-child(11) { color: var(--primary-color); top: 50%; left: 30%; animation-delay: 16s; }
.firefly:nth-child(12) { color: var(--accent-color); top: 25%; left: 85%; animation-delay: 18s; }
.firefly:nth-child(13) { color: var(--primary-color); top: 75%; left: 75%; animation-delay: 20s; }
.firefly:nth-child(14) { color: var(--accent-color); top: 35%; left: 15%; animation-delay: 22s; }

@keyframes fly {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    25% { transform: translateX(100px) translateY(-100px) rotate(90deg); }
    50% { transform: translateX(-50px) translateY(50px) rotate(180deg); }
    75% { transform: translateX(-100px) translateY(-50px) rotate(270deg); }
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.1); }
}

/* === HERO SECTION === */
.hero-section {
    padding: 120px 20px 80px;
    text-align: center;
    background: linear-gradient(135deg, rgba(156, 80, 150, 0.1) 0%, rgba(0, 245, 202, 0.1) 100%);
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.icon-header {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: #b0b0b0;
    margin-bottom: 30px;
    font-weight: 300;
    line-height: 1.6;
}

.last-update {
    display: inline-block;
    background: rgba(156, 80, 150, 0.2);
    padding: 12px 24px;
    border-radius: 25px;
    border: 1px solid rgba(156, 80, 150, 0.3);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    color: var(--accent-color);
    font-weight: 500;
}

/* === LEGAL CONTENT === */
.legal-content {
    padding: 0 20px 60px;
    position: relative;
    z-index: 2;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* === TABLE OF CONTENTS === */
.table-of-contents {
    position: sticky;
    top: 120px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(156, 80, 150, 0.3);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(156, 80, 150, 0.2);
}

.table-of-contents h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.table-of-contents a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(156, 80, 150, 0.2), transparent);
    transition: left 0.5s;
}

.table-of-contents a:hover {
    color: var(--accent-color);
    background: rgba(156, 80, 150, 0.1);
    transform: translateX(5px);
}

.table-of-contents a:hover:before {
    left: 100%;
}

/* === ARTICLES === */
.articles-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.legal-article {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(156, 80, 150, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(156, 80, 150, 0.1);
    transition: all 0.3s ease;
}

.legal-article:hover {
    border-color: rgba(156, 80, 150, 0.5);
    box-shadow: 0 15px 40px rgba(156, 80, 150, 0.2);
    transform: translateY(-2px);
}

.article-header {
    background: linear-gradient(135deg, rgba(156, 80, 150, 0.2) 0%, rgba(0, 245, 202, 0.1) 100%);
    padding: 25px 30px;
    border-bottom: 1px solid rgba(156, 80, 150, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
}

.article-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(0, 245, 202, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 245, 202, 0.3);
    flex-shrink: 0;
}

.article-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #ffffff;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.article-content {
    padding: 30px;
    line-height: 1.8;
}

.article-content p {
    color: #d0d0d0;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.article-content ul {
    color: #d0d0d0;
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.article-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.article-content a:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* === SUBSECTIONS === */
.subsection {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(156, 80, 150, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(156, 80, 150, 0.1);
}

.subsection h4 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === SPECIAL BOXES === */
.highlight-box, .warning-box, .info-box, .intro-box, .contact-rights, .cnil-info, .incident-box {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.highlight-box, .intro-box {
    background: rgba(0, 245, 202, 0.1);
    border-color: rgba(0, 245, 202, 0.3);
}

.highlight-box h4, .intro-box h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-box {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.warning-box strong {
    color: #ff6b6b;
}

.info-box, .contact-rights, .cnil-info, .incident-box {
    background: rgba(116, 185, 255, 0.1);
    border-color: rgba(116, 185, 255, 0.3);
}

.info-box h4, .contact-rights h4, .cnil-info h4, .incident-box h4 {
    color: #74b9ff;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === SPECIALIZED CONTENT === */
.info-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(156, 80, 150, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.info-card h4 {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-grid, .retention-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.detail-item, .retention-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    padding: 12px;
    background: rgba(156, 80, 150, 0.05);
    border-radius: 8px;
    align-items: start;
}

.detail-item strong, .retention-item strong {
    color: var(--accent-color);
    font-weight: 600;
}

.contact-section {
    display: grid;
    gap: 25px;
    margin-top: 20px;
}

.contact-method {
    background: rgba(20, 20, 20, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(156, 80, 150, 0.2);
}

.contact-method h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.data-list, .cookies-list, .contact-methods {
    list-style: none;
    padding: 0;
}

.data-list li, .cookies-list li, .contact-methods li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(156, 80, 150, 0.1);
    position: relative;
    padding-left: 20px;
}

.data-list li:before, .cookies-list li:before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 8px;
}

.purpose-card, .cookie-type {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(156, 80, 150, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.purpose-card h4, .cookie-type h5 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.purpose-card p:first-of-type {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 15px;
}

.rights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.right-item {
    background: rgba(20, 20, 20, 0.6);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(156, 80, 150, 0.2);
}

.right-item h4 {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.security-measures {
    margin: 20px 0;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(20, 20, 20, 0.6);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(156, 80, 150, 0.2);
}

.security-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.security-item strong {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.cookie-control {
    margin-top: 30px;
    background: rgba(20, 20, 20, 0.6);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(156, 80, 150, 0.2);
}

.response-time {
    margin-top: 15px;
    font-style: italic;
    color: var(--text-muted);
}

/* === LEGAL LISTS === */
.legal-list {
    list-style: none;
    padding: 0;
}

.legal-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(156, 80, 150, 0.1);
    position: relative;
    padding-left: 25px;
}

.legal-list li:before {
    content: '▸';
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 12px;
}

/* === FOOTER === */
footer {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-nav a.active {
    color: var(--accent-color);
}

/* === SCROLL TO TOP === */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(156, 80, 150, 0.3);
}

#scroll-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 35px rgba(156, 80, 150, 0.5);
}

#scroll-top.show {
    opacity: 1;
    visibility: visible;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .icon-header {
        font-size: 3rem;
    }
    
    .content-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .table-of-contents {
        position: static;
        margin-bottom: 30px;
    }
    
    .article-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .article-header h2 {
        font-size: 1.4rem;
    }
    
    .article-number {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }
    
    .rights-container {
        grid-template-columns: 1fr;
    }
    
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid,
    .retention-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item,
    .retention-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    #scroll-top {
        bottom: 100px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 15px 20px;
    }
    
    .hero-section {
        padding: 100px 15px 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .legal-content {
        padding: 0 15px 40px;
    }
    
    .table-of-contents,
    .legal-article {
        margin: 0 -5px;
    }
    
    .article-content,
    .table-of-contents {
        padding: 20px;
    }
    
    .subsection {
        padding: 20px;
    }
}
