@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;500&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-snap-type: y mandatory; scroll-behavior: smooth; }

body { 
    font-family: 'Montserrat', sans-serif; 
    overflow-x: hidden; 
}

.section { 
    height: 100vh; 
    width: 100%; 
    scroll-snap-align: start; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: filter 0.15s ease;
}


.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    flex-direction: column;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.header-emoji { font-size: 5rem; margin-bottom: 1rem; animation: float 3s ease-in-out infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.header-section h1 {
    font-family: "Titan One", sans-serif;
    font-weight: 700;
    font-size: 4.5rem;
    color: rgb(110, 101, 101);
    text-shadow: 4px 4px 10px rgba(0,0,0,0.4);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.header-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 2rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.header-description {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}



.scroll-indicator {
    color: white;
    font-size: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.anime-section {
    position: relative;
    overflow: hidden;
}

.anime-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.anime-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3);
}

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

.anime-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 95%;
    padding: 3rem 2rem 2rem 3rem;
    color: white;
}
.anime-source {
    margin-top: 3rem;
    padding-bottom: 2rem;
}

.anime-content::-webkit-scrollbar { width: 8px; }
.anime-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 4px; }
.anime-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }

.anime-title {
    font-family: "Titan One", sans-serif;
    font-weight: normal;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.5);
    text-align: center;
}

.anime-description {
    font-size: 1.2rem;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 2rem;
    text-align: center;
}

.characters-title {
    font-family: "Titan One", sans-serif;
    font-weight: normal;
    font-size: 2rem;
    text-align: center;
    margin: 2rem 0 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.character-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.character-card:hover {
    transform: translateY(-10px);
    background: rgba(73, 46, 46, 0.2);
    border-color: rgba(255,255,255,0.4);
}

.character-img {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 3px solid rgba(255,255,255,0.5);
}

.character-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: center;
}

.character-role {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
    margin-bottom: 0.5rem;
}

.character-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    color: rgba(255,255,255,0.9);
}

