/* =========================================================
   Gold Food Africa — ajouts du thème WordPress
   (sélecteur de langue, bouton clair/sombre, mode sombre,
   compatibilité Elementor / Elementor Pro)
   Le design d'origine est dans main.css et n'est pas modifié.
   ========================================================= */

/* ---------- Protection contre les styles globaux liens/boutons du Kit Elementor ---------- */
body .btn-gold{color:#19372b}body .btn-green{color:#fff}body .btn-white{color:var(--green)}body .btn-outline{color:#fff}
body .nav a,body .footer a,body a.brand,body .card h3 a{color:inherit}
body .nav a:hover,body .nav a:focus{color:#b69145}
body .link{color:var(--jade)}
body button.gfa-theme-toggle{background:transparent;border:1px solid #e0e6de;border-radius:10px;padding:8px 10px;font-size:12px;line-height:1;color:#24453a;box-shadow:none}
body button.menu-toggle{background:transparent;border:0;padding:0 4px;font-size:25px;line-height:1;color:var(--green);box-shadow:none}
body .gfa-lang a{color:#7d857c}body .gfa-lang a.is-active{color:#12392d}

/* ---------- Outils du header : langue + thème ---------- */
.gfa-theme-toggle{display:inline-grid;place-items:center;background:transparent;cursor:pointer;line-height:1;color:#24453a;padding:8px 10px}
.gfa-theme-toggle:hover,.gfa-theme-toggle:focus-visible{color:#b69145;border-color:#c7a151}
.gfa-theme-toggle .i-sun{display:none}
.gfa-lang{display:inline-flex;align-items:center;gap:6px}
.gfa-lang a{color:#7d857c;font-weight:600}
.gfa-lang a:hover,.gfa-lang a:focus-visible{color:#b69145}
.gfa-lang a.is-active{color:#12392d;font-weight:850}
.gfa-lang i{font-style:normal;color:#c9cfc6}
.menu-toggle{cursor:pointer}
/* Header : éviter tout débordement entre la tablette et le grand écran */
@media(max-width:1340px){.header-right .btn{display:none}}
@media(max-width:1180px){
  .menu-toggle{display:block}
  .nav{display:none;position:absolute;top:91px;left:0;right:0;background:#fff;padding:24px;box-shadow:0 20px 30px #0002;flex-wrap:wrap;gap:20px}
  .nav.open{display:flex}
  .nav a{font-size:12px}
  html[data-theme="dark"] .nav{background:#0d241e;box-shadow:0 20px 30px #0008}
}
@media(max-width:1180px){
  .header-right{display:flex;gap:8px;margin-left:auto;margin-right:10px}
}
@media(max-width:540px){
  .brand{min-width:0;gap:9px;white-space:nowrap}
  .header-right{gap:5px;margin-right:4px}
  .header-right .taglang{padding:6px 7px;font-size:11px}
  .gfa-lang{gap:3px}
  .menu-toggle{padding:0 2px}
}
@media(max-width:420px){
  .brand{gap:7px}
  .brand-title{font-size:16px!important}
  .brand-sub{font-size:9px;letter-spacing:.06em}
  .brandmark{width:34px!important;height:34px!important}
  .header-right{gap:4px;margin-right:6px}
  body .header-right .taglang{padding:6px}
}

/* ---------- WordPress : barre d'admin & contenus génériques ---------- */
.admin-bar .header{top:32px}
@media(max-width:782px){.admin-bar .header{top:46px}}
@media(max-width:600px){.admin-bar .header{top:0}}
.gfa-entry{padding:72px 0 90px}
.gfa-entry .entry-content{max-width:820px;line-height:1.7}
.gfa-entry .entry-content img{height:auto}
.gfa-entry .post-list{display:grid;gap:20px}
.gfa-entry .post-list .card{padding:26px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}

/* ---------- Gabarits de secours : blog, recherche, 404 ---------- */
.gfa-page-hero{padding:92px 0 80px}
.gfa-page-title{font-size:clamp(36px,3.1vw,54px);line-height:1.08;font-weight:800;color:#fff;max-width:900px;margin-bottom:16px}
.gfa-post-meta{color:#d6e4dd;font-size:13px}.gfa-post-meta a{color:#e8c06b}
.gfa-search{display:flex;gap:10px;max-width:620px;margin-top:22px}
.gfa-search input{flex:1;min-width:0;height:50px;border:1px solid var(--line);border-radius:11px;padding:0 16px;font:inherit;font-size:14px;background:var(--white,#fff);color:var(--ink)}
.gfa-search .btn{border:0;cursor:pointer;min-height:50px}
.gfa-list .card-image{display:block}.gfa-list h3 a:hover{color:var(--jade)}
.gfa-pagination{margin-top:36px;text-align:center}
.gfa-pagination .page-numbers{display:inline-grid;place-items:center;min-width:40px;height:40px;margin:0 3px;border-radius:10px;border:1px solid var(--line);background:var(--white,#fff);font-size:13px;font-weight:700}
.gfa-pagination .page-numbers.current{background:var(--green);color:#fff;border-color:var(--green)}
.gfa-featured{height:440px;margin-bottom:40px}
.gfa-post-nav{display:flex;justify-content:space-between;gap:20px;margin:10px 0 30px;font-weight:800;font-size:14px;color:var(--jade)}
.gfa-404{text-align:center;min-height:620px;display:flex;align-items:center}
.gfa-404 .eyebrow{justify-content:center}.gfa-404 .lead{margin:0 auto 30px}
.gfa-404 h2{max-width:760px;margin-left:auto;margin-right:auto}
.gfa-404 .gfa-search{margin:0 auto 24px}
.gfa-404-code{font-size:clamp(70px,8vw,120px);font-weight:850;line-height:1;color:var(--gold);letter-spacing:-.05em;margin-bottom:10px}
.gfa-404-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
@media(max-width:540px){.gfa-search{flex-direction:column}.gfa-featured{height:240px}}

/* =========================================================
   Elementor natif — petits détails décoratifs non disponibles
   dans l'interface (classes posées dans l'onglet Avancé).
   Couleurs = variables globales du Kit Elementor.
   ========================================================= */
.elementor-widget-text-editor p:last-child{margin-bottom:0}
.gfa-eyebrow .elementor-heading-title{display:flex;align-items:center;gap:10px}
.gfa-eyebrow .elementor-heading-title::before{content:"";flex:none;width:27px;height:2px;background:var(--e-global-color-secondary,#c7a151)}
.gfa-gold{color:var(--e-global-color-gfa_goldlight,#e8c06b)}
.gfa-glyph .elementor-heading-title{width:53px;height:53px;display:grid;place-items:center}
/* Hero : signature en bas à droite */
.gfa-hero{position:relative}
.elementor-widget.gfa-hero-side{position:absolute!important;right:max(55px,calc((100vw - 1260px)/2));bottom:62px;width:auto!important;max-width:200px;border-right:3px solid var(--e-global-color-secondary,#c7a151);padding-right:16px}
/* Carte export */
.gfa-map{position:relative}
.gfa-map::after{content:"";position:absolute;inset:46px;opacity:.12;pointer-events:none;background:repeating-radial-gradient(circle at 52% 45%,transparent 0 45px,#fff 46px 47px)}
.gfa-map>.elementor-element{position:relative;z-index:1}
.elementor-widget.gfa-globe{position:absolute!important;right:23px;top:48px;width:auto!important;opacity:.23;z-index:0}
.gfa-globe .elementor-heading-title{font-size:160px!important;line-height:1!important}
.gfa-markets>.e-con{--width:auto;min-width:190px}
.gfa-markets>.gfa-market-end{align-self:flex-end}
.gfa-glass{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
/* Objectifs de développement durable */
.gfa-sdg{--width:67px;--min-height:67px;width:67px;min-height:67px}
.gfa-sdg .elementor-heading-title{line-height:1.05}
.gfa-fund-icon .elementor-heading-title{font-size:130px!important;opacity:.77}
/* Header Elementor Pro */
.gfa-header-bar .gfa-nav{flex-grow:0}
.gfa-header-bar .elementor-nav-menu--dropdown{box-shadow:0 20px 30px #0002}

/* =========================================================
   MODE SOMBRE  — activé par <html data-theme="dark">
   ========================================================= */
html[data-theme="dark"]{
  --ivory:#0b1f1a;--cream:#10271f;--white:#132c25;--line:#24433a;
  --ink:#e7eee9;--muted:#a9bab2;--jade:#6cc49a;
  color-scheme:dark
}
html[data-theme="dark"] body{background:var(--ivory);color:var(--ink)}
html[data-theme="dark"] .mock-notice{background:#2a2414;border-bottom-color:#3a321c;color:#e3d3a8}

/* Header */
html[data-theme="dark"] .header{background:#0d241e;border-bottom-color:#1f3a32;box-shadow:0 3px 14px #0006}
html[data-theme="dark"] .brand-title{color:#eef3ef}
html[data-theme="dark"] .nav{color:#d3e0d9}
html[data-theme="dark"] .taglang{color:#a9b5ad;border-color:#2a4a40}
html[data-theme="dark"] .gfa-theme-toggle{color:#e8c06b}
html[data-theme="dark"] .gfa-theme-toggle .i-sun{display:block}
html[data-theme="dark"] .gfa-theme-toggle .i-moon{display:none}
html[data-theme="dark"] .gfa-lang a{color:#8fa39a}
html[data-theme="dark"] .gfa-lang a.is-active{color:#eef3ef}
html[data-theme="dark"] .gfa-lang i{color:#3a5a50}
html[data-theme="dark"] .menu-toggle{color:#eef3ef}
@media(max-width:830px){html[data-theme="dark"] .nav{background:#0d241e;box-shadow:0 20px 30px #0008}}

/* Boutons & éléments communs */
html[data-theme="dark"] .btn-green{background:#207251;color:#fff}
html[data-theme="dark"] .link{color:#6cc49a}
html[data-theme="dark"] .card{background:var(--white);border-color:var(--line);box-shadow:0 12px 35px #0005}
html[data-theme="dark"] .num{color:#f1d187}
html[data-theme="dark"] .section:not(.dark) .lead{color:var(--muted)}
html[data-theme="dark"] .pill{background:#15332a;border-color:#2c5446;color:#7fd0a8}
html[data-theme="dark"] .icon-round{background:#1a3a30;color:#e8c06b}
html[data-theme="dark"] .note{color:#8fa39a}
html[data-theme="dark"] .photo{box-shadow:0 18px 50px #0007}

/* Fonds de sections (styles en ligne de la maquette) */
html[data-theme="dark"] .section[style*="background"]{background:#0e241e!important}
html[data-theme="dark"] #accueil.section{background:var(--ivory)!important}

/* Accueil */
html[data-theme="dark"] .metrics{background:var(--white);box-shadow:0 18px 60px #0008}
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .pillar p,
html[data-theme="dark"] .card-body p{color:var(--muted)}

/* Entreprise */
html[data-theme="dark"] .about-point{border-top-color:var(--line)}
html[data-theme="dark"] .about-point b{color:#eef3ef}
html[data-theme="dark"] .about-point span,
html[data-theme="dark"] .value-step p{color:var(--muted)}
html[data-theme="dark"] .value-strip{background:var(--white)}

/* Filières & produits */
html[data-theme="dark"] .large-quote{color:#eef3ef}
html[data-theme="dark"] .products-band{background:#132c25}
html[data-theme="dark"] .products-band p{color:var(--muted)!important}
html[data-theme="dark"] .product-tags span{background:#1a3a30;color:#e7eee9}

/* Impact */
html[data-theme="dark"] .dark{background:#0f3a2d}
html[data-theme="dark"] .impact-quote{background:#0d241ef0;color:#eef3ef}

/* Climat */
html[data-theme="dark"] .climate-card{background:var(--white)}
html[data-theme="dark"] .climate-card p{color:var(--muted)}

/* Qualité & export */
html[data-theme="dark"] .quality-list .soft{background:var(--cream)}
html[data-theme="dark"] .quality-list b{color:#eef3ef}
html[data-theme="dark"] .quality-list p{color:var(--muted)}
html[data-theme="dark"] .quality-note,
html[data-theme="dark"] .disclaimer{background:#2a2414;color:#e3d3a8}

/* Projets */
html[data-theme="dark"] .project-card{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .project-card p,
html[data-theme="dark"] .project-footer small{color:var(--muted)}
html[data-theme="dark"] .project-footer span{background:#1a3a30;color:#8fd3ae}
html[data-theme="dark"] .funding-stripe{background:#0f3a2d}

/* Bailleurs */
html[data-theme="dark"] .funder-hero{background:#0f3a2d}
html[data-theme="dark"] .data-room{background:var(--white)}
html[data-theme="dark"] .data-room p{color:var(--muted)}
html[data-theme="dark"] .soft p[style*="color"]{color:var(--muted)!important}

/* Actualités */
html[data-theme="dark"] .news-feature{background:#132c25}
html[data-theme="dark"] .news-feature p{color:var(--muted)}

/* Contact & footer */
html[data-theme="dark"] .contact-info{background:var(--white);color:var(--ink)}
html[data-theme="dark"] .contact-info b{color:#eef3ef}
html[data-theme="dark"] .contact-line{border-bottom-color:var(--line)}
html[data-theme="dark"] .contact-line small{color:var(--muted)}
html[data-theme="dark"] .footer{background:#061d16}

/* Transition douce lors du basculement */
html.gfa-theme-anim body,html.gfa-theme-anim body *{transition:background-color .25s ease,color .25s ease,border-color .25s ease!important}
