/* --- POLICES ---
   Un seul appel Google Fonts pour tout le site (regroupe tous les poids
   utilisés par index.html, calendar.php, etc.) : évite les requêtes
   dupliquées et les @import redondants sur certaines pages. */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,wght@0,400;0,700;1,400&family=Inter:wght@200;300;400;500&display=swap');

:root {
    --noir: #050505;
    --blanc: #ffffff;
    --gris: #999;
}

* {
    box-sizing: border-box;
    cursor: default;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--noir);
    color: var(--blanc);
}

/* Éviter le défilement du body quand la modale est ouverte */
body.modal-open {
    overflow: hidden;
}

/* --- BANDEAU (HEADER) --- */

.logo a {
    font-family: 'Bodoni Moda', serif;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--blanc) !important;
    text-decoration: none !important;
    border: none !important;
    /* Ajoute-le ici aussi */
    cursor: pointer !important; 
}

nav a {
    margin-left: 20px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--gris);
	opacity: 0.9;
    text-transform: uppercase;
    text-decoration: none;
    /* On ajoute la main au survol ici */
    cursor: pointer !important; 
}

nav a:hover, 
nav a.active {
    color: var(--blanc) !important;
    opacity: 1 !important;
}

/* --- GRILLE DE VIGNETTES --- */
.artist-grid, .gallery-grid {
    display: grid;
    /* On force 5 colonnes sur grand écran */
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px;
    max-width: 1400px; /* Augmenté un peu pour 5 vignettes */
    margin: 0 auto;
    padding: 20px 5%;
}

.artist-item, .photo-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}

.artist-item img, .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.artist-item:hover img, .photo-item:hover img {
    transform: scale(1.08);
}

/* Tablettes (4 vignettes) */
@media (max-width: 1100px) {
    .artist-grid, .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablettes portrait (3 vignettes) */
@media (max-width: 850px) {
    .artist-grid, .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Mobiles (2 vignettes) */
@media (max-width: 600px) {
    .artist-grid, .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px 3%;
    }
}

/* --- FENÊTRE MODALE --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100vw; 
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(8px);
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/* Conteneur principal de la modale (l'arrière-plan sombre) */
/* La Modale */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(5, 5, 5, 0.98); /* Fond presque noir pur */
    align-items: center;
    justify-content: center;
}

/* Conteneur Image + Légende */
.modal-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 85%; /* Marge pour les flèches */
    max-height: 90vh;
}

#modalImg {
    max-width: 100%;
    max-height: 80vh; /* Laisse de la place pour la légende */
    object-fit: contain;
}

.modal-caption {
    margin-top: 20px;
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* FLÈCHES PRO (Fines et élégantes) */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3); /* Discrètes par défaut */
    font-size: 4rem;
    font-weight: 100; /* Très fines */
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    padding: 0 20px;
    z-index: 1010;
}

.nav-arrow:hover {
    color: rgba(255, 255, 255, 1); /* S'allument au survol */
}

.left-arrow { left: 10px; }
.right-arrow { right: 10px; }

/* Fermeture */
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
}
.close-modal:hover { opacity: 1; }

/* --- FOOTER DEUX LIGNES (VERSION VISIBLE) --- */
.site-footer {
    width: 100%;
    padding: 20px 0 30px !important;
    margin-top: 20px !important;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 20px !important;
        padding: 20px 0 30px !important;
    }
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #bbb; /* Gris clair */
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer !important;
}

.footer-link:hover {
    color: #fff;
}

/* Ton nom et copyright - On augmente la visibilité ici */
.footer-copyright {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem; /* Taille augmentée */
    font-weight: 400;   /* Un peu plus épais */
    text-transform: uppercase;
    letter-spacing: 4px; /* Un peu moins d'espace pour que les lettres soient plus denses */
    color: #999; /* Gris beaucoup plus clair (très lisible sur noir) */
    cursor: default;
    display: block;
}

/* --- STYLE DU NOM SUR LA VIGNETTE --- */

.artist-item {
    position: relative;
    overflow: hidden;
    display: block; /* S'assure que le lien prend toute la place */
}

.artist-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    /* Un dégradé sombre au pied de l'image pour aider la lecture */
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    text-align: left;
    z-index: 10;
}

.artist-info h2 {
    margin: 0;
    font-family: 'Bodoni Moda', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: #ffffff; /* Texte en blanc */
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* --- L'OMBRE PORTÉE --- */
    /* x=2px, y=2px, flou=4px, couleur=noir */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); 
}

.artist-info span {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: #ffffff; /* Le petit texte "CONCERT" aussi en blanc */
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
	opacity: 0.5; 
    transition: all 0.3s ease;
}

/* C'est cette règle qui déclenche l'éclairage au survol de la vignette */
.artist-item:hover .artist-info span {
    opacity: 1 !important;
    color: #ffffff !important;
    letter-spacing: 3px; /* Optionnel : écarte un peu les lettres pour l'effet */
}

/* --- PAGE CONTACT --- */

