@import url('https://fonts.googleapis.com/css2?family=Sonsie+One&display=swap');

:root {
    --raisin-black-1: hsl(234, 14%, 14%);
    --raisin-black-2: hsl(231, 12%, 12%);
    --raisin-black-3: hsl(228, 12%, 17%);
    --eerie-black: hsl(240, 11%, 9%);
    --light-gray: hsl(0, 0%, 80%);
    --platinum: hsl(0, 4%, 91%);
    --xiketic: hsl(275, 24%, 10%);
    --blue: hsl(180.9deg 98.03% 60.2%);
    --white: hsl(0, 0%, 100%);
    --onyx: hsl(240, 5%, 26%);

    --ff-refault: "Refault", Georgia;
    --ff-oswald: 'Oswald', sans-serif;
    --ff-poppins: 'Poppins', sans-serif;
    --ff-sonsie: 'Sonsie One', sans-serif;

    --transition-1: 0.15s ease-in-out;
    --transition-2: 0.15s ease-in;
    --transition-3: 0.25s ease-out;

    --section-padding: 60px;

    --polygon-1: polygon(90% 0, 100% 34%, 100% 100%, 10% 100%, 0 66%, 0 0);
    --polygon-2: polygon(0 0, 100% 0%, 82% 100%, 0% 100%);
    --polygon-3: polygon(0 0, 100% 0%, 100% 100%, 18% 100%);
    --polygon-4: polygon(96% 0, 100% 36%, 100% 100%, 4% 100%, 0 66%, 0 0);

}

body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: #2b3052;
    color: white;
    position: relative;
    z-index: 0;
}

/* Particules en arrière-plan */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

#particles-js.loaded {
    opacity: 1;
}

.flex-container {
    padding: 0 10px;
}

/* Prevent layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Loading state pour images lazy */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Background de jour (par défaut) */
body.day::before {
    content: "";
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure the background appears behind the body content */
    background: url('/img/design/index_background_day.png') no-repeat center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

/* Background de nuit */
body.night::before {
    content: "";
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure the background appears behind the body content */
    background: url('/img/design/index_background_night.png') no-repeat center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

body.night .ribbon, .box > header {
    color: #d3dada;
    background: linear-gradient(180deg, #1c3b62 0%, rgb(8 25 48) 100%);
}

body.night .box-body {
    background: #1a2154;
    color: #d6e4ee;
}

body.night #box {
    background: #090d2a;
}

/* Variables CSS adaptées pour le thème nocturne */
body.night {
    --glass-bg: rgba(26, 33, 84, 0.85);
    --glass-border: rgba(211, 218, 218, 0.3);
    --text-primary: #d6e4ee;
    --text-secondary: #a8b8c8;
    --text-light: #d3dada;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.6);
    --border-radius: 16px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-intro: url('/img/accueil/background_index_intro_night.png');
    --bg-register: url('/img/accueil/background_index_register_night.png');
}

/* Surcharges FAQ pour le thème nuit */
body.night .faq-number {
    color: #0ea5e9;
    background: linear-gradient(135deg, #0ea5e9, #ff6b35);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.night .faq-icon {
    color: #0ea5e9;
}

body.night .faq-item.active .faq-icon {
    color: #ff6b35;
}

body.night .faq-subtitle {
    color: #93c5fd;
}

body.night .search-icon {
    color: #93c5fd;
}

body.night .faq-search-input {
    color: #e0f2fe;
}

/* Adaptations spécifiques pour les boîtes d'explication en mode nuit */
body.night .explanation-box {
    background: var(--glass-bg);
    border-color: #4a5568;
    color: var(--text-primary);
}

body.night .explanation-header {
    background: linear-gradient(135deg, rgba(28, 59, 98, 0.15), transparent);
    border-bottom: 1px solid rgba(211, 218, 218, 0.2);
}

body.night .explanation-content p {
    color: var(--text-primary);
}

body.night .explanation-content li {
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(211, 218, 218, 0.1);
}

body.night .close-btn {
    color: var(--text-secondary);
}

body.night .close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Adaptations pour les cartes de couleur en mode nuit */
body.night .color-card {
    background: var(--glass-bg);
    border: 2px solid rgba(211, 218, 218, 0.2);
    box-shadow: var(--card-shadow);
}

body.night .color-card:hover {
    box-shadow: var(--card-shadow-hover);
}

body.night .card-title {
    color: var(--text-light);
}

/* Adaptation du texte d'introduction en mode nuit */
body.night .intro p {
    color: var(--text-light);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Adaptation de l'overlay en mode nuit */
body.night .explanation-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Adaptations pour les bordures stylisées en mode nuit */
body.night .hero::after {
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.6) 0%, 
        rgba(255, 107, 53, 0.6) 25%, 
        rgba(82, 152, 232, 0.6) 50%, 
        rgba(255, 107, 53, 0.6) 75%, 
        rgba(255, 215, 0, 0.6) 100%
    );
}

body.night .intro::after {
    background: linear-gradient(90deg, 
        rgba(156, 39, 176, 0.6) 0%, 
        rgba(76, 175, 80, 0.6) 25%, 
        rgba(233, 30, 99, 0.6) 50%, 
        rgba(255, 152, 0, 0.6) 75%, 
        rgba(156, 39, 176, 0.6) 100%
    );
}

body.night .register::after {
    background: linear-gradient(90deg,
        rgba(255, 215, 0, 0.6) 0%,
        rgba(255, 107, 53, 0.6) 25%,
        rgba(82, 152, 232, 0.6) 50%,
        rgba(255, 107, 53, 0.6) 75%,
        rgba(255, 215, 0, 0.6) 100%
    );
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; }
li { list-style: none; }
ol li { list-style: unset; margin-left: 25px; }
img, input, button, ion-icon { display: block; }
button { font: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; width: 100%; border: none; }
html { font-family: var(--ff-poppins); /* scroll-behavior: smooth; Temporairement désactivé */ }
body { overflow-x: hidden; }
body.active { overflow-y: hidden; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--raisin-black-2); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 10px; }

.container { padding-inline: 15px; }
.h1 { color: var(--white); font-family: var(--ff-refault); font-size: var(--fs-1); font-weight: var(--fw-400); text-transform: uppercase; }
.h2 { font-size: var(--fs-2); color: var(--white); line-height: 1.2; text-transform: uppercase; font-family: var(--ff-oswald); }
.h3 { font-family: var(--ff-oswald); font-size: var(--fs-2); text-transform: uppercase; line-height: 1.2; }

.btn {
    width: 100%;
    clip-path: var(--polygon-1);
    transition: var(--transition-1);
}
.btn-primary { background-color: var(--blue); }
.btn-primary:is(:hover, :focus ){ background: var(--raisin-black-1); }
.btn-secondary { background: var(--white); color: var(--blue); }
.btn-secondary:is(:hover, :focus ) { background: var(--raisin-black-1); color: var(--white); }
.btn-link:is(:hover, :focus ) { color: var(--blue); }
.has-scrollbar::-webkit-scrollbar { height: 12px; }
.has-scrollbar::-webkit-scrollbar-button { width: 40px; }
.section-title { position: relative; text-align: center; margin-bottom: 80px; }
.section-title::before, .section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    height: 5px;
    width: 120px;
    background: var(--blue);
    border-radius: 0 0 5px 5px;
}
.section-title::before { bottom: -23px; height: 4px; width: 30px; }

