/* Custom Styles for KANSOTEX - Dynamic Theme System */

:root {
    --bg-primary: #000000;
    --bg-secondary: rgba(20, 20, 20, 0.8);
    --bg-card: rgba(20, 20, 20, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    /* Default to silver theme as fallback */
    --accent-light: #E8E8E8;
    --accent-mid: #C0C0C0;
    --accent-dark: #A8A8A8;
    --accent-rgb: 232, 232, 232;
    --border-opacity: 0.4;
    --hover-border-opacity: 0.7;
    --shadow-opacity: 0.25;
}

/* THEME OR (GOLD) - Dark gold avec éclat */
body[data-theme="gold"] {
    --accent-light: #B8941E;
    --accent-mid: #D4AF37;
    --accent-dark: #9A7B15;
    --accent-rgb: 184, 148, 30;
    --border-opacity: 0.3;
    --hover-border-opacity: 0.7;
    --shadow-opacity: 0.2;
    --button-bg: #B8941E;
    --button-hover-bg: #D4AF37;
    --button-text: #000000;
}

/* THEME ARGENT (SILVER) - Blanc et gris argenté pour fond dark */
body[data-theme="silver"] {
    --accent-light: #E8E8E8;
    --accent-mid: #C0C0C0;
    --accent-dark: #A8A8A8;
    --accent-rgb: 232, 232, 232;
    --border-opacity: 0.4;
    --hover-border-opacity: 0.7;
    --shadow-opacity: 0.25;
    --button-bg: #E8E8E8;
    --button-hover-bg: #FFFFFF;
    --button-text: #000000;
}

/* LIGHT MODE - Mode Clair */
body[data-theme-mode="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Light mode text color overrides - ALL gray text classes */
body[data-theme-mode="light"] .text-gray-100,
body[data-theme-mode="light"] .text-gray-200,
body[data-theme-mode="light"] .text-gray-300,
body[data-theme-mode="light"] .text-white {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] .text-gray-400,
body[data-theme-mode="light"] .text-gray-500,
body[data-theme-mode="light"] .text-gray-600 {
    color: var(--text-secondary) !important;
}

body[data-theme-mode="light"] .bg-black {
    background: var(--bg-primary) !important;
}

body[data-theme-mode="light"] .bg-gray-800,
body[data-theme-mode="light"] .bg-gray-900 {
    background: var(--bg-card) !important;
    border: 1px solid #e5e7eb;
}

body[data-theme-mode="light"] #main-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(var(--accent-rgb), 0.2) !important;
}

body[data-theme-mode="light"] #main-header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-mid) 50%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--accent-light) !important;
}

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

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

.border-accent-subtle {
    border-color: rgba(var(--accent-rgb), var(--border-opacity)) !important;
}

.bg-accent-gradient {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-mid) 100%) !important;
    color: var(--button-text) !important;
    font-weight: bold;
}

/* Boutons principaux avec système dynamique */
.btn-primary {
    background: var(--button-bg) !important;
    color: var(--button-text) !important;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--button-hover-bg) !important;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.3);
}

/* Boutons de navigation (flèches) */
.nav-arrow {
    background: rgba(var(--accent-rgb), 0.9) !important;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: var(--button-bg) !important;
    transform: scale(1.1);
}

.bg-accent-subtle {
    background: rgba(var(--accent-rgb), 0.2) !important;
}

.border-l-accent {
    border-left-color: var(--accent-light) !important;
}

.hover-text-accent:hover {
    color: var(--accent-light) !important;
}

.hover-bg-accent:hover {
    background-color: var(--accent-light) !important;
}

/* Classe pour les numéros qui s'adaptent au thème (engagement section) */
.text-accent-number {
    color: rgba(var(--accent-rgb), 0.2) !important;
}

.hover-border-accent:hover {
    border-color: var(--accent-light) !important;
}

.ring-accent:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15) !important;
}

.shadow-accent {
    box-shadow: 0 20px 40px rgba(var(--accent-rgb), var(--shadow-opacity)) !important;
}

.shadow-accent-lg {
    box-shadow: 0 25px 50px rgba(var(--accent-rgb), 0.2) !important;
}

/* For header border */
.border-accent-faint {
    border-color: rgba(var(--accent-rgb), 0.3) !important;
}

/* For gradients */
.bg-gradient-accent {
    background: linear-gradient(to right, transparent, rgba(var(--accent-rgb), 0.5), transparent) !important;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid rgba(var(--accent-rgb), var(--border-opacity));
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), var(--hover-border-opacity));
    box-shadow: 0 20px 40px rgba(var(--accent-rgb), var(--shadow-opacity));
}

.engagement-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.engagement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-light) 0%, var(--accent-mid) 50%, var(--accent-dark) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.engagement-card:hover::before {
    transform: scaleX(1);
}

.engagement-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.8);
    box-shadow: 0 25px 50px rgba(var(--accent-rgb), 0.2);
}

#testimonials-container {
    position: relative;
    min-height: 300px;
}

