/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-bg: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(30, 41, 59, 0.95) !important;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 45px;
    width: auto;
    margin-right: 0.75rem;
    border-radius: 8px;
    background: white;
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.navbar-brand span {
    font-size: 1.25rem;
    font-weight: 600;
    color: white !important;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-features {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px; /* Espace pour la navbar fixe */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 120px; /* Plus d'espace sur mobile */
        min-height: calc(100vh + 120px);
    }
    
    .hero-content {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-image {
        transform: perspective(1000px) rotateY(0deg);
        margin-top: 2rem;
    }
    
    .hero-image img {
        height: 250px;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="2"/></g></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image {
    text-align: center;
    animation: float 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    filter: brightness(0.9);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(29, 78, 216, 0.4) 100%);
    border-radius: 20px;
    z-index: 1;
}

.hero-image .image-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    z-index: 2;
    color: white;
    text-align: left;
}

.hero-image .badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.hero-image .badge i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

@keyframes float {
    0%, 100% { transform: perspective(1000px) rotateY(-5deg) translateY(0px); }
    50% { transform: perspective(1000px) rotateY(-5deg) translateY(-10px); }
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, var(--success-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* CTA Button Special Style */
.btn-cta {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: none !important;
    padding: 0.75rem 2rem !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    border-radius: 50px !important;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.btn-cta:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-xl) !important;
    background: linear-gradient(135deg, #20c997, #28a745) !important;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Features Section */
.features-section {
    background: white;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-card h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Test Section */
.test-section {
    background: var(--light-bg);
}

.test-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.setup-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.setup-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.test-interface {
    text-align: center;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
}

.progress-bar {
    background: var(--primary-color);
    border-radius: 4px;
}

.sound-test {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.sound-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.sound-controls .btn {
    min-width: 140px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sound-controls .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
}

.sound-controls .btn-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    border: none;
    color: white;
}

.sound-controls .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
}

.sound-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.frequency-test {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.test-controls {
    margin-top: 2rem;
}

.test-complete {
    padding: 3rem 2rem;
}

/* Results Section */
.results-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.result-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-score small {
    font-size: 1rem;
    color: var(--text-secondary);
}

.score-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

.score-status.good {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.score-status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.score-status.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.analysis-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.recommendations {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.recommendations ul li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

/* Contact Section */
.contact-section {
    background: white;
}

.contact-form {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background: var(--dark-bg) !important;
    color: white;
}

.social-links a {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
        padding-top: 160px; /* Espace supplémentaire pour navbar et titre visible */
    }
    
    .hero-section .display-4 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-content {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero-image {
        transform: perspective(1000px) rotateY(0deg);
        margin-top: 2rem;
    }
    
    .hero-image img {
        height: 250px;
    }
    
    .hero-features {
        padding: 1rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .test-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .sound-test {
        padding: 2rem 1rem;
    }
    
    .sound-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .sound-controls .btn {
        min-width: 200px;
        margin-bottom: 0;
    }
    
    /* Boutons de réponse sur mobile */
    .sound-test .d-flex {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    .sound-test .btn-lg {
        width: 100%;
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
    }
}

/* Classes d'affichage responsive */
@media (min-width: 769px) {
    .d-md-none {
        display: none !important;
    }
}
    
    .result-score {
        font-size: 2rem;
    }
}
    
    .result-score {
        font-size: 2rem;
    }
}

/* Loading Animations */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Utility Classes */
.min-vh-100 {
    min-height: 100vh;
}

.gap-3 {
    gap: 1rem;
}

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

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}