/* ========================================
   YB IT CONSULTING - STYLESHEET
   Version corrigée
   ======================================== */

/* === VARIABLES === */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #FF6B35;
    --accent-light: #FF8C5A;
    --accent-dark: #E55A2B;
    --light: #f8f9fa;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary);
}

/* === UTILITY CLASSES === */
.section-padding {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

.title-divider {
    height: 4px;
    width: 80px;
    background: var(--accent);
    margin: 20px auto;
    border-radius: 2px;
}

/* === NAVIGATION === */
.navbar {
    background-color: var(--primary);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: padding 0.3s ease;
}

.navbar.scrolled {
    padding: 10px 0;
}

.logo {
    height: 130px;
    width: auto;
    transition: height 0.3s ease;
}

.navbar.scrolled .logo {
    height: 100px;
}

.navbar-nav .nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: white;
    margin: 0 10px;
    padding: 8px 15px !important;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-light);
}

.navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:focus,
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.navbar-nav .nav-link:hover:after,
.navbar-nav .nav-link.active:after {
    width: 100%;
}

.navbar-toggler {
    border-color: white;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.9)), 
                url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 180px 0 120px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.0rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: white;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

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

/* === BUTTONS === */
.btn-primary {
    background-color: var(--accent);
    border: none;
    padding: 14px 35px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 12px 35px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* === ABOUT SECTION === */
.about-img {
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.feature-icon i {
    color: white;
    font-size: 1.5rem;
}

.feature-text h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

/* === SERVICES SECTION === */
.services {
    background-color: var(--light);
}

.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 40px 30px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-top: 4px solid var(--accent);
    margin-bottom: 30px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.service-icon i {
    color: white;
    font-size: 2rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--gray);
}

/* === WHY CHOOSE US SECTION === */
.why-choose-us {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), 
                url('https://images.unsplash.com/photo-1521791055366-0d553872125f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.why-choose-us .section-title h2,
.why-choose-us .section-title p {
    color: white;
}

.feature-box {
    text-align: center;
    padding: 30px 20px;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box .feature-icon {
    background: rgba(255, 107, 53, 0.2);
    margin: 0 auto 25px;
}

.feature-box .feature-icon i {
    color: var(--accent);
}

.feature-box h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-box p {
    color: rgba(255, 255, 255, 0.8);
}

/* === CONTACT SECTION === */
.contact-info {
    background: var(--primary);
    color: white;
    padding: 50px 40px;
    border-radius: 8px;
    height: 100%;
}

.contact-info h3 {
    color: white;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-details p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* === FORMULAIRE STYLES === */
.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
    display: block;
    font-size: 0.95rem;
}

.form-control, .form-select {
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-select {
    background-color: white;
    cursor: pointer;
}

/* Messages */
.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: #155724;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
}

/* Bouton soumission */
.btn-primary {
    background-color: var(--accent);
    border: none;
    padding: 15px 40px;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.btn-outline-success {
    border: 2px solid #28a745;
    color: #28a745;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background-color: #28a745;
    color: white;
}

/* Animation de chargement */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === FOOTER === */
footer {
    background-color: var(--primary);
    color: white;
    padding: 80px 0 20px;
}

.footer-logo {
    height: 230px;
    width: auto;
    margin-bottom: 10px;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4:after,
.footer-contact h4:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--accent);
    bottom: 0;
    left: 0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-links a i {
    margin-right: 8px;
    font-size: 0.8rem;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--accent);
    margin-right: 10px;
    margin-top: 5px;
    width: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 50px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .contact-form {
        padding: 30px;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .logo {
        height: 100px;
    }
    
    .about-img {
        margin-bottom: 30px;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .btn-primary {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-control, .form-select {
        padding: 10px 12px;
    }
    
    .btn-primary {
        padding: 12px 25px;
    }
}

/* Animation pour le défilement des sections */
section {
    scroll-margin-top: 80px;
}