.btn-sign-in {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--raisin-black-3);
    color: var(--light-gray);
    font-family: var(--ff-oswald);
    font-size: var(--fs-11);
    font-weight: var(--fw-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px;
    border-right: 5px solid var(--blue);
    box-shadow: 0 0 4px hsla(0, 0%, 0%, 0.2);
    margin-left: 15px;
    transition: var(--transition-1);
}
.btn-sign-in::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    transform: translateY(-50%);
    width: 5px;
    height: 40px;
}
.btn-sign-in:is(:hover, :focus) { color: var(--blue); }
.btn-sign-in .icon-box {
    font-size: 18px;
    background: var(--raisin-black-2);
    padding: 6px;
    margin-right: 5px;
    box-shadow: 0 3px 7px hsla(345, 75%, 30%, 0.2), inset 0 3px 7px 0 hsla(335, 53%, 14%, .4);
}
.btn-sign-in .icon-box ion-icon { --ionicon-stroke-width: 40px; }

.header {
    display: flex;
    position: fixed;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: transparent;
    width: 100%;
    height: 10%;
    box-sizing: border-box; /* Ajouté pour inclure le padding dans la largeur totale */
    left: 0; /* Ajouté pour fixer le header au bord gauche de la fenêtre */
    z-index: 99;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background-color: #002149;
}


.logo {
    font-size: 24px;
    font-weight: bold;
    font-family: "Montserrat", sans-serif;
    text-shadow: 0px 4px 8.9px rgba(0, 0, 0, 0.50);
    text-decoration: none;
    color: #fff;
}