/* Conteneur principal pour centrer le contenu */
.contact-container {
    padding: 100px 5% 60px; /* Espace en haut pour le header fixe */
    max-width: 900px; /* Limite la largeur pour une meilleure lecture */
    margin: 0 auto; /* Centre le conteneur dans la page */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre le titre et le wrapper */
}

/* Wrapper pour le formulaire : fond sombre, padding et bordure fine */
.contact-form-wrapper {
    width: 100%; /* Prend toute la largeur disponible du conteneur parent */
    max-width: 600px; /* Limite la largeur du formulaire lui-même */
    background: #0a0a0a; /* Un noir légèrement plus clair que le fond */
    padding: 40px;
    border: 1px solid #1a1a1a; /* Une bordure très discrète */
}

/* Groupe pour Nom et Prénom sur la même ligne */
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Deux colonnes égales */
    gap: 20px; /* Espace entre les deux champs */
    margin-bottom: 20px;
}

/* Styles communs pour tous les champs de saisie */
input, textarea {
    width: 100%;
    background: #111; /* Fond très sombre */
    border: 1px solid #222; /* Bordure sombre */
    padding: 15px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none; /* Enlève la bordure par défaut au focus */
    transition: border-color 0.3s ease;
}

/* Changement de couleur de bordure quand on clique dans un champ */
input:focus, textarea:focus {
    border-color: var(--gris); /* Utilise la variable définie dans votre CSS */
}

/* Style spécifique pour l'email (prend toute la largeur) */
#email {
    margin-bottom: 20px;
}

/* Style pour la zone de texte (message) */
textarea {
    margin-bottom: 20px;
    resize: vertical; /* Permet à l'utilisateur d'agrandir seulement en hauteur */
}

@media (min-width: 1024px) {
    html {
        overflow-y: scroll;  /* Force la scrollbar verticale en permanence */
    }
}

body {
    min-height: 101vh; /* Force un tout petit débordement vertical */
}

/* Bouton Envoyer élégant */
.submit-btn {
    background: var(--blanc);
    color: var(--noir);
    border: none;
    padding: 15px 40px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: block; /* Pour l'effet au survol */
    width: auto; /* Taille auto, ne prend pas toute la largeur */
}

.submit-btn:hover {
    opacity: 0.8; /* Légère transparence au survol */
}

/* --- RESPONSIVE POUR MOBILE --- */

@media (max-width: 600px) {
    /* Sur mobile, Nom et Prénom s'empilent verticalement */
    .form-group {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 20px; /* Moins de padding sur mobile */
    }
}/* Barre de recherche */
.search-container {
    margin-bottom: 40px;
    text-align: center;
}

#artistSearch {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 10px;
    width: 300px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#artistSearch:focus {
    outline: none;
    border-bottom-color: #fff;
}

/* Index alphabétique */
.alphabet-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 5%;
}

.alphabet-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer !important;
}

.alphabet-link:hover {
    color: #fff;
}5 

/* Titre de section (A, B, C...) */
.letter-section-title {
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 40px 0 20px;
    padding-bottom: 10px;
}

.sub-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; /* Plus petit que le nom */
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 8px; /* Espacement élégant */
    color: rgba(255, 255, 255, 0.8); /* Blanc légèrement transparent */
    margin-top: -30px; /* Pour le rapprocher du nom */
    margin-bottom: 50px; /* Espace avant le bouton */
    animation: fadeIn 2.5s ease-out;
}

/* Empêche le contenu d'être caché sous le header lors du clic sur l'alphabet */
.letter-anchor {
    scroll-margin-top: 120px; /* 80px du header + 40px de marge de confort */
    display: block;
    width: 100%;
}
/* La vignette de la lettre */
.letter-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Garde la forme carrée */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.4s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

/* Le texte de la lettre */
.letter-tile span {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0;
}

/* L'effet lumineux au survol */
.letter-tile:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15); /* Halo lumineux */
    transform: translateY(-5px);
}

