@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&family=Fraunces:ital,opsz,wght@1,9..144,300;1,9..144,400&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #437dff;
    --accent-gradient: linear-gradient(135deg, #437dff 0%, #1e4ef2 100%);
    --grid-color: rgba(0, 0, 0, 0.04); /* Très léger */
    --marker-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.05);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-accent: 'Fraunces', serif;
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* RTL Support */
[lang="ar"] {
    direction: rtl;
    text-align: right;
}

[lang="ar"] .logo, [lang="ar"] nav, [lang="ar"] .hero-content, [lang="ar"] .section-title {
    text-align: right;
}

[lang="ar"] .lang-dropdown {
    direction: ltr; /* Keep dropdown ltr for consistency or fix its position */
}

h1, h2, h3 {
    font-family: var(--font-heading);
    letter-spacing: -2px;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 1.2rem 5%;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1.5px;
    color: #000;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.6;
    transition: var(--transition);
}

nav ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.lang-switcher {
    padding-left: 1rem;
    border-left: 1px solid rgba(0,0,0,0.1);
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: rgba(0,0,0,0.03);
    color: #000;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(0,0,0,0.08);
}

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 1rem 0;
    margin-top: 1rem;
    z-index: 1001;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Pont invisible pour maintenir le hover entre le bouton et le menu */
.lang-content::before {
    content: '';
    position: absolute;
    top: -1.2rem;
    left: 0;
    right: 0;
    height: 1.5rem;
    background: transparent;
}

.lang-content a {
    color: #666;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-content a:hover {
    background-color: #f8f9fa;
    color: var(--accent-color);
    padding-left: 1.8rem;
}

.lang-content a.active {
    color: var(--accent-color);
    font-weight: 700;
}

.lang-dropdown:hover .lang-content {
    display: block;
    animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Grid Background */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligner vers le haut pour contrôler l'espacement */
    align-items: center;
    position: relative;
    padding: 250px 5% 150px; /* Beaucoup plus d'espace en haut */
    overflow: hidden;
    background-color: var(--bg-color);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center center;
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

/* Plus markers at intersections - Tiny and faint */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3.5V6.5' stroke='rgba(0,0,0,0.1)' stroke-width='0.8'/%3E%3Cpath d='M3.5 5H6.5' stroke='rgba(0,0,0,0.1)' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center center;
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    z-index: 10;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-availability {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    gap: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.badge-availability::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #2dd4bf;
    border-radius: 50%;
    box-shadow: 0 0 15px #2dd4bf;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.hero-content h1 {
    font-size: clamp(2rem, 7.5vw, 5.5rem);
    line-height: 0.95;
    margin: 0 auto 2.5rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -4px;
    text-align: center;
}

.hero-content h1 em {
    font-style: italic;
    font-family: var(--font-accent);
    color: var(--accent-color);
    font-weight: 400;
    letter-spacing: 0;
    display: inline-block;
    padding-left: 15px;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 3.5rem;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(67, 125, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(67, 125, 255, 0.35);
}

/* Floating Elements Fix */
.floating-cursor {
    position: absolute;
    display: flex;
    align-items: flex-start;
    gap: 0;
    pointer-events: none;
    z-index: 5;
    animation: float-around 12s ease-in-out infinite;
}

.cursor-icon {
    width: 20px;
    height: 20px;
    margin-top: -2px;
    margin-left: -2px;
}

.cursor-label {
    background: var(--tag-color, var(--accent-color));
    color: #fff;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

@keyframes float-around {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -20px); }
    66% { transform: translate(-20px, 40px); }
}

.trusted-by {
    width: 100%;
    padding: 6rem 10% 8rem;
    background: #fff;
    text-align: center;
    position: relative;
    z-index: 10;
}

.trusted-by p {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    opacity: 0.4;
}

.logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5rem;
    opacity: 0.3;
    filter: grayscale(1);
}

.logos-grid img {
    height: 30px;
    width: auto;
    transition: var(--transition);
}

.logos-grid img:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* Services */
.services {
    padding: 10rem 5%;
    background: #fbfbfc;
}

