/* === Styles généraux === */
body {
    font-family: 'Georgia', serif;
    background-color: #1a1a1a;
    color: #f0e6d2;
    margin: 0;
    padding: 0;
}

header {
    background-color: #2d1f14;
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #c9a227;
}

header h1 {
    font-family: 'Cinzel', serif;
    margin: 0;
    color: #c9a227;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

nav a {
    color: #f0e6d2;
    text-decoration: none;
}

nav a:hover {
    color: #c9a227;
}

.intro {
    text-align: center;
    padding: 2rem;
}

.cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
}

.cards article {
    background-color: #2d1f14;
    border: 1px solid #c9a227;
    padding: 1rem;
    width: 250px;
    text-align: center;
    border-radius: 8px;
}

/* === Boutons généraux (pages normales) === */
.btn {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #c9a227, #e0c15b);
    color: #1a1a1a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #e0c15b, #c9a227);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    transform: translateY(-2px);
}

/* === Section Hero avec parallax === */
.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 1rem;
    animation: heroFadeIn 1.5s ease forwards;
    opacity: 0;
}

.hero-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #c9a227;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.hero-map {
    background: url('assets/Maps/Map-Faerun.webp') center/cover no-repeat;
    background-attachment: fixed; /* Optionnel : effet parallax */
}

.hero-map .hero-overlay {
    background: rgba(0, 0, 0, 0.55); /* Rend le texte lisible */
}

/* === Animation fade-in pour les sections === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Hero */
@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.05) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

/* === Page de connexion === */
html, body.login-page {
    height: 100%;
    margin: 0;
}

body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background-color: rgba(45, 31, 20, 0.95);
    border: 2px solid #c9a227;
    border-radius: 10px;
    width: 360px;
    padding: 2rem;
    box-shadow: 0 0 25px rgba(201, 162, 39, 0.3);
    animation: fadeIn 0.8s ease-in-out;
    text-align: center;
}

.login-container h1 {
    font-family: 'Cinzel', serif;
    color: #c9a227;
    margin-bottom: 0.5rem;
}

.login-container h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #f0e6d2;
}

label {
    font-weight: bold;
    font-size: 0.95rem;
    display: block;
    text-align: left;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.6rem;
    margin: 0.5rem 0 1rem;
    border: 1px solid #c9a227;
    border-radius: 4px;
    background-color: #1a1a1a;
    color: #f0e6d2;
    font-size: 1rem;
}

input:focus {
    border-color: #e0c15b;
    outline: none;
}

/* Boutons spécifiques à la page login */
.login-page .btn,
.login-page button {
    width: 100%;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #c9a227, #e0c15b);
    color: #1a1a1a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-page .btn:hover,
.login-page button:hover {
    background: linear-gradient(135deg, #e0c15b, #c9a227);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
    transform: translateY(-2px);
}

.return-home {
    margin-top: 1rem;
    font-size: 0.9rem;
    display: block;
}

.map-section {
    text-align: center;
    padding: 2rem;
    background-color: #2d1f14;
    border-top: 2px solid #c9a227;
}

.map-section h2 {
    color: #c9a227;
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
}

/* Animation fadeIn */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.character-card {
    background: #1f1f1f;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.character-card img {
    width: 140px;
    height: auto;
    border-radius: 8px;
}

.character-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.modal-content {
    display: flex;
    gap: 20px;
    background: #202020;
    padding: 20px;
    border-radius: 12px;
    max-width: 900px;
    width: 95%;
}

.modal-image img {
    max-width: 300px;
    height: auto;
    border-radius: 10px;
}

#personnages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
    padding: 20px 40px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    animation: fadeIn .25s ease-out;
}

/* Section Informations (titre + espacement) */
.info-section {
    text-align: center;
    padding-top: 2rem;
}

.info-section h2 {
    color: #c9a227;
    font-family: 'Cinzel', serif;
}

/* === Page Informations === */

.info-section {
    text-align: center;
    padding: 2.5rem 1rem 3rem;
}

.info-section h2 {
    color: #c9a227;            /* or doré, comme ton thème */
    font-family: 'Cinzel', serif;
    margin-bottom: 0.4rem;
}

.info-section-subtitle {
    margin: 0 auto 1.8rem;
    max-width: 700px;
    font-size: 0.95rem;
    color: #f0e6d2;
}

/* Réutilise ta classe .cards mais recentre et limite la largeur */
.info-cards {
    max-width: 1100px;
    margin: 0 auto;
}

/* Style des tuiles (compatible avec tes cartes existantes) */
.info-card {
    background-color: #2d1f14;
    border: 1px solid #c9a227;
    border-radius: 10px;
    padding: 1.5rem 1.25rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform .2s ease, box-shadow .2s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.info-card h3 {
    margin-bottom: 0.6rem;
    color: #f4d47b;
}

/* Séparateur entre Wikis et Cartes */
.info-separator {
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid #c9a227;
    opacity: 0.6;
}

/* Centrer les titres des sections d'information */
.info-section h2,
.info-section-subtitle {
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.95); }
    to { opacity: 1; transform: scale(1); }
}

body {
    font-family: 'Inter', sans-serif;
    color: #ddd;
}

h1, h2, h3 {
    font-family: 'IM Fell English', serif;
}

/* Layout de la modale sur mobile */
@media (max-width: 640px) {

    .modal-content {
        flex-direction: column;   /* image au-dessus, texte en dessous */
        align-items: center;
        max-height: 90vh;         /* ne dépasse pas la hauteur de l'écran */
        overflow-y: auto;         /* on scroll à l'intérieur si c'est trop long */
    }

    .modal-image img {
        max-width: 100%;          /* l'image prend la largeur disponible */
    }

    .modal-info {
        width: 100%;
    }
}