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

body {
    font-family: "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #fafafa;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

a {
    text-decoration: none;
    color: #0077b6;
    transition: 0.3s ease-in-out;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =====================================================
   NAVBAR
===================================================== */
header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    max-width: 150px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-links a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
}

.nav-links a:hover {
    color: #0077b6;
    background-color: rgba(0, 119, 182, 0.1);
}

/* =====================================================
   MENU BURGER MOBILE
===================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #0077b6;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary {
    background: linear-gradient(135deg, #0077b6, #0096c7);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
    transition: 0.3s ease-in-out;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #005b8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline {
    border: 2px solid #0077b6;
    color: #0077b6;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s ease-in-out;
    text-align: center;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-outline:hover {
    background: #0077b6;
    color: white;
    transform: translateY(-2px);
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero {
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
                url('https://images.unsplash.com/photo-1556761175-4b46a572b786') center/cover no-repeat;
    color: white;
    padding: 6rem 1rem;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.hero-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   SECTIONS
===================================================== */
section {
    padding: 4rem 0;
}

section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    text-align: center;
}

.about, .services, .process, .testimonials {
    background: white;
}

/* =====================================================
   ABOUT SECTION
===================================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* =====================================================
   CARDS (SERVICES)
===================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #0077b6;
}

.card p {
    color: #555;
    line-height: 1.6;
}

/* =====================================================
   PROCESSUS
===================================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

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

.step-number {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.step p {
    color: #555;
    line-height: 1.6;
}

/* =====================================================
   TESTIMONIALS
===================================================== */
.testimonials {
    background: #f9f9f9;
}

.testi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testi-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 2rem 1.5rem;
    font-style: italic;
    transition: transform 0.3s;
}

.testi-card:hover {
    transform: translateY(-5px);
}

.testi-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testi-card span {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    color: #0077b6;
    font-style: normal;
}

.no-testimonials {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* =====================================================
   CTA
===================================================== */
.cta {
    background: #0077b6;
    color: white;
    padding: 5rem 1rem;
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 2.5rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: white;
    color: #0077b6;
}

.cta .btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.cta .btn-outline {
    border-color: white;
    color: white;
}

.cta .btn-outline:hover {
    background: white;
    color: #0077b6;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
    background: #222;
    color: #ddd;
    text-align: center;
    padding: 2rem 1rem;
}

footer a {
    color: #fff;
}

footer a:hover {
    color: #0077b6;
}

/* =====================================================
   MEDIA QUERIES - RESPONSIVE DESIGN
===================================================== */

/* Tablettes */
@media (max-width: 1024px) {
    .cards, .steps, .testi-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .hero {
        min-height: 60vh;
        padding: 4rem 1rem;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 3rem;
        transition: 0.3s ease-in-out;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        gap: 2rem;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }

    section {
        padding: 3rem 0;
    }

    .hero {
        min-height: 50vh;
        padding: 3rem 1rem;
    }

    .hero-buttons, .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn-primary,
    .cta-buttons .btn-primary,
    .cta-buttons .btn-outline {
        width: 100%;
        max-width: 300px;
    }

    .cards, .steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card, .step {
        padding: 1.5rem 1rem;
    }
}

/* Petits mobiles */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .btn-primary, .btn-outline {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .testi-cards {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   STYLES SPÉCIFIQUES PORTFOLIO - 4 CARTES PAR LIGNE
===================================================== */

.portfolio-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 cartes par ligne */
    gap: 1.2rem;
    margin-top: 2rem;
}

.portfolio-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    min-height: 320px; /* Hauteur minimale pour uniformité */
}

.portfolio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-image {
    width: 100%;
    height: 140px; /* Légèrement réduit pour 4 cartes */
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem; /* Légèrement plus petit */
    line-height: 1.3;
    color: #1a1a1a;
}

.card-content p {
    flex-grow: 1;
    margin-bottom: 0.8rem;
    color: #555;
    line-height: 1.4; /* Légèrement réduit */
    font-size: 0.85rem; /* Légèrement plus petit */
}

.card-content .btn-primary {
    align-self: flex-start;
    margin-top: auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* =====================================================
   RESPONSIVE - ADAPTATION POUR PETITS ÉCRANS
===================================================== */

/* Tablettes */
@media (max-width: 1024px) {
    .portfolio-cards {
        grid-template-columns: repeat(2, 1fr); /* 2 cartes par ligne */
        gap: 1.5rem;
    }

    .portfolio-card {
        min-height: 300px;
    }

    .card-image {
        height: 150px;
    }

    .card-content h3 {
        font-size: 1.1rem;
    }

    .card-content p {
        font-size: 0.9rem;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .portfolio-cards {
        grid-template-columns: 1fr; /* 1 carte par ligne */
        gap: 1rem;
    }

    .portfolio-card {
        min-height: auto;
        padding: 1rem;
    }

    .card-image {
        height: 160px;
    }

    .card-content h3 {
        font-size: 1.1rem;
    }

    .card-content p {
        font-size: 0.9rem;
    }

    .card-content .btn-primary {
        width: 100%;
        text-align: center;
    }
}

/* Très petits mobiles */
@media (max-width: 480px) {
    .portfolio-cards {
        grid-template-columns: 1fr;
    }

    .card-image {
        height: 140px;
    }

    .portfolio-card {
        padding: 0.8rem;
    }
}

/* Animation subtile pour les cartes portfolio */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card {
    animation: fadeInUp 0.5s ease-out;
}

.portfolio-card:nth-child(2) { animation-delay: 0.1s; }
.portfolio-card:nth-child(3) { animation-delay: 0.2s; }
.portfolio-card:nth-child(4) { animation-delay: 0.3s; }