/* Variables de base */
:root {
    --color-primary: #0056b3; /* Bleu professionnel */
    --color-secondary: #003366; /* Bleu foncé pour le contraste */
    --color-background: #ffffff;
    --color-light-gray: #f4f7f9; /* Gris très clair pour les sections */
    --color-text: #333;
    --color-text-light: #666;
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

/* Base et typographie */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--color-secondary);
    margin-bottom: 0.5em;
}

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

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

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

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.primary-btn:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header et Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-primary);
}

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

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: var(--color-text);
    padding: 5px 0;
    position: relative;
}

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

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

.lang-switcher button {
    background: none;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-switcher button:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.menu-toggle {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--color-primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: white;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Sections communes */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--color-light-gray);
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1em;
    margin-bottom: 50px;
}

/* Solutions Section */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.solution-card {
    background-color: var(--color-background);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-card .icon {
    font-size: 3em;
    color: var(--color-primary);
    margin-bottom: 15px;
}

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

/* About Us Section */
.about-section {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-content {
    flex: 2;
}

.about-image {
    flex: 1;
    min-width: 250px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--color-background);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

#contact-form button {
    width: 100%;
}

#confirmation-message {
    text-align: center;
    color: green;
    font-weight: 700;
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Footer */
footer {
    background-color: var(--color-secondary);
    color: white;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}

footer a {
    color: var(--color-light-gray);
}

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

.social-links a {
    font-size: 1.5em;
    margin: 0 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

footer p {
    margin-top: 15px;
}

/* Animations (Appearance on Scroll) */
.fade-in {
    opacity: 1;
    transition: opacity 1s ease-out;
}

.appear-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* RTL Specific Styles (Arabic) */
/* Ces classes seront ajoutées dynamiquement par le JS */
.rtl-mode {
    direction: rtl;
    text-align: right;
}

.rtl-mode .nav-links {
    /* Inverse l'ordre pour que le dernier lien soit le plus à gauche */
    /* ou assurez-vous que les marges fonctionnent correctement */
    justify-content: flex-end;
}

.rtl-mode .nav-links li {
    margin: 0 0 0 15px; /* Marge à gauche */
}

.rtl-mode .hero-content,
.rtl-mode .solution-card,
.rtl-mode .about-content,
.rtl-mode .about-image {
    text-align: right;
}

.rtl-mode .about-section {
    flex-direction: row-reverse; /* Inverse l'image et le texte */
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-section {
        flex-direction: column;
        text-align: center;
    }
    .rtl-mode .about-section {
        flex-direction: column; /* Le RTL reste en colonne */
    }
    .about-image {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }
}