.testimonial-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 1rem;
    padding: 2.5rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.testimonial-card.active {
    opacity: 1;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    color: rgba(var(--accent-rgb), 0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(100, 100, 100, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-light);
    width: 40px;
    border-radius: 6px;
}

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

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

/* Header Styles */
#main-header {
    background: transparent;
    backdrop-filter: none;
}

#main-header.header-sticky {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.1);
}

/* Form Styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

/* Success/Error Messages */
.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 1rem;
    border-radius: 0.5rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 1rem;
    border-radius: 0.5rem;
}

/* Mobile Menu Button */
#mobile-menu-btn {
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 60;
}

#mobile-menu-btn:hover {
    color: var(--accent-light);
    transform: scale(1.1);
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Mobile Menu */
#mobile-menu {
    background: rgba(10, 10, 10, 0.98);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Strengths Section */
.strength-card {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-light);
    padding: 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.strength-card:hover {
    transform: translateX(10px);
    background: rgba(30, 30, 30, 0.9);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.1);
}

/* Hero Section Slider Styles */
.hero-slider-container {
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    animation: slowZoom 20s ease-in-out infinite;
}

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

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--accent-light);
    width: 24px;
    border-radius: 4px;
}

/* Collection Two Column Slider Styles */
.collection-two-col-slider {
    position: relative;
}

.collection-two-col-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.collection-two-col-slide.active {
    display: block;
    opacity: 1;
}

/* Mobile: hide second item in each slide to show only 1 column */
@media (max-width: 767px) {
    .collection-two-col-slide .grid > div:nth-child(2) {
        display: none !important;
    }
    
    .collection-two-col-slide .grid {
        grid-template-columns: 1fr !important;
    }
}

.collection-two-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collection-two-dot.active {
    background: var(--accent-light);
    width: 24px;
    border-radius: 4px;
}

.collection-two-prev,
.collection-two-next {
    opacity: 0.9;
}

.collection-two-prev:hover,
.collection-two-next:hover {
    opacity: 1;
    transform: scale(1.1) translateY(-50%);
}

/* Responsive */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2.5rem;
    }
    
    #accueil h1 {
        font-size: 3rem !important;
    }
    
    #accueil p {
        font-size: 1.25rem !important;
    }
    
    .collection-slider-container {
        height: 400px !important;
    }
    
    .collection-slide h3 {
        font-size: 2rem !important;
    }
    
    .collection-slide p {
        font-size: 1rem !important;
    }
}

/* ===== LIGHT THEME STYLES ===== */

/* Light theme with gold accent */
body[data-theme-mode="light"][data-theme="gold"] {
    --accent-light: #9A7B15;
    --accent-mid: #B8941E;
    --accent-dark: #D4AF37;
    --accent-rgb: 154, 123, 21;
    --border-opacity: 0.3;
    --hover-border-opacity: 0.6;
    --shadow-opacity: 0.15;
    --button-bg: #B8941E;
    --button-hover-bg: #D4AF37;
    --button-text: #ffffff;
}

/* Light theme with silver accent */
body[data-theme-mode="light"][data-theme="silver"] {
    --accent-light: #475569;
    --accent-mid: #64748b;
    --accent-dark: #94a3b8;
    --accent-rgb: 71, 85, 105;
    --border-opacity: 0.4;
    --hover-border-opacity: 0.7;
    --shadow-opacity: 0.2;
    --button-bg: #334155;
    --button-hover-bg: #475569;
    --button-text: #ffffff;
}

/* Light theme specific overrides */
body[data-theme-mode="light"] #main-header {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
}

body[data-theme-mode="light"] #main-header.header-sticky {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body[data-theme-mode="light"] .card {
    background: var(--bg-card);
    border: 1px solid rgba(var(--accent-rgb), var(--border-opacity));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body[data-theme-mode="light"] .card:hover {
    border-color: rgba(var(--accent-rgb), var(--hover-border-opacity));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body[data-theme-mode="light"] .engagement-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(248, 249, 250, 0.9) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

body[data-theme-mode="light"] .testimonial-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

body[data-theme-mode="light"] #mobile-menu-btn {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] #mobile-menu-btn:hover {
    color: var(--accent-mid) !important;
}

body[data-theme-mode="light"] #mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}

body[data-theme-mode="light"] .strength-card {
    background: var(--bg-card);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

body[data-theme-mode="light"] .strength-card:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body[data-theme-mode="light"] .strength-card h3,
body[data-theme-mode="light"] .strength-card h4,
body[data-theme-mode="light"] .strength-card p,
body[data-theme-mode="light"] .strength-card span,
body[data-theme-mode="light"] .strength-card i {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] .strength-card .text-gray-400 {
    color: var(--text-secondary) !important;
}

/* Additional comprehensive light mode overrides */
body[data-theme-mode="light"] .volet-card {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] .volet-card h3,
body[data-theme-mode="light"] .volet-card p {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] .collection-slide {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%) !important;
}

body[data-theme-mode="light"] .collection-slide h3,
body[data-theme-mode="light"] .collection-slide h4,
body[data-theme-mode="light"] .collection-slide p,
body[data-theme-mode="light"] .collection-slide span,
body[data-theme-mode="light"] .collection-slide small {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] .collection-slide .text-gray-400,
body[data-theme-mode="light"] .collection-slide .text-gray-300 {
    color: var(--text-secondary) !important;
}

