/*
|--------------------------------------------------------------------------
| 1. VARIABLES & CONFIGURATION
|--------------------------------------------------------------------------
*/
:root {
    /* Palette de couleurs harmonisée */
    --main-bg-color: #1a0505; /* Fond très sombre (presque noir/rouge) pour le contraste */
    --primary-red: #b52c29;   /* Votre rouge bordeaux */
    --accent-gold: #ffc107;   /* Or pour les boutons/actions (meilleur que le cyan) */
    
    --text-main: #ffffff;     /* Texte principal blanc */
    --text-muted: #e0e0e0;    /* Texte secondaire gris clair */
    
    --glass-bg: rgba(255, 255, 255, 0.1); /* Fond vitré */
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    background: var(--main-bg-color); /* Fond global sombre */
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Évite le scroll horizontal à cause des vagues */
    padding-bottom: 200px; /* Espace pour les vagues en bas */
}

.song-card {
    display: block; /* Pour que toute la carte soit cliquable */
    text-decoration: none; /* Enlever le soulignement */
    color: white; /* Garder ton texte blanc */
    transition: transform 0.3s, background 0.3s;
}

.song-card:hover {
    transform: translateY(-5px);
    background: var(--primary-red); /* Elle s'illumine au survol */
    color: var(--accent-gold);
}
/*
|--------------------------------------------------------------------------
| 2. HERO BANNER
|--------------------------------------------------------------------------
*/
.hero-banner {
    /* Dégradé plus doux pour la lisibilité */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(181, 44, 41, 0.6)), 
                url('../img/image23.jpeg');
    background-size: cover;
    background-position: center 30%;
    padding: 20px 20px 100px 20px; /* Grand padding bas pour laisser la place au bloc principal */
    text-align: center;
    position: relative;
}

