:root {
    --primary: #1a56db;
    --primary-light: #3b82f6;
    --primary-dark: #1e429f;
    --secondary: #e67e22;
    --secondary-light: #f97316;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --lighter: #ffffff;
    --gray: #e2e8f0;
    --dark-gray: #64748b;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    background-image: url('asset/image-fond.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    gap: 0.5rem;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 2.75rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 1rem auto 0;
    border-radius: 3px;
}

.text-center {
    text-align: center;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

header.scrolled {
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-weight: 600;
    position: relative;
    font-size: 1.05rem;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    z-index: 1001;
    padding: 0.5rem;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(26, 86, 219, 0.9), rgba(30, 66, 159, 0.95)), url('https://images.unsplash.com/photo-1551434678-e076c223a692?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: white;
    padding: 16rem 0 10rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    margin-bottom: -5rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* About */
.about {
    background-color: var(--lighter);
    padding-top: 8rem;
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    font-size: 1.1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    justify-content: center;
}

.skill {
    background-color: var(--gray);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
}

/* Services */
.services {
    background-color: var(--light);
    position: relative;
    overflow: hidden;
}

.services:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    opacity: 0.03;
    z-index: 0;
}

.services .container {
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--lighter);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--gray);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: inline-flex;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text ;
    -webkit-text-fill-color: transparent;
}

.features {
    text-align: left;
    margin: 1.5rem 0;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--dark-gray);
}

.feature:before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
}

/* Portfolio */
.portfolio {
    background-color: var(--lighter);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background-color: var(--lighter);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--gray);
    position: relative;
    overflow: hidden;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: inline-flex;
}

.portfolio-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.portfolio-item p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.portfolio-item a {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: var(--transition);
}

.portfolio-item a:hover {
    color: var(--primary-light);
    gap: 0.75rem;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    margin-top: -3rem;
}

.cta:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1579403124614-197f69d8187b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    opacity: 0.1;
    z-index: 0;
}

.cta .container {
    position: relative;
    z-index: 1;
    padding-top: 4rem;
}

.cta h2 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

/* Contact */
.contact {
    background-color: var(--light);
    position: relative;
    padding-top: 8rem;
}

.contact:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    opacity: 0.03;
    z-index: 0;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    background-color: var(--lighter);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-size: 1.05rem;
}

.contact-details a {
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary);
}

.contact-form {
    background-color: var(--lighter);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--light);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background-color: var(--lighter);
}

textarea.form-control {
    min-height: 180px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--darker);
    color: white;
    padding: 5rem 0 2rem;
    position: relative;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-col p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray);
    transition: var(--transition);
    font-size: 0.95rem;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: var(--transition);
    padding: 4px;
}

.social-links a:hover {
    background-color: var(--secondary);
    color: var(--darker);
    transform: translateY(-3px);
}

.social-links img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Success message */
.success-message {
    display: none;
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
}

/* Popup cookies */
#cookie-popup {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    background: var(--lighter);
    color: var(--dark);
    border-radius: 1.2rem;
    box-shadow: var(--shadow);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    max-width: 340px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--gray);
    font-size: 1rem;
}
#cookie-popup.show {
    display: flex;
    animation: fadeIn 0.5s;
}
#cookie-popup h4 {
    font-family: 'Plus Jakarta Sans', 'Inter', Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 700;
}
#cookie-popup p {
    text-align: center;
    margin-bottom: 1rem;
}
#cookie-popup .cookie-btns {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}
#cookie-popup button {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 0.7rem;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
#cookie-accept {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
#cookie-accept:hover {
    background: var(--primary-dark);
}
#cookie-decline {
    background: var(--gray);
    color: var(--dark);
}
#cookie-decline:hover {
    background: var(--dark-gray);
    color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--lighter);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 12rem 0 8rem;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .cta h2 {
        font-size: 2.25rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 1.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
}

/* ====== Blog Page Styles ====== */

.subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: -1rem auto 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.blog-card {
    background-color: var(--lighter);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--darker);
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--dark-gray);
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== Nouveaux Styles pour Blog & Articles ====== */

/* Applique un fond clair pour les pages du blog et des articles */
body.blog-background {
    background-image: none;
    background-color: var(--light);
}

/* En-tête de page pour la liste du blog */
.page-header {
    padding: 8rem 0 4rem;
    text-align: center;
    background-color: var(--lighter);
    border-bottom: 1px solid var(--gray);
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--darker);
}

/* Amélioration des cartes de blog */
.blog-card {
    background-color: var(--lighter);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--gray);
}

.blog-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.blog-card-image {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    aspect-ratio: 16 / 10;
}

.blog-card-readmore {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.blog-card-link:hover .blog-card-readmore {
    color: var(--secondary);
    gap: 0.5rem;
}

/* Styles pour la page d'un article unique */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-header h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    color: var(--darker);
}

.article-meta {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.article-image-principale {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 3rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #334155; /* Un gris un peu plus foncé pour une meilleure lecture */
}

.article-content .article-intro {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-light);
    display: inline-block;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
}

.article-content ul li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

.article-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    .article-header h1 {
        font-size: 2.2rem;
    }
}