/* Styles généraux */
body {
    margin: 0;
    padding: 0;
    font-family: 'Goudy Old Style', 'Palatino Linotype', serif;
    color: #d4c7a5;
    background: linear-gradient(to bottom, #0a1632 0%, #1c3b6f 30%, #4a5e8c 60%, #7986a7 85%, #a792ab 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Ciel étoilé */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 25px 25px, white, rgba(255,255,255,0)),
        radial-gradient(1px 1px at 50px 50px, white, rgba(255,255,255,0)),
        radial-gradient(1px 1px at 125px 125px, white, rgba(255,255,255,0)),
        radial-gradient(1.5px 1.5px at 75px 75px, white, rgba(255,255,255,0));
    background-size: 100px 100px;
    z-index: -1;
}

/* En-tête */
header {
    text-align: center;
    padding: 2rem 0;
    background-color: rgba(10, 22, 50, 0.8);
    border-bottom: 3px solid #5e8ec7;
    box-shadow: 0 0 20px rgba(94, 142, 199, 0.3);
}

h1 {
    font-size: 3.5rem;
    margin: 0;
    color: #d9ecff;
    text-shadow: 0 0 10px #4a89dc, 0 0 20px #4a89dc;
    font-family: 'Luminari', 'Blackadder ITC', fantasy;
}

header p {
    color: #a7c7f5;
}

/* Navigation */
nav {
    background-color: rgba(12, 28, 61, 0.9);
    border-top: 1px solid #5e8ec7;
    border-bottom: 1px solid #5e8ec7;
}

.nav-link {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #a7c7f5;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #d9ecff;
    background-color: rgba(74, 89, 140, 0.5);
}
.nav-link:hover {
    text-shadow: 0 0 10px #4a89dc;
}

/* Section principale */
main {
    background-color: rgba(12, 28, 61, 0.85);
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid #5e8ec7;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.hero {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    margin-right: 2rem;
    border: 3px solid #5e8ec7;
    box-shadow: 0 0 15px rgba(94, 142, 199, 0.6);
}

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-content {
    flex: 2;
}

h2 {
    color: #d9ecff;
    font-size: 2.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px #4a89dc;
    font-family: 'Luminari', 'Blackadder ITC', fantasy;
    border-bottom: 2px solid rgba(94, 142, 199, 0.4);
    padding-bottom: 0.5rem;
}

h3 {
    color: #a7c7f5;
    font-size: 1.8rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 6px rgba(74, 137, 220, 0.6);
    font-family: 'Luminari', 'Blackadder ITC', fantasy;
    border-left: 4px solid #5e8ec7;
    padding-left: 1rem;
}

h4 {
    color: #a7c7f5;
    font-size: 1.5rem;
    margin-top: 1.2rem;
    margin-bottom: 0.7rem;
    text-shadow: 0 0 4px rgba(74, 137, 220, 0.4);
    font-weight: 600;
}

h5 {
    color: #8eaad6;
    font-size: 1.3rem;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h6 {
    color: #8eaad6;
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-style: italic;
}

p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

/* Links */
a {
    color: #a7c7f5;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(167, 199, 245, 0.3);
}

a:hover {
    color: #d9ecff;
    text-shadow: 0 0 8px rgba(74, 137, 220, 0.5);
    border-bottom-color: #d9ecff;
}

a:visited {
    color: #9bb5e0;
}

/* Sections */
.section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.section-card {
    background-color: rgba(26, 41, 74, 0.7);
    border: 1px solid #5e8ec7;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: #a7c7f5;
}

.section-card h3 {
    color: #d9ecff;
    font-size: 1.5rem;
    margin-top: 0;
    border-bottom: 1px solid #5e8ec7;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.section-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background-image: url('/api/placeholder/30/30');
    background-size: contain;
    opacity: 0.5;
}

/* Formulaire Newsletter */
.newsletter-section {
    margin-top: 3rem;
    background-color: rgba(15, 32, 67, 0.8);
    padding: 2rem;
    border: 2px solid #5e8ec7;
    text-align: center;
    position: relative;
}

.newsletter-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/api/placeholder/1200/200');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
}

.newsletter-title {
    font-size: 1.8rem;
    color: #d9ecff;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.newsletter-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #5e8ec7, transparent);
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #a7c7f5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #5e8ec7;
    background-color: rgba(12, 28, 61, 0.7);
    color: #d4c7a5;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #a7c7f5;
    box-shadow: 0 0 10px rgba(94, 142, 199, 0.3);
}

.btn-subscribe {
    display: block;
    text-decoration: none;
    padding: 12px 30px;
    background: linear-gradient(to bottom, #4a89dc, #2a5298);
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #a7c7f5;
    font-weight: bold;
}

.btn-subscribe::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(167, 199, 245, 0.3), transparent);
    transition: all 0.6s ease;
}

