/*
  Fichier nettoyé automatiquement :
  - Doublons de sélecteurs supprimés (dernière occurrence conservée)
  - Doublons de propriétés dans chaque bloc supprimés (dernière valeur conservée)
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #5a2d82 0%, #0a0a0a 70%);
    z-index: -2;
    opacity: 0.3;
}

.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="%237e4a9b" stroke-width="0.5" stroke-dasharray="2,2" opacity="0.3"/></svg>');
    background-size: 20px 20px;
    opacity: 0.2;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(126, 74, 155, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    position: relative;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ffffff, #b388ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: #7e4a9b;
    border-radius: 50%;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.desktop-nav ul {
    display: flex;
    list-style: none;
}

.desktop-nav ul li {
    margin-left: 30px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #b388ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #7e4a9b;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #b388ff;
}

.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: flex-end;
}

.mobile-nav {
    width: 70%;
    height: 100%;
    background-color: #1a1a1a;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.mobile-nav-overlay.active {
    display: flex;
}

.mobile-nav-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(126, 74, 155, 0.3);
    margin-bottom: 30px;
}

.mobile-nav-header span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
}

.mobile-close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    margin-bottom: 20px;
}

.mobile-nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 1px;
    transition: color 0.3s;
    display: block;
    padding: 10px 0;
}

.mobile-nav-link:hover {
    color: #b388ff;
}

main {
    margin-top: 80px;
}

.section {
    min-height: 100vh;
    padding: 80px 5%;
    display: none;
}

.section.active {
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title span {
    color: #b388ff;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #7e4a9b, #b388ff);
}

.presentation-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(100vh - 160px);
}

.presentation-text {
    flex: 1;
    padding-right: 50px;
}

.presentation-text h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

.presentation-text h1 span {
    display: block;
    color: #b388ff;
}

.presentation-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #cccccc;
    max-width: 600px;
}

.cta-button {
    background: linear-gradient(45deg, #7e4a9b, #b388ff);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(126, 74, 155, 0.3);
}

.presentation-image {
    flex: 1;
    position: relative;
}

.image-frame {
    position: relative;
    width: 400px;
    height: 500px;
    margin: 0 auto;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.frame-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid #7e4a9b;
    border-radius: 10px;
    z-index: 0;
    transition: all 0.5s ease;
}

.image-frame:hover .frame-decoration {
    top: -15px;
    left: -15px;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid #7e4a9b;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.filter-btn:hover, .filter-btn.active {
    background: #7e4a9b;
    color: #ffffff;
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
    justify-items: center;
    grid-auto-rows: minmax(320px, auto);
}


.gallery-item {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.gallery-item-inner {
    width: 100%;
    max-width: 700px;
    min-width: 400px;
    height: 340px;
    min-height: 340px;
    position: relative;
    background: #181818;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}
.gallery-item-inner > img,
.gallery-item-inner > video,
.gallery-item-inner > iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #181818;
}

.fullscreen-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    background: rgba(20,20,30,0.85);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 0;
}
.fullscreen-btn:hover {
    background: #b388ff;
}
.fullscreen-btn svg {
    display: block;
    pointer-events: none;
    stroke: #b388ff;
    transition: stroke 0.2s;
}
.fullscreen-btn:hover svg {
    stroke: #181818;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery-item-inner {
    max-width: 100%;
    min-width: 0;
    min-height: 200px;
  }
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

.gallery-item-inner {
    position: relative;
    width: 100%;
    /* Par défaut, ratio paysage 16/9 */
    aspect-ratio: 16/9;
    background: #181818;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
/* Si besoin d'un ratio portrait, ajouter une classe .portrait sur .gallery-item-inner */
.gallery-item-inner.portrait {
    aspect-ratio: 9/16;
}

/* Responsive : pour petits écrans, on force le carré */
@media (max-width: 600px) {
  .gallery-item-inner {
    aspect-ratio: 1/1;
  }
  .gallery-item-inner.portrait {
    aspect-ratio: 3/4;
  }
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #181818;
    display: block;
    transition: transform 0.5s;
}

