/* ==================== THÈME YSDesign ==================== */

:root {
    --primary-color: #00415d;
    --secondary-color: #ff414d;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-muted: #666;
    --border-color: #eee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

/* ==================== NAVIGATION ==================== */

.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-in {
    animation: slideIn 0.8s ease-out forwards;
    opacity: 0;
}

/* ==================== HERO SECTION ==================== */

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-section img {
    max-width: 100%;
    height: auto;
}

/* ==================== CARDS ==================== */

.card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: scale(1.02);
}

.portfolio-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 65, 93, 0.8);
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-card:hover .overlay {
    opacity: 1;
}

/* ==================== BUTTONS ==================== */

.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background-color: #002030;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--secondary-color);
    border: none;
}

.btn-danger:hover {
    background-color: #e63743;
}

/* ==================== BADGES ET LABELS ==================== */

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* ==================== SECTIONS ==================== */

section {
    padding: 60px 0;
}

section.py-5 {
    padding: 60px 0;
}

/* ==================== FOOTER ==================== */

footer {
    margin-top: 80px;
    padding-top: 40px;
}

footer a {
    transition: color 0.3s;
}

footer a:hover {
    color: var(--secondary-color) !important;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* ==================== FORMULAIRES ==================== */

.form-control,
.form-select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 65, 93, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==================== PROGRESSBAR ==================== */

.progress {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .display-4 {
        font-size: 1.8rem;
    }

    section {
        padding: 40px 0;
    }

    .card {
        margin-bottom: 20px;
    }

    footer {
        margin-top: 40px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .display-3 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 24px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

/* ==================== HOVER EFFECTS ==================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-dark);
}

h1 {
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

/* ==================== ACCESIBILITÉ ==================== */

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.alert {
    border-radius: 8px;
    border: none;
}

/* ==================== UTILITAIRES ==================== */

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary-light {
    background-color: rgba(0, 65, 93, 0.05);
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.rounded-3 {
    border-radius: 12px;
}

/* Position fixes */
.sticky-top {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ==================== MODAL STYLING ==================== */

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid var(--border-color);
    background-color: rgba(0, 65, 93, 0.02);
}

.modal-body {
    padding: 30px;
}

.modal.fade .modal-dialog {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* ==================== FORM ERROR STYLING ==================== */

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.form-error.show {
    display: block;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
    padding-right: 12px;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ==================== FILTER BUTTONS ==================== */

.portfolio-filter-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--text-muted);
}

.portfolio-filter-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.portfolio-filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 65, 93, 0.3);
}

/* ==================== MULTI-STEP FORM ==================== */

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideIn 0.5s ease-out;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step-indicator .step {
    flex: 1;
    text-align: center;
    padding: 20px 10px;
    border-bottom: 3px solid #e0e0e0;
    transition: all 0.3s;
    position: relative;
}

.step-indicator .step.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.step-indicator .step.completed {
    border-bottom-color: #28a745;
    color: #28a745;
}

.step-num {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: white;
    font-weight: bold;
    margin-bottom: 10px;
}

.step.active .step-num {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 65, 93, 0.3);
}

.step.completed .step-num {
    background-color: #28a745;
}

/* ==================== NOTIFICATIONS ==================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.warning {
    background-color: #ffc107;
    color: var(--text-dark);
}

/* ==================== LAZY LOADING ==================== */

.lazy-image {
    background-color: #f0f0f0;
    transition: all 0.3s ease;
}

.lazy-image.loaded {
    animation: fadeIn 0.5s ease-out;
}

/* ==================== PORTFOLIO ITEMS ==================== */

.portfolio-item {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px;
    overflow: hidden;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== TESTIMONIALS ==================== */

.testimonial-card {
    padding: 30px;
    border-left: 4px solid var(--secondary-color);
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 65, 77, 0.15);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial-stars {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* ==================== STATS COUNTERS ==================== */

.stat-item {
    padding: 30px;
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.stat-label {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 10px;
}

/* ==================== STICKY HEADER ==================== */

.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.98);
}

/* ==================== LOADING SPINNER ==================== */

.spinner {
    border: 4px solid rgba(0, 65, 93, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== CLIENT LOGOS ==================== */

.client-logo {
    max-width: 100%;
    height: auto;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ==================== ADVANCED ANIMATIONS ==================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite;
}

/* ==================== MOBILE MENU ==================== */

.navbar-collapse {
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        border-top: 1px solid var(--border-color);
        padding-top: 15px;
    }

    .nav-link {
        padding: 8px 0 !important;
        border-bottom: 1px solid var(--border-color);
    }
}
