@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&display=swap');
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

/* ===================================================================
 * 1. VARIABLES & RESET
 * =================================================================== */
:root {
    --bg-dark: #050505;
    --bg-light: #111111;
    --primary: #6103ad;
    --text-muted: #adacad;
    --white: #ffffff;
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
}

html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 70px !important;
}

body {
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-muted);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: var(--white); transition: color 0.3s ease; }
a:hover { color: var(--primary); }

h1, h2, h3, h4, h5, h6 {
    color: var(--white);
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.2;
}

hr {
    border: none;
    height: 3px;
    width: 80px;
    background-color: var(--primary);
    margin: 20px 0 30px;
}

/* ===================================================================
 * 2. GRILLE
 * =================================================================== */
.row {
    width: 90%; max-width: 1200px; margin: 0 auto;
}
.twelve.columns { width: 100%; }

.service-list, .team-wrapper {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
}
.bgrid {
    flex: 1 1 300px;
    padding: 20px;
}

#portfolio-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}
@media (min-width: 1024px) {
    #portfolio-wrapper { grid-template-columns: repeat(4, 1fr); }
}
.folio-item { height: 100%; }
.folio-item img { height: 100%; width: 100%; object-fit: cover; }

/* ===================================================================
 * 3. HEADER & NAVIGATION
 * =================================================================== */
header {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 20px 0; z-index: 1000;
    background: rgba(5, 5, 5, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
header .row {
    display: flex; justify-content: space-between; align-items: center;
}
.logo a {
    font-size: 1.5rem; font-weight: 900; color: var(--white); letter-spacing: 2px;
}
ul#nav {
    display: flex; gap: 20px; list-style: none;
}
ul#nav li a {
    font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
ul#nav li.current a { color: var(--primary); }

.mobile-btn { display: none; color: var(--white); font-size: 1.2rem; }

@media (max-width: 768px) {
    .mobile-btn { display: block; }
    ul#nav {
        display: none; flex-direction: column; background: var(--bg-dark);
        position: absolute; top: 100%; left: 0; width: 100%; padding: 20px;
    }
    #nav-wrap:target ul#nav { display: flex; } 
}

/* ===================================================================
 * 4. SECTIONS COMMUNES
 * =================================================================== */
section {
    padding: 100px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.section-head { text-align: center; margin-bottom: 50px; }
.section-head h1 { font-size: 2.5rem; text-transform: uppercase; letter-spacing: 2px; }
.section-head hr { margin: 20px auto; }
.section-head p { font-size: 1.2rem; max-width: 800px; margin: 0 auto; color: var(--text-muted); }

/* ===================================================================
 * 5. HERO SECTION
 * =================================================================== */
#hero {
    height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(rgba(5,5,5,0.7), rgba(5,5,5,0.9)), url('../images/background.jpg') center/cover;
    text-align: center; border-bottom: none;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; }
.hero-content h3 { font-size: 1.5rem; font-weight: 300; color: var(--text-muted); }

/* ===================================================================
 * 6. PORTFOLIO 
 * =================================================================== */
