/* ============================================================
   CHATEXPERT — styles.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --primary:    #0077B6;
    --primary-dk: #005f92;
    --secondary:  #90E0EF;
    --accent:     #00B4D8;
    --dark:       #03045E;
    --light:      #CAF0F8;
    --white:      #FFFFFF;
    --gray:       #64748b;
    --gray-lt:    #94a3b8;
    --bg:         #F8FAFC;
    --text:       #1e293b;
    --border:     rgba(0,0,0,.07);
    --radius:     12px;
    --radius-lg:  20px;
    --container:  1200px;
    --ease:       cubic-bezier(.4,0,.2,1);
    --transition: all .25s var(--ease);
    --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
    --shadow-md:  0 10px 30px rgba(0,0,0,.08);
    --shadow-lg:  0 20px 60px rgba(0,0,0,.12);
    --promo:      #EF4444;
    --header-h:   80px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,h2,h3,h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width:100%; height:auto; display:block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.logo span { color: var(--dark); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.btn-devis {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white) !important;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0,119,182,.3);
}

.btn-devis:hover {
    background: var(--primary-dk);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,119,182,.4);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: var(--light);
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu Panel */
.main-nav.nav-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    padding: 30px 24px;
    margin: 0;
    gap: 10px;
    animation: slideInUp 0.3s var(--ease);
}

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

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 998;
    backdrop-filter: blur(4px);
}
.mobile-overlay.active { display: block; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.breadcrumbs ul {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--gray);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumbs a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs svg {
    color: var(--gray-lt);
}

/* ============================================================
   SECTIONS & LAYOUT
   ============================================================ */
section { padding: 80px 0; position: relative; }

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-header h2 { font-size: 2.8rem; margin-bottom: 20px; }
.section-header p { color: var(--gray); font-size: 1.1rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f0f9ff 0%, var(--bg) 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.8rem;
    margin-bottom: 25px;
    line-height: 1.1;
    color: var(--dark);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-image img {
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 15px rgba(0,119,182, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dk);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,119,182, 0.4);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white !important;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-orange { background: #ffedd5; color: #c2410c; }

/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 100px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h4 { color: var(--secondary); font-size: 1.6rem; margin-bottom: 20px; }
.footer-brand p { opacity: 0.7; font-size: 0.95rem; }

.footer-links h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: white;
    opacity: 0.5;
}

.footer-links ul li { margin-bottom: 15px; }
.footer-links a { opacity: 0.8; font-size: 0.95rem; }
.footer-links a:hover { opacity: 1; color: var(--secondary); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .main-nav { display: none; }
    .burger { display: flex; }
    .hero-content h1 { font-size: 3rem; }
    .hero-grid { gap: 40px; }
}

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-image { order: -1; }
    .hero-content h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .section-header h2 { font-size: 2.2rem; }
    .btn-devis { display: none; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 2.2rem; }
}

/* ChatExpert latest blog feed */
.home-blog-section { background: linear-gradient(180deg, var(--white) 0%, #eefaff 100%); overflow: hidden; }
.home-blog-section::before { content:""; position:absolute; width:440px; height:440px; border-radius:50%; background:rgba(144,224,239,.24); top:-250px; right:-170px; pointer-events:none; }
.home-blog-section .container { position:relative; z-index:1; }
.home-blog-kicker { display:inline-flex; align-items:center; gap:8px; padding:7px 13px; border-radius:999px; background:var(--light); color:var(--primary-dk); font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.home-blog-kicker::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(0,180,216,.13); }
.home-blog-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; min-height:1px; }
.home-blog-card { display:flex; flex-direction:column; min-width:0; overflow:hidden; background:var(--white); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); transition:transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.home-blog-card:hover { transform:translateY(-6px); border-color:rgba(0,119,182,.28); box-shadow:var(--shadow-md); }
.home-blog-card__media { display:block; overflow:hidden; aspect-ratio:16/9; background:var(--light); }
.home-blog-card__media img { width:100%; height:100%; object-fit:cover; transition:transform .45s var(--ease); }
.home-blog-card:hover .home-blog-card__media img { transform:scale(1.045); }
.home-blog-card__body { display:flex; flex:1; flex-direction:column; padding:24px; }
.home-blog-card__date { color:var(--primary); font-size:.8rem; font-weight:800; letter-spacing:.025em; text-transform:capitalize; }
.home-blog-card__title { margin:9px 0 10px; font-size:1.28rem; }
.home-blog-card__title a:hover, .home-blog-card__read:hover { color:var(--primary); }
.home-blog-card__excerpt { display:-webkit-box; overflow:hidden; color:var(--gray); font-size:.92rem; line-height:1.65; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.home-blog-card__read { margin-top:auto; padding-top:18px; color:var(--primary); font-size:.9rem; font-weight:800; }
.home-blog-empty { grid-column:1/-1; max-width:720px; margin:0 auto; padding:42px 30px; border:1px dashed rgba(0,119,182,.3); border-radius:var(--radius-lg); background:rgba(255,255,255,.72); color:var(--gray); text-align:center; }
.home-blog-empty__title { margin-bottom:7px; color:var(--dark); font-family:'Outfit',sans-serif; font-size:1.32rem; font-weight:700; }
.home-blog-empty__link { margin-top:21px; }
.home-blog-actions { margin-top:44px; text-align:center; }
@media (max-width:900px) { .home-blog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .home-blog-section { padding:64px 0; } .home-blog-grid { grid-template-columns:1fr; gap:18px; } .home-blog-section .section-header { margin-bottom:38px; } .home-blog-section .section-header h2 { font-size:2.1rem; } .home-blog-card__body { padding:20px; } }