/* About Section */
.about {
    padding: 10rem 5%;
    background: #fff;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 8%;
    max-width: 1200px;
    margin: 0 auto;
}

.about-img {
    flex: 1;
    border-radius: 40px;
    overflow: hidden;
    height: 500px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    flex: 1.2;
}

.about-content p {
    font-size: 1.2rem;
    color: rgba(0,0,0,0.6);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stats-row {
    display: flex;
    gap: 4rem;
    margin-top: 3rem;
}

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

.stat-number {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -2px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4;
}


.section-title {
    margin-bottom: 6rem;
    max-width: 800px;
}

.section-title h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #000;
}

.section-title p {
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.4);
}

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

.service-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 4rem;
    border-radius: 40px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.service-card:hover {
    background: #fff;
    border-color: var(--accent-color);
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.06);
}

.service-card i {
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
    display: block;
    color: var(--accent-color);
}

.service-card h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.service-card p {
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.05rem;
}

/* Portfolio Highlight */
.portfolio {
    padding: 10rem 5%;
    background: #fff;
}

.portfolio-item {
    display: flex;
    align-items: center;
    gap: 8%;
    margin-bottom: 12rem;
}

.portfolio-item:nth-child(even) {
    flex-direction: row-reverse;
}

.portfolio-img {
    flex: 1.2;
    border-radius: 40px;
    overflow: hidden;
    height: 600px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.1);
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-img:hover img {
    transform: scale(1.08);
}

.portfolio-info {
    flex: 1;
}

.portfolio-info h3 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #111;
}

.portfolio-info p {
    font-size: 1.15rem;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Testimonials */
.testimonials {
    padding: 10rem 5%;
    background: #fbfbfc;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: #fff;
    padding: 4rem;
    border-radius: 40px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-content p {
    font-size: 1.4rem;
    font-family: var(--font-accent);
    color: #111;
    line-height: 1.5;
    margin-bottom: 3rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info strong {
    display: block;
    font-size: 1.1rem;
    color: #111;
}

.author-info span {
    font-size: 0.9rem;
    opacity: 0.5;
}


/* Contact Section */
.contact {
    padding: 10rem 5%;
    background: #fff;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 8%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.contact-info {
    padding-top: 2rem;
}

.info-block {
    margin-bottom: 4rem;
}

.info-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-block p {
    font-size: 1.1rem;
    opacity: 0.6;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-block p a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.info-block p a:hover {
    color: var(--accent-color);
}

.info-block i {
    color: var(--accent-color);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #111;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: translateY(-5px);
}

form {
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem;
    background: #fff;
    padding: 4.5rem;
    border-radius: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.05);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0,0,0,0.4);
}

input, textarea {
    background: #f8f9fa;
    border: 1px solid transparent;
    padding: 1.4rem;
    border-radius: 18px;
    color: #000;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(67, 125, 255, 0.1);
}


/* Footer */
footer {
    padding: 8rem 5% 4rem;
    background: #000;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto 6rem;
}

.footer-brand .logo {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    font-size: 1.2rem;
    opacity: 0.6;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    opacity: 0.4;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: #fff;
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
}

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

.copyright {
    opacity: 0.4;
    font-size: 0.9rem;
    font-weight: 500;
}


/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure content is visible if JS fails or for hero section */
.hero .reveal {
    opacity: 1 !important;
    transform: none !important;
}

@media (max-width: 1024px) {
    .portfolio-item, .portfolio-item:nth-child(even) {
        flex-direction: column;
        gap: 3rem;
        margin-bottom: 8rem;
    }
    .portfolio-img {
        height: 400px;
        width: 100%;
    }
    .hero-content h1 {
        font-size: 4rem;
    }
    .about-container, .contact-container {
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .about-img {
        height: 400px;
        width: 100%;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 5%;
    }
    nav {
        display: none;
    }
    .section-title h2 {
        font-size: 3rem;
    }
    .service-card {
        padding: 2.5rem;
    }
    form {
        padding: 2.5rem;
    }
    .stats-row {
        gap: 2rem;
    }
    .stat-number {
        font-size: 2.5rem;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

