/* ===========================
   Variables et Réinitialisation
   =========================== */

:root {
    --primary-color: #1B3A7A;
    --secondary-color: #A8A8A8;
    --accent-color: #1B3A7A;
    --text-dark: #1A1A1A;
    --text-light: #666666;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --success-color: #28A745;
    --error-color: #DC3545;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
    position: relative;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
}

/* Background avec logo en watermark */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/logo.png');
    background-repeat: repeat;
    background-size: 250px 250px;
    background-attachment: fixed;
    opacity: 0.025;
    pointer-events: none;
    z-index: -1;
}

/* ===========================
   Utilitaires
   =========================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

/* ===========================
   Boutons
   =========================== */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #0F2A5F;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

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

/* ===========================
   Header & Navigation
   =========================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.navbar {
    padding: 1rem 0;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

/* ===========================
   Hero Section
   =========================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2A4F7E 100%);
    color: white;
    padding: 100px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 0.95;
}

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

.hero .btn-secondary {
    border-color: white;
    color: white;
}

.hero .btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
        min-height: auto;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

/* ===========================
   About Section
   =========================== */

.about {
    background-color: var(--bg-light);
    padding: 80px 0;
}

.about h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.skill-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.skill-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.skill-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    color: var(--text-light);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===========================
   Services Section
   =========================== */

.services {
    background-color: white;
    padding: 80px 0;
}

.services h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-align: center;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-card ul {
    list-style: none;
    text-align: left;
}

.service-card li {
    color: var(--text-light);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* ===========================
   Contact Section
   =========================== */

.contact {
    background-color: var(--bg-light);
    padding: 80px 0;
}

.contact h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-item a,
.info-item p {
    color: var(--text-light);
    font-size: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 58, 147, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-color);
}

.form-group.error .error-message {
    display: block;
}

.form-message {
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
    display: block;
}

.form-message.error {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
    display: block;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Footer
   =========================== */

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.skill-card {
    animation: fadeIn 0.6s ease-out;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }

    .services h2,
    .about h2,
    .contact h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

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

    .hero-text h1 {
        font-size: 2rem;
    }

    .services-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
