/* --- IMPORTATION DES POLICES ---*/
@import url('https://fonts.googleapis.com/css2?family=Metal+Mania&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* --- DÉCLARATION DES VARIABLES DE COULEURS PRINCIPALES --- */
:root {
    --red-marple: #CA2851;
    --cream-marple: #FFE3B3;
    --orange-marple: #fca766;
    --pink-marple: #FF6766;
    --grey-25: #252525;
}

*,
*::after,
*::before {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--grey-25);
    color: whitesmoke;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
}

body.no-scroll {
    overflow: hidden;
}

header {
    position: absolute;
    top: 25px;
    left: 5%;
    width: 90%;
    height: 80px;
    background-color: var(--cream-marple);
    border-radius: 10px;
    display: flex;
    align-items: center;
    z-index: 10;
}

nav {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
}

header > nav> a {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    color : whitesmoke;
    text-decoration: none;
    font-size: 1.3rem;
    background-color: var(--red-marple);
    border: solid 1px var(--grey-25);
    padding: 10px 25px;
    border-radius: 10px;
    
}

header > nav > a:hover {
    color : var(--red-marple);
    background-color: whitesmoke;
    border: solid 1px var(--red-marple);
}

/* --- BANNIERE --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    object-fit: cover;
    filter: brightness(50%);
}

.title {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Metal Mania", system-ui;
    font-size: 4.5rem;
    text-align:center;
    font-style: normal;
    font-weight: 400;
    margin: 0;
    z-index: 3;
    transition: 200ms ease-in-out;
}

#title {
    position: absolute;
    top: 37.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Metal Mania", system-ui;
    font-size: 4rem;
    text-align:center;
    font-style: normal;
    font-weight: 400;
    margin: 0;
    z-index: 3;
    transition: 200ms ease-in-out;
}

.title:hover {
    text-shadow: 
        0 0 7px #fff,
        0 0 10px #fff,
        0 0 42px var(--red-marple),
        0 0 77px var(--red-marple),
        0 0 100px var(--red-marple);
}

#title:hover {
    text-shadow: 
        0 0 7px #fff,
        0 0 10px #fff,
        0 0 42px var(--red-marple),
        0 0 77px var(--red-marple),
        0 0 100px var(--red-marple);
}

#intro {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    text-align:center;
    background: rgb(25 25 25 / 60%);
    border-radius: 10px;
    padding: 5px;
    margin: 0;
    z-index: 3;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.wave {
  position: absolute;
  bottom: -1px; 
  left: 0;
  width: 100%;
  height: 150px;
  z-index: 2;
}

/* --- BARRE DE RECHERCHE --- */
.barre-recherche {
    margin: 30px auto; 
    text-align: center; 
    max-width: 500px;
}

#form-recherche{
    display: flex; 
    gap: 10px;
}

#recherche {
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 8px; 
    flex: 1; 
    font-size: 16px;
}

.btn-valider-recherche {
    margin: 0; 
    width: auto; 
    padding: 0 20px;
    background-color: var(--pink-marple);
    border-radius: 8px;
}

#del-recherche {
    color: var(--orange-marple); 
    font-size: 14px;
}

.voir-plus {
    display:flex;
    justify-content:center;
    gap:15px;
}

.voir-plus > a {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    color : whitesmoke;
    text-decoration: none;
    font-size: 1rem;
    background-color: var(--red-marple);
    border: solid 1px var(--grey-25);
    padding: 10px 25px;
    border-radius: 10px;
    
}

.voir-plus > a:hover {
    color : var(--red-marple);
    background-color: whitesmoke;
    border: solid 1px var(--red-marple);
}

/* --- BARRE D'OUTILS (FILTRES ET TRI) ---*/
.barre-outils {
    margin: 20px; 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    align-items: center;
}

/* --- GRILLE ET CARTES AVEC LES PERSONNAGES, CARTES ET EVENTS --- */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 25px 20px;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background-color: var(--red-marple);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    font-family: sans-serif;
    color: white;
    cursor: pointer;
    transition: 300ms ease-in-out;
}

