/* Custom Font Setup */
body { 
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4, h5, h6 { 
    font-family: 'Space Grotesk', sans-serif; 
}

/* Transition pour tous les éléments lors du changement de thème */
html.theme-transition,
html.theme-transition * {
    transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Dark Mode Support */
:root {
    color-scheme: light;
}

html.dark-mode {
    color-scheme: dark;
}

html.dark-mode body {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

html.dark-mode > * {
    background-color: #1e293b;
    color: #f1f5f9;
}

/* Background gradient for dark mode */
html.dark-mode .fixed.inset-0.bg-gradient-to-br {
    background: linear-gradient(to bottom right, #0f172a, #1e293b, #1e293b) !important;
}

/* Text colors dark mode */
html.dark-mode .text-slate-700 {
    color: #cbd5e1 !important;
}

html.dark-mode .text-slate-600 {
    color: #94a3b8 !important;
}

html.dark-mode .text-slate-500 {
    color: #94a3b8 !important;
}

html.dark-mode .text-slate-800 {
    color: #f1f5f9 !important;
}

html.dark-mode .text-slate-900 {
    color: #f8fafc !important;
}

html.dark-mode .text-slate-400 {
    color: #cbd5e1 !important;
}

/* Glass panel and cards */
html.dark-mode .glass-panel {
    background: rgba(30, 41, 59, 0.75) !important;
    border-color: rgba(100, 116, 139, 0.5) !important;
    backdrop-filter: blur(24px) !important;
}

html.dark-mode .glass-card {
    background: rgba(30, 41, 59, 0.65) !important;
    border-color: rgba(100, 116, 139, 0.5) !important;
    backdrop-filter: blur(20px) !important;
}

html.dark-mode .glass-card:hover {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(71, 85, 105, 0.7) !important;
}

html.dark-mode .glass-button {
    background: rgba(51, 65, 85, 0.6) !important;
    border-color: rgba(71, 85, 105, 0.6) !important;
    color: #cbd5e1 !important;
    backdrop-filter: blur(8px) !important;
}

html.dark-mode .glass-button:hover {
    background: rgba(51, 65, 85, 0.85) !important;
    border-color: rgba(71, 85, 105, 0.8) !important;
}

/* Background overrides */
html.dark-mode .bg-slate-50 {
    background-color: #1e293b !important;
}

html.dark-mode .bg-white {
    background-color: #1e293b !important;
}

html.dark-mode .bg-slate-100 {
    background-color: #334155 !important;
}

html.dark-mode .bg-sky-50 {
    background-color: #1e293b !important;
}

html.dark-mode .bg-indigo-50 {
    background-color: #1e293b !important;
}

html.dark-mode .bg-violet-50 {
    background-color: #1e293b !important;
}

html.dark-mode .bg-orange-50 {
    background-color: #1e293b !important;
}

html.dark-mode .bg-emerald-50 {
    background-color: #1e293b !important;
}

html.dark-mode .bg-indigo-100 {
    background-color: #334155 !important;
}

html.dark-mode .bg-orange-100 {
    background-color: #334155 !important;
}

/* Form inputs */
html.dark-mode .custom-input {
    background: rgba(71, 85, 105, 0.3) !important;
    border-color: rgba(100, 116, 139, 0.4) !important;
    color: #f1f5f9 !important;
}

html.dark-mode .custom-input::placeholder {
    color: #64748b !important;
}

html.dark-mode .custom-input:focus {
    background: rgba(71, 85, 105, 0.5) !important;
    border-color: #38bdf8 !important;
    outline: none;
}

/* Border colors */
html.dark-mode .border-white {
    border-color: rgba(100, 116, 139, 0.4) !important;
}

html.dark-mode .border-sky-200 {
    border-color: rgba(56, 189, 248, 0.2) !important;
}

html.dark-mode .border-white\/30 {
    border-color: rgba(100, 116, 139, 0.3) !important;
}

html.dark-mode .border-white\/40 {
    border-color: rgba(100, 116, 139, 0.4) !important;
}

html.dark-mode .border-white\/50 {
    border-color: rgba(100, 116, 139, 0.5) !important;
}

/* Specific section backgrounds */
html.dark-mode .bg-white\/30 {
    background-color: rgba(51, 65, 85, 0.4) !important;
}

html.dark-mode section {
    background-color: #1e293b;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes float-delayed {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes drift {
    0% { transform: translateX(0) translateY(0); opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { transform: translateX(100px) translateY(-50px); opacity: 0.5; }
}

@keyframes gradient-xy {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-float { 
    animation: float 6s ease-in-out infinite; 
}

.animate-float-delayed { 
    animation: float-delayed 8s ease-in-out infinite; 
}

.animate-gradient { 
    background-size: 200% 200%; 
    animation: gradient-xy 15s ease infinite; 
}

/* Glass Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(0, 100, 255, 0.15);
}

.glass-button {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: white;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* Form Elements */
.custom-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.5);
    border-color: #38bdf8;
}

/* Active Navigation Link */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link.active-nav {
    color: #0284c7 !important;
    font-weight: 600;
}

.nav-link.active-nav::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #0ea5e9, #6366f1);
    border-radius: 2px;
    animation: slideIn 0.3s ease-out;
}

/* Mobile menu nav links: underline only under text */
#mobile-menu .nav-link {
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track { 
    background: #f0f9ff; 
}

::-webkit-scrollbar-thumb { 
    background: #bae6fd; 
    border-radius: 4px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: #7dd3fc; 
}

/* Dark Mode */
body.dark-mode {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .text-slate-800 {
    color: #f1f5f9 !important;
}

body.dark-mode .text-slate-600 {
    color: #cbd5e1 !important;
}

body.dark-mode .text-slate-500 {
    color: #94a3b8 !important;
}

body.dark-mode .bg-gradient-to-br {
    background: linear-gradient(to bottom right, #1e293b, #0f172a) !important;
}

body.dark-mode .glass-panel,
body.dark-mode .glass-card,
body.dark-mode .glass-button {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(100, 116, 139, 0.3);
}

body.dark-mode .glass-panel:hover,
body.dark-mode .glass-card:hover {
    background: rgba(30, 41, 59, 0.7);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: rgba(30, 41, 59, 0.5) !important;
    color: #f1f5f9 !important;
    border-color: rgba(100, 116, 139, 0.4) !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748b !important;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    width: calc(100% - 48px);
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
}

.cookie-consent.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-consent__title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cookie-consent__text {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
}

.cookie-consent__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-consent__btn {
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.25);
}

.cookie-consent__btn--ghost {
    background: transparent;
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: none;
}

html.dark-mode .cookie-consent {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(71, 85, 105, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

html.dark-mode .cookie-consent__title {
    color: #f8fafc;
}

html.dark-mode .cookie-consent__text {
    color: #cbd5e1;
}

html.dark-mode .cookie-consent__btn--ghost {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.4);
}

/* Sakura Toast */
.sakura-toast {
    position: fixed;
    right: 24px;
    bottom: 96px;
    left: auto;
    top: auto;
    z-index: 60;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(251, 113, 133, 0.3);
    color: #9f1239;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.sakura-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

html.dark-mode .sakura-toast {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(244, 114, 182, 0.35);
    color: #fbcfe8;
}

/* Carousel */
.carousel-container {
    width: 100%;
}

.carousel-item {
    min-width: 100%;
}

.carousel-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    width: 12px;
    height: 12px;
}

/* Sakura Theme */
html.sakura-mode {
    color-scheme: light;
}

html.sakura-mode body {
    background-color: #fff1f5 !important;
    color: #7f1d1d !important;
}

html.sakura-mode .fixed.inset-0.bg-gradient-to-br {
    background: linear-gradient(to bottom right, #fff1f5, #ffe4e6, #fdf2f8) !important;
}

html.sakura-mode .text-slate-900,
html.sakura-mode .text-slate-800,
html.sakura-mode .text-slate-700 {
    color: #7f1d1d !important;
}

html.sakura-mode .text-slate-600,
html.sakura-mode .text-slate-500,
html.sakura-mode .text-slate-400 {
    color: #9f1239 !important;
}

html.sakura-mode .glass-panel,
html.sakura-mode .glass-card,
html.sakura-mode .glass-button {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(251, 113, 133, 0.35) !important;
    box-shadow: 0 20px 40px rgba(244, 63, 94, 0.08);
}

html.sakura-mode .glass-card:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(251, 113, 133, 0.5) !important;
    box-shadow: 0 20px 40px rgba(244, 63, 94, 0.15);
}

html.sakura-mode .bg-slate-50,
html.sakura-mode .bg-white {
    background-color: #fff1f5 !important;
}

html.sakura-mode .bg-white\/30 {
    background-color: rgba(255, 255, 255, 0.6) !important;
}

html.sakura-mode .nav-link.active-nav {
    color: #e11d48 !important;
}

html.sakura-mode .nav-link.active-nav::after {
    background: linear-gradient(to right, #fb7185, #f472b6) !important;
}

html.sakura-mode .cookie-consent {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(251, 113, 133, 0.3);
    box-shadow: 0 20px 40px rgba(244, 63, 94, 0.12);
}