.btn-subscribe:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-subscribe:hover::before {
    left: 100%;
}

.newsletter-benefits {
    margin-top: 1.5rem;
    font-style: italic;
    color: #8eaad6;
}

.scroll-decoration {
    background-image: url('/api/placeholder/50/150');
    background-repeat: no-repeat;
    background-size: contain;
    width: 50px;
    height: 150px;
    position: absolute;
    opacity: 0.6;
}

.scroll-left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.scroll-right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
}

/* Pied de page */
footer {
    background-color: rgba(10, 22, 50, 0.9);
    text-align: center;
    padding: 1.5rem 0;
    border-top: 2px solid #5e8ec7;
    color: #8eaad6;
}

/* Effets mystiques */
.magical-border {
    position: relative;
}

.magical-border::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #5e8ec7, transparent, #5e8ec7, transparent);
    background-size: 400% 400%;
    z-index: -1;
    animation: borderGlow 10s ease infinite;
}

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

.magical-text {
    background: linear-gradient(90deg, #a7c7f5, #d9ecff, #a7c7f5);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShine 5s linear infinite;
    display: inline-block;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

/* Étoiles qui scintillent */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: var(--opacity);
}

@keyframes twinkle {
    0%, 100% {
        opacity: var(--opacity);
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.5);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
    }

    .hero-image {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    .scroll-decoration {
        display: none;
    }
}

.magic-items {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.magic-item {
    text-align: center;
    color: #f5d79c;
}

.magic-item i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.dragon {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.dragon-eye {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #ff4500;
    border-radius: 50%;
    box-shadow: 0 0 15px #ff4500;
    animation: blink 4s infinite;
}

.dragon-eye.left {
    top: 50px;
    left: 30px;
}

.dragon-eye.right {
    top: 50px;
    right: 30px;
}

@keyframes blink {
    0%, 45%, 50%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    47%, 48% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

.smoke {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: rgba(200, 200, 200, 0.3);
    border-radius: 50%;
    animation: smoke 3s infinite;
}

.smoke:nth-child(1) {
    left: 65px;
    top: 100px;
    animation-delay: 0s;
}

.smoke:nth-child(2) {
    left: 80px;
    top: 90px;
    animation-delay: 0.5s;
}

.smoke:nth-child(3) {
    left: 50px;
    top: 95px;
    animation-delay: 1s;
}

@keyframes smoke {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    100% {
        transform: translateY(-40px) scale(2);
        opacity: 0;
    }
}

.sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: #f5d79c;
    border-radius: 50%;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Position sparkles around the container */
.sparkle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 25%; left: 90%; animation-delay: 0.3s; }
.sparkle:nth-child(3) { top: 80%; left: 20%; animation-delay: 0.6s; }
.sparkle:nth-child(4) { top: 70%; left: 85%; animation-delay: 0.9s; }
.sparkle:nth-child(5) { top: 10%; left: 50%; animation-delay: 1.2s; }
.sparkle:nth-child(6) { top: 90%; left: 50%; animation-delay: 1.5s; }

.menu-item {
    background-color: #f5e5c0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #432c0e;
    text-decoration: none;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.menu-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.menu-title {
    padding: 20px;
    font-size: 1.5rem;
    text-align: center;
    font-family: 'Luminari', 'Blackadder ITC', fantasy;
    font-weight: bold;
}

/* Quote and attribution styles */
blockquote {
    background-color: rgba(26, 41, 74, 0.5);
    border-left: 4px solid #5e8ec7;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    margin: 2rem 0 0 0;
    font-style: italic;
    color: #a7c7f5;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

blockquote::before {
    content: "\201C";
    font-size: 4rem;
    color: #5e8ec7;
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
    line-height: 1;
}

blockquote::after {
    content: "\201D";
    font-size: 4rem;
    color: #5e8ec7;
    position: absolute;
    bottom: -30px;
    right: 20px;
    opacity: 0.3;
    line-height: 1;
}

.attribution-separator {
    text-align: center;
    color: #5e8ec7;
    margin: 0;
    padding: 0 0 0.5rem 0;
    font-size: 1.2rem;
    opacity: 0.5;
}

.attribution {
    text-align: right;
    margin: 0 0 -2rem 0;
    padding: 0.5rem 2rem 1.5rem 2rem;
    color: #8eaad6;
    font-style: italic;
    background: linear-gradient(to bottom, rgba(26, 41, 74, 0.2), transparent);
    position: relative;
}

.attribution::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(94, 142, 199, 0.4), transparent);
}

.attribution .titre {
    font-size: 1.05rem;
    color: #a7c7f5;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.attribution .ecole {
    font-size: 0.9rem;
    color: #8eaad6;
    margin-bottom: 0.3rem;
}

.attribution .nom {
    font-size: 1.05rem;
    color: #d9ecff;
    font-weight: 600;
    margin-top: 0.5rem;
    text-shadow: 0 0 4px rgba(74, 137, 220, 0.3);
}

/* ==================== BESTIARY STYLES ==================== */

.page-container {
    background: #f4e8d0;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(139, 69, 19, 0.03) 2px,
            rgba(139, 69, 19, 0.03) 4px
        );
    box-shadow:
        0 0 50px rgba(0,0,0,0.8),
        inset 0 0 100px rgba(139, 69, 19, 0.1);
    border: 15px solid #3d2817;
    border-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30"><rect width="30" height="30" fill="%233d2817"/><rect x="2" y="2" width="26" height="26" fill="%23654321"/></svg>') 15;
    position: relative;
    color: black;
}

.corner {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid #8b4513;
}

.corner.top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.bestiary-entry {
    padding: 40px;
    position: relative;
}

.bestiary-entry .breadcrumb {
    margin-bottom: 2.5rem;
    padding-bottom: 0px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
    font-size: 0.9em;
    color: #5c4033 !important;
}

.bestiary-entry .breadcrumb-link {
    color: #5a6b3a !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bestiary-entry .breadcrumb-link:hover {
    color: #d4af37 !important;
    text-decoration: underline;
}

.bestiary-entry .breadcrumb-separator {
    margin: 0 8px;
    color: #8b4513 !important;
    opacity: 0.6;
}

.bestiary-entry .breadcrumb-current {
    color: #2c1810 !important;
    font-weight: 600;
}

.bestiary-entry .header-section {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px double #8b4513;
    padding-bottom: 20px;
}

.bestiary-entry .creature-title {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 3em;
    color: #5a6b3a;
    text-shadow: 2px 2px 0px #d4af37;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.bestiary-entry .creature-subtitle {
    font-style: italic;
    color: #5c4033;
    font-size: 1.2em;
}

.bestiary-entry .illustration-container {
    float: right;
    width: 300px;
    margin: 0 0 20px 30px;
    border: 5px solid #8b4513;
    background: #2c1810;
    padding: 10px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    position: relative;
}

.bestiary-entry .illustration-container::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid #d4af37;
    pointer-events: none;
}

.bestiary-entry .creature-image {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(0.3) contrast(1.1);
}

.bestiary-entry .image-caption {
    text-align: center;
    font-size: 0.8em;
    font-style: italic;
    color: #d4af37;
    margin-top: 8px;
    font-family: 'MedievalSharp', cursive;
}

.bestiary-entry .text-section {
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
    color: #2c1810;
}

.bestiary-entry h2 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.8em;
    color: #5a6b3a;
    margin-bottom: 15px;
    margin-top: 25px;
    border-left: 5px solid #d4af37;
    padding-left: 15px;
    clear: both;
    text-shadow: none;
    border-bottom: none;
}

