/* ============================================================
   CEEM V2 — Design System & Global Styles
   Cabinet d'Études et d'Expertise Marketing
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Design Tokens ── */
:root {
  --navy:         #1D3A6E;
  --navy-dark:    #122554;
  --navy-light:   #2A4F96;
  --navy-faint:   #EEF2FA;
  --orange:       #F5A020;
  --orange-dark:  #D4840A;
  --orange-light: #FFB84D;
  --orange-faint: #FFF5E6;
  --white:        #FFFFFF;
  --off-white:    #F8F7F4;
  --gray-50:      #FAFAF8;
  --gray-100:     #F1EFE9;
  --gray-200:     #E4E1D8;
  --gray-400:     #A8A49A;
  --gray-600:     #6B6760;
  --gray-800:     #2E2C28;
  --text:         #1A1917;
  --success:      #22A366;
  --error:        #E24B4A;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --r-sm: 6px;  --r-md: 12px;
  --r-lg: 20px; --r-xl: 32px;

  --sh-sm: 0 2px 8px rgba(29,58,110,0.07);
  --sh-md: 0 8px 32px rgba(29,58,110,0.11);
  --sh-lg: 0 24px 64px rgba(29,58,110,0.16);
  --sh-xl: 0 40px 100px rgba(29,58,110,0.22);

  --nav-h: 72px;
  --max-w: 1180px;
  --ease-out: cubic-bezier(0.22,1,0.36,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; }

/* ── Layout ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-lg { padding: 128px 0; }

/* ── Typography ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: ''; display: inline-block;
  width: 28px; height: 2px;
  background: var(--orange); border-radius: 2px; flex-shrink: 0;
}
.eyebrow.light { color: var(--orange-light); }
.eyebrow.light::before { background: var(--orange-light); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 700; color: var(--navy-dark);
  line-height: 1.15; margin-top: 14px;
}
.section-title.light { color: var(--white); }
.section-title em { font-style: italic; color: var(--orange); }

.section-sub {
  font-size: 16px; color: var(--gray-600);
  line-height: 1.8; max-width: 540px; margin-top: 18px;
}
.section-sub.light { color: rgba(255,255,255,0.6); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; font-size: 14px; font-weight: 600;
  letter-spacing: 0.03em; border-radius: var(--r-sm);
  transition: all 0.22s var(--ease-out);
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--orange); color: var(--white); border: 2px solid var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,160,32,0.38); }
.btn-navy { background: var(--navy-dark); color: var(--white); border: 2px solid var(--navy-dark); }
.btn-navy:hover { background: var(--navy-light); border-color: var(--navy-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29,58,110,0.3); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.8); transform: translateY(-2px); }
.btn-sm { padding: 9px 20px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ── Cards ── */
.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; border-radius: 100px;
}
.badge-orange { background: var(--orange-faint); color: var(--orange-dark); border: 1px solid rgba(245,160,32,0.25); }
.badge-navy   { background: var(--navy-faint);   color: var(--navy);        border: 1px solid rgba(29,58,110,0.15); }
.badge-green  { background: rgba(34,163,102,0.1); color: var(--success);   border: 1px solid rgba(34,163,102,0.2); }
.badge-gray   { background: var(--gray-100);      color: var(--gray-600);  border: 1px solid var(--gray-200); }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--gray-800); letter-spacing: 0.02em; margin-bottom: 8px;
}
.form-group label .req { color: var(--orange); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 16px; font-size: 14px;
  color: var(--text); background: var(--off-white);
  border: 1.5px solid var(--gray-200); border-radius: var(--r-sm);
  outline: none; transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.form-control:focus { border-color: var(--navy); background: var(--white); box-shadow: 0 0 0 3px rgba(29,58,110,0.08); }
.form-control.is-error { border-color: var(--error); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* File upload */
.file-drop {
  border: 2px dashed var(--gray-200); border-radius: var(--r-md);
  padding: 28px 20px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--gray-50); position: relative;
}
.file-drop:hover, .file-drop.drag { border-color: var(--navy); background: var(--navy-faint); }
.file-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-drop-icon { color: var(--gray-400); margin: 0 auto 10px; }
.file-drop p { font-size: 14px; color: var(--gray-600); }
.file-drop small { font-size: 12px; color: var(--gray-400); }
.file-chosen { margin-top: 8px; font-size: 13px; color: var(--navy); font-weight: 500; display: none; }

/* ── Navbar ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 999; height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.25s;
}
#navbar.scrolled { box-shadow: var(--sh-md); }
.nav-inner {
  height: var(--nav-h); display: flex;
  align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo img { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 13px; font-size: 14px; font-weight: 500;
  color: var(--gray-600); border-radius: var(--r-sm);
  transition: all 0.18s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: 3px; left: 13px; right: 13px; height: 2px;
  background: var(--orange); border-radius: 2px;
  transform: scaleX(0); transition: transform 0.2s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); background: var(--gray-100); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-cta { margin-left: 10px; flex-shrink: 0; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: var(--r-sm); background: var(--gray-100);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px; transition: all 0.25s var(--ease-out);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 16px 24px 28px; z-index: 998;
  box-shadow: var(--sh-lg); flex-direction: column; gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 16px; font-size: 15px; font-weight: 500;
  color: var(--gray-800); border-radius: var(--r-sm); transition: background 0.15s;
}
.mobile-menu a:hover { background: var(--gray-100); color: var(--navy); }
.mobile-menu .btn { margin-top: 10px; justify-content: center; }

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding-top: calc(var(--nav-h) + 72px); padding-bottom: 72px;
  background: var(--navy-dark); position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg,rgba(255,255,255,0.02) 0,rgba(255,255,255,0.02) 1px,transparent 1px,transparent 64px),
    repeating-linear-gradient(90deg,rgba(255,255,255,0.02) 0,rgba(255,255,255,0.02) 1px,transparent 1px,transparent 64px);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px); font-weight: 700;
  color: var(--white); line-height: 1.1;
  margin-top: 16px; margin-bottom: 18px;
}
.page-hero-title em { font-style: italic; color: var(--orange-light); }
.page-hero-sub { font-size: 17px; color: rgba(255,255,255,0.6); line-height: 1.75; max-width: 560px; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 24px;
}
.breadcrumb a { color: rgba(255,255,255,0.55); transition: color 0.18s; }
.breadcrumb a:hover { color: var(--orange-light); }

/* ── Footer ── */
footer { background: #0A1628; padding: 64px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 32px;
}
.footer-brand img { height: 48px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.4); line-height: 1.75; max-width: 280px; }
.footer-col h5 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.45); transition: color 0.18s; }
.footer-col ul li a:hover { color: var(--white); }