#portfolio { background: var(--bg-dark); }
.folio-item {
    position: relative; overflow: hidden; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.folio-item img {
    width: 100%; height: auto; display: block;
    transition: transform 0.5s ease;
}
.folio-item .overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(97, 3, 173, 0.85); 
    opacity: 0; transition: opacity 0.3s ease;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.folio-item:hover .overlay { opacity: 1; }
.folio-item:hover img { transform: scale(1.1); }

.portfolio-item-meta { text-align: center; transform: translateY(20px); transition: transform 0.3s ease; }
.folio-item:hover .portfolio-item-meta { transform: translateY(0); }
.portfolio-item-meta h5 { margin: 0; font-size: 1.2rem; }
.portfolio-item-meta p { color: rgba(255,255,255,0.7); }
.link-icon i { font-size: 2rem; color: var(--white); margin-top: 15px; }

/* ===================================================================
 * 7. MATÉRIEL & ABOUT
 * =================================================================== */
#materiel, #about { background: var(--bg-light); }
.service-content p { color: var(--text-muted); line-height: 1.8; }
.member-pic { border-radius: 50%; overflow: hidden; width: 150px; margin: 0 auto 20px; border: 3px solid var(--primary); }
.member-pic img { width: 100%; display: block; }
.member-name { text-align: center; }
.member-name span { color: var(--primary); font-weight: 700; font-size: 0.9rem; }

/* ===================================================================
 * 8. RUBAN PARTENAIRES
 * =================================================================== */
#confiance { padding: 60px 0; background: var(--bg-dark); overflow: hidden; }
.logo-slider { width: 100%; padding: 20px 0; }
.logo-slide-track { display: flex; width: max-content; animation: ruban 20s linear infinite; }
.slide { width: 300px; display: flex; justify-content: center; align-items: center; }
.slide img { max-height: 80px; filter: grayscale(100%) opacity(0.5); transition: 0.3s; }
.slide img:hover { filter: grayscale(0%) opacity(1); }
@keyframes ruban { 0% { transform: translateX(0); } 100% { transform: translateX(-1200px); } }

/* ===================================================================
 * 9. SLIDER AVIS
 * =================================================================== */
#avis { background: var(--bg-light); }
#avis-slider { background: transparent; border: none; box-shadow: none; }
#avis-slider .slides li h3 { font-style: italic; font-weight: 300; font-size: 1.8rem; }
#avis-slider .slides li p { color: var(--primary); font-weight: 700; }
.flex-control-nav { text-align: center; margin-top: 30px; list-style: none; }
.flex-control-nav li { display: inline-block; margin: 0 5px; }
.flex-control-paging li a {
    display: block; width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.2); text-indent: -9999px; cursor: pointer;
}
.flex-control-paging li a.flex-active { background: var(--primary); }

/* ===================================================================
 * 10. FOOTER & LOCALISATION
 * =================================================================== */
#localisation iframe { border-radius: 10px; filter: invert(90%) hue-rotate(180deg); }
footer { background: #020202; padding: 50px 0 20px; text-align: center; position: relative; }
.copyright { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; font-size: 0.8rem; }
#go-top { position: absolute; top: -25px; left: 50%; transform: translateX(-50%); }
#go-top a {
    background: var(--primary); padding: 15px 30px; border-radius: 30px;
    font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px;
}
#go-top a:hover { background: var(--white); color: var(--bg-dark); }

/* ===================================================================
 * 11. CORRECTIFS PRESTATIONS.HTML
 * =================================================================== */

#hero { 
    display: block !important; 
    padding-top: 18vh; 
}
.hero-content { width: 100%; }

.flexslider { margin: 0; padding: 0; position: relative; }
.flexslider .slides { list-style: none; margin: 0; padding: 0; }
.flexslider .slides > li { display: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: center; }
.flexslider .slides > li:first-child { display: block; }

.flex-control-nav { 
    width: 100%; text-align: center; margin-top: 30px; position: absolute; bottom: -40px; list-style: none; 
}
.flex-control-nav li { display: inline-block; margin: 0 5px; }
.flex-control-paging li a { 
    display: block; width: 12px; height: 12px; background: rgba(255,255,255,0.3); 
    border-radius: 50%; text-indent: -9999px; cursor: pointer; border: none; 
}
.flex-control-paging li a.flex-active { background: var(--primary); }

#avis-slider { margin-bottom: 50px !important; }

.badges { 
    display: flex; justify-content: center; align-items: center; 
    gap: 20px; flex-wrap: wrap; margin-top: 20px; 
}

/* ===================================================================
 * 12. CORRECTIFS GLOBAUX & POP-UP
 * =================================================================== */

@media (min-width: 769px) {
    .mobile-btn { display: none !important; }
}

#more {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
#more a {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}
#more a:hover {
    background: var(--white);
    color: var(--bg-dark);
}

#hero-slider .flex-control-nav {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 12px;
}
#hero-slider .flex-control-paging li a {
    background: #555555;
    width: 14px; 
    height: 14px;
    opacity: 1;
}
#hero-slider .flex-control-paging li a.flex-active {
    background: var(--primary); 
}