.card img {
    width: 100%;
    display: block;
}

.card .nom {
    padding: 20px 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.card .nom .type {
    display: block; 
    font-size: 11px; 
    opacity: 0.6; 
    text-transform: uppercase;
}
.card:hover {
    transform: rotate(-6deg);
}

.card:hover ~ .card {
    z-index: 1;
    
}

.grid:has(.card:hover) .card:not(:hover) {
    opacity: .8;
}

.ajout {
    text-align: center; 
    margin: 30px 0;
}

.ajout > a {
    background-color: var(--red-marple); 
    color: white; 
    padding: 12px 25px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: bold;
}


/* --- MODALE GLOBALE POUR LES POP-UPS DE L'INDEX.PHP --- */
#globalModal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    align-items: center; 
    justify-content: center; 
}

.global-modal-content { 
    background-color: var(--grey-25); 
    color: white; 
    padding: 30px; 
    border-radius: 15px; 
    max-width: 500px; 
    width: 90%; 
    text-align: center; 
    position: relative; 
    border: 2px solid var(--red-marple); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
}

.modal-close { 
    position: absolute; 
    top: 15px; 
    right: 20px;
    font-size: 30px; 
    color: #aaa; 
    cursor: pointer; 
    font-weight: bold; 
}
        
.modal-close:hover { 
    color: var(--orange-marple); 
}

.modal-img { 
    max-width: 200px; 
    max-height: 200px; 
    border-radius: 10px; 
    margin-bottom: 15px; 
    border: 2px solid white; 
}

.badge { 
    display: inline-block; 
    padding: 5px 10px; 
    border-radius: 5px; 
    font-size: 12px; 
    text-transform: uppercase; 
    font-weight: bold; 
    margin-bottom: 10px; 
    background-color: var(--red-marple); }
    
#modalTitre {
    margin-top: 0; 
    color: var(--orange-marple);
}

/* --- MODALE PAR CATÉGORIE ---*/
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-contenu {
    background-color: var(--red-marple);
    color: white;
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    font-family: sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto; /* Permet de scroller si le texte de l'histoire est long */
}


.btn-fermer {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 30px;
    background: none; border: none;
    color: white; cursor: pointer;
}


.modal-header { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 20px; 
}

.modal-infos { 
    max-width: 60%; 
}

/* --- STYLE POUR CHAQUE LIGNE DE CHAQUE MODALE (A AMÉLIORER ET OPTIMISER PAR LA SUITE) --- */
#popNom {
    font-size: 40px; 
    margin: 0;
}

#popRole {
    margin: 5px 0; 
    font-weight: normal;
}

#popDetails {
    margin: 5px 0; 
    opacity: 0.8;
}

#popComedien {
    font-size: 12px; 
    font-style: italic;
}

#popDesc {
    margin-top: 15px;
}

#popNomCarte {
    font-size: 40px; 
    margin: 0;
}

#popTypeCarte {
    margin: 5px 0; 
    font-weight: normal;
}

#popPaysCarte {
    margin: 5px 0; 
    opacity: 0.8;
}

#popNomEvent {
    font-size: 40px; 
    margin: 0;
}

#popTypeEvent {
    margin: 5px 0; 
    font-weight: normal;
}

#popDateDeb {
    margin: 5px 0; 
    opacity: 0.8;
}

#popDateFin {
    margin: 5px 0; 
    opacity: 0.8;
}
.modal-avatar { 
    width: 150px; 
    height: 150px; 
    object-fit: cover; 
    border-radius: 15px; 
}

.section-titre { 
    text-align: center; 
    font-size: 22px; 
    font-weight: bold; 
    margin-top: 25px; 
    text-transform: uppercase; 
}

.section-texte { 
    text-align: center; 
    margin: 10px 0 20px 0; 
    font-size: 15px; 
    line-height: 1.5; 
    opacity: 0.9; 
}