.anime-source {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.anime-source a {
    color: #ffd700;
    text-decoration: none;
    border-bottom: 1px solid #ffd700;
}

.contribute-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    flex-direction: column;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.contribute-content {
    max-width: 900px;
    width: 90%;
    background: rgba(0, 222, 252, 0.1);
    backdrop-filter: blur(1px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 100vh;
    
    position: relative;
    z-index: 2;
}

.contribute-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #f5576c;
    text-align: center;
    margin-bottom: 1rem;
}

.contribute-intro {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e25353;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea { min-height: 100px; resize: vertical; }

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview { 
    background: #444645; color: rgb(255, 255, 255); 
}
.btn-submit { 
    background: #b61818; 
    color: white; 
}

.footer-section {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer-link {
    color: #ffd700;
    text-decoration: underline;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}


.modal-content {
    background: rgba(255, 255, 255, 0.15); /* 👈 plus opaque */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    padding: 3rem;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);

    animation: fadeUp 0.3s ease;
    color: white;
    pointer-events: auto;
    position: relative;
    z-index: 10001;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f5576c;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

.character-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.5);
}

@media (max-width: 1024px) {
    .header-section h1 { font-size: 2.5rem; }
    .anime-title { font-size: 2rem; }
    .characters-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/*  ZOOM IMAGE (TAILLE UNIFORME)  */

.zoom-content {
    width: 80vw;
    max-width: 900px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.zoom-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
}

.zoom-content img {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/*  INTERFACE ACCUEIL */

.header-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.accueil-card {
     background: rgba(219, 117, 117, 0.1);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(6px);
    width: 90%;
    max-width: 1400px;
    height: 80vh;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.15);
    display: flex;
    overflow: hidden; /* IMPORTANT */
    position: relative;
    z-index: 2;
}

/* GRILLE 2 COLONNES */
.accueil-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

/* TEXTE */
.accueil-text {
    padding: 4rem;
}

.accueil-text h1 {
    font-family: "Titan One", sans-serif;
    font-weight: normal;
    font-size: 4.2rem;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1rem;
}

.accueil-text h1 span {
    color: #e63946;
}

.accueil-subtitle {
    font-size: 1.6rem;
    color: #ffb4b4;
    margin-bottom: 1.5rem;
}

.accueil-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ffb4b4;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

/* BOUTON */
.accueil-button {
    display: inline-block;
    padding: 1rem 2.2rem;
    background: #e63946;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accueil-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(230,57,70,0.4);
}

.accueil-image {
    height: 100%;
    width: 100%;
}

.accueil-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* SUPPRIME l’espace fantôme inline */
}

.reveal-text {
    transition-delay: 0.1s;
}

.reveal-image {
    transition-delay: 0.5s;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* APPARITION CARTES PERSONNAGES */

.character-card.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.character-card.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-inline {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.footer-inline .footer-link {
    color: #e63946;
    text-decoration: underline;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* 👈 TRANSPARENT OPAQUE */
    backdrop-filter: blur(4px);     /* 👈 léger flou élégant */
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}


.modal-content h2 {
    color: #ffd700;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.95);
}

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

.fonds-etoiles {
    position: absolute;
    inset: 0;
    background-color: #000000;

    /* motif étoiles */
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.35) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 80px 120px, rgba(255,255,255,0.25) 50%, transparent 51%),
        radial-gradient(1px 1px at 150px 60px, rgba(255,255,255,0.2) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 200px 180px, rgba(255,255,255,0.3) 50%, transparent 51%);

    background-size: 240px 240px;
    animation: starsScroll 80s linear infinite;

    z-index: 0;
}

/* animation de défilement */
@keyframes starsScroll {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 1000px;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .accueil-card,
    .contribute-content {
        backdrop-filter: none;
        background: white;
    }
}

/*  IMAGE CLIQUABLE  */
.zoomable {
    cursor: pointer;
}

/*  CONTENU ZOOM  */
.zoom-content {
    width: 80vw;
    max-width: 900px;
    height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* IMAGE UNIFORME */
.zoom-content img {
    width: 100%;
    height: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
}

/* TEXTE SOURCE */
.zoom-source {
    font-size: 0.9rem;
    color: rgba(0,0,0,0.7);
    text-align: center;
}

/* ANIMATION */
.zoom-content img {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.trailer-button {
    background: #ff4d6d;
}

.trailer-button:hover {
    box-shadow: 0 12px 30px rgba(255,77,109,0.45);
}

/* iframe trailer */
#trailer-frame {
    width: 100%;
    height: 100%;
    min-height: 50vh;
    border-radius: 15px;
}

/* FORMULAIRE OPQUAST  */

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.field-help {
    font-size: 0.85rem;
    color: #ffdede;
    display: block;
    margin-top: 0.2rem;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #da2b2b;
}

.form-message {
    margin-top: 1.5rem;
    font-weight: bold;
    text-align: center;
}


/* ===== TRAILER ===== */

.anime-actions {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 2rem;
}

.anime-trailer-btn {
    padding: 0.9rem 2.2rem;
    background: #e63946;
    color: white;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.anime-trailer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(230,57,70,0.4);
}

.zoom-content iframe {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

@media (max-width: 1024px) {
    .anime-section {
        height: 100vh;
    }

    .anime-content {
        max-height: 90vh;
        overflow-y: auto;
        padding-bottom: 4rem;
    }

    /* scrollbar discrète */
    .anime-content::-webkit-scrollbar {
        width: 6px;
    }

    .anime-content::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 3px;
    }
}

/*  BOUTON HAUT  */

#scrollTopBtn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e63946;
    color: white;
    border: none;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;

    box-shadow: 0 10px 25px rgba(230,57,70,0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);

    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

#scrollTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    transform: translateY(-3px);
}