:root {
    --primary-color: #1a4a6e; /* Couleur principale */
    --accent-color: #4fb4e8; /* Couleur d'accentuation */
    --text-color: #ffffff; /* Couleur du texte */
    --wave-color: #64b5f6; /* Couleur pour les animations */
}

/* ====================== Global Styles ====================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    background: #fff;

}

main {
    position: relative;
    z-index: 1;
    padding-top: 100vh; /* Décalage pour tenir compte de la hauteur du header */
    background-color: #fff ;
}

/* ====================== Header Styles ====================== */

/* Styles pour le logo dans le header */
#round-image {
    border-radius: 50%; /* Rend l'image ronde */
    width: 200px;
    height: 200px;
    object-fit: cover; /* S'assure que l'image occupe tout le cadre sans déformation */
    overflow: hidden; /* Cache les parties débordantes */
    border: none; /* Supprime tout bord éventuel */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer; /* Le pointeur de souris change pour tout l'élément */
    animation: spin 10s linear infinite; /* Animation de rotation */
}

/* Animation de rotation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Stop animation */
#round-image.paused {
    animation: none;
}


/* Si le header est réduit, adaptez la taille */
.wave-header.collapsed #round-image {
    width: 60px; /* Réduit la taille du logo */
    height: 60px;
    margin-bottom: 0;
    transition: all 0.5s ease; /* Transition fluide */
}

.wave-header {
    position: fixed;
    width: 100%;
    height: 100vh;
    background: linear-gradient(45deg, #1a4a6e, #2980b9, #64b5f6);
    background-size: 300% 300%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 1.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.wave-header.collapsed {
    height: 100px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 0 2rem;
    background: rgba(26, 74, 110, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.header-content {
    color: var(--text-color);
    text-align: center;
    opacity: 0;
    z-index: 2;
    animation: fadeInUp 2.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
    animation-delay: 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Transition header réduit */
.wave-header.collapsed .header-content {
    transform: none;
    margin-right: 2rem;
}

.wave-header.collapsed h1 {
    font-size: 1.5rem;
    margin: 0;
    text-align: left;
}

.wave-header.collapsed p {
    display: none;
}

/* ====================== Navigation Styles ====================== */
nav {
    display: none;
    opacity: 0;
}

.wave-header.collapsed nav {
    display: flex;
    gap: 2rem;
    animation: fadeInDown 1.5s ease forwards;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(79, 180, 232, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.6s ease;
}

nav a:hover {
    background: linear-gradient(to right, var(--accent-color), var(--primary-color));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(79, 180, 232, 0.4);
}

nav a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.4s ease;
}

nav a:hover svg {
    transform: scale(1.2);
}

/* ====================== Content Section Styles ====================== */
.content-section {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: #fff;
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 4rem;
}

.grid-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    cursor: pointer; /* Le pointeur de souris change pour tout l'élément */
    text-decoration: none;
    gap: 2rem;
    height: 500px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 10, 0.5);
}

.grid-item.visible {
    opacity: 1;
    transform: translateY(0);
    background-color: #d8e7f2;
}

/* ====================== Bubble Styles ====================== */
.bubble-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent-color), var(--primary-color));
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(26, 74, 110, 0.3);
    animation: float 6s ease-in-out infinite;
}

.bubble img {
    width: 80%;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.bubble img.dezoom {
    transform: scale(0.7);
}

.bubble img.zoom {
    transform: scale(1);
}

/* Effet lumineux sur les bulles */
.bubble::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 20%;
    height: 20%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(5px);
}

.bubble::after {
    content: '';
    position: absolute;
    inset: -5px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: ripple 3s linear infinite;
}

/* ====================== Text Content Styles ====================== */
.content {
    padding: 2rem;
}

.content h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

.content p {
    color: #444;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* ====================== Keyframe Animations ====================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.quiz-section {
    background-color: #d8e7f2;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.quiz-question {
    margin-bottom: 20px;
}

.quiz-result {
    margin-top: 20px;
    font-weight: bold;
    color: green;
    text-align: center;
}

button {
    background-color: #4fb4e8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #1a4a6e;
}

.code_barre {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}


/* ====================== Responsive Styles ====================== */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem; /* Réduction de la taille du titre */
    }

    .header-content p {
        font-size: 1rem;
    }

    .grid-container {
        grid-template-columns: 1fr; /* Une seule colonne sur petits écrans */
    }

    .bubble-container {
        width: 300px;
        height: 300px;
    }

    .content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .bubble-container {
        width: 250px;
        height: 250px;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    .content p {
        font-size: 0.9rem;
    }
}

/* Animation pour faire disparaître le texte */
.animated {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease; /* Temps d'animation */
}

/* Animation pour faire apparaître le texte */
.appear {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s ease; /* Temps d'animation */
}

.music-logo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1000;
}

.music-logo img {
    width: 60%;
    height: auto;
}

.music-logo.hidden {
    opacity: 0; /* Cache le logo après un délai */
    transform: scale(0); /* Réduit la taille lorsqu'il est caché */
    pointer-events: none; /* Empêche les interactions */
}