/* --- SECTION FORMULAIRE POUR LES TROIS FORMULAIRES D'AJOUTS --- */
.body-form { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 40px 0; 
}
.box { 
    margin: auto; 
    background-color: var(--orange-marple); 
    color: #1a1a1a; 
    padding: 30px; 
    border-radius: 15px; 
    width: 100%; 
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); 
    box-sizing: border-box; 
    
}

fieldset { 
    border: 1px solid #ccc; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 15px; 
}

legend { 
    font-weight: bold; 
    padding: 0 10px; 
}

h2 { 
    text-align: center; 
    margin-top: 0; 
    font-size: 24px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    
}

.form-group { 
    margin-bottom: 15px; 
    display: flex; 
    flex-direction: column; 
    
}

#imagePerso {
    background: white; 
    padding: 5px; 
    border-radius: 5px;
}

#imageCarte {
    background: white; 
    padding: 5px; 
    border-radius: 5px;
}

#imageEvent {
    background: white; 
    padding: 5px; 
    border-radius: 5px;
}

label { 
    font-weight: bold; 
    margin-bottom: 5px; 
    font-size: 14px; 
    
}
        
input[type="text"], select { 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-size: 14px; 
    width: 100%; 
    box-sizing: border-box; 
    
}

.btn-valider-form { 
    background-color: var(--pink-marple); 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 8px; 
    width: 100%; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 10px; 
    transition: 0.2s; 
    
}
        
.btn-valider-form:hover { 
    background-color: #d64b53; 
    
}
   
.retour {
    display:flex;
    flex-direction: column;
    gap:5px;
    text-align: center; 
    margin-top: 15px;
}

.retour > a {
    color: #1a1a1a; 
    font-size: 14px; 
    font-weight: bold; 
    text-decoration: none;
}

/* --- ALERTES DU FORMULAIRE --- */
.alert { 
    padding: 10px; 
    border-radius: 5px; 
    margin-bottom: 15px; 
    text-align: center; 
    font-weight: bold; 
    
}

.alert-error { 
    background-color: var(--pink-marple); 
    color: white; 
    
}

.alert-success { 
    background-color: #5cb85c; 
    color: white; 
    
}
   
/* --- STYLE POUR LA PAGE A PROPOS --- */   
.auteur-card {
    max-width: 1000px;
    margin: 150px auto 50px;    
    padding: 30px;
    background-color: #1e222b; 
    color: #f0edcf;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-left: 6px solid var(--red-marple); 
}

.auteur-card h1 {
    font-family: "Metal Mania", system-ui;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 2.2rem;
    color: #8892b0;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center; 
}

.auteur-card h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
    text-align:left;
}

.auteur-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--pink-marple); 
    margin: 0 0 25px 0;
}

.auteur-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 18px;
}

.auteur-card p:last-of-type {
    background: rgba(255, 105, 210, 0.1); 
    border: 1px dashed var(--red-marple);
    padding: 15px;
    border-radius: 8px;
    margin-top: 25px;
}

.auteur-card a {
    color: #40a9ff;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auteur-card a:hover {
    color: var(--red-marple);
}

.auteur-card a[href*="forms.gle"] {
    display: inline-block;
    text-decoration: none;
    margin-top: 10px;
    background: var(--red-marple);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: transform 0.2s, background-color 0.2s;
}

.auteur-card a[href*="forms.gle"]:hover {
    background: #ffffff;
    color: var(--red-marple);
    border: 1px solid var(--red-marple);
}

/* --- STYLE DU FOOTER (PROCHE DU STYLE DE MA PASSION EN IMAGES) --- */
footer {
    background-color: var(--red-marple);
    color: #f6f6f6;
    text-align: center;
    box-sizing: border-box;
    margin: 30px 0 0 0;
    width: 100%;
    padding: 20px;
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-bottom: 20px;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

footer ul p {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 5px;
}

footer li {
    font-size: 0.9rem;}
        
        