/* ============================================================
   RomainWeb — Shared stylesheet (site FR + EN)
   ============================================================ */

:root {
    --midnight-blue: #0f172a;
    --electric-violet: #7c3aed;
    --cyan-accent: #06b6d4;
    --bg-light: #f8fafc;
    --whatsapp-green: #25D366;
    --linkedin-blue: #0077b5;
}

* { box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--midnight-blue);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) { body { padding-top: 70px; } }
@media (max-width: 991px) { body { padding-top: 75px; } }

.container { max-width: 100%; padding-left: 15px; padding-right: 15px; }
@media (min-width: 576px) { .container { padding-left: 20px; padding-right: 20px; } }

/* --- NAVBAR --- */
.navbar {
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 12px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
    left: 0;
    right: 0;
}
.navbar .container { width: 100%; max-width: 100%; padding-left: 20px; padding-right: 20px; }
.navbar-brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; white-space: nowrap; }
.navbar-toggler { border: none; padding: 0; outline: none !important; box-shadow: none !important; }
.bi-list { font-size: 2rem; color: var(--midnight-blue); }
.nav-link { font-weight: 600; color: var(--midnight-blue) !important; padding: 10px 12px !important; transition: 0.3s; white-space: nowrap; }
.nav-link:hover { color: var(--electric-violet) !important; }

@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        margin-top: 15px;
        margin-left: -20px;
        margin-right: -20px;
        padding: 20px;
        border-radius: 20px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        text-align: center;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    .navbar-brand { font-size: 1.1rem; }
    .navbar-brand i { font-size: 1.5rem !important; }

    .navbar-collapse .dropdown-menu.show {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        text-align: left;
        box-shadow: none;
        border: 1px solid rgba(0,0,0,0.06);
    }
    .navbar-collapse .dropdown-item {
        white-space: normal;
        font-size: 0.85rem;
        padding: 10px 8px;
    }
}

