/* Variables et Reset */
:root {
    /* Couleurs du drapeau marocain */
    --primary-color: #C1272D;  /* Rouge marocain */
    --primary-dark: #A01F24;   /* Rouge foncé */
    --primary-light: #E1585E;  /* Rouge clair */
    --secondary-color: #006233; /* Vert marocain */
    --secondary-dark: #004D28; /* Vert foncé */
    --secondary-light: #1A8755; /* Vert clair */
    
    /* Couleurs complémentaires */
    --dark-color: #333333;
    --light-color: #FFFFFF;
    --gray-color: #F5F5F5;
    --gray-light: #F9F9F9;
    --gray-dark: #666666;
    --border-color: #E0E0E0;
    --gold: #FFD700;
    --gold-light: rgba(255, 215, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-color);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 98, 51, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(193, 39, 45, 0.2);
}

.btn-light {
    background-color: var(--light-color);
    color: var(--primary-color);
}

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

/* Header */
header {
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

header.sticky {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
    position: relative;
    padding-left: 10px;
    transition: color 0.3s ease;
}

.logo h1::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.logo h1:hover {
    color: var(--secondary-color);
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover:after,
.nav-links a.active:after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.burger div {
    width: 25px;
    height: 3px;
    margin: 5px;
    background-color: var(--dark-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--light-color);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-tagline {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--gold);
}

.hero-text h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-text h1 .highlight {
    color: var(--gold);
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}

.stat-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

/* Button styles for hero section */
.btn-light {
    background-color: var(--light-color);
    color: var(--primary-color);
    border: none;
}

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

.btn-outline-light {
    background-color: transparent;
    color: var(--light-color);
    border: 2px solid var(--light-color);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    transform: translateY(-3px);
}

.hero-image {
    flex: 1;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.hero-card:hover .hero-card-icon {
    transform: scale(1.1);
}

.hero-card-icon i {
    font-size: 28px;
    color: var(--gold);
}

.hero-card h3 {
    margin-bottom: 10px;
    color: var(--light-color);
}

.hero-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--light-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--gray-dark);
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--primary-color);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(193, 39, 45, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon i {
    font-size: 28px;
    color: var(--primary-color);
}

.service-card:nth-child(even) .service-icon {
    background-color: rgba(0, 98, 51, 0.1);
}

.service-card:nth-child(even) .service-icon i {
    color: var(--secondary-color);
}

.service-card:nth-child(even):hover {
    border-bottom: 3px solid var(--secondary-color);
}

.service-card h3 {
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--primary-color);
}

.service-card:nth-child(even):hover h3 {
    color: var(--secondary-color);
}

.service-card p {
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.service-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.service-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

.service-card:nth-child(even) .service-link {
    color: var(--secondary-color);
}

.services-cta {
    text-align: center;
    margin-top: 20px;
}

/* About Preview */
.about-preview {
    padding: 100px 0;
    background-color: var(--gray-color);
    position: relative;
    overflow: hidden;
}

.about-preview::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background-color: rgba(193, 39, 45, 0.05);
    border-radius: 50%;
    top: -150px;
    left: -150px;
    z-index: 1;
}

.about-preview::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background-color: rgba(0, 98, 51, 0.05);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
    z-index: 1;
}

.about-preview .container {
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(5deg);
    transition: transform 0.5s ease;
}

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

.moroccan-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    opacity: 0.9;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C1272D' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    transition: opacity 0.3s ease;
}

.image-wrapper:hover .moroccan-pattern {
    opacity: 0.8;
}

.about-content h2 {
    margin-bottom: 20px;
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.about-content p {
    margin-bottom: 25px;
    color: var(--gray-dark);
    font-size: 1.05rem;
}

.about-features {
    list-style: none;
    margin: 25px 0;
}

.about-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.about-features li:hover {
    transform: translateX(5px);
}

.about-features i {
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 5px;
    font-size: 14px;
}

/* Clients & Projects */
.clients {
    padding: 100px 0;
    background-color: var(--light-color);
    position: relative;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    background-color: var(--light-color);
}

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

.project-image {
    height: 200px;
    background-color: var(--gray-color);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.project-card:hover .project-image::before {
    opacity: 0.8;
}

.project-content {
    padding: 25px;
}

.project-category {
    display: inline-block;
    padding: 5px 12px;
    background-color: rgba(193, 39, 45, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.project-card:nth-child(even) .project-category {
    background-color: rgba(0, 98, 51, 0.1);
    color: var(--secondary-color);
}

.project-content h3 {
    margin-bottom: 10px;
}

.project-content p {
    color: var(--gray-dark);
    margin-bottom: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 5px;
}

.project-link i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(5px);
}

.project-card:nth-child(even) .project-link {
    color: var(--secondary-color);
}

/* CTA Section */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--light-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    top: -150px;
    right: -50px;
}

.cta::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    bottom: -100px;
    left: -50px;
}

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

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-info h3 {
    margin-bottom: 20px;
    color: var(--light-color);
    font-size: 1.8rem;
    position: relative;
    padding-left: 15px;
}

.footer-info h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.footer-info p {
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    max-width: 350px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--light-color);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

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

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0px;
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    margin-right: 5px;
    transform: translateX(-10px);
    display: inline-block;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--light-color);
    padding-left: 10px;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.footer-contact li span {
    color: rgba(255, 255, 255, 0.7);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Styles */
@media screen and (max-width: 1200px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 992px) {
    .hero {
        padding: 70px 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-image {
        max-width: 500px;
        width: 100%;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-content h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .about-features li {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-info {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-info p {
        max-width: 100%;
    }
    
    .footer-info h3::before {
        display: none;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 20px 10px;
    }
    
    .stat-item {
        flex: 0 0 45%;
        text-align: center;
    }
    
    .burger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        right: 0;
        top: 80px;
        height: calc(100vh - 80px);
        width: 100%;
        background-color: var(--light-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.5s ease;
        z-index: 99;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        margin: 20px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links h4:after,
    .footer-contact h4:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links,
    .footer-contact {
        text-align: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .hero {
        padding: 50px 0;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-card {
        padding: 20px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}