/* Employeur.ma — Tech Isométrique Bleu — style.css */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Variables pilotees par le Customizer Astra (Apparence > Personnaliser > Couleurs globales).
     Fallback sur la couleur originale du Design System si l'utilisateur n'a rien change. */
  --primary: var(--ast-global-color-0, #1E40AF);
  --primary-dark: #0F2C7B;
  --accent: var(--ast-global-color-1, #2EB1FF);
  --accent-soft: #CFEBFF;
  --bg: var(--ast-global-color-5, #F0F9FF);
  --surface: #FFFFFF;
  --text: var(--ast-global-color-3, #0A2540);
  --text-soft: #5A6A85;
  --line: #D5E0F0;
  --shadow-sm: 0 1px 3px rgba(10,37,64,.06);
  --shadow-md: 0 6px 24px rgba(10,37,64,.08);
  --shadow-lg: 0 18px 48px rgba(10,37,64,.12);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1200px;
  --transition: cubic-bezier(.2,.7,.3,1) .35s;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5 {
  font-family: 'Sora', sans-serif;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.eyebrow {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* === HEADER (logo-center-menu-split) === */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-top {
  text-align: center;
  padding: 18px 24px 12px;
}
.header-top .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.header-top .brand img { width: 44px; height: 44px; }
.header-top .brand .brand-name {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}
.header-top .brand .brand-tag {
  display: block;
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 2px;
}
.header-bar {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.header-nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-list a {
  display: inline-block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--text);
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-list a:hover, .nav-list a.is-current {
  background: var(--accent-soft);
  color: var(--primary-dark);
}
.nav-cta { white-space: nowrap; }

.burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 22px; height: 2px;
  background: var(--text); transition: transform var(--transition);
}
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* === BUTTONS + ANIMATIONS (CTA/CTR/CTO) === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  padding: 13px 22px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--primary-dark);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary, .btn--cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover, .btn--cta:hover { color: #fff; box-shadow: var(--shadow-lg); }
.btn--ghost {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn--ghost:hover { background: var(--primary); color: #fff; }

/* CTA animation: progress_bar_cta — a sliding bar that fills under text on hover */
.btn--cta::after {
  content: '';
  position: absolute; left: 0; bottom: 0; height: 3px;
  width: 0%;
  background: rgba(255,255,255,.9);
  transition: width 1.2s cubic-bezier(.2,.7,.3,1);
}
.btn--cta:hover::after { width: 100%; }
.btn--cta::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .9s;
}
.btn--cta:hover::before { transform: translateX(100%); }

/* CTR animation: animated_stats_grid — counter-like pulse on the arrow */
.btn--ctr {
  background: transparent;
  color: var(--primary);
  padding: 8px 0;
  font-weight: 600;
  font-size: .92rem;
  border-radius: 0;
  border: 0;
  min-height: 0;
}
.btn--ctr::after {
  content: '';
  display: inline-block;
  width: 18px; height: 2px;
  background: currentColor;
  margin-left: 8px;
  transition: width var(--transition);
  vertical-align: middle;
}
.btn--ctr:hover { color: var(--accent); }
.btn--ctr:hover::after { width: 32px; }
.card:hover .btn--ctr::after { width: 28px; }

/* CTO animation: spin_wheel_popup — applies to popup entry rotation */
.cto-trigger {
  display: inline-flex;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  border: 0;
}

/* === HERO (quote-hero) === */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--line);
}
.hero-quote {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 56px;
  align-items: center;
}
.hero-quote .portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  background: var(--accent-soft);
}
.hero-quote .portrait img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-quote .portrait::after {
  content: '';
  position: absolute; inset: 0;
  border: 4px solid var(--surface);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.hero-quote blockquote {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--text);
  position: relative;
  padding-left: 28px;
  border-left: 4px solid var(--accent);
}
.hero-quote blockquote::before {
  content: '“';
  font-family: 'Sora', serif;
  position: absolute;
  left: -8px; top: -32px;
  font-size: 6rem;
  color: var(--accent-soft);
  line-height: 1;
  font-weight: 800;
}
.hero-quote cite {
  display: block;
  margin-top: 28px;
  font-style: normal;
  font-size: 1rem;
  color: var(--text-soft);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
}
.hero-quote cite strong { color: var(--text); font-weight: 700; }
.hero-quote .hero-actions { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }

/* === GRIDS === */
.grid-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.cat-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.cat-card .thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.cat-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s;
}
.cat-card:hover .thumb img { transform: scale(1.05); }
.cat-card .body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.cat-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.cat-card p { font-size: .94rem; color: var(--text-soft); margin: 0 0 16px; flex: 1; }
.cat-card a.cover { color: inherit; display: contents; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card a { color: inherit; display: contents; }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card .card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.05rem; margin: 6px 0 10px; }
.card p { font-size: .9rem; color: var(--text-soft); margin: 0 0 14px; flex: 1; }
.card .card-cats {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); font-weight: 700; margin: 0;
}
.card-read { margin-top: auto; }
.loading { color: var(--text-soft); font-style: italic; }

/* === ABOUT SECTION === */
.about-block {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
}
.about-block .portrait {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-md);
}
.about-block .portrait img { width: 100%; height: 100%; object-fit: cover; }

/* === LONG-FORM EDITORIAL SECTIONS === */
.prose {
  font-size: 1.04rem;
  color: var(--text);
  line-height: 1.75;
}
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; font-size: 1.15rem; }
.prose p { margin: 0 0 1.1em; color: var(--text); }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose ul li { margin-bottom: .4em; }