/* Lang switcher */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(15,23,42,0.12);
    border-radius: 50px;
    padding: 6px 6px;
}
.lang-switch a {
    padding: 4px 10px;
    border-radius: 50px;
    color: var(--midnight-blue);
    text-decoration: none;
    transition: 0.2s;
}
.lang-switch a.active, .lang-switch a:hover { background: var(--midnight-blue); color: #fff; }

/* Dropdown "métiers / industries" */
.dropdown-menu { border-radius: 16px; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 15px 30px rgba(0,0,0,0.1); padding: 10px; }
.dropdown-item { border-radius: 10px; font-weight: 600; padding: 10px 14px; }
.dropdown-item:hover, .dropdown-item:focus { background: rgba(124,58,237,0.08); color: var(--electric-violet); }

/* --- ANIMATIONS --- */
.text-gradient {
    background: linear-gradient(90deg, var(--electric-violet), var(--cyan-accent), var(--electric-violet));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

/* --- HERO --- */
.hero-section {
    padding: 80px 0;
    background: radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
}
@media (max-width: 767px) {
    .hero-section { padding: 40px 0; }
    .display-3 { font-size: 2rem !important; line-height: 1.2; }
    .display-5 { font-size: 1.75rem !important; }
    .display-6 { font-size: 1.5rem !important; }
    .lead { font-size: 1rem !important; }
}

.glass-tag {
    background: rgba(124, 58, 237, 0.08);
    color: var(--electric-violet);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.btn-cta {
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    background: var(--midnight-blue);
    color: white;
    border: none;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}
.btn-cta:hover { transform: scale(1.05); color:black; box-shadow: 0 15px 30px rgba(15, 23, 42, 0.2); }
@media (max-width: 767px) { .btn-cta { padding: 14px 24px; font-size: 0.9rem; } }

/* --- CARDS & TABLES --- */
.card-custom {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 40px;
    transition: 0.4s;
    height: 100%;
}
.card-custom:hover { transform: translateY(-10px); border-color: var(--electric-violet); }
@media (max-width: 767px) {
    .card-custom { padding: 25px; }
    .card-custom h3 { font-size: 1.25rem; }
}

.price-card.featured { border: 2.5px solid var(--electric-violet); position: relative; }

.comparison-table { border-radius: 20px; overflow: hidden; background: white; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
@media (max-width: 767px) {
    .comparison-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .comparison-table th, .comparison-table td { font-size: 0.85rem; align-content: center; text-align: center; }
}

/* Project Cards */
.project-card { background: white; border-radius: 20px; overflow: hidden; transition: transform 0.3s ease; }
.project-card:hover { transform: translateY(-5px); }
.project-img { height: 250px; background-size: cover; background-position: center; }
.project-img-wrapper { height: 300px; background-color: #f8f9fa; display: flex; align-items: center; justify-content: center; overflow: hidden; width: 100%; }
.project-img-tag { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
@media (max-width: 768px) { .project-img-wrapper { height: 200px; } }

/* --- TRADE / INDUSTRY LANDING PAGES --- */
.trade-hero { padding: 60px 0 50px; background: radial-gradient(circle at 0% 0%, rgba(124,58,237,0.05) 0%, transparent 60%), radial-gradient(circle at 100% 100%, rgba(6,182,212,0.05) 0%, transparent 60%); border-bottom: 1px solid rgba(0,0,0,0.06); }
.breadcrumb { font-size: 0.85rem; }
.breadcrumb a { color: var(--midnight-blue); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--electric-violet); }
.icon-badge { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(124,58,237,0.08); color: var(--electric-violet); font-size: 1.5rem; flex-shrink: 0; }
.accordion-button { font-weight: 700; }
.accordion-button:not(.collapsed) { color: var(--electric-violet); background: rgba(124,58,237,0.06); box-shadow: none; }
.accordion-item { border-radius: 16px !important; overflow: hidden; margin-bottom: 12px; border: 1px solid rgba(0,0,0,0.06) !important; }

/* --- FOOTER --- */
footer { background: white; border-top: 1px solid #eee; padding: 40px 0; }

@media (max-width: 767px) {
    #contact .bg-dark { padding: 30px 20px !important; border-radius: 30px !important; }
    #contact h2 { font-size: 1.75rem !important; }
}

#contact-form .form-control::placeholder { color: rgba(255, 255, 255, 0.5) !important; }
.form-select { color: rgba(255, 255, 255, 0.5) !important; }
.form-select:focus { color: white !important; }
.form-select option { background-color: #fff; color: #000; }

.telephone-mobile { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- BLOG / ARTICLES --- */
.article-body h2 { margin-top: 2.5rem; font-weight: 800; }
.article-body p, .article-body li { color: #334155; line-height: 1.75; }
.article-meta { color: #64748b; font-size: 0.9rem; }

.blog-card { background: white; border-radius: 20px; border: 1px solid rgba(0,0,0,0.06); padding: 30px; height: 100%; transition: 0.3s; }
.blog-card:hover { transform: translateY(-6px); border-color: var(--electric-violet); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.blog-card .blog-date { color: #94a3b8; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* --- COOKIE CONSENT BANNER --- */
#cookie-consent-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 2000;
    background: var(--midnight-blue);
    color: white;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    padding: 18px 20px;
}
.cookie-consent-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-consent-inner p { margin: 0; font-size: 0.85rem; opacity: 0.9; flex: 1 1 400px; }
.cookie-consent-inner a { color: var(--cyan-accent); text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-consent-actions .btn { border-radius: 50px; padding: 8px 20px; font-weight: 700; }
.cookie-consent-actions .btn-cta { background: var(--electric-violet); }
.cookie-consent-actions .btn-outline-light { border-color: rgba(255,255,255,0.4); }
@media (max-width: 576px) {
    .cookie-consent-inner { flex-direction: column; align-items: stretch; }
    .cookie-consent-actions { justify-content: stretch; }
    .cookie-consent-actions .btn { flex: 1; }
}

/* --- CHATBOT WIDGET --- */
#rw-chatbot { position: fixed; right: 20px; bottom: 24px; z-index: 1990; }
#rw-chatbot.rw-banner-visible { bottom: 100px; }

#rw-chat-launcher {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--electric-violet), var(--cyan-accent));
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
#rw-chat-launcher:hover { transform: scale(1.08); }

#rw-chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 340px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

.rw-chat-header {
    background: var(--midnight-blue);
    color: white;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rw-chat-title { font-weight: 800; font-size: 0.95rem; }
.rw-chat-subtitle { font-size: 0.75rem; opacity: 0.7; }
.rw-chat-close { background: none; border: none; color: white; opacity: 0.7; font-size: 1rem; cursor: pointer; }
.rw-chat-close:hover { opacity: 1; }

.rw-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-light);
    min-height: 180px;
    max-height: 320px;
}
.rw-msg { padding: 10px 14px; border-radius: 14px; font-size: 0.85rem; line-height: 1.5; max-width: 85%; }
.rw-msg-bot { background: white; border: 1px solid rgba(0,0,0,0.06); align-self: flex-start; border-bottom-left-radius: 4px; }
.rw-msg-user { background: var(--electric-violet); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.rw-msg strong { color: inherit; }

.rw-chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.rw-chip {
    background: rgba(124,58,237,0.08);
    color: var(--electric-violet);
    border: none;
    border-radius: 50px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.rw-chip:hover { background: rgba(124,58,237,0.16); }

.rw-chat-input-row { display: flex; border-top: 1px solid rgba(0,0,0,0.06); }
.rw-chat-input-row input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}
.rw-chat-input-row button {
    background: var(--electric-violet);
    color: white;
    border: none;
    width: 46px;
    cursor: pointer;
}

@media (max-width: 480px) {
    #rw-chatbot { right: 12px; bottom: 16px; }
    #rw-chatbot.rw-banner-visible { bottom: 130px; }
    #rw-chat-panel { width: calc(100vw - 24px); right: -8px; }
}