/* NAVBAR GLASSMORPHISM */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(20, 5, 5, 0.85); /* Fond sombre semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
}

.nav-logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-gold);
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-item {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
}

.nav-item:hover { color: var(--accent-gold); }

/* Boutons spéciaux */
.btn-login { border: 1px solid var(--accent-gold); padding: 8px 15px; border-radius: 20px; color: var(--accent-gold); }
.btn-login:hover { background: var(--accent-gold); color: #000; }

.btn-register { background: var(--primary-red); color: white; padding: 8px 15px; border-radius: 20px; }
.btn-register:hover { background: #fff; color: #000; }

.btn-donate { color: #4CAF50; border: 1px solid #4CAF50; padding: 6px 12px; border-radius: 5px; font-size: 14px; }

/* DROPDOWN MENU */
.dropdown { position: relative; display: inline-block; }
.dropdown-btn { background: none; border: none; cursor: pointer; font-family: inherit; }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #1a0505;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    z-index: 1;
    overflow: hidden;
}

.dropdown:hover .dropdown-content { display: block; }

.dropdown-content a, .dropdown-content span, .dropdown-content button {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
}
.dropdown-content button { width: 100%; background: none; border: none; cursor: pointer; border-top: 1px solid #333;}
.dropdown-content a:hover, .dropdown-content button:hover { background-color: rgba(255,255,255,0.1); }
.user-name { color: #888; font-size: 12px; border-bottom: 1px solid #333; }

/* AJUSTEMENT DU BODY */
/* Puisque le menu est fixe, il faut descendre le contenu des pages */
body { padding-top: 80px; }

nav {
    display: flex;
    justify-content: center; /* Centré pour l'élégance */
    align-items: center;
    margin-bottom: 40px;
}

.logo-container {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-img {
    height: 50px;
    margin-right: 15px;
    border-radius: 0; /* Logo rond si carré à l'origine */
    border: none;
}

.header-title {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Taille responsive */
    margin: 0;
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-weight: 400;
}

/*
|--------------------------------------------------------------------------
| 3. MAIN CONTENT (SEARCH BOX)
|--------------------------------------------------------------------------
*/
main.content {
    /* Style Glassmorphism flottant */
    background: rgba(20, 20, 20, 0.6); /* Fond semi-transparent sombre */
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    
    padding: 50px 30px;
    text-align: center;
    border-radius: 20px;
    max-width: 700px;
    margin: -60px auto 60px auto; /* Chevauchement sur le header */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

/* Bouton Principal */
button {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    padding: 15px 40px;
    background: var(--accent-gold);
    color: #333; /* Texte sombre sur bouton or */
    border: none;
    border-radius: 50px; /* Bouton arrondi moderne */
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    transition: all 0.3s ease;
}

button:hover {
    background: #fff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/*
|--------------------------------------------------------------------------
| 4. SECTIONS (Video, Steps, Songs)
|--------------------------------------------------------------------------
*/
section {
    max-width: 1000px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::after {
    /* Petit trait décoratif sous les titres */
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

/* VIDEO */
.video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0,0,0,0.3);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.3s;
}
.video-placeholder:hover {
    background: rgba(0,0,0,0.5);
    border-color: var(--accent-gold);
}
.video-placeholder span {
    font-size: 50px;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

/* STEPS (Comment ça marche) */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.step {
    background: var(--glass-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.step .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: inline-block;
    background: rgba(255,255,255,0.1);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
}

/* SONGS LIST (Grille de chants) */
.songs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.song-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.song-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

/* MISSION & FOOTER */
.mission-section p {
    text-align: center;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-muted);
}

.footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    position: relative;
    z-index: 10;
}

/*
|--------------------------------------------------------------------------
| 5. BACKGROUND WAVES (Animation)
|--------------------------------------------------------------------------
*/
.topaccords-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Un fond radial rouge profond qui reste derrière tout */
    background: radial-gradient(circle at 50% 120%, #6e0d0d 0%, #1a0505 60%);
    z-index: -2;
}

.topaccords-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 450px; /* Hauteur ajustée */
    pointer-events: none;
    z-index: -1;
}

.wave {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
}

.wave path {
    stroke: rgba(255, 80, 80, 0.6); /* Rouge plus lumineux pour les traits */
    stroke-width: 1.5;
    fill: none;
    animation: waveShape 7s ease-in-out infinite;
}

/* Animation et Opacité étagée */
.wave1 path { opacity: 0.6; animation-duration: 5s; stroke: #ff5252; }
.wave2 path { opacity: 0.5; animation-duration: 7s; stroke: #ff7b7b; }
.wave3 path { opacity: 0.4; animation-duration: 9s; stroke: #b52c29; }
.wave4 path { opacity: 0.3; animation-duration: 12s; }
.wave5 path { opacity: 0.2; animation-duration: 15s; }

@keyframes waveShape {
    0%, 100% {
        d: path("M0,190 C220,100 440,270 660,160 C880,70 1100,260 1320,150 C1540,70 1760,260 1920,190");
        transform: translateY(0);
    }
    50% {
        d: path("M0,230 C220,310 440,130 660,250 C880,310 1100,120 1320,270 C1540,320 1760,120 1920,230");
        transform: translateY(-15px);
    }
}
/* |--------------------------------------------------------------------------
| STYLE DU FORMULAIRE DE RECHERCHE
|-------------------------------------------------------------------------- 
*/

.search-form {
    display: flex;
    gap: 15px; /* Espace entre l'input et le bouton */
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap; /* Permet de passer à la ligne sur mobile */
}

.search-input {
    flex: 1; /* Prend toute la place disponible */
    min-width: 250px; /* Largeur minimum */
    padding: 15px 20px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    border: 2px solid transparent;
    border-radius: 50px; /* Arrondi comme le bouton */
    outline: none;
    background: rgba(255, 255, 255, 0.9); /* Blanc légèrement transparent */
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.search-input:focus {
    background: #fff;
    border-color: var(--accent-gold); /* Bordure or quand on clique dedans */
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.search-input::placeholder {
    color: #888;
}

/* Ajustement spécifique pour le bouton dans le formulaire */
.search-btn {
    /* Le style de base 'button' s'applique déjà, on ajuste juste les marges si besoin */
    margin: 0; 
    white-space: nowrap; /* Empêche le texte du bouton de se couper */
}

/*
|--------------------------------------------------------------------------
| STYLE DE LA PAGE DE RÉSULTATS (search-results-page)
|--------------------------------------------------------------------------
*/

.search-results-page {
    /* Assure que la page utilise le même fond sombre */
    background: var(--main-bg-color); 
    color: var(--text-main);
    padding: 0;
}

.results-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.results-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-main);
}

.results-title .icon {
    color: var(--accent-gold);
    margin-right: 15px;
}

.results-count {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}
.results-count strong {
    color: var(--accent-gold);
}

/* LISTE DES CHANTS */
.songs-results-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 15px;
}

.song-item-card {
    /* Utilisation de l'effet Glassmorphism pour les cartes de résultats */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.song-item-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.song-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    text-decoration: none;
    color: var(--text-main);
}

.song-title {
    font-size: 1.2rem;
    font-weight: 600;
    flex-grow: 1; /* Permet au titre de prendre de la place */
}

.song-type {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 15px;
}

.arrow-icon {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    margin-left: 20px;
    transition: transform 0.3s ease;
}

/* Animation de l'icône de flèche au survol */
.song-item-card:hover .arrow-icon {
    transform: translateX(5px);
}

/* AUCUN RÉSULTAT */
.no-results-message {
    text-align: center;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-top: 30px;
}

.no-results-message p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.back-home-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 2px;
}

.back-home-link:hover {
    color: #fff;
}

/*
|--------------------------------------------------------------------------
| STYLE DE LA PAGE DE DÉTAIL DU CHANT (song-details-page)
|--------------------------------------------------------------------------
*/

.song-details-page {
    /* Utilise le fond sombre global */
    background: var(--main-bg-color); 
    color: var(--text-main);
}

.song-content-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-gold);
}

/* En-tête du chant */
.song-header {
    text-align: center;
    padding: 30px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--primary-red);
}

.song-header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin: 0;
    color: var(--accent-gold); /* Titre en couleur accentuée */
}

.type-tag {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 10px;
}

.type-tag strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Titres de Section (Paroles/Accords) */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    color: var(--primary-red);
    font-size: 1.5rem;
}

/* Contenu Principal (Paroles et Accords) */
.content-box {
    /* Style Glassmorphism pour le conteneur */
    background: var(--glass-bg); 
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow-x: auto; /* Permet le défilement horizontal si les accords sont très longs */
}

.content-box pre {
    /* Réinitialisation du style par défaut de <pre> */
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: 'Consolas', 'Courier New', monospace; /* Police mono pour les accords */
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main); /* Texte blanc lisible */
    white-space: pre-wrap; /* Assure que les paroles longues reviennent à la ligne */
}

.chords-box pre {
    /* Style spécifique pour les accords pour mieux les distinguer */
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-gold); /* Accords en couleur OR */
}