/* Optionnel : un petit point ou trait sous la lettre */
.letter-tile::after {
    content: '';
    position: absolute;
    bottom: 20%;
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

/* --- STYLE DU BOUTON ADMINISTRATION --- */

.admin-link {
    display: inline-flex !important;
    align-items: center;
    padding-left: 15px !important; /* Espace après "À Propos" */
    
    /* EFFET GRIS PAR DÉFAUT */
    opacity: 0.5 !important; 
    
    transition: opacity 0.3s ease;
    text-decoration: none;
    cursor: pointer !important;
}

.admin-link:hover {
    /* EFFET BLANC AU SURVOL */
    opacity: 1 !important;
}

.admin-icon {
    display: inline-block !important;
    visibility: visible !important;
    width: 14px !important;
    height: 14px !important;
    vertical-align: middle;
    
    /* Rend l'icône blanche (l'opacité du lien gère le gris) */
    filter: invert(1); 
}

/* --- ADAPTATIONS MOBILES (Smartphone & Tablette portrait) --- */
@media (max-width: 768px) {

    /* CORRECTION HEADER : supprime l'espace entre les deux lignes */
    #main-header {
        align-content: flex-start !important;
        justify-content: flex-start !important;
        row-gap: 0 !important;
    }
    #main-header .logo {
        width: 100% !important;
        margin: 0 !important;
        padding: 4px 0 !important;
        line-height: 1 !important;
    }
    #main-header nav {
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 4px 0 !important;
        border-top: 1px solid #1a1a1a !important;
        row-gap: 0 !important;
    }

    .logo a {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px;
    }
    
    nav a {
        font-size: 0.6rem !important;
        white-space: nowrap;
    }

    /* 2. Logo Admin (Correction visibilité) */
    .admin-link {
        display: inline-flex !important;
        align-items: center;
        margin: 0 !important;
        padding: 0 5px !important;
    }

    .admin-icon {
        display: block !important;
        visibility: visible !important;
        width: 14px !important;
        height: 14px !important;
        filter: invert(1);
        opacity: 0.8;
    }

    /* 3. Grille Nouveautés (3 vignettes par ligne) */
    .nouveautes-grid {
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 8px !important;
        padding: 0 10px !important;
        width: 100% !important;
    }

    .artist-item img {
        height: 120px !important; 
        object-fit: cover;
    }

    .artist-info span {
        font-size: 0.6rem !important;
        letter-spacing: 0.5px !important;
    }

    /* 4. Footer et Retour en haut */
    .site-footer {
        padding-top: 15px !important; 
        margin-top: 15px !important;  
    }

    .back-to-top-text {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
        margin: 10px auto 40px !important;
        padding: 10px 0 !important;
        font-size: 0.7rem !important;
        letter-spacing: 5px !important;
        text-transform: uppercase;
        border: none !important;
        background: none !important;
        color: var(--gris) !important;
    }

    /* Uniformise et remonte les titres de pages */
    .nouveautes-title, 
    .contact-header, 
    .about-header, 
    .artist-header-title,
    .gallery-main-title {
        margin-top: 40px !important;    
        margin-bottom: 30px !important; 
        font-size: 1.1rem !important;   
        letter-spacing: 4px !important; 
        text-align: center !important;
    }
}

#backToTop {
    display: none; /* Caché par défaut */
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1001;
    
    /* Style calqué sur le formulaire de contact et la page CGU */
    background: #0a0a0a; 
    border: 1px solid #1a1a1a;
    color: #fff;
    
    padding: 12px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    cursor: pointer !important;
    transition: all 0.3s ease;
}

#backToTop:hover {
    /* Effet de survol cohérent avec vos boutons admin */
    background-color: #7f7; 
    color: #000;
    border-color: #7f7;
}

/* Adaptation mobile pour ne pas gêner la navigation */
@media (max-width: 600px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        padding: 8px 14px;
    }
}

/* Animation de l'éclat lumineux */
@keyframes glow-pulse {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
        opacity: 0.6;
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 0 25px rgba(255, 255, 255, 0.3);
        opacity: 1;
    }
    100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
        opacity: 0.6;
    }
}

.back-to-top-text {
    display: block;
    text-align: center;
    margin: 20px auto 10px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gris);
    cursor: pointer;
    transition: 0.3s;
}

.back-to-top-text:hover {
    color: var(--blanc);
}

/* Style de base (PC) */
.back-to-top-text {
    display: block;
    width: fit-content;
    margin: 20px auto 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gris) !important;
    text-decoration: none;
    cursor: pointer !important;
    transition: 0.3s;
}


.back-to-top-text:hover {
    color: var(--blanc) !important;
}

/* ===== AMÉLIORATIONS UX ===== */

/* Animation fade entre les pages */
main {
    animation: fadeInPage 0.3s ease-out;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zones tactiles mobiles (min 44px) */
@media (max-width: 768px) {
    .alphabet-link,
    .artist-item,
    .btn,
    .submit-btn,
    .admin-link,
    .back-to-top,
    .photo-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    /* nav a séparé : zone tactile via padding uniquement, pas min-height */
    nav a {
        min-height: unset;
        padding: 10px 0;
    }
    
    /* Ajustement pour les vignettes sans perdre le ratio */
    .artist-item,
    .photo-item {
        min-height: auto;
    }
    
    /* Messages vides plus lisibles */
    .empty-search-msg,
    .empty-photos-msg {
        padding: 30px 15px;
        font-size: 0.7rem;
    }
}

/* Loader pour les images */
.photo-item img {
    transition: opacity 0.3s ease;
}

.calendar-link {
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: 0.3s;
    font-size: 1rem;
}

.calendar-link:hover {
    opacity: 1;
}

/* Tooltip pour admin (PC uniquement) */
@media (min-width: 769px) {
    .admin-link {
        position: relative;
    }
    
    .admin-link[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        background: #222;
        color: #fff;
        font-size: 0.65rem;
        padding: 4px 8px;
        border-radius: 4px;
        white-space: nowrap;
        z-index: 100;
        pointer-events: none;
    }
}