/* ============================================================
   CA4SFC — Feuille de style principale
   Identité : terre, agriculture, patrimoine (vert olive + terracotta)
   ============================================================ */
:root {
  --primary: #3f6b1f;        /* vert olive cultures */
  --primary-dark: #2c4d13;
  --secondary: #b3541e;      /* terracotta */
  --accent: #e8b33d;         /* jaune moisson */
  --dark: #1e2a14;
  --light: #f7f6ef;
}

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

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

/* Navigation */
.main-nav { background: var(--primary); padding: .5rem 0; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.main-nav .nav-link { color: #f0f7e6 !important; font-weight: 700; padding: .5rem .75rem !important; font-size: .94rem; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: var(--accent) !important; }
.navbar-brand { display: flex; align-items: center; gap: .55rem; color: #fff !important; }
.brand-icon { background: var(--accent); color: var(--primary-dark); width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.brand-text { font-size: 1.05rem; line-height: 1.05; }
.brand-text small { font-size: .62rem; letter-spacing: .5px; opacity: .85; }
.navbar-toggler { border-color: rgba(255,255,255,.5); }
.navbar-toggler-icon { filter: invert(1); }
.btn-involve { background: var(--secondary); color: #fff !important; font-weight: 700; border-radius: 20px; }
.btn-involve:hover { background: #93451a; }
.mobile-menu li a { display: block; padding: .55rem 0; color: #2b3325; font-weight: 600; border-bottom: 1px solid #eee; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #557f2d 100%); color: #fff; padding: 5rem 0 4rem; position: relative; overflow: hidden; }
.hero h1 { font-size: 2rem; line-height: 1.35; }
.hero .lead { color: #e3ecd6; }
.hero .slogan { color: var(--accent); font-style: italic; font-weight: 700; }
.btn-cta { background: var(--secondary); border: none; color: #fff; font-weight: 700; padding: .7rem 1.6rem; border-radius: 30px; }
.btn-cta:hover { background: #93451a; 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: #6b7461; max-width: 760px; white-space: pre-line; }
.card-feature { border: none; border-radius: 14px; box-shadow: 0 4px 18px rgba(63,107,31,.09); transition: .25s; height: 100%; }
.card-feature:hover { transform: translateY(-5px); box-shadow: 0 10px 26px rgba(63,107,31,.17); }
.feature-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(63,107,31,.1); color: var(--primary); display:flex; align-items:center; justify-content:center; font-size: 1.6rem; margin-bottom: 1rem; }
.feature-icon.alt { background: rgba(179,84,30,.12); color: var(--secondary); }

/* Cartes cultures & recettes */
.crop-card img, .crop-card .img-placeholder { height: 200px; object-fit: cover; width: 100%; border-radius: 14px 14px 0 0; }
.img-placeholder { background: linear-gradient(135deg,#eef3e2,#dce8c8); display:flex; align-items:center; justify-content:center; color: var(--primary); font-size: 2.6rem; }
.badge-crop { background: rgba(63,107,31,.12); color: var(--primary-dark); font-weight: 700; border-radius: 20px; padding: .3rem .7rem; font-size: .75rem; }
.badge-terra { background: rgba(179,84,30,.12); color: var(--secondary); font-weight: 700; border-radius: 20px; padding: .3rem .7rem; font-size: .75rem; }

/* 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.7rem; }
.breadcrumb-item a { color: var(--accent); }
.breadcrumb-item.active { color: #e3ecd6; }

/* Valeurs / organes */
.value-card { border-left: 5px solid var(--accent); background:#fff; border-radius: 10px; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.organ-card { border-top: 4px solid var(--primary); background:#fff; border-radius: 12px; box-shadow: 0 3px 12px rgba(0,0,0,.06); }

/* Footer */
.site-footer { background: var(--dark); color: #c2cbb4; padding: 3.5rem 0 1.5rem; }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: #c2cbb4; }
.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: #38452b; }

/* Chatbot */
#ca4sfc-chatbot { position: fixed; bottom: 22px; right: 22px; z-index: 1050; }
#chatbot-toggle { width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--secondary); color: #fff; font-size: 1.6rem; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
#chatbot-toggle:hover { background: #93451a; }
#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: #f8f7f0; 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 #e3e8d5; 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: #8b9479; font-size: .85rem; align-self: flex-start; }
#chatbot-form { display: flex; border-top: 1px solid #e8ece0; }
#chatbot-input { flex: 1; border: none; padding: .85rem 1rem; outline: none; font-size: .92rem; }
#chatbot-form button { border: none; background: var(--secondary); 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: #b3541e; }

/* 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(--secondary); }
.cta-band { background: linear-gradient(120deg, var(--secondary), #cf6a2c); color:#fff; padding: 3rem 0; }
.team-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--light); }
.team-placeholder { width: 110px; height: 110px; border-radius: 50%; background: #eef3e2; display:flex; align-items:center; justify-content:center; color: var(--primary); font-size: 2.2rem; margin: 0 auto; }
@media (max-width: 576px) { .hero h1 { font-size: 1.45rem; } .hero { padding: 3rem 0; } }
