/* ===========================
   VARIABLES & RESET
=========================== */
:root{
    --brand-dark: #001a4d;
    --brand-blue: #0033a0;
    --brand-blue-2: #0066cc;
    --accent: #ff6b00;
    --text: #333;
    --muted: #666;
    --header-height: 72px; /* Ajuste si nécessaire */
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #ffffff;
    /* Empêche le header fixe de recouvrir le contenu */
    padding-top: var(--header-height);
}

/* ===========================
   HEADER / NAV
=========================== */
header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-2) 100%);
    color: #fff;
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.6px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    align-items: center;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color .25s ease, opacity .25s ease;
}

nav ul li a:hover{
    color: rgba(255,255,255,0.9);
    opacity: 0.9;
}

/* ===========================
   HERO
=========================== */
.hero {
    /* remplacer l'URL par la vraie image si besoin */
    background: url('/api/placeholder/1200/600') center/cover no-repeat;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 160, 0.55);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    color: #fff;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 650px;
    margin-bottom: 1.8rem;
}

/* CTA button (utilisé aussi dans overlays) */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color .25s ease, transform .12s ease;
}

.btn:hover {
    background-color: #e05a00;
    transform: translateY(-3px);
}

/* ===========================
   SECTION TITLES
=========================== */
.section-title {
    font-size: 2.5rem;
    color: var(--brand-blue);
    text-align: center;
    margin-bottom: .4rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 2.4rem;
}

/* ===========================
   À PROPOS
=========================== */
.about {
    padding: 4.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    gap: 2.4rem;
    align-items: center;
    justify-content: space-between;
}

.about-text{
    flex: 1;
}

.about-image{
    flex: 1;
    display: flex;
    justify-content: center;
}

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

/* ===========================
   SERVICES
=========================== */
.services {
    background-color: #f9f9f9;
    padding: 4.5rem 2rem;
}

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

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

.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.6rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.09);
}

.service-icon {
    font-size: 2.4rem;
    color: var(--brand-blue);
    margin-bottom: .6rem;
}

/* ===========================
   TÉMOIGNAGES
=========================== */
.testimonials {
    padding: 4.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}

.testimonial-card {
    background: #f6f9ff;
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.testimonial-text {
    font-style: italic;
    color: #444;
    margin-bottom: .8rem;
}

/* ===========================
   CONTACT
=========================== */
.contact {
    background: var(--brand-blue);
    color: #fff;
    padding: 4.5rem 2rem;
}

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

.contact .section-title,
.contact .section-subtitle {
    color: #fff;
}

.contact-form {
    max-width: 720px;
    margin: 1.6rem auto 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: .4rem;
    color: #fff;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: .8rem;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 140px;
}

/* ===========================
   RÉALISATIONS (CARDS PREMIUM)
=========================== */
.realisations {
    max-width: 1300px;
    margin: 8rem auto;
    padding: 0 2rem;
}

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* Card container */
.realisation-item {
    position: relative;
    border-radius: 15px;
    perspective: 1000px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Hover elevation */
.realisation-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Image wrapper : on utilise aspect-ratio si possible pour garder un crop cohérent,
   sinon la hauteur s'adapte naturellement. */
.realisation-img-wrapper {
    overflow: hidden;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

/* Image : on met height:100% pour utiliser object-fit (évite l'étirement) */
.realisation-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 0.6s ease, transform-origin 0.3s ease;
}

/* Parallax zoom au hover (désactivé sur écrans tactiles via media query plus bas) */
.realisation-item:hover .realisation-img-wrapper img {
    transform: scale(1.15);
}

/* Overlay (slide depuis le bas) */
.realisation-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 51, 160, 0.8) 0%, rgba(0, 102, 204, 0.95) 100%);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.realisation-item:hover .realisation-overlay {
    transform: translateY(0);
    opacity: 1;
}

