/* Custom Styles for Serrurerie Henri */

:root {
    --primary: #121212; 
    --secondary: #1E2229;
    --accent: #d4af37;
    --gold: #c5a028;
    --light: #f4f4f4;
    --text-dark: #2d3436;
    --text-light: #ffffff;
    --text-gold: #e5c559;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, .font-serif {
    font-family: 'Playfair Display', serif;
}

/* Accent color utility classes */
.text-accent {
    color: var(--accent);
}

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

.border-accent {
    border-color: var(--accent);
}

/* Button primary style */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-4px);
}

/* Logo icon decorative element */
.logo-icon::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

/* Navigation link hover effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

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

/* Hero background */
.hero-bg {
    background: linear-gradient(rgba(18, 18, 18, 0.75), rgba(18, 18, 18, 0.85)), url('https://images.unsplash.com/photo-1558002038-1091a1661116?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

/* Service card hover effect */
.service-card:hover .service-icon {
    background-color: var(--accent);
    color: var(--primary);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .type-animate,
    .animate-bounce,
    .service-card,
    .btn-primary,
    .nav-link::after {
        transition: none;
        animation: none;
    }
}

/* Mobile Touch Optimizations */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Safe area padding for notched phones */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.pb-safe-2 {
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 20px);
}

/* Fix body scroll on mobile */
body {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

/* Mobile menu improvements */
@media (max-width: 767px) {
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Prevent pull-to-refresh on mobile */
.hero-bg {
    overscroll-behavior: contain;
}

/* Fix for iOS Safari address bar issues */
@supports (-webkit-touch-callout: none) {
    .min-h-\[100dvh\] {
        min-height: -webkit-fill-available;
    }
}

/* Navbar mobile improvements */
#navbar {
    transition: all 0.3s ease;
}

/* Mobile navbar - fixed at top */
@media (max-width: 767px) {
    #navbar {
        top: 0 !important;
    }
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Mobile menu hamburger button - explicit styles to ensure visibility */
.mobile-menu-btn span,
#navbar .md\:hidden span {
    background-color: #d4af37 !important;
}

#mobile-menu {
    right: -100%;
    transition: right 0.3s ease-in-out;
    visibility: hidden;
}

#mobile-menu.active {
    right: 0;
    visibility: visible;
}

#mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
    opacity: 0;
}

#mobile-overlay.active {
    visibility: visible;
    opacity: 1;
}
