/* Définition de la police Lora */
@font-face {
    font-family: 'Lora';
    src: url('./static/Lora-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    src: url('./static/Lora-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    src: url('./static/Lora-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Lora';
    src: url('./static/Lora-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Nouvelle palette de couleurs SHIRAN */
    --beige: #ece2d0;            /* Beige */
    --rouge: #96031a;            /* Rouge */
    --ocre: #8f754f;             /* Ocre/Doré */
    --violet: #7f6a93;           /* Violet */
    --vert: #2a3c24;             /* Vert */
    --text-dark: #2C2C2C;        /* Texte foncé */
    --text-light: #ece2d0;       /* Texte clair */
}

body {
    font-family: 'Lora', serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--beige);
    overflow-x: hidden;
}

/* Section Hero */
.hero-section {
    width: 100%;
}

.battle-image {
    width: 100%;
    height: auto;
    background: linear-gradient(45deg, 
        #8B4513 0%, 
        #654321 25%, 
        #A0522D 50%, 
        #8B4513 75%, 
        #654321 100%);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(160, 82, 45, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(101, 67, 33, 0.7) 0%, transparent 70%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.battle-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.3) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.1) 2px,
            rgba(0,0,0,0.1) 4px
        );
    pointer-events: none;
}

/* Zone d'image hero */
.hero-image-placeholder {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 0;
}

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

.main-title {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 400;
    color: var(--text-light);
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

/* Contenu de l'histoire */
.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem 2rem;
    background: #ece2d0;
    align-items: center;
}

.story-text {
    padding-right: 2rem;
    padding-left: 3rem;
}

.story-text p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #96031a;
    text-align: justify;
}

/* Carte fantaisie */
.map-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fantasy-map {
    width: 80%;
    height: auto;
    background: 
        linear-gradient(135deg, #8FBC8F 0%, #9ACD32 50%, #8FBC8F 100%),
        radial-gradient(circle at 30% 40%, #87CEEB 0%, transparent 30%),
        radial-gradient(circle at 70% 60%, #4682B4 0%, transparent 25%);
    border-radius: 15px;
    position: relative;
    border: 3px solid var(--ocre);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    display: inline-block;
}

/* Zone d'image carte */
.map-image-placeholder {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 0;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.map-labels {
    position: relative;
    width: 100%;
    height: 100%;
}

.region {
    position: absolute;
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.region.atria {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.region.sethia {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
}

.ocean, .gulf, .lake, .sea {
    position: absolute;
    font-family: 'Lora', serif;
    font-size: clamp(0.7rem, 1.9vw, 0.9rem);
    font-weight: 500;
    color: #2F4F4F;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.6);
}

.ocean.west {
    left: 5%;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
}

.gulf {
    top: 30%;
    left: 30%;
}

.lake {
    top: 60%;
    right: 25%;
}

.sea.east {
    right: 5%;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
}

.location {
    position: absolute;
    font-family: 'Lora', serif;
    font-size: clamp(0.55rem, 1.5vw, 0.7rem);
    font-weight: 400;
    color: var(--text-dark);
    background: rgba(255,255,255,0.7);
    padding: 2px 4px;
    border-radius: 3px;
}

.location.enzaxi { top: 25%; left: 20%; }
.location.moytoue { top: 40%; left: 15%; }
.location.balio { top: 50%; left: 25%; }
.location.jiy { bottom: 35%; left: 20%; }
.location.panrao { bottom: 50%; left: 15%; }
.location.nawon { bottom: 30%; right: 20%; }
.location.qindao { bottom: 45%; right: 15%; }

.world-name {
    position: absolute;
    left: 10%;
    bottom: 10%;
    font-family: 'Lora', serif;
    font-size: clamp(0.65rem, 1.7vw, 0.8rem);
    font-weight: 500;
    color: var(--text-dark);
    background: rgba(255,255,255,0.8);
    padding: 3px 6px;
    border-radius: 4px;
}

/* Section Personnages */
.characters-section {
    background: #2a3c24;
    padding: 4rem 2rem;
    text-align: center;
}

.section-title {
    font-family: 'Lora', serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 400;
    color: #ece2d0;
    margin-bottom: 3rem;
    text-align: center;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.character-image {
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Zone d'image personnage */
.character-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 50%;
    overflow: hidden;
}

.character-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.mask-icon {
    width: 80px;
    height: 80px;
    background: var(--ocre);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 0;
    display: none; /* Masqué car vous avez vos vraies images */
}

.mask-icon::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 30%;
    background: #333;
    border-radius: 50%;
}

.mask-icon::after {
    content: '';
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 15%;
    background: #333;
    border-radius: 50%;
    clip-path: polygon(0 100%, 100% 100%, 50% 0);
}

.character-name {
    font-family: 'Lora', serif;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 400;
    color: #ece2d0;
    margin-bottom: 1rem;
}

.character-description {
    font-family: 'Lora', serif;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    color: #ece2d0;
    line-height: 1.5;
    max-width: 250px;
    text-align: center;
}

/* Section AO3 */
.ao3-section {
    background: var(--beige);
    padding: 4rem 2rem;
}

.ao3-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.ao3-title {
    font-family: 'Lora', serif;
    font-size: clamp(1.4rem, 4.5vw, 2.2rem);
    font-weight: 400;
    color: var(--rouge);
    text-align: center;
}

.tags-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.tags-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.relationship-tags {
    font-family: 'Lora', serif;
    font-size: clamp(0.9rem, 2.3vw, 1.1rem);
    font-weight: 400;
    color: var(--rouge);
}

.genre-tag {
    font-family: 'Lora', serif;
    font-size: clamp(0.75rem, 1.9vw, 0.9rem);
    font-weight: 400;
    color: var(--text-light);
    background: var(--rouge);
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.8rem, 2vw, 1rem);
    border-radius: 20px;
}

.tags-list {
    font-family: 'Lora', serif;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    color: var(--rouge);
    line-height: 1.6;
    text-align: justify;
    width: 100%;
}

/* Section Réseaux sociaux */
.social-section {
    width: 100%;
    position: relative;
}

.social-image-container {
    width: 100%;
    height: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.social-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Zone d'image sociale */
.social-image-placeholder {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 0;
}

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

.social-content {
    display: flex;
    gap: clamp(1.5rem, 4vw, 3rem);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 100%;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.social-link {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.social-logo {
    width: clamp(50px, 6vw, 80px);
    height: clamp(50px, 6vw, 80px);
    object-fit: contain;
}

/* Responsive */

@media (max-width: 768px) {
    .main-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .story-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .story-text {
        padding-right: 0;
        padding-left: 0;
    }
    
    .story-text p {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        text-align: justify;
    }
    
    .tags-list {
        font-size: clamp(0.75rem, 2.5vw, 0.95rem);
        text-align: justify;
    }
    
    .fantasy-map {
        width: 80%;
        max-width: 350px;
        height: auto;
        margin: 0 auto;
    }
    
    .characters-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .ao3-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .ao3-title {
        text-align: center;
    }
    
    .tags-container {
        align-items: center;
    }
    
    .tags-row {
        justify-content: center;
    }
    
    .tags-list {
        text-align: justify;
    }
    
    .map-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .fantasy-map {
        margin: 0 auto;
    }
    
    .character-card {
        margin: 0 auto;
    }
    
    .social-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .section-title {
        font-size: clamp(1.3rem, 4vw, 2rem);
    }
    
    .ao3-title {
        font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    }
    
    .social-content {
        padding: 0 1.5rem;
    }
    
    .social-logo {
        width: clamp(40px, 5vw, 60px);
        height: clamp(40px, 5vw, 60px);
    }
    
    .fantasy-map {
        width: 80%;
        max-width: 280px;
        height: auto;
        margin: 0 auto;
    }
    
    .story-text p {
        font-size: clamp(0.85rem, 3.5vw, 1.1rem);
        text-align: justify;
    }
    
    .tags-list {
        font-size: clamp(0.7rem, 2.8vw, 0.9rem);
        text-align: justify;
    }
    
    .map-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .character-card {
        margin: 0 auto;
    }
    
    .region {
        font-size: clamp(0.8rem, 2.2vw, 1rem);
    }
    
    .ocean, .gulf, .lake, .sea {
        font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    }
    
    .location {
        font-size: clamp(0.5rem, 1.4vw, 0.6rem);
    }
}
