/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #d4a574;
    --primary-dark: #b8865a;
    --primary-light: #e6c09b;
    --secondary-color: #e8d5c4;
    --success-color: #c9b5a3;
    --error-color: #e09891;
    --dark-bg: #1a1614;
    --dark-surface: #faf7f4;
    --dark-surface-light: #f5ede6;
    --text-primary: #3a2822;
    --text-secondary: #5a4239;
    --text-muted: #8b7265;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #e6c09b 0%, #d4a574 50%, #c9936d 100%);
    --gradient-secondary: linear-gradient(135deg, #f5ede6 0%, #e8d5c4 100%);
    --gradient-success: linear-gradient(135deg, #e8d5c4 0%, #d4c0ae 100%);
    --gradient-dark: linear-gradient(180deg, rgba(250, 247, 244, 0.95) 0%, rgba(250, 247, 244, 0.85) 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Animations */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    
/* Shadows */
--shadow-sm: 0 1px 2px 0 rgba(58, 40, 34, 0.05);
--shadow-md: 0 4px 6px -1px rgba(58, 40, 34, 0.1), 0 2px 4px -1px rgba(58, 40, 34, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(58, 40, 34, 0.1), 0 4px 6px -2px rgba(58, 40, 34, 0.05);
--shadow-xl: 0 20px 25px -5px rgba(58, 40, 34, 0.1), 0 10px 10px -5px rgba(58, 40, 34, 0.04);
--shadow-2xl: 0 25px 50px -12px rgba(58, 40, 34, 0.25);
--shadow-glow: 0 0 20px rgba(212, 165, 116, 0.5);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height:100dvh;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: var(--spacing-md);
}

/* Buttons base */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5), 0 0 10px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(99, 102, 241, 0.4);
    }
}

/* Utility classes */
.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out;
}

.animate-fadeInDown {
    animation: fadeInDown 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive utilities */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: var(--font-size-3xl);
    }
    
    h2 {
        font-size: var(--font-size-2xl);
    }
    
    h3 {
        font-size: var(--font-size-xl);
    }
}

/* Message de réassurance pour les champs email */
.email-reassurance-msg {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(212, 165, 116, 0.1);
    border-radius: 12px;
    animation: fadeIn 0.5s ease;
}

.email-reassurance-msg svg {
    flex-shrink: 0;
    color: var(--primary-color);
    opacity: 0.8;
}

.email-reassurance-msg span {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Animation pour l'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    /* Pour les wrappers d'email, utiliser flex et réorganiser avec order */
    .text-input-wrapper:has(input[type="email"]) {
        display: flex;
        flex-direction: column;
    }
    
    /* Ordre des éléments pour email sur mobile */
    .text-input-wrapper:has(input[type="email"]) .email-reassurance-msg {
        order: 1; /* En premier */
        margin-top: 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .text-input-wrapper:has(input[type="email"]) input[type="email"] {
        order: 2; /* En deuxième */
    }
    
    .text-input-wrapper:has(input[type="email"]) .email-error-msg {
        order: 3; /* En troisième */
        margin-top: var(--spacing-xs);
    }
    
    .text-input-wrapper:has(input[type="email"]) .mobile-text-btn {
        order: 4; /* En dernier */
        margin-top: var(--spacing-sm);
    }
    
    .email-reassurance-msg {
        padding: var(--spacing-xs) var(--spacing-sm);
        background-color: #f7efe7;
    }
    
    .email-reassurance-msg svg {
        width: 14px;
        height: 14px;
    }
    
    .email-reassurance-msg span {
        font-size: var(--font-size-xs);
    }
}