.mfp-bg {
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000; overflow: hidden; position: fixed;
    background: #050505; opacity: 0.9;
}
.mfp-wrap {
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10001; position: fixed; outline: none !important;
}
.mfp-container {
    text-align: center; position: absolute; width: 100%; height: 100%;
    left: 0; top: 0; padding: 0 8px; box-sizing: border-box;
}
.mfp-container:before {
    content: ''; display: inline-block; height: 100%; vertical-align: middle;
}
.mfp-content {
    position: relative; display: inline-block; vertical-align: middle;
    margin: 0 auto; text-align: left; z-index: 10005;
    max-width: 900px; 
}
img.mfp-img {
    width: auto; max-width: 100%; height: auto; display: block;
    line-height: 0; box-sizing: border-box; padding: 40px 0 40px; margin: 0 auto;
}
.mfp-close {
    width: 44px; height: 44px; line-height: 44px; position: absolute;
    right: 0; top: 0; text-decoration: none; text-align: center;
    opacity: 0.65; padding: 0 0 18px 10px; color: #FFF;
    font-size: 28px; background: transparent; border: 0; cursor: pointer;
}
.mfp-close:hover { opacity: 1; color: var(--primary); }
.mfp-title { 
    text-align: center; line-height: 18px; color: #FFF; padding-right: 36px; 
}
.mfp-image-holder .mfp-close { right: -6px; text-align: right; width: 100%; }
.mfp-bottom-bar { margin-top: -36px; position: absolute; top: 100%; left: 0; width: 100%; }

/* ===================================================================
 * 13. HEADER FIXE & BOUTON À PROPOS
 * =================================================================== */

header#main-header {
    position: fixed !important;
    background: rgba(5, 5, 5, 0.95) !important;
}

ul#nav {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
}

#hero {
    flex-direction: column !important;
}
#more {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 40px !important;
}

/* ===================================================================
 * 14. CORRECTION (Menu, Taille Hero, Points Slider)
 * =================================================================== */

.mobile-btn, .menu-icon { 
    display: none !important; 
}

#hero {
    height: 70vh !important;
    min-height: 500px;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding-top: 100px !important;
}

#hero .flex-control-nav {
    position: absolute !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    margin: 0 !important;
    z-index: 50 !important;
}

/* ===================================================================
 * 15. CORRECTION NAVIGATION
 * =================================================================== */

section {
    scroll-margin-top: 90px !important;
}

ul#nav li.current a {
    color: var(--primary) !important;
}

/* ===================================================================
 * 16. REPLICATION ANIMATIONS
 * =================================================================== */

html, body { cursor: none !important; }
@media (min-width: 768px) {
    a, button, .hover-target { cursor: none !important; }
}

.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9999; pointer-events: none;
}
.cursor-dot {
    width: 8px; height: 8px; background-color: var(--primary);
}
.cursor-outline {
    width: 40px; height: 40px; border: 2px solid var(--primary);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}
@media (max-width: 768px) { 
    .cursor-dot, .cursor-outline { display: none; } 
    html, body { cursor: auto !important; }
}

.preloader, .page-transition {
    position: fixed; left: 0; width: 100%; height: 100vh;
    background: #050505; z-index: 1000000;
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.preloader { top: 0; }
.preloader.hidden { transform: translateY(-100%); }
.page-transition { top: 100%; }
.page-transition.active { transform: translateY(-100%); }

.preloader-logo {
    font-size: 15vw; font-weight: 900; letter-spacing: 0.05em; color: #fff;
    position: relative; text-transform: uppercase;
}
.glitch-fast::before, .glitch-fast::after {
    content: attr(data-text); position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: #050505;
}
.glitch-fast::before { left: 5px; text-shadow: -3px 0 #ff00c1; animation: glitch-anim-1 1s infinite linear alternate-reverse; }
.glitch-fast::after { left: -5px; text-shadow: -3px 0 #00fff9; animation: glitch-anim-2 1.2s infinite linear alternate-reverse; }

.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ===================================================================
 * 17. MOTEUR GLITCH 
 * =================================================================== */
@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 20% 0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(30% 0 20% 0); }
    40% { clip-path: inset(70% 0 10% 0); }
    60% { clip-path: inset(20% 0 50% 0); }
    80% { clip-path: inset(90% 0 5% 0); }
    100% { clip-path: inset(5% 0 80% 0); }
}

/* ===================================================================
 * 18. PACK ANIMATIONS
 * =================================================================== */

.anim-float { animation: floatAnim 4s ease-in-out infinite; }
@keyframes floatAnim {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.anim-glow-pulse { animation: neonPulse 2s infinite alternate; }
@keyframes neonPulse {
    from { box-shadow: 0 0 10px rgba(97, 3, 173, 0.2); }
    to { box-shadow: 0 0 25px rgba(97, 3, 173, 0.8), 0 0 5px rgba(97, 3, 173, 1); }
}

.anim-bass:hover { animation: bassShake 0.2s linear infinite; }
@keyframes bassShake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    25% { transform: translate(-1px, -2px) rotate(-1deg); }
    50% { transform: translate(-3px, 0px) rotate(1deg); }
    75% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -1px) rotate(-1deg); }
}