body[data-theme-mode="light"] nav a {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] nav a:hover {
    color: var(--accent-mid) !important;
}

body[data-theme-mode="light"] .nav-arrow,
body[data-theme-mode="light"] .slider-dot {
    background: rgba(var(--accent-rgb), 0.3) !important;
    border: 2px solid rgba(var(--accent-rgb), 0.5) !important;
}

body[data-theme-mode="light"] .nav-arrow i {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] .nav-arrow:hover,
body[data-theme-mode="light"] .slider-dot:hover,
body[data-theme-mode="light"] .slider-dot.active {
    background: rgba(var(--accent-rgb), 0.6) !important;
}

body[data-theme-mode="light"] footer {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%) !important;
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] footer h3,
body[data-theme-mode="light"] footer p,
body[data-theme-mode="light"] footer a {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] footer a:hover {
    color: var(--accent-mid) !important;
}

body[data-theme-mode="light"] .text-gray-300,
body[data-theme-mode="light"] .text-gray-200 {
    color: var(--text-secondary) !important;
}

body[data-theme-mode="light"] section {
    background: var(--bg-primary) !important;
}

body[data-theme-mode="light"] .bg-gradient-to-b,
body[data-theme-mode="light"] .bg-gradient-to-r {
    background: var(--bg-primary) !important;
}

body[data-theme-mode="light"] #contact {
    background: rgba(245, 245, 245, 0.5) !important;
}

body[data-theme-mode="light"] #contact h2,
body[data-theme-mode="light"] #contact h3,
body[data-theme-mode="light"] #contact h4,
body[data-theme-mode="light"] #contact p,
body[data-theme-mode="light"] #contact span,
body[data-theme-mode="light"] #contact i,
body[data-theme-mode="light"] #contact a,
body[data-theme-mode="light"] #contact label {
    color: var(--text-primary) !important;
}

body[data-theme-mode="light"] #contact .text-gray-400 {
    color: var(--text-secondary) !important;
}

body[data-theme-mode="light"] #contact-form input,
body[data-theme-mode="light"] #contact-form textarea {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: rgba(var(--accent-rgb), 0.3) !important;
}

body[data-theme-mode="light"] #contact-form input::placeholder,
body[data-theme-mode="light"] #contact-form textarea::placeholder {
    color: var(--text-secondary) !important;
}

body[data-theme-mode="light"] .p-8.rounded-lg.border {
    background: var(--bg-card) !important;
    border-color: rgba(var(--accent-rgb), 0.3) !important;
}

/* ===== DARK THEME STYLES FOR COLLECTION ===== */

/* Dark mode collection cards - darker overlays and backgrounds */
body[data-theme-mode="dark"] .collection-two-col-slide .bg-gradient-to-t {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6), transparent) !important;
}

body[data-theme-mode="dark"] .collection-two-col-slide .absolute.bottom-0 {
    background: rgba(20, 20, 20, 0.92) !important;
}

body[data-theme-mode="dark"] .collection-two-col-slide h3 {
    color: #ffffff !important;
}

body[data-theme-mode="dark"] .collection-two-col-slide p {
    color: #d1d5db !important;
}

body[data-theme-mode="dark"] .collection-two-col-slide span.bg-gray-900 {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Floating buttons container - stacks vertically on left side */
.floating-buttons-stack {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Theme toggle button styles */
#theme-toggle {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-rgb), 0.75));
    border: 2px solid rgba(var(--accent-rgb), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(var(--accent-rgb), 0.2);
    backdrop-filter: blur(10px);
}

#theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(var(--accent-rgb), 0.3);
    border-color: rgba(var(--accent-rgb), 0.6);
}

#theme-toggle i {
    font-size: 1.4rem;
    color: var(--button-text);
}

/* Language switcher positioning - no longer needs special handling */
#lang-switcher {
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(var(--accent-rgb), 0.2) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(var(--accent-rgb), 0.4) !important;
}

#lang-switcher:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(var(--accent-rgb), 0.3) !important;
    border-color: rgba(var(--accent-rgb), 0.6) !important;
}

/* Smooth transition for theme changes */
body * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Light theme input styles */
body[data-theme-mode="light"] input,
body[data-theme-mode="light"] textarea {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.3) !important;
}

body[data-theme-mode="light"] input:focus,
body[data-theme-mode="light"] textarea:focus {
    border-color: rgba(var(--accent-rgb), 0.6) !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1) !important;
}

/* Light theme for hero overlay */
body[data-theme-mode="light"] .hero-slide .bg-opacity-60 {
    background-color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 768px) {
    .floating-buttons-stack {
        left: 1rem;
        bottom: 1rem;
        gap: 0.75rem;
    }
    
    #theme-toggle,
    #lang-switcher {
        width: 48px !important;
        height: 48px !important;
    }
    
    #theme-toggle i {
        font-size: 1.2rem;
    }
    
    #lang-switcher span {
        font-size: 0.75rem !important;
    }
}
