/*
Theme Name:        DiaspoBack Theme
Theme URI:         https://diaspoback.com
Author:            DiaspoBack
Author URI:        https://diaspoback.com
Description:       Thème officiel DiaspoBack — Plateforme emploi Afrique & Diaspora + Welcome Expat. Deux univers visuels distincts, système de navigation intelligent, dashboards recruteur/talent, candidatures, WhatsApp intégré.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           Proprietary
License URI:       https://diaspoback.com/licence
Text Domain:       diaspoback
Tags:              employment, africa, diaspora, bilingual, custom-header, custom-menu, featured-images, threaded-comments, translation-ready
*/

/*
 * ════════════════════════════════════════════════════════
 * TABLE DES MATIÈRES
 * ════════════════════════════════════════════════════════
 * 1.  Reset & Base
 * 2.  Variables CSS (palette complète)
 * 3.  Typographie
 * 4.  Layout utilitaires
 * 5.  Boutons (partagés)
 * 6.  Formulaires (partagés)
 * 7.  Accessibilité
 * 8.  Animations partagées
 * 9.  Media queries de base
 * ════════════════════════════════════════════════════════
 * NOTA : Les styles spécifiques DiaspoBack et Welcome Expat
 * sont dans assets/css/diaspoback.css et assets/css/welcome-expat.css
 * ════════════════════════════════════════════════════════
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--fb);
  background: var(--fond);
  color: var(--dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a           { text-decoration: none; color: inherit; }
img, video  { display: block; max-width: 100%; height: auto; }
ul, ol      { list-style: none; }
button      { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── 2. Variables CSS ─── */
:root {
  /* ── Palette DiaspoBack ── */
  --vert:      #1B4332;
  --vert-2:    #2D6A4F;
  --vert-3:    #40916C;
  --vert-4:    #52B788;
  --vert-bg:   rgba(27, 67, 50, .08);
  --vert-bd:   rgba(27, 67, 50, .18);

  --or:        #D4AC0D;
  --or-l:      #F0C30F;
  --or-bg:     rgba(212, 172, 13, .10);
  --or-bd:     rgba(212, 172, 13, .22);

  --fond:      #F8FAF9;
  --fond-2:    #F0F5F2;
  --g50:       #F4F7F5;
  --g100:      #E8EFEB;
  --g200:      #C8D8CF;
  --g400:      #7A9A87;
  --g600:      #4A6857;
  --g800:      #2A3D32;
  --g900:      #1A2820;
  --dark:      #1A2820;
  --blanc:     #FFFFFF;
  --red:       #C0392B;
  --green:     #27AE60;

  /* ── Palette Welcome Expat ── */
  --we-or:     #C9960C;
  --we-or-2:   #E8AC0E;
  --we-or-3:   #F5C842;
  --we-sand:   #F9F4E8;
  --we-cream:  #FFFDF6;
  --we-dark:   #1C1410;
  --we-g400:   #AE9E88;
  --we-g600:   #7A6A56;
  --we-g100:   #EDE8DE;
  --we-g200:   #DDD4C4;

  /* ── WhatsApp ── */
  --wa:        #25D366;
  --wa-dark:   #128C7E;

  /* ── Typographies ── */
  --ft:        'Outfit', system-ui, sans-serif;
  --fb:        'Inter', system-ui, sans-serif;
  --ft-we:     'Cormorant Garamond', Georgia, serif;
  --fb-we:     'DM Sans', system-ui, sans-serif;

  /* ── Rayons ── */
  --r-xs:  4px;
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  32px;
  --r-max: 999px;

  /* ── Ombres ── */
  --sh-xs: 0 1px 4px rgba(27, 67, 50, .07);
  --sh-sm: 0 3px 12px rgba(27, 67, 50, .10);
  --sh-md: 0 6px 24px rgba(27, 67, 50, .13);
  --sh-lg: 0 12px 48px rgba(27, 67, 50, .17);
  --sh-or: 0 6px 24px rgba(212, 172, 13, .28);
  --sh-wa: 0 8px 32px rgba(37, 211, 102, .35);

  /* ── Transitions ── */
  --t:     .22s cubic-bezier(.4, 0, .2, 1);

  /* ── Largeur max ── */
  --max:   1240px;
  --max-we: 1200px;
}