.button {
    background-color: #ffc107;
    border: none;
    padding: 10px 20px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    border-radius: 5px;
    background: linear-gradient(180deg, #FEB603 0%, #E88A1C 100%);
    text-decoration: none;
}

.button.orange {
    background-color: #ffc107;
    color: white;
    background: linear-gradient(180deg, #FEB603 0%, #E88A1C 100%);
}

.button.red {
    background-color: #ff0707;
    color: white;
    background: linear-gradient(180deg, #ff5656 0%, #e81c1c 100%);
}

.button.green {
    background-color: #2aa716;
    color: white;
    background: linear-gradient(180deg, #4ce03d 0%, #2aa716 100%);
}

.main-content {
    text-align: center;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    min-height: 90vh; /* Prend toute la hauteur de l'écran */
    width: 100vw; /* Prend toute la largeur de l'écran */
    box-sizing: border-box;
}

.hero-child {
    width: fit-content;
    height: fit-content;
    margin: auto;
    justify-items: center;
}

.hero-image {
    width: min(90vw, 500px);
    height: auto;
    max-width: none; /* Permet au CSS de contrôler entièrement la taille */
}

.hero-logo {
    width: calc(min(90vw, 600px) * 0.8); /* 80% de la taille de hero-image (différence réduite) */
    height: auto;
    max-width: none;
}

.hero-text {
    transform: translate(0%, -30%);
    text-align: center;
}

.hero-text h1 {
    font-size: 48px;
    margin: 0;
}

.hero-text p {
    margin: -10px 10px 10px;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    text-shadow: 0px 4px 8.9px rgba(0, 0, 0, 0.50);
    font-weight: bold;
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.start-button {
    padding: 15px 15px 12px 15px;
    font-size: 30px;
    margin-top: 20px;
    color: white;
    cursor: pointer;
    background-color: #00d084;
    border-radius: 10px;
    border: 0px solid #3E858B;
    background: linear-gradient(180deg, #24E2BE 0%, #1BAE92 100%);
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
}

.start-button:hover {
    background: linear-gradient(180deg, #034d3f 0%, #3cc8ae 100%);
}

.intro {
    padding: 200px 20px;
    min-height: 100vh; /* Prend toute la hauteur de l'écran */
    width: 100vw; /* Prend toute la largeur de l'écran */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.intro p {
    color: #FFF;
    text-align: center;
    text-shadow: 0px 0px 8.9px rgba(0, 0, 0, 0.50);
    font-family: "Yanone Kaffeesatz";
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    margin-bottom: 20px;
}
.color-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.color-card {
    width: 150px;
    height: 250px; /* Adjusted height to accommodate content */
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    transition: 0.1s;
    cursor: pointer;
    box-shadow: 0 0 1em rgba(0, 0, 0, 0.05), 0 0.2em 0.3em rgba(0, 0, 0, 0.05), 0 0 0.2em inset rgba(255, 255, 255, 0.5);
}

.color-card:hover {
    transform: translate(0px, -10px) scale(105%, 105%);
    transition: 0.3s;
}

.card1 {
    background: radial-gradient(50% 50% at 50% 50%, #45F2D4 44.1%, #3DC9A7 100%);
}

.card2 {
    background: radial-gradient(50% 50% at 50% 50%, #FFAA4E 0%, #FFA34A 30%, #FD8436 69%, #FC6221 100%);
}

.card3 {
    background: radial-gradient(56.71% 56.71% at 50% 50%, #96E6F2 0%, #88DCEE 30.5%, #5DBDE3 68%, #2494D5 100%);
}

.card4 {
    background: radial-gradient(56.71% 56.71% at 50% 50%, #C365EB 0%, #C365EB 12%, #A852E3 62.5%, #7C32D6 100%);
}

.card-image {
    margin: 16px;
    width: 90%;
    height: auto;
    border-radius: 10px 10px 0 0;
}

.card-title {
    position: absolute;
    bottom: 0;
    font-size: 24px;
    font-weight: bold;
    padding: 5px;
    background: #031b50b5;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    width: 100%;
}

.card-subtitle {
    font-size: 12px;
}

.footer {
    position: absolute;
    width: 100%;
    padding: 20px;
    text-align: center;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 18px;
    gap: 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    background-color: #1f2029;
    box-shadow: 0 -3px 7px hsla(0, 0%, 0%, 0.5);
    z-index: 97;
}

.footer-pegi {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    opacity: 0.7;
}

.footer-links a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
}

.footer-icons a {
    margin: 0 10px;
}

.footer-icons img {
    width: 32px;
    transition: 0.2s;
    cursor: pointer;
}

.footer-icons img:hover {
    transform: translate(0px, -5px);
    transition: 0.5s;
}

.footer-copy {
    margin-top: 10px;
}

.arrow-down {
    cursor: pointer;
    transition: 0.2s;
}

.arrow-down:hover {
    transform: translate(0px, 5px);
    transition: 0.5s;
}

.character-poly {
    height: 500px;
    left: -15px;
    bottom: -140px;
    position: fixed;
    z-index: 98;
    transition: opacity 0.5s ease;
}

.character-chris {
    position: fixed;
    height: 500px;
    right: 0px;
    bottom: -140px;
    z-index: 98;
    transition: opacity 0.5s ease;
}

#FlashRegister {
    position: relative;
    width: 527px;
    height: 407px;
    background: url('/img/inside/cadre.png') no-repeat center center;
    background-size: contain;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.characters-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    max-width: 350px;
}

.registerStereoMale,
.registerStereoFemale {
    width: 130px;
    height: auto;
    transition: transform 0.2s ease;
    cursor: pointer;
    display: block;
    place-self: center;
}

.registerStereoFemale {
    padding-bottom: 10px;
}

.registerStereoMale:hover,
.registerStereoFemale:hover {
    transform: scale(1.07);
}

.registerText {
    text-align: center;
    color: #5298e8;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 25px;
    font-weight: bold;
    text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
                    1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
    margin: 0;
}

/* Adaptation responsive pour petits écrans */
@media (max-height: 800px) {
    #FlashRegister {
        transform: scale(1);
    }
    .registerText {
        font-size: 22px;
    }
}

@media (max-height: 600px) {
    #FlashRegister {
        transform: scale(1);
    }
    .registerText {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    #FlashRegister {
        transform: scale(1);
        width: 90vw;
        max-width: 527px;
    }
    .registerText {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    #FlashRegister {
        transform: scale(1);
    }
    .registerStereoMale,
    .registerStereoFemale {
        width: 60%;
    }
    .registerText {
        font-size: 16px;
    }
}

/* Modal styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 400px; 
    border-radius: 10px;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    color: #1d1d1d;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    text-transform: uppercase;
    font-size: 28px;
    margin-bottom: 30px;
}

.modal input {
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 18px;
}

.modal button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #ffc107;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    border-radius: 5px;
    background: linear-gradient(180deg, #FEB603 0%, #E88A1C 100%);
}

.modal form {
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.modal button:hover {
    background-color: #00a86b;
}

.modal a {
    color: #FF6300;
    text-decoration: none;
    font-size: 14px;
    text-align: left;
}

.password-container {
    position: relative;
    display: flex;
}

.password-container input {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
}

.hero-logo {
    width: 600px;
}

#character-name {
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-weight: bold;
    color: #ffc400;
    cursor: pointer;
    font-size: 24px;
    height: 100%;
    text-decoration: none;
}

#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    width: 50px;
    height: 50px;
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='21' viewBox='0 0 23 21' fill='none'%3E%3Cg clip-path='url(%23clip0_441_259)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.3078 0.106942C11.9084 -0.440432 11.0916 -0.440433 10.6922 0.106942L0.349316 14.2805C-0.093917 14.8879 0.262806 15.6319 0.848577 15.827L10.4666 2.53277C10.9776 1.82237 12.0224 1.82237 12.5334 2.53277L22.1514 15.827C22.7372 15.6319 23.0939 14.8879 22.6507 14.2805L12.3078 0.106942Z' fill='%23C08A04'/%3E%3Cpath d='M10.6922 5.10697C11.0916 4.5596 11.9084 4.5596 12.3078 5.10697L22.6507 19.2806C23.2638 20.1208 22.3462 21.2223 21.4091 20.771L11.9338 16.2089C11.6597 16.0769 11.3403 16.0769 11.0662 16.2089L1.59092 20.771C0.653774 21.2223 -0.2638 20.1208 0.349317 19.2806L10.6922 5.10697Z' fill='%23FEB603'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_441_259'%3E%3Crect width='23' height='21' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

#back-to-top:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='21' viewBox='0 0 23 21' fill='none'%3E%3Cg clip-path='url(%23clip0_441_259)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.3078 0.106942C11.9084 -0.440432 11.0916 -0.440433 10.6922 0.106942L0.349316 14.2805C-0.093917 14.8879 0.262806 15.6319 0.848577 15.827L10.4666 2.53277C10.9776 1.82237 12.0224 1.82237 12.5334 2.53277L22.1514 15.827C22.7372 15.6319 23.0939 14.8879 22.6507 14.2805L12.3078 0.106942Z' fill='%23FEB603'/%3E%3Cpath d='M10.6922 5.10697C11.0916 4.5596 11.9084 4.5596 12.3078 5.10697L22.6507 19.2806C23.2638 20.1208 22.3462 21.2223 21.4091 20.771L11.9338 16.2089C11.6597 16.0769 11.3403 16.0769 11.0662 16.2089L1.59092 20.771C0.653774 21.2223 -0.2638 20.1208 0.349317 19.2806L10.6922 5.10697Z' fill='%23C08A04'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_441_259'%3E%3Crect width='23' height='21' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
}

.section {
    padding: 100px 200px;
    min-height: 100vh; /* Prend toute la hauteur de l'écran */
    width: 100vw; /* Prend toute la largeur de l'écran */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    border: 0px;
    z-index: -1;
}

.money {
    background: url(/img/icons/euro.png) no-repeat right center;
    padding-right: 20px;
}

@media (max-width: 1000px) {
    .header {
        position: relative;
    }

    .hero-child {
        transform: translate(0px, -80px);
    }

    .hero-logo {
        width: 90%;
        max-width: 700px;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 20px;
    }

    .start-button {
        font-size: 20px;
        padding: 10px 15px;
    }

    .intro {
        padding: 100px 10px;
    }

    .intro p {
        font-size: 18px;
    }

    .color-card {
        width: 120px;
        height: 200px;
    }

    .card-title {
        font-size: 18px;
    }

    .footer {
        font-size: 16px;
    }

    .footer-icons img {
        width: 48px;
    }

    .character-chris {
        height: 30%;
    }

    .character-poly {
        height: 30%;
    }

    .fade-out {
        opacity: 0; /* Classe pour rendre les personnages transparents */
    }

    .section {
        padding: 50px 100px; /* Réduction du padding pour les écrans moyens */
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: row;
        align-items: center;
    }

    .login-button {
        font-size: 14px;
        padding: 8px 15px;
    }

    .hero-text h1 {
        font-size: 24px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .start-button {
        font-size: 16px;
        padding: 8px 12px;
    }

    .intro {
        padding: 80px 10px;
    }

    .intro p {
        font-size: 16px;
    }

    .color-card {
        width: 100px;
        height: 160px;
    }

    .card-title {
        font-size: 14px;
    }

    .footer {
        font-size: 14px;
    }

    .footer-icons img {
        width: 48px;
    }

    .section {
        padding: 20px 50px; /* Réduction du padding pour les petits écrans */
    }
}

/* Header */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--raisin-black-1);
    box-shadow: 0 3px 7px hsla(0, 0%, 0%, 0.5);
    padding-block: 20px;
    z-index: 99;
}

.header .container { display: flex; justify-content: center; align-items: center; height: 100%; }
.header-actions { display: none; }
.nav-open-btn { color: var(--white); font-size: 40px; padding: 5px; }
.nav-open-btn ion-icon { --ionicon-stroke-width: 40px; }
.navbar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 100%;
    max-width: 100%;
    background: var(--raisin-black-2);
    height: 100%;
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.5);
    visibility: hidden;
    z-index: 2;
    transition: var(--transition-2);
}
    .navbar.active { right: 0; visibility: visible; transition: var(--transition-3); }
.navbar-top { display: flex; justify-content: space-between; align-items: center; padding: 25px; }
.nav-close-btn { color: var(--blue); font-size: 25px; padding: 10px; transform: translateX(15px); }
    .nav-close-btn ion-icon { --ionicon-stroke-width: 70px; }
.navbar-link {
    color: var(--white);
    font-size: 15px;
    line-height: 50px;
    padding: 10px 25px;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
    font-weight: var(--fw-500);
    transition: .15s ease-in-out;
    text-align: center;
}
    .navbar-link:is(:hover, :focus) { color: var(--blue); }

    .logo-img-full { width: 100%; }

    .navbar-top-logo { width: 60%; }

    .auth-visibility.is-hidden { display: none; }

    .auth-visibility.is-visible { display: block; }

    .header-auth-actions {
        display: flex;
        justify-content: center;
    }

    .header-action-link {
        width: auto;
        height: 100%;
        align-content: center;
        word-wrap: normal;
    }

    .header-action-link-logout { margin: 0 10px; }

    .disconnected-options { width: 20%; }

    .btn-sign-in-label { color: unset; }

    .login-submit-btn { margin-top: 30px; }

    .page-content {
        margin-top: 100px;
        width: 100%;
    }

    .error-404-image {
        width: 450px;
        height: auto;
    }

    .footer-icons-row,
    .footer-links-row { display: flex; }

    .footer-copy-spaced { margin-top: 40px; }

/* ===== Utility classes ===== */
.is-hidden { display: none; }
.is-flipped { transform: scaleX(-1); }

/* ===== 404 page ===== */
.error-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.error-hero-content {
    text-align: center;
    color: white;
    padding: 40px;
}

.error-hero-code {
    font-size: 150px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.error-hero-title {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 600;
}

.error-hero-text {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.error-hero-action { margin-top: 40px; }

.error-hero-btn {
    text-decoration: none;
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #667eea;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.error-hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3) !important;
}

.error-hero-logo-wrapper {
    margin-top: 60px;
    opacity: 0.8;
}

.error-hero-logo {
    max-width: 300px;
    filter: brightness(0) invert(1);
}

/* ===== Avatar shadow (selectPerso) ===== */
.avatar-shadow-filter {
    filter: opacity(0.2) brightness(0.5);
}

/*Media queries*/
@media(min-width: 575px) {
    :root {
        --fs-1: 90px;
        --fs-2: 45px;
    }

    .container { max-width: 540px; margin-inline: auto; }
}

@media(min-width: 768px) {
    .container { max-width: 700px; }
    .has-scrollbar::-webkit-scrollbar-button { width: 150px; }

    .header::before, .header::after {
        content: '';
        position: absolute;
        width: 115px;
        height: 20px;
        background: var(--raisin-black-3);
        bottom: -17px;
    }
        .header::before { left: 0; clip-path: var(--polygon-2); }
        .header::after { right: 0; clip-path: var(--polygon-3); }
}

/* Media query pour les écrans où le menu hamburger est visible (moins de 1024px) */
@media(max-width: 1219px) {
    .navbar {
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .header .container { 
        justify-content: space-between; 
    }
    .header .logo {
        margin-right: 25px;
        width: 50%;
    }
    .navbar-list { margin-bottom: 0 !important; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 30px; }
    .navbar-list ul { margin: 0 !important; display: flex; flex-direction: column; list-style: none; width: 100%; }
    .navbar-list ul li { text-align: center; margin: 10px 0; width: 100%; }
    #logged-options {
        width: 100%;
        margin-top: 25px;
    }
}

@media(min-width: 1220px) {
    .container { max-width: 1000px; }
    .has-scrollbar::-webkit-scrollbar-button { width: 200px; }

    .header { padding-block: 0; }
        .header .logo {
            margin-right: 25px;
            width: 25%;
        }
    .nav-open-btn { display: none; }
    .navbar {
        position: static;
        opacity: 1;
        visibility: visible;
        background: none;
        max-width: unset;
        width: max-content;
        height: 100%;
        box-shadow: none;
        overflow: visible;
    }
    .navbar-top, .nav-social-list { display: none; }
    .navbar-list { 
        margin-bottom: 0 !important; 
        display: flex; 
        flex-direction: row; 
        justify-content: flex-end; 
        align-items: center; 
        height: 100%;
    }
    .navbar-list ul { 
        margin: 0; 
        display: flex; 
        flex-direction: row; 
        list-style: none; 
        height: 100%;
    }
    .navbar-list ul li { 
        text-align: center; 
        margin: 0; 
        height: 100%;
        display: flex;
        align-items: center;
    }
    #logged-options {
        width: 25%;
        margin-left: 30px;
    }
    .navbar-link {
        position: relative;
        color: var(--platinum);
        font-weight: 600;
        padding-inline: 20px;
        height: 100%;
        border: none;
        text-transform: uppercase;
        letter-spacing: 1px;
        z-index: 1;
        display: flex;
        align-items: center;
    }
    .navbar-link::after {
        content: '';
        position: absolute;
        inset: 0;
        transform: skew(15deg);
        border-bottom: 5px solid transparent;
        z-index: -1;
        transition: var(--transition-1);
    }
    .navbar-link:focus { outline: none; }
    .navbar-link:is(:hover, :focus )::after { background: var(--raisin-black-2); border-color: var(--blue); }
    .header-actions { display: flex; justify-content: center; align-items: center; }
    .header-actions .search { color: var(--white); font-size: 18px; padding: 25px; transition: var(--transition-1); }
    .search ion-icon { --ionicon-stroke-width: 70px; }
    .header-actions .search:is(:hover, :focus ) { color: var(--blue); }
    .btn-sign-in {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--raisin-black-3);
        color: var(--light-gray);
        font-family: var(--ff-oswald);
        font-size: var(--fs-11);
        font-weight: var(--fw-500);
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 5px;
        border-right: 5px solid var(--blue);
        box-shadow: 0 0 4px hsla(0, 0%, 0%, 0.2);
        margin-left: 15px;
        transition: var(--transition-1);
    }
    .btn-sign-in::after {
        content: '';
        position: absolute;
        top: 50%;
        left: -20px;
        transform: translateY(-50%);
        width: 5px;
        height: 40px;
    }
    .btn-sign-in:is(:hover, :focus) { color: var(--blue); }
    .btn-sign-in .icon-box {
        font-size: 18px;
        background: var(--raisin-black-2);
        padding: 6px;
        margin-right: 5px;
        box-shadow: 0 3px 7px hsla(345, 75%, 30%, 0.2), inset 0 3px 7px 0 hsla(335, 53%, 14%, .4);
    }
    .btn-sign-in .icon-box ion-icon { --ionicon-stroke-width: 40px; }

    /* Media queries pour les images hero responsive */
    @media (max-width: 768px) {
        .hero-image {
            width: min(95vw, 450px);
        }

        .hero-logo {
            width: calc(min(95vw, 450px) * 0.82); /* Légèrement plus proche sur mobile */
        }
    }

    @media (max-width: 480px) {
        .hero-image {
            width: min(98vw, 350px);
        }

        .hero-logo {
            width: calc(min(98vw, 350px) * 0.85); /* Encore plus proche sur très petit écran */
        }
    }

    @media (min-width: 1200px) {
        .hero-image {
            width: min(70vw, 500px); /* Plus grand sur grand écran */
        }
    }
    .btn-sign-in span { padding-inline: 10px; }
}

@media(min-width: 1200px) {
    .container { max-width: 1200px; }
    /* Le navbar-link utilise déjà height: 100%, pas besoin de padding-block supplémentaire */
}

/* Styles responsive pour le footer */

/* Footer responsive icons et pegi */
.footer-icons img,
.footer-pegi img {
    height: auto;
    max-width: 100%;
    transition: all 0.3s ease;
}

/* Menu select pour les liens footer sur mobile */
.footer-links-select {
    display: none;
    background: var(--raisin-black-1);
    color: white;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
}

.footer-links-select option {
    background: var(--raisin-black-1);
    color: white;
}

/* Media queries pour le responsive du footer */
@media (max-width: 1024px) {
    .footer-icons img {
        width: 30px;
    }
    
    .footer-pegi img {
        width: 50px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 15px;
        gap: 15px;
    }
    
    .footer-icons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .footer-icons img {
        width: 24px;
    }
    
    .footer-pegi {
        gap: 5px;
    }
    
    .footer-pegi img {
        width: 40px;
        height: auto;
    }
    
    .footer-links {
        display: none !important;
    }
    
    .footer-links-select {
        display: block;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 10px;
        gap: 10px;
    }
    
    .footer-icons img {
        width: 20px;
    }
    
    .footer-pegi {
        gap: 3px;
    }
    
    .footer-pegi img {
        width: 30px;
        height: auto;
    }
    
    .footer-copy {
        font-size: 12px;
        margin-top: 20px !important;
    }
}

/* ===== HOME PAGE STYLES ===== */
/* Variables CSS pour la cohérence */
:root {
    --primary-color: #ffd700;
    --secondary-color: #5298e8;
    --accent-color: #ff6b35;
    --success-color: #28a745;
    --roleplay-color: #9c27b0;
    --social-color: #e91e63;
    --family-color: #4caf50;
    --career-color: #ff9800;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #ecf0f1;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.2);
    --border-radius: 16px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgb(255 255 255 / 20%);
    --glass-border: rgba(255, 255, 255, 0.2);
    --bg-intro: url('/img/accueil/background_index_intro.png');
    --bg-register: url('/img/accueil/background_index_register.png');
}

.intro {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    flex-direction: column;
    background-image: var(--bg-intro);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    padding: 20px; /* Padding réduit */
    overflow: hidden; /* Empêche le débordement */
}

.intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.intro > div {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.intro p {
    font-size: 1.8rem; /* Taille réduite */
    font-weight: 300;
    color: black;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
    margin-bottom: 30px; /* Marge réduite */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px; /* Padding réduit */
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

p:not(:last-child), ul:not(:last-child) {
    margin-bottom: unset !important;
}

/* Scroll indicator - Position absolue en bas de l'écran */
.arrow-down {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
    animation: bounce 2s infinite;
    z-index: 5;
}

.arrow-down:hover {
    transform: translateX(-50%) scale(1.2);
}

/* Styles pour toutes les sections */
section {
    width: 100vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden; /* Empêche le débordement */
}

/* Centrage du contenu principal dans les sections */
.intro > div,
.hero > .hero-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    max-width: 1200px;
    z-index: 5;
}

/* Section register avec image de fond */
.register {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    flex-direction: column;
    background-image: var(--bg-register);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    padding: 20px; /* Padding réduit */
    overflow: hidden; /* Empêche le débordement */
}

.register > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    max-width: 1200px;
}

/* Bordures stylisées entre les sections */
section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        var(--accent-color) 25%,
        var(--secondary-color) 50%,
        var(--accent-color) 75%,
        var(--primary-color) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
}

section::after {
    background: linear-gradient(90deg,
        rgba(156, 39, 176, 0.8) 0%,
        rgba(76, 175, 80, 0.8) 25%,
        rgba(233, 30, 99, 0.8) 50%,
        rgba(255, 152, 0, 0.8) 75%,
        rgba(156, 39, 176, 0.8) 100%
    );
}

.hero::after {
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.8) 0%, 
        rgba(255, 107, 53, 0.8) 25%, 
        rgba(82, 152, 232, 0.8) 50%, 
        rgba(255, 107, 53, 0.8) 75%, 
        rgba(255, 215, 0, 0.8) 100%
    );
}

.intro::after {
    background: linear-gradient(90deg, 
        rgba(156, 39, 176, 0.8) 0%, 
        rgba(76, 175, 80, 0.8) 25%, 
        rgba(233, 30, 99, 0.8) 50%, 
        rgba(255, 152, 0, 0.8) 75%, 
        rgba(156, 39, 176, 0.8) 100%
    );
}

.register::after {
    background: linear-gradient(90deg,
        rgba(255, 215, 0, 0.8) 0%,
        rgba(255, 107, 53, 0.8) 25%,
        rgba(82, 152, 232, 0.8) 50%,
        rgba(255, 107, 53, 0.8) 75%,
        rgba(255, 215, 0, 0.8) 100%
    );
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Cartes de couleur avec interaction */
.color-cards {
    display: flex;
    flex-direction: row;
    gap: 20px; /* Gap réduit */
    position: relative;
    justify-content: center;
    flex-wrap: wrap; /* Permet le wrapping sur petits écrans */
}

.color-card {
    position: relative;
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 180px; /* Hauteur réduite */
    width: 200px; /* Largeur fixe pour contrôler la taille */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.color-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--card-shadow-hover);
}

.color-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.card-image {
    width: 50%;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius-small);
    margin-bottom: -33px;
    transition: var(--transition);
}