.anim-text-shine {
    background: linear-gradient(90deg, #fff 0%, #6103ad 50%, #fff 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShine 3s linear infinite;
}
@keyframes textShine { to { background-position: 200% center; } }

.anim-slide-hover { transition: transform 0.3s ease, color 0.3s ease; display: inline-block; }
.anim-slide-hover:hover { transform: translateX(10px); color: var(--primary); }

.anim-tilt { transition: transform 0.4s ease; transform-style: preserve-3d; }
.anim-tilt:hover { transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) scale3d(1.02, 1.02, 1.02); z-index: 10; }

.anim-cyber { position: relative; }
.anim-cyber::before, .anim-cyber::after {
    content: ''; position: absolute; width: 0; height: 0; border: 2px solid transparent; transition: all 0.4s ease;
}
.anim-cyber::before { top: 0; left: 0; }
.anim-cyber::after { bottom: 0; right: 0; }
.anim-cyber:hover::before { width: 100%; height: 100%; border-top-color: var(--primary); border-right-color: var(--primary); }
.anim-cyber:hover::after { width: 100%; height: 100%; border-bottom-color: var(--primary); border-left-color: var(--primary); }

.anim-zoom-img { overflow: hidden; }
.anim-zoom-img img { transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.anim-zoom-img:hover img { transform: scale(1.15); }

.anim-strobe:active { animation: strobeClick 0.1s infinite; }
@keyframes strobeClick { 0% { opacity: 1; filter: invert(0); } 100% { opacity: 0; filter: invert(1); } }

.anim-ghost { filter: blur(4px); opacity: 0.7; transition: all 0.4s ease; }
.anim-ghost:hover { filter: blur(0); opacity: 1; }

/* ===================================================================
 * 19. FIX POP-UP
 * =================================================================== */

.cursor-dot, .cursor-outline {
    z-index: 10000000 !important; 
}

.mfp-wrap, .mfp-container, .mfp-content, .mfp-close, button.mfp-arrow, img.mfp-img {
    cursor: none !important;
}

button.mfp-arrow {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    width: 70px; 
    height: 100px; 
    background: transparent; 
    border: none;
    outline: none; 
    z-index: 10006; 
    opacity: 0.5; 
    transition: opacity 0.3s ease;
}
button.mfp-arrow:hover { 
    opacity: 1; 
}
button.mfp-arrow-left { 
    left: 10px; 
}
button.mfp-arrow-right { 
    right: 10px; 
}

button.mfp-arrow::before {
    content: ''; 
    display: block; 
    width: 30px; 
    height: 30px;
    border-top: 4px solid #fff; 
    border-left: 4px solid #fff;
    margin: 0 auto; 
    transition: border-color 0.3s ease;
}
button.mfp-arrow:hover::before { 
    border-color: var(--primary);
}

button.mfp-arrow-left::before { 
    transform: rotate(-45deg); 
    margin-left: 20px; 
}
button.mfp-arrow-right::before { 
    transform: rotate(135deg); 
    margin-right: 20px; 
}

.mfp-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
}