.bestiary-entry .initial-letter {
    float: left;
    font-family: 'Uncial Antiqua', cursive;
    font-size: 5em;
    line-height: 0.8;
    margin: 10px 10px 0 0;
    color: #5a6b3a;
    text-shadow: 2px 2px 0px #d4af37;
}

.bestiary-entry .stats-container {
    background: rgba(90, 107, 58, 0.1);
    border: 2px solid #5a6b3a;
    padding: 20px;
    margin: 25px 0;
}

.bestiary-entry .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.bestiary-entry .stat-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(244, 232, 208, 0.5);
    border-left: 3px solid #d4af37;
}

.bestiary-entry .stat-label {
    font-weight: 600;
    color: #5a6b3a;
    margin-right: 10px;
    min-width: 140px;
}

.bestiary-entry .stat-value {
    color: #2c1810;
}

.bestiary-entry ul {
    list-style: none;
    padding-left: 0;
}

.bestiary-entry li {
    padding-left: 30px;
    margin-bottom: 10px;
    position: relative;
}

.bestiary-entry li::before {
    content: '⚔';
    position: absolute;
    left: 0;
    color: #5a6b3a;
    font-size: 1.2em;
}

.bestiary-entry .decorative-separator {
    text-align: center;
    margin: 30px 0;
    color: #8b4513;
    font-size: 1.5em;
}

.bestiary-entry .footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 3px double #8b4513;
    text-align: center;
    font-style: italic;
    color: #5c4033;
    font-size: 0.9em;
}

.bestiary-entry .subsection {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 2px solid #d4af37;
}

.bestiary-entry .subsection-title {
    font-weight: 600;
    color: #5a6b3a;
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* Responsive bestiary styles */
@media (max-width: 768px) {
    .bestiary-entry .illustration-container {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }

    .bestiary-entry .creature-title {
        font-size: 2em;
    }

    .bestiary-entry .stats-grid {
        grid-template-columns: 1fr;
    }

    .bestiary-entry {
        padding: 20px;
    }
}