.color-card:hover .card-image {
    transform: scale(1.1);
}

.card-title {
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 1rem; /* Taille réduite */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Boîtes d'explication */
.explanation-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-55%, -45%) scale(0);
    width: 90%;
    max-width: 500px;
    background: rgb(255 255 255 / 50%);
    backdrop-filter: blur(20px);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
    z-index: 10002;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.explanation-box.active {
    transform: translate(-55%, -45%) scale(1);
    opacity: 1;
}

.explanation-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.explanation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), transparent);
}

.explanation-header h3 {
    margin: 0;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.explanation-icon {
    font-size: 1.5rem;
    font-style: normal !important;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

.explanation-content {
    padding: 20px 25px 25px 25px;
}

.explanation-content p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 1rem;
}

.explanation-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.explanation-content li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.explanation-content li:last-child {
    border-bottom: none;
}

/* Mega Menu - Style adapté au header */
.navbar-item-with-mega {
    position: relative;
}

.navbar-item-with-mega .navbar-link i {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.navbar-item-with-mega:hover .navbar-link i,
.navbar-item-with-mega .navbar-link[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--raisin-black-1);
    border: 2px solid var(--blue);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(0, 188, 212, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    width: max-content;
    min-width: 300px;
    max-width: 740px;
    overflow: hidden;
    pointer-events: none;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--blue) 0%, 
        rgba(0, 188, 212, 0.7) 50%, 
        var(--blue) 100%);
    box-shadow: 0 0 10px var(--blue);
}

