/* Custom Styles for Mobilshine */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Custom CSS Variables - Couleurs du logo Mobilshine */
:root {
    /* Couleurs principales Mobilshine */
    --mobilshine-blue: #526fb3;
    --mobilshine-gold: #ccb353;
    --mobilshine-bg: #f1ede2;
    
    /* Variations du bleu principal */
    --primary-50: #f0f3fb;
    --primary-100: #dde4f5;
    --primary-200: #bfccec;
    --primary-300: #95aade;
    --primary-400: #6983cd;
    --primary-500: #526fb3;
    --primary-600: #455d98;
    --primary-700: #394d7d;
    --primary-800: #334268;
    --primary-900: #2d3857;
    
    /* Variations du doré/gold principal */
    --gold-50: #fdfbf7;
    --gold-100: #faf5e9;
    --gold-200: #f3e8c8;
    --gold-300: #ecd5a3;
    --gold-400: #e1c275;
    --gold-500: #ccb353;
    --gold-600: #b59d42;
    --gold-700: #978135;
    --gold-800: #7d6b30;
    --gold-900: #6a5829;
    
    /* Autres couleurs */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Video Background Styling */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
}

/* Ensure video covers properly on all screen sizes */
@media (max-aspect-ratio: 16/9) {
    .video-background,
    #hero-video {
        width: 100%;
        height: auto;
    }
}

@media (min-aspect-ratio: 16/9) {
    .video-background,
    #hero-video {
        width: auto;
        height: 100%;
    }
}

/* Mobile video optimizations */
@media (max-width: 768px) {
    .video-background,
    #hero-video {
        object-fit: cover;
        object-position: center;
    }
}

/* Custom background colors */
.bg-mobilshine {
    background-color: var(--mobilshine-bg);
}

.bg-mobilshine-blue {
    background-color: var(--mobilshine-blue);
}

.bg-mobilshine-gold {
    background-color: var(--mobilshine-gold);
}

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Custom Animations */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes zoomBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
    40%, 100% { transform: rotateZ(0); }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Animation Classes */
.animate-shine {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shine 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-zoom-bounce {
    animation: zoomBounce 0.6s ease-out;
}

.animate-wiggle {
    animation: wiggle 1s ease-in-out;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Header Styles */
#header {
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-700));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
#accueil {
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 25%, #4338ca 50%, #5856eb 75%, #7679ff 100%);
    position: relative;
    overflow: hidden;
}

/* Video Background Styles */
#accueil video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Responsive video adjustments */
@media (max-aspect-ratio: 16/9) {
    #accueil video {
        width: 100vh * (16/9);
        height: 100vh;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-aspect-ratio: 16/9) {
    #accueil video {
        width: 100vw;
        height: 100vw * (9/16);
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Fallback for browsers without video support */
#accueil video + div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 25%, #4338ca 50%, #5856eb 75%, #7679ff 100%);
    z-index: -2;
}

#accueil::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient><radialGradient id="b" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23fbbf24" stop-opacity="0.1"/><stop offset="100%" stop-color="%23fbbf24" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23b)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/><circle cx="900" cy="800" r="80" fill="url(%23b)"/></svg>') no-repeat center;
    background-size: cover;
    opacity: 0.4;
    z-index: 1;
    pointer-events: none;
}

/* Enhanced text readability over video */
#accueil .relative.z-10 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#accueil h1 {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

/* Video loading animation */
@keyframes videoFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#accueil video {
    animation: videoFadeIn 1.5s ease-in-out;
}

/* Mobile video optimizations */
@media (max-width: 768px) {
    #accueil video {
        object-position: center center;
        min-height: 100vh;
    }
    
    /* Pause video on mobile to save battery */
    #accueil video.mobile-paused {
        animation-play-state: paused;
    }
}

/* Service Cards */
.service-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.02), rgba(59, 130, 246, 0.05));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover .fas {
    transform: scale(1.2) rotate(10deg);
    animation: wiggle 0.5s ease-in-out;
}

.service-card:hover h3 {
    color: var(--primary-700);
    transition: color 0.3s ease;
}

/* Gallery Items */
.gallery-item {
    position: relative;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item .group:hover i {
    animation: heartbeat 1s ease-in-out;
}

/* Amélioration du contraste pour les cartes */
.gallery-item .bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to));
    position: relative;
}

.gallery-item .bg-gradient-to-br::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
}

/* Aspect Ratio */
.aspect-w-4 {
    position: relative;
    padding-bottom: 75%; /* 4:3 aspect ratio */
}

.aspect-w-4 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 56, 202, 0.4);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-600), var(--gold-700));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-600);
    color: var(--primary-600);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 56, 202, 0.3);
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #f8fafc;
}

.form-input:valid {
    border-color: #10b981;
}

/* Lightbox Styles */
#lightbox {
    backdrop-filter: blur(5px);
    z-index: 9999;
}

#lightbox-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Mobile Menu */
#mobile-menu {
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

#mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-700);
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Effects */
.parallax {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Morphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-left-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 20px;
    }
    
    .gallery-item {
        margin-bottom: 20px;
    }
    
    #mobile-menu {
        margin-top: 8px;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .service-card,
    .gallery-item {
        border: 2px solid #000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

/* Selection Styles */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--primary-900);
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--primary-900);
}

/* Instagram Gallery Styles */
.instagram-post {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.instagram-post:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.instagram-post .aspect-square {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
}

.instagram-post .aspect-square > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Instagram-like hover effects */
.instagram-post:hover .absolute.inset-0 {
    background: linear-gradient(45deg, rgba(255, 0, 150, 0.1), rgba(255, 100, 0, 0.1));
}

/* Pulsing animation for Instagram icons */
@keyframes pulse-instagram {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.instagram-post:hover .fa-instagram {
    animation: pulse-instagram 2s infinite;
}

/* Gradient text effect */
.instagram-gradient-text {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Instagram button hover */
.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.instagram-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

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

/* Like/Comment counter styling */
.instagram-post .absolute.bottom-4 {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding-top: 20px;
}

/* Mobile responsiveness for Instagram grid */
@media (max-width: 640px) {
    .instagram-post {
        margin-bottom: 1rem;
    }
}

/* Loading skeleton effect for future Instagram API integration */
.instagram-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}