.gallery-item video {
    /* Masquer la bordure native, harmoniser avec img */
    border: none;
    background: #181818;
}

.gallery-item video::-webkit-media-controls-panel {
    background: rgba(30, 30, 30, 0.7);
    border-radius: 0 0 8px 8px;
}

.gallery-item video::-webkit-media-controls {
    color-scheme: dark;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover video {
    transform: none;
}

.gallery-item video:focus {
    outline: 2px solid #b388ff;
}

.gallery-item:hover {
    transform: translateY(-5px);
}



.gallery-overlay {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px 12px 18px;
    background: rgba(20, 20, 30, 0.88);
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    color: #fff;
    text-align: left;
    position: static;
    transition: none;
    font-size: 1rem;
}

/* Pour les vidéos (catégorie anime), overlay en bas sur la vidéo */
.gallery-item[data-category="anime"] .gallery-item-inner,
.gallery-item[data-category="irl"] .gallery-item-inner {
    position: relative;
    padding-bottom: 60px; /* espace pour overlay */
}
.gallery-item[data-category="anime"] .gallery-overlay,
.gallery-item[data-category="irl"] .gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    border-radius: 0 0 8px 8px;
    z-index: 2;
    pointer-events: none;
}
.gallery-item[data-category="anime"] .gallery-overlay h3,
.gallery-item[data-category="anime"] .gallery-overlay p,
.gallery-item[data-category="irl"] .gallery-overlay h3,
.gallery-item[data-category="irl"] .gallery-overlay p {
    pointer-events: auto;
}

.gallery-overlay h3 {
    color: #b388ff;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.gallery-item {
    display: flex;
    flex-direction: column;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    color: #b388ff;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    color: #cccccc;
}

.gallery-item:nth-child(3n+1) {
    grid-row: span 2;
}

.gallery-item:nth-child(5n+2) {
    grid-column: span 1;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .gallery-item:nth-child(n) {
        grid-row: span 1;
        grid-column: span 1;
    }
    .gallery-filter {
        gap: 8px;
    }
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

.contact-container {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
    padding-right: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #b388ff;
}

.contact-info p {
    line-height: 1.6;
    margin-bottom: 30px;
    color: #cccccc;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.2rem;
    color: #b388ff;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #ffffff;
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: #b388ff;
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(126, 74, 155, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: #2a2a2a;
    border: 1px solid rgba(126, 74, 155, 0.3);
    border-radius: 5px;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7e4a9b;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: linear-gradient(45deg, #7e4a9b, #b388ff);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(126, 74, 155, 0.3);
}

footer {
    background-color: #1a1a1a;
    padding: 50px 5%;
    border-top: 1px solid rgba(126, 74, 155, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-logo span {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ffffff, #b388ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    margin-bottom: 10px;
}

.footer-logo p {
    color: #cccccc;
    font-size: 0.9rem;
}

.footer-links {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #b388ff;
}

.footer-legal {
    flex: 1;
    min-width: 250px;
    text-align: right;
}

.footer-legal p {
    color: #666666;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.footer-legal a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: #b388ff;
}

@media (max-width: 1200px) {
    .presentation-text h1 {
        font-size: 3rem;
    }
    .image-frame {
        width: 350px;
        height: 450px;
    }
}

@media (max-width: 992px) {
    .presentation-container {
        flex-direction: column;
        height: auto;
        text-align: center;
    }
    .presentation-text {
        padding-right: 0;
        margin-bottom: 50px;
    }
    .presentation-text p {
        max-width: 100%;
    }
    .contact-container {
        flex-direction: column;
    }
    .contact-info {
        padding-right: 0;
        margin-bottom: 50px;
    }
    .footer-legal {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .section-title {
        font-size: 2rem;
    }
    .presentation-text h1 {
        font-size: 2.5rem;
    }
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    header {
        padding: 15px 20px;
    }
    .logo-text {
        font-size: 1.5rem;
    }
    .section {
        padding: 80px 20px;
    }
    .presentation-text h1 {
        font-size: 2rem;
    }
    .image-frame {
        width: 280px;
        height: 380px;
    }
    .contact-form {
        padding: 30px 20px;
    }
}