.realisation-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.realisation-overlay p {
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* small CTA in overlay */
.realisation-overlay .btn {
    align-self: flex-start;
    background-color: #ff6b00;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    transition: background-color 0.3s ease;
}

.realisation-overlay .btn:hover {
    background-color: #e05a00;
}

/* ===========================
   ANIMATIONS FADE / ENTRÉE
=========================== */
/* Entrées alternées (left/right) */
.fade-in-left, .fade-in-right {
    opacity: 0;
    transition: opacity .9s ease-out, transform .9s ease-out;
    will-change: opacity, transform;
}

.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-right {
    transform: translateX(40px);
}

.fade-in-left.show,
.fade-in-right.show {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================
   FOOTER
=========================== */
footer{
    background: var(--brand-dark);
    color: #fff;
    padding: 2.4rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.95;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ===========================
   ACCESSIBILITY / SMALL STUFF
=========================== */
a { cursor: pointer; }

/* ===========================
   RESPONSIVE (mobile & accessibility)
=========================== */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1.05rem; }
    :root { --header-height: 64px; } /* header un peu plus petit sur tablette */
}


/* Sur petits écrans */
@media (max-width: 768px) {
    body { padding-top: calc(var(--header-height)); }
    .header-container { padding: 0 1rem; }
    .hero { min-height: calc(60vh - var(--header-height)); }
    .about-content { flex-direction: column; gap: 1.2rem; }
    .services-grid, .testimonial-grid { grid-template-columns: 1fr; }
    .realisations-grid { grid-template-columns: 1fr; gap: 1rem; padding: 0 1rem; }

    /* Réduction overlay sur mobile pour éviter superposition trop lourde */
    .realisation-overlay {
        padding: 1rem;
        transform: translateY(50%);
    }

    .realisation-img-wrapper {
        aspect-ratio: auto;
        min-height: 160px;
        height: 200px; /* fallback pour mobile */
    }

    /* Désactiver effet de déplacement de l'image sur mobile */
    .realisation-img-wrapper img { transform: none !important; }
}

/* Si l'appareil n'a pas de hover (tactile), désactive certains effets */
@media (hover: none) and (pointer: coarse) {
    .realisation-item:hover { transform: none; }
    .realisation-item:hover .realisation-img-wrapper img { transform: none; }
    .realisation-item:hover .realisation-overlay { transform: translateY(0); opacity: 1; }
}

/* ===========================
   Page Erreur 404
=========================== */

    /* Reset CSS de base */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.6;
        color: #333;
        background-color: #f8f9fa;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* Header */
    header {
        background: linear-gradient(135deg, #0033a0 0%, #0066cc 100%);
        color: white;
        padding: 1rem 0;
        width: 100%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

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

    .logo {
        font-size: 1.8rem;
        font-weight: bold;
    }

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

    nav ul li {
        margin-left: 2rem;
    }

    nav ul li a {
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    nav ul li a:hover {
        color: #e0e0e0;
        text-decoration: underline;
    }

    /* Main Content */
    .main-content {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        text-align: center;
    }

    .error-container {
        max-width: 800px;
        padding: 3rem;
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    }

    .error-code {
        font-size: 8rem;
        font-weight: bold;
        color: #0033a0;
        line-height: 1;
        margin-bottom: 0.5rem;
    }

    .error-title {
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 1.5rem;
        color: #333;
    }

    .error-message {
        font-size: 1.2rem;
        margin-bottom: 2rem;
        color: #666;
    }

    .error-graphic {
        margin: 2rem 0;
    }

    .error-graphic svg {
        max-width: 250px;
        height: auto;
    }

    .btn {
        display: inline-block;
        background-color: #ff6b00;
        color: white;
        padding: 0.8rem 2rem;
        border-radius: 50px;
        text-decoration: none;
        font-weight: bold;
        transition: all 0.3s ease;
        margin: 0.5rem;
    }

    .btn-primary {
        background-color: #0033a0;
    }

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

    .btn-primary:hover {
        background-color: #00288c;
    }

    .btn-secondary:hover {
        background-color: #e05a00;
    }

    /* Footer */
    footer {
        background-color: #001a4d;
        color: white;
        padding: 1.5rem 0;
        text-align: center;
    }

    .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    /* Media Queries */
    @media (max-width: 768px) {
        .header-container {
            flex-direction: column;
            text-align: center;
        }

        nav ul {
            margin-top: 1rem;
        }

        nav ul li {
            margin: 0 0.5rem;
        }

        .error-code {
            font-size: 6rem;
        }

        .error-title {
            font-size: 1.5rem;
        }
    }

/* ===========================
   FIN
=========================== */