/* ─── 3. Typographie ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ft);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--g900);
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ─── 4. Layout utilitaires ─── */
.W  {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}

.W--we {
  max-width: var(--max-we);
  margin: 0 auto;
  padding: 0 2rem;
}

.section      { padding: 5rem 0; }
.section--sm  { padding: 3.5rem 0; }
.section--lg  { padding: 7rem 0; }

.text-center  { text-align: center; }
.text-left    { text-align: left; }

/* ─── 5. Boutons partagés ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1.5rem;
  border-radius: var(--r-max);
  font-family: var(--fb);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn--or {
  background: var(--or);
  color: var(--g900);
  box-shadow: var(--sh-or);
}
.btn--or:hover { background: var(--or-l); transform: translateY(-2px); }

.btn--vert {
  background: var(--vert);
  color: #fff;
}
.btn--vert:hover { background: var(--vert-2); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--g600);
  border: 1.5px solid var(--g200);
}
.btn--ghost:hover { border-color: var(--vert-bd); color: var(--vert); background: var(--vert-bg); }

.btn--wa {
  background: var(--wa);
  color: #fff;
  box-shadow: var(--sh-wa);
}
.btn--wa:hover { background: var(--wa-dark); transform: translateY(-2px); }

.btn--sm  { padding: .42rem .9rem;  font-size: .76rem; }
.btn--lg  { padding: .95rem 2rem;   font-size: .95rem; }
.btn--xl  { padding: 1.1rem 2.5rem; font-size: 1.05rem; }
.btn--fw  { width: 100%; }

/* ─── 6. Formulaires partagés ─── */
.form-field { display: flex; flex-direction: column; gap: .32rem; margin-bottom: 1rem; }

.form-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .45px;
  color: var(--g400);
}
.form-label .req { color: var(--red); }

.form-input {
  width: 100%;
  padding: .72rem 1rem;
  border: 1.5px solid var(--g100);
  border-radius: var(--r-sm);
  font-family: var(--fb);
  font-size: .88rem;
  color: var(--g900);
  background: var(--g50);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.form-input:focus {
  border-color: var(--vert-2);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, .09);
  background: #fff;
}

.form-alert {
  padding: .8rem 1rem;
  border-radius: var(--r-md);
  font-size: .82rem;
  display: none;
  line-height: 1.5;
}
.form-alert.show    { display: block; }
.form-alert--error  { background: #FDE8E8; color: #7B1D1D; border: 1px solid rgba(192,57,43,.2); }
.form-alert--success{ background: #D4EDDA; color: #155724; border: 1px solid rgba(40,167,69,.2); }
.form-alert--info   { background: #D1ECF1; color: #0C5460; border: 1px solid rgba(0,123,255,.2); }

/* ─── 7. Accessibilité ─── */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.screen-reader-text:focus {
  clip: auto;
  width: auto;
  height: auto;
  padding: .5rem 1rem;
  background: var(--vert);
  color: #fff;
  font-size: .875rem;
  z-index: 9999;
  top: .5rem;
  left: .5rem;
  border-radius: var(--r-sm);
}

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

/* ─── 8. Animations partagées ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.3); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes wa-ring {
  0%, 100% { transform: scale(1); opacity: .3; }
  50%       { transform: scale(1.22); opacity: 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* ─── 9. Media queries de base ─── */
@media (max-width: 768px) {
  .W, .W--we { padding: 0 1rem; }
  .section    { padding: 3.5rem 0; }
  .section--lg{ padding: 4rem 0; }
}