.footer-newsletter { margin-top: 16px; }
.footer-newsletter p { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1; padding: 10px 14px; font-size: 13px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm); color: var(--white); outline: none; transition: border-color 0.18s;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-form input:focus { border-color: var(--orange); }
.newsletter-form button {
  padding: 10px 16px; background: var(--orange); color: var(--white);
  border-radius: var(--r-sm); font-size: 13px; font-weight: 600; transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--orange-dark); }

.footer-bottom {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.28); }
.footer-bottom a { color: rgba(255,255,255,0.28); transition: color 0.18s; }
.footer-bottom a:hover { color: var(--orange); }

/* ── Reveal animation ── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ── Search bar ── */
.search-bar {
  display: flex; align-items: center;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--r-sm); overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-bar:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29,58,110,0.08); }
.search-bar svg { flex-shrink: 0; color: var(--gray-400); margin: 0 12px; }
.search-bar input {
  flex: 1; border: none; outline: none;
  font-size: 14px; padding: 12px 0;
  background: transparent; color: var(--text);
}
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar button {
  padding: 0 20px; min-height: 46px;
  background: var(--navy); color: var(--white);
  font-size: 13px; font-weight: 600;
  border-left: 1px solid var(--gray-200); transition: background 0.2s;
}
.search-bar button:hover { background: var(--navy-light); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--navy-dark); color: var(--white);
  padding: 16px 24px; border-radius: var(--r-md);
  box-shadow: var(--sh-xl); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 12px;
  z-index: 9999; transform: translateY(80px); opacity: 0;
  transition: all 0.4s var(--ease-out); max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--error); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 72px 24px; }
.empty-state svg { color: var(--gray-200); margin: 0 auto 20px; }
.empty-state h4 { font-size: 18px; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--gray-600); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 56px; }
.page-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--gray-200); color: var(--gray-600);
  cursor: pointer; transition: all 0.18s; background: var(--white);
}
.page-btn:hover { border-color: var(--navy); color: var(--navy); background: var(--navy-faint); }
.page-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Utilities ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }

/* ── Responsive ── */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 48px; }
}
