@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #900000;
    --primary-light: #b30000;
    --gold: #D4AF37;
    --gold-light: #f1d592;
    --black: #000000;
    --white: #ffffff;
    --pure-white: #ffffff;
    --pure-black: #000000;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 25px;
    --card-radius: 28px;
    --bg-color: #000;
    --text-color: #ffffff;
    --feature-bg: rgba(255, 255, 255, 0.03);
    --feature-border: rgba(255, 255, 255, 0.05);
}

body.light-mode {
    --black: #ffffff;
    --white: #1d1d1f;
    --primary: #d32f2f;
    --primary-light: #ef5350;
    --gold: #aa8a2e;
    --gold-light: #c5a044;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.1);
    --bg-color: #fbfbfd;
    --text-color: #1d1d1f;
    --feature-bg: rgba(0, 0, 0, 0.03);
    --feature-border: rgba(0, 0, 0, 0.08);
}

html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

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

a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
    filter: brightness(1.2);
}

body {
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(144, 0, 0, 0.4) 0, transparent 50%), 
        radial-gradient(at 50% 0%, rgba(212, 175, 55, 0.15) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(144, 0, 0, 0.4) 0, transparent 50%),
        radial-gradient(at 50% 100%, rgba(144, 0, 0, 0.3) 0, transparent 50%);
    background-size: 200% 200%;
    animation: liquidBackground 15s ease infinite;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s;
}

body.light-mode {
    background-image: 
        radial-gradient(at 0% 0%, rgba(211, 47, 47, 0.22) 0, transparent 55%), 
        radial-gradient(at 50% 0%, rgba(212, 175, 55, 0.18) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(211, 47, 47, 0.22) 0, transparent 55%),
        radial-gradient(at 50% 100%, rgba(211, 47, 47, 0.15) 0, transparent 50%);
}

@keyframes liquidBackground {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Logo_RR_RemoveBG.png') no-repeat center;
    background-size: 60%;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

header {
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container img {
    height: 60px;
}

.logo-container span {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

nav a:hover::after {
    width: 100%;
}

main {
    flex: 1;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.hero {
    text-align: center;
    max-width: 900px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--gold), var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

.glass-card {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 3.5rem;
    width: 100%;
    max-width: 1050px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 20px rgba(255, 255, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: rotate(45deg);
    transition: 0.8s;
    pointer-events: none;
}

.glass-card:hover::after {
    left: 100%;
    top: 100%;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.01);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
}

.feature-item {
    padding: 2rem;
    background: var(--feature-bg);
    border-radius: 15px;
    border: 1px solid var(--feature-border);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-item:hover {
    background: rgba(144, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: var(--gold);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: var(--pure-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--primary);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(144, 0, 0, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--pure-white);
}

.btn-gold:hover {
    background: transparent;
    color: var(--gold);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

footer {
    padding: 3rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid var(--glass-border);
    color: var(--text-color);
    opacity: 0.6;
}

footer a {
    color: #888;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding-bottom: 2px;
}

footer a:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

footer a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
}

footer a:hover::after {
    width: 100%;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
    filter: grayscale(1);
    opacity: 0.5;
}

/* Media Queries - Responsiveness */

/* Tablette (Max 1024px) */
@media (max-width: 1024px) {
    .glass-card {
        padding: 2.5rem;
        max-width: 90%;
    }
    
    .hero h1 {
        font-size: 3.2rem;
    }
}

/* Mobile (Max 768px) */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
        flex-direction: column;
        gap: 1.2rem;
        background: transparent;
        backdrop-filter: none;
        border-bottom: none;
    }

    .logo-container a {
        flex-direction: column;
        gap: 0.8rem;
    }

    .logo-container img {
        height: 45px;
    }

    .logo-container span {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    nav ul {
        gap: 0.6rem;
        background: rgba(255, 255, 255, 0.08);
        padding: 0.6rem 1rem;
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        max-width: 95vw;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.65rem;
        font-weight: 600;
        white-space: nowrap;
    }

    main {
        padding: 2rem 1rem;
        gap: 2rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        letter-spacing: 3px;
    }

    .hero p {
        font-size: 0.9rem;
        padding: 0 1.5rem;
        line-height: 1.5;
    }

    .glass-card {
        padding: 2rem 1rem;
        border-radius: 30px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 15px 35px rgba(0,0,0,0.5);
        width: calc(100% - 2rem);
        margin: 0 auto;
    }

    .glass-card h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .feature-item {
        padding: 1.2rem;
        display: flex;
        flex-direction: column; /* Retour à la colonne pour éviter l'écrasement */
        align-items: center;
        text-align: center;
        gap: 0.8rem;
        width: 100%;
    }

    .feature-item i {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .feature-item h3 {
        font-size: 1.2rem;
    }

    .feature-item p {
        font-size: 0.85rem;
    }

    .btn {
        padding: 1rem;
        font-size: 0.8rem;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        max-width: 280px; /* Évite qu'il ne soit trop large si le texte est court */
        margin: 2rem auto 0; /* Centre le bouton lui-même dans son conteneur */
    }

    .theme-toggle {
        bottom: 30px;
        right: 20px;
        width: 55px;
        height: 55px;
        background: var(--primary);
        color: white;
        border: none;
        box-shadow: 0 10px 20px rgba(144, 0, 0, 0.4);
    }
}

/* Très petits écrans (Max 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    nav a {
        font-size: 0.8rem;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

.cookie-content a {
    color: var(--gold);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
    margin-top: 0;
}

@media (max-width: 900px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.theme-toggle:active {
    transform: scale(0.9);
}

@media (max-width: 768px) {
    .theme-toggle {
        top: auto;
        bottom: 100px;
        right: 20px;
    }
}
