/* ==========================================================================
   Variables & Base (Pleng.net style)
   ========================================================================== */
:root {
    --primary: #0A3D62; /* Navy Blue */
    --secondary: #F39C12; /* Engineering Orange/Yellow */
    --text: #444;
    --text-light: #777;
    --bg-light: #f9f9f9;
    --white: #fff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--text); line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; color: var(--primary); }
a { text-decoration: none; color: var(--primary); transition: 0.3s; }
a:hover { color: var(--secondary); }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* Simple Grid System */
.container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-md-2 { width: 16.6667%; padding: 0 15px; }
.col-md-3 { width: 25%; padding: 0 15px; }
.col-md-4 { width: 33.3333%; padding: 0 15px; }
.col-md-5 { width: 41.6667%; padding: 0 15px; }
.col-md-6 { width: 50%; padding: 0 15px; }
.col-md-7 { width: 58.3333%; padding: 0 15px; }
.col-md-8 { width: 66.6667%; padding: 0 15px; }
.col-md-9 { width: 75%; padding: 0 15px; }
.col-md-10 { width: 83.3333%; padding: 0 15px; }
.align-items-center { align-items: center; }

/* Utility */
.section { padding: 45px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

/* Buttons */
.btn-primary { display: inline-block; background: var(--secondary); color: var(--white); padding: 10px 25px; border: none; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: transform 0.2s ease, background 0.3s ease; }
.btn-primary:hover { background: #d68910; color: var(--white); transform: translateY(-2px); }
.btn-sm { display: inline-block; padding: 5px 15px; font-size: 0.85rem; background: var(--secondary); color: var(--white); font-weight: 600; transition: transform 0.2s ease, background 0.3s ease; }
.btn-sm:hover { background: #d68910; color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--white); transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease; }
.btn-outline:hover { background: var(--white); color: var(--primary); transform: translateY(-2px); }

/* Typography */
.section-heading { font-size: 32px; text-transform: uppercase; margin-bottom: 15px; }
.heading-line { width: 50px; height: 3px; background: var(--secondary); margin-bottom: 20px; }
.heading-line.center-line { margin: 0 auto 30px; }

/* ==========================================================================
   Top Bar & Header
   ========================================================================== */
.top-bar { background: var(--primary); color: var(--white); font-size: 0.85rem; padding: 10px 0; }
.top-bar-container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left span { color: #ddd; }
.top-bar-right { display: flex; gap: 10px; }

header { 
    background: var(--white); 
    border-bottom: 1px solid #eee; 
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 300px; /* Taille du logo en filigrane */
    opacity: 0.08; /* Très subtil pour rester professionnel */
    pointer-events: none;
    z-index: 0;
}

.header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 5px 15px; 
    position: relative;
    z-index: 1; /* Le texte reste au-dessus du filigrane */
}
.logo img { 
    height: 95px; 
    transition: transform 0.3s ease; 
}
.logo img:hover {
    transform: scale(1.05);
}
.header-contact-info { display: flex; gap: 30px; }
.contact-block { display: flex; align-items: center; gap: 15px; }
.contact-block i { font-size: 24px; color: var(--secondary); }
.contact-block h5 { font-size: 14px; margin-bottom: 2px; text-transform: uppercase; }
.contact-block span { font-size: 13px; color: var(--text-light); }

.main-nav-wrapper { background: var(--primary); }
.nav-menu ul { display: flex; margin: 0; }
.nav-menu ul li { position: relative; }
.nav-menu ul li a { display: block; padding: 15px 20px; color: var(--white); font-weight: 600; font-family: var(--font-heading); font-size: 14px; text-transform: uppercase; transition: 0.3s; }
.nav-menu ul li a:hover, .nav-menu ul li a.active { background: var(--secondary); }
.mobile-toggle { display: none; padding: 15px; color: var(--white); cursor: pointer; text-align: center; font-weight: bold; }

/* ==========================================================================
   Hero Carousel
   ========================================================================== */
.hero-carousel { position: relative; height: 70vh; overflow: hidden; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease-in-out; display: flex; align-items: center; justify-content: center; text-align: center; }
.carousel-slide.active { opacity: 1; z-index: 1; }
.slide-content { color: var(--white); }
.slide-content h1 { font-size: 48px; color: var(--white); text-transform: uppercase; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.slide-content p { font-size: 24px; font-weight: 300; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; padding: 15px 20px; cursor: pointer; z-index: 10; font-size: 20px; transition: 0.3s; }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }
.carousel-prev:hover, .carousel-next:hover { background: var(--secondary); }

/* ==========================================================================
   Welcome Section
   ========================================================================== */
.welcome-text p { margin-bottom: 20px; font-size: 15px; text-align: justify; }

/* ==========================================================================
   Mission / Vision / Values
   ========================================================================== */
.mvv-box { text-align: center; padding: 25px; background: var(--white); box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-bottom: 4px solid var(--secondary); margin-bottom: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.mvv-box:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.mvv-icon { width: 60px; height: 60px; margin: 0 auto 15px; background: rgba(10,61,98,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; }
.mvv-box:hover .mvv-icon { transform: scale(1.1); background: var(--secondary); }
.mvv-box:hover .mvv-icon i { color: var(--white); }
.mvv-icon i { font-size: 26px; color: var(--secondary); transition: color 0.3s ease; }
.mvv-box h3 { margin-bottom: 15px; font-size: 18px; }
.custom-list { text-align: left; }
.custom-list li { padding: 5px 0; font-size: 14px; border-bottom: 1px solid #eee; }
.custom-list i { color: var(--secondary); margin-right: 10px; }

/* ==========================================================================
   Services Section (Tabs)
   ========================================================================== */
.service-nav { background: var(--white); border: 1px solid #eee; }
.service-nav li { padding: 15px 20px; border-bottom: 1px solid #eee; cursor: pointer; font-weight: 600; transition: 0.3s; position: relative; }
.service-nav li::after { content: '\f105'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 20px; color: var(--text-light); }
.service-nav li:hover, .service-nav li.active { background: var(--primary); color: var(--white); border-left: 4px solid var(--secondary); }
.service-nav li:hover::after, .service-nav li.active::after { color: var(--white); }
.service-panel { display: none; padding: 30px; background: var(--white); border: 1px solid #eee; min-height: 400px; }
.service-panel.active { display: block; animation: fadeIn 0.5s; }
.service-img { width: 100%; height: 250px; object-fit: cover; margin-bottom: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Portfolio
   ========================================================================== */
.portfolio-filters { text-align: center; margin-bottom: 30px; }
.filter-btn { background: transparent; border: 1px solid #ddd; padding: 8px 20px; margin: 0 5px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); transition: 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.portfolio-wrap { position: relative; overflow: hidden; margin-bottom: 30px; }
.portfolio-info { position: absolute; bottom: -100%; left: 0; width: 100%; background: rgba(10,61,98,0.9); color: var(--white); padding: 20px; transition: 0.4s; text-align: center; }
.portfolio-wrap:hover .portfolio-info { bottom: 0; }
.portfolio-info h4 { color: var(--white); font-size: 18px; margin-bottom: 5px; }
.portfolio-info p { font-size: 13px; color: #ddd; margin-bottom: 10px; }
.details-link { color: var(--white); font-size: 20px; }
.details-link:hover { color: var(--secondary); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: #111; color: #aaa; font-size: 14px; }
.footer-top { padding: 45px 0 20px; border-bottom: 1px solid #222; }
.footer h3 { color: var(--white); font-size: 18px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--secondary); display: inline-block; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { color: #aaa; }
.footer-links ul li a:hover { color: var(--secondary); }
.footer-links i { color: var(--secondary); margin-right: 8px; font-size: 10px; }
.social-links a { display: inline-block; width: 36px; height: 36px; background: #222; color: #aaa; text-align: center; line-height: 36px; border-radius: 50%; margin-right: 5px; transition: 0.3s; }
.social-links a:hover { background: var(--secondary); color: var(--white); }
.footer-form input, .footer-form textarea { width: 100%; padding: 10px; margin-bottom: 10px; background: #222; border: 1px solid #333; color: var(--white); font-family: var(--font-body); }
.footer-form input:focus, .footer-form textarea:focus { outline: none; border-color: var(--secondary); }
.footer-bottom { padding: 20px 0; text-align: center; }

/* Responsive */
@media (max-width: 991px) {
    .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10 { width: 100%; margin-bottom: 30px; }
    .header-container { flex-direction: column; text-align: center; gap: 20px; }
    .header-contact-info { flex-direction: column; gap: 10px; }
    .nav-menu { display: none; }
    .mobile-toggle { display: block; }
    .nav-menu.active { display: block; }
    .nav-menu ul { flex-direction: column; }
    .hero-carousel { height: 50vh; }
    .slide-content h1 { font-size: 32px; }
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.ceo-image img {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.ceo-image img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

/* ==========================================================================
   Chat Widget
   ========================================================================== */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--secondary);
}

.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.chat-widget.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background: var(--primary);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    color: var(--white);
    font-size: 16px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--secondary);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f4f7f6;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message.assistant {
    background: var(--white);
    color: var(--text);
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user {
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}

.chat-input-area {
    padding: 15px;
    background: var(--white);
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

#chat-input:focus {
    border-color: var(--primary);
}

#send-chat {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 15px;
    background: var(--white);
    border-radius: 15px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-light);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 768px) {
    .chat-widget {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
        height: 60vh;
    }
}
