/* ============================================================
   CRIC Food & Drug Safety — Feuille de style principale
   ============================================================ */
:root {
  --primary: #0e7a52;        /* vert santé */
  --primary-dark: #095c3d;
  --secondary: #f39c12;      /* orange alerte */
  --danger: #c0392b;
  --dark: #10281e;
  --light: #f4faf7;
}

body { font-family: 'Nunito', sans-serif; color: #23312b; background: #fff; }
h1,h2,h3,h4,h5 { font-weight: 800; }
a { text-decoration: none; }

/* Topbar */
.topbar { background: var(--primary-dark); color: #d8efe5; font-size: .85rem; padding: .35rem 0; }
.topbar a { color: #d8efe5; }
.topbar a:hover { color: #fff; }

/* Navigation */
.main-nav { background: var(--primary); padding: .6rem 0; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.main-nav .nav-link { color: #eafff5 !important; font-weight: 600; padding: .5rem .7rem !important; font-size: .93rem; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: #ffd97a !important; }
.navbar-brand { display: flex; align-items: center; gap: .5rem; color: #fff !important; }
.brand-icon { background: #fff; color: var(--primary); width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.brand-text { font-size: 1.02rem; line-height: 1.1; }
.navbar-toggler { border-color: rgba(255,255,255,.5); }
.navbar-toggler-icon { filter: invert(1); }
.btn-report { background: var(--danger); color: #fff !important; font-weight: 700; border-radius: 20px; }
.btn-report:hover { background: #a93226; }
.mobile-menu li a { display: block; padding: .55rem 0; color: #23312b; font-weight: 600; border-bottom: 1px solid #eee; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #14a06c 100%); color: #fff; padding: 5rem 0 4rem; position: relative; overflow: hidden; }
.hero h1 { font-size: 2.1rem; line-height: 1.3; }
.hero .lead { color: #d9f3e8; }
.hero-icons i { font-size: 6rem; opacity: .15; position: absolute; }
.btn-cta { background: var(--secondary); border: none; color: #fff; font-weight: 700; padding: .7rem 1.6rem; border-radius: 30px; }
.btn-cta:hover { background: #d68910; color:#fff; }
.btn-outline-cta { border: 2px solid #fff; color: #fff; font-weight: 700; padding: .6rem 1.5rem; border-radius: 30px; }
.btn-outline-cta:hover { background: #fff; color: var(--primary); }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--light); }
.section-title { color: var(--primary-dark); margin-bottom: .4rem; }
.section-sub { color: #6b7f76; max-width: 720px; }
.card-feature { border: none; border-radius: 14px; box-shadow: 0 4px 18px rgba(14,122,82,.08); transition: .25s; height: 100%; }
.card-feature:hover { transform: translateY(-5px); box-shadow: 0 10px 26px rgba(14,122,82,.16); }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; background: rgba(14,122,82,.1); color: var(--primary); display:flex; align-items:center; justify-content:center; font-size: 1.6rem; margin-bottom: 1rem; }

/* Badges de sévérité */
.badge-sev { font-size: .75rem; font-weight: 700; padding: .3rem .7rem; border-radius: 20px; }
.badge-info-sev { background: #d6eaf8; color: #1a5276; }
.badge-warning-sev { background: #fdebd0; color: #9c640c; }
.badge-danger-sev { background: #fadbd8; color: #922b21; }
.badge-critical-sev { background: #922b21; color: #fff; }

/* Cartes alertes / news */
.alert-card { border-left: 5px solid var(--danger); border-radius: 10px; background:#fff; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.news-card img, .news-card .img-placeholder { height: 190px; object-fit: cover; width: 100%; border-radius: 14px 14px 0 0; }
.img-placeholder { background: linear-gradient(135deg,#e8f6f0,#cdeadd); display:flex; align-items:center; justify-content:center; color: var(--primary); font-size: 2.4rem; }

/* Page header interne */
.page-head { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color:#fff; padding: 3rem 0 2.2rem; }
.page-head h1 { font-size: 1.8rem; }
.breadcrumb-item a { color: #ffd97a; }
.breadcrumb-item.active { color: #d9f3e8; }

/* Footer */
.site-footer { background: var(--dark); color: #b9cfc5; padding: 3.5rem 0 1.5rem; margin-top: 0; }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: #b9cfc5; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .45rem; font-size: .92rem; }
.site-footer hr { border-color: #2c443a; }

/* Chatbot */
#cric-chatbot { position: fixed; bottom: 22px; right: 22px; z-index: 1050; }
#chatbot-toggle { width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 1.6rem; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
#chatbot-toggle:hover { background: var(--primary-dark); }
#chatbot-window { position: fixed; bottom: 95px; right: 22px; width: 360px; max-width: calc(100vw - 30px); height: 480px; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.28); display: flex; flex-direction: column; overflow: hidden; }
.chatbot-header { background: var(--primary); color: #fff; padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: center; }
#chatbot-messages { flex: 1; overflow-y: auto; padding: 1rem; background: #f6faf8; display: flex; flex-direction: column; gap: .6rem; }
.bot-msg, .user-msg { max-width: 85%; padding: .6rem .85rem; border-radius: 14px; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; }
.bot-msg { background: #fff; border: 1px solid #dfece6; align-self: flex-start; border-bottom-left-radius: 4px; }
.user-msg { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bot-typing { font-style: italic; color: #7d938a; font-size: .85rem; align-self: flex-start; }
#chatbot-form { display: flex; border-top: 1px solid #e4eee9; }
#chatbot-input { flex: 1; border: none; padding: .85rem 1rem; outline: none; font-size: .92rem; }
#chatbot-form button { border: none; background: var(--primary); color: #fff; width: 54px; }

/* Formulaires */
.form-card { background:#fff; border-radius: 14px; box-shadow: 0 5px 22px rgba(0,0,0,.08); padding: 2rem; }
.required::after { content: " *"; color: var(--danger); }

/* Divers */
.stat-box { background:#fff; border-radius: 14px; padding: 1.4rem; text-align:center; box-shadow: 0 3px 14px rgba(0,0,0,.06); }
.stat-box .num { font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.cta-band { background: linear-gradient(120deg, var(--secondary), #e67e22); color:#fff; padding: 3rem 0; }
@media (max-width: 576px) { .hero h1 { font-size: 1.5rem; } .hero { padding: 3rem 0; } }