.navbar-item-with-mega:hover .mega-menu,
.mega-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.mega-menu-content {
    display: flex;
    gap: 0;
    padding: 30px 25px 25px;
    width: max-content;
}

.mega-menu-column {
    padding: 15px 25px;
    position: relative;
    min-width: 200px;
    flex: 0 1 auto;
}

.mega-menu-column:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--blue) 20%,
        var(--blue) 80%,
        transparent 100%);
}

.mega-menu-column h4 {
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 1.4rem;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue);
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mega-menu-column a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--platinum);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    margin: 5px 0;
    background: transparent;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.mega-menu-column a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--raisin-black-2);
    transform: skew(-5deg) scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.mega-menu-column a:hover {
    color: var(--blue);
    border-left-color: var(--blue);
}

.mega-menu-column a:hover::before {
    transform: skew(-5deg) scaleX(1);
}

.mega-menu-column a i {
    font-size: 1.2rem;
    width: 24px;
    min-width: 24px;
    text-align: center;
    color: var(--blue);
    transition: filter 0.3s ease;
}

.mega-menu-column a:hover i {
    filter: drop-shadow(0 0 8px var(--blue));
}

/* Overlay pour fermer les boîtes */
.explanation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.explanation-overlay.active {
    opacity: 1;
    visibility: visible;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mega Menu responsive */
    .mega-menu {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
        clip-path: none !important;
        border-radius: 0 !important;
        border: none !important;
        border-top: 1px solid rgba(0, 188, 212, 0.3) !important;
        border-bottom: 1px solid rgba(0, 188, 212, 0.3) !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: var(--raisin-black-2) !important;
        display: none;
        z-index: auto !important;
    }

    .navbar-item-with-mega:hover .mega-menu,
    .mega-menu.open {
        display: block;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .navbar-item-with-mega {
        width: 100%;
    }

    .mega-menu-content {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 20px 15px;
        width: 100%;
    }

    .mega-menu-column {
        border-bottom: 1px solid rgba(0, 188, 212, 0.3);
        padding: 15px 10px;
        width: 100%;
        min-width: unset;
    }

    .mega-menu-column:not(:last-child)::after {
        display: none;
    }

    .mega-menu-column:last-child {
        border-bottom: none;
    }

    .mega-menu-column h4 {
        font-size: 1.2rem;
    }

    .mega-menu-column a {
        font-size: 0.95rem;
        padding: 10px 12px;
        white-space: normal !important;
        border-left: none !important;
    }
    
    .mega-menu-column a::before {
        display: none !important;
    }
    
    .mega-menu-column a:hover {
        background: rgba(0, 188, 212, 0.1) !important;
        transform: none !important;
    }

    /* Explanation box responsive */
    .explanation-box {
        width: 95%;
        max-width: 400px;
        transform: translate(-50%, -50%) scale(0);
        max-height: 80vh;
        overflow-y: auto;
    }

    .explanation-box.active {
        transform: translate(-50%, -50%) scale(1);
    }

    .color-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 400px;
    }
    
    .color-card {
        height: 200px;
        width: 100%;
        padding: 15px;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .intro p {
        font-size: 1rem;
        padding: 10px;
        margin-bottom: 30px;
    }

    .explanation-box {
        width: 95%;
        margin: 20px;
    }

    .explanation-header {
        padding: 15px 20px 10px 20px;
    }

    .explanation-header h3 {
        font-size: 1.5rem;
    }

    .explanation-content {
        padding: 15px 20px 20px 20px;
    }
}

@media (max-width: 480px) {
    /* Color cards en 1 colonne sur très petit écran */
    .color-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 300px;
        margin: 0 auto;
    }

    .color-card {
        height: 200px;
        width: 100%;
        padding: 20px;
    }

    .card-title {
        font-size: 1rem;
    }

    .intro p {
        font-size: 0.9rem;
        margin-bottom: 30px;
        padding: 8px;
    }

    /* Explanation box encore plus compact */
    .explanation-box {
        width: 98%;
    }

    .explanation-header {
        padding: 12px 15px;
    }

    .explanation-content {
        padding: 15px;
    }

    .explanation-header h3 {
        font-size: 1.4rem;
    }
}

@media (max-height: 800px) {
    .color-cards {
        gap: 15px;
    }
    
    .color-card {
        height: 160px;
    }
}

@media (max-height: 600px) {
    .color-card {
        height: 140px;
    }
    
    .card-title {
        font-size: 1rem;
    }

    .intro p {
        font-size: 1.1rem;
    }

    .explanation-box {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Styles de compatibilité */
#home {
    color: var(--primary-color) !important;
}

/* Empêcher l'italique sur toutes les icônes */
i, .explanation-icon {
    font-style: normal !important;
}

/* Styles pour les personnages Chris et Poly */
.character-chris,
.character-poly {
    transition: var(--transition);
}

/* Masquer les personnages sur les petits écrans */
@media (max-width: 768px) {
    .character-chris,
    .character-poly {
        display: none;
    }
}