/*
|--------------------------------------------------------------------------
| STYLE DE LA PAGE D'ADMINISTRATION/FORMULAIRE (admin-form-page)
|--------------------------------------------------------------------------
*/

.admin-form-page {
    /* Utilise le fond sombre global */
    background: var(--main-bg-color); 
    color: var(--text-main);
    padding: 0;
}

.admin-container {
    max-width: 700px;
    margin: 60px auto;
    padding: 30px;
    
    /* Style Glassmorphism pour le conteneur du formulaire */
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.admin-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 30px;
    color: var(--accent-gold);
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 15px;
}

/* Styles des champs du formulaire */
.form-group {
    margin-bottom: 20px;
}

label { 
    font-weight: 600; 
    margin-bottom: 8px; 
    display: block; 
    color: var(--text-muted);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    margin-top: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    
    /* Style d'entrée sombre/élégant */
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
}

/* Styles spécifiques pour les textarea */
.form-textarea {
    resize: vertical;
}

/* Message de succès */
.success-message {
    background: rgba(0, 255, 0, 0.2);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 0, 0.5);
}

/* Bouton d'enregistrement */
.submit-btn {
    /* Reprise du style bouton accentué (Or) */
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    padding: 15px 40px;
    background: var(--primary-red); /* Utilisation du rouge principal pour l'action admin */
    color: var(--light-text-color); /* Texte blanc */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(181, 44, 41, 0.4);
    transition: all 0.3s ease;
    width: 100%; /* Prend toute la largeur */
}

.submit-btn:hover {
    background: var(--accent-gold); /* Survol en or */
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}
/* |--------------------------------------------------------------------------
| STYLE DES LIENS D'AUTHENTIFICATION (À ajouter à style.css)
|-------------------------------------------------------------------------- */
.auth-links {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px; /* Espace entre les boutons */
    flex-wrap: wrap; 
}

.btn-auth, .btn-admin-link {
    /* Style général des boutons */
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer; /* Indiquer que ce sont des éléments cliquables */
}

/* Style pour le bouton Connexion/Déconnexion */
.btn-auth {
    background: var(--glass-bg); /* Fond semi-transparent, supposé être défini */
    color: var(--text-main); /* Couleur du texte principal */
    border: 1px solid var(--glass-border); /* Bordure fine */
}

.btn-auth:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-gold); /* Supposé être défini */
}

/* Style pour le lien Ajouter un Chant (Admin) */
.btn-admin-link {
    background: var(--primary-red); /* Utilisation d'une couleur d'accent forte, supposée être définie */
    color: var(--light-text-color); /* Couleur du texte clair */
    box-shadow: 0 4px 10px rgba(181, 44, 41, 0.4);
}

.btn-admin-link:hover {
    background: var(--accent-gold); 
    color: #333;
    transform: translateY(-1px);
}

.logout-btn {
    border: none;
    background: none;
    padding: 0; /* Pour que le padding soit géré par .btn-auth */
}

.fav-active {
    background-color: var(--primary-red) !important;
    border-color: var(--primary-red) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(181, 44, 41, 0.6);
}