/* === BREADCRUMB === */
.breadcrumb {
  font-size: .85rem;
  color: var(--text-soft);
  padding: 18px 0 0;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }

/* === CATEGORY HERO === */
.cat-hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.cat-hero .bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.cat-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.cat-hero .bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,.55) 0%, rgba(10,37,64,.85) 100%);
}
.cat-hero .inner {
  position: relative; z-index: 1;
  padding: 80px 0 64px;
  color: #fff;
  text-align: center;
}
.cat-hero .inner h1 { color: #fff; max-width: 760px; margin: 8px auto 14px; }
.cat-hero .inner p { color: rgba(255,255,255,.85); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }
.cat-hero .eyebrow { color: var(--accent-soft); }

/* === FOOTER === */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.78);
  padding: 64px 0 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 36px;
}
.site-footer h4 {
  color: #fff;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 18px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.78); transition: color .2s; }
.site-footer a:hover { color: var(--accent); }
.social-list { display: flex; gap: 12px; flex-wrap: wrap; }
.social-list a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 600;
}
.social-list a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  margin-top: 48px;
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* === POPUP NEWSLETTER (CTO disabled here — popup defined for completeness) === */
/* Intentionally not auto-triggered — see Phase config (POPUP_ENABLED=no) */

/* === MOUSE EFFECT: link_hover_soft_glow === */
@media (hover: hover) {
  a, button, .card, .cat-card {
    position: relative;
  }
  .glow-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 220px; height: 220px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, rgba(46,177,255,.18) 0%, rgba(46,177,255,0) 70%);
    transform: translate(-50%, -50%);
    transition: opacity .25s;
    mix-blend-mode: screen;
    opacity: 0;
  }
  .glow-cursor.active { opacity: 1; }
  a:hover, button:hover, .card:hover, .cat-card:hover {
    box-shadow: 0 0 0 1px var(--accent-soft), 0 8px 28px rgba(46,177,255,.15);
  }
}
@media (hover: none) {
  .glow-cursor { display: none; }
}

/* === TOOLS === */
.tool-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin: 32px 0;
}
.tool-wrap label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .95rem;
}
.tool-wrap input, .tool-wrap select, .tool-wrap textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 18px;
}
.tool-wrap input:focus, .tool-wrap select:focus, .tool-wrap textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.tool-result {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 18px;
  border-left: 4px solid var(--accent);
}
.tool-result h3 { color: var(--primary-dark); margin-top: 0; }
.quiz-q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.quiz-q:last-of-type { border-bottom: 0; }
.quiz-q p { font-weight: 600; margin: 0 0 10px; }
.quiz-q .opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-q .opts label {
  display: flex; align-items: flex-start; gap: 10px;
  font-weight: 400; cursor: pointer; padding: 8px 12px;
  border-radius: 8px; transition: background .2s;
}
.quiz-q .opts label:hover { background: var(--bg); }

/* === JOTFORM WRAPPER === */
.jotform-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin: 32px 0;
}

/* === STATS GRID (animated for CTR area) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin: 48px 0;
}
.stat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat .num {
  font-family: 'Sora', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
}
.stat .label { font-size: .85rem; color: var(--text-soft); margin-top: 8px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero-quote { grid-template-columns: 240px 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-block { grid-template-columns: 260px 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .header-top { padding: 14px 16px 10px; }
  .header-nav { padding: 8px 16px; }
  .nav-list {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    flex-direction: column;
    padding: 14px 16px 22px;
    gap: 0;
    box-shadow: var(--shadow-md);
    max-height: 80vh;
    overflow-y: auto;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 14px 12px; border-radius: 8px; display: block; }
  .nav-cta { margin: 8px 0 0; }
  .burger { display: inline-flex; }
  .header-bar { position: relative; }
  .header-top .brand .brand-name { font-size: 1.15rem; }
  .hero-quote {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 28px;
  }
  .hero-quote .portrait { max-width: 260px; }
  .hero-quote blockquote { font-size: 1.4rem; padding-left: 18px; }
  .about-block { grid-template-columns: 1fr; gap: 24px; }
  .about-block .portrait { max-width: 280px; margin: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-cats, .article-grid { grid-template-columns: 1fr; }
  .cat-hero .inner { padding: 56px 0 44px; }
  .tool-wrap { padding: 24px 18px; }
}
@media (max-width: 480px) {
  .hero { padding: 56px 0 64px; }
  .hero-quote blockquote { font-size: 1.25rem; }
  h1 { font-size: 1.8rem; }
}

/* === A11Y === */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* Bridge Customizer v3 -> variables CSS v2 */
:root {
    --primary:   var(--rp-primary,   #1E40AF);
    --accent:    var(--rp-accent,    #F59E0B);
    --text:      var(--rp-text,      #0F172A);
    --text-soft: var(--rp-text-soft, #64748B);
    --bg:        var(--rp-bg,        #FFFFFF);
    --surface:   var(--rp-surface,   #F8FAFC);
    --line:      var(--rp-line,      #E2E8F0);
}
