/* VR Services - Styles personnalisés */

/* Variables CSS */
:root {
    --vr-orange: #ff6b35;
    --vr-orange-hover: #e55a2b;
    --vr-green: #2d5016;
    --metal-50: #f5f5f6;
    --metal-100: #e6e6e8;
    --metal-200: #c7c8cc;
    --metal-300: #a3a4ab;
    --metal-400: #7f8089;
    --metal-500: #64656d;
    --metal-600: #4d4e54;
    --metal-700: #3f4044;
    --metal-800: #2c2d30;
    --metal-900: #1a1b1d;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--vr-orange);
    transition: width 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--vr-orange);
    color: white;
}

.btn-primary:hover {
    background-color: var(--vr-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background-color: var(--metal-900);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--metal-800);
}

/* Cards */
.product-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-featured {
    background-color: var(--vr-orange);
    color: white;
}

.badge-stock {
    background-color: #10b981;
    color: white;
}

.badge-out-of-stock {
    background-color: #ef4444;
    color: white;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--vr-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

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

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--metal-200);
    border-top-color: var(--vr-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Chatbot Styles */
#chatbot-window {
    max-height: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#chatbot-messages {
    scrollbar-width: thin;
    scrollbar-color: var(--metal-300) var(--metal-100);
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: var(--metal-100);
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background-color: var(--metal-300);
    border-radius: 3px;
}

.bot-message,
.user-message {
    animation: fadeIn 0.3s ease-out;
}

/* Notification Styles */
.notification {
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.warning {
    background-color: #f59e0b;
}

.notification.info {
    background-color: #3b82f6;
}

/* Cart Count Badge */
#cart-count {
    animation: bounce 0.6s;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--metal-900) 0%, var(--metal-700) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Product Gallery */
.product-gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.product-gallery-main img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--vr-orange);
}

/* Search Results Dropdown */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--metal-300) var(--metal-100);
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--metal-100);
}

.search-results::-webkit-scrollbar-thumb {
    background-color: var(--metal-300);
    border-radius: 3px;
}

/* Accordion */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

/* Tooltips */
.tooltip {
    background-color: var(--metal-900);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.2s ease-out forwards;
}

/* Filter Sidebar */
.filter-sidebar {
    position: sticky;
    top: 5rem;
}

/* Quantity Input */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Custom Checkbox */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--vr-orange);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: none;
        color: inherit;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Responsive Tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: var(--metal-900);
        --text-primary: #f9fafb;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--vr-orange);
    outline-offset: 2px;
}

/* Skip to Content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--vr-orange);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

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

::-webkit-scrollbar-track {
    background: var(--metal-100);
}

::-webkit-scrollbar-thumb {
    background: var(--metal-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--metal-500);
}

/* Selection Color */
::selection {
    background-color: var(--vr-orange);
    color: white;
}

::-moz-selection {
    background-color: var(--vr-orange);
    color: white;
}
