/* ============================================================
   GS MKC - Feuille de style
   Palette inspirée du logo : bleu marine, rouge, blanc, bleu clair
   ============================================================ */

:root {
  --navy: #163a5f;
  --navy-dark: #0e2740;
  --navy-light: #2c5a8c;
  --blue-accent: #4a7db8;
  --red: #d21f2e;
  --red-dark: #a91821;
  --off-white: #f4f6f9;
  --white: #ffffff;
  --gray-text: #4a5568;
  --gray-border: #e2e6ec;
  --success: #1e8a4c;
  --warning: #c98a12;
  --shadow: 0 4px 16px rgba(14, 39, 64, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1c2b3a;
  background: var(--off-white);
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: "Georgia", "Times New Roman", serif; color: var(--navy-dark); margin-top: 0; }
a { color: var(--navy-light); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy-dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo-svg { width: 52px; height: 52px; flex-shrink: 0; }
.brand-text { line-height: 1.2; }
.brand-text strong { display: block; font-size: 1.05rem; font-family: Georgia, serif; }
.brand-text span { display: block; font-size: 0.72rem; color: #b9c8da; letter-spacing: 0.03em; }

nav.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav.main-nav a, nav.main-nav button.nav-link {
  color: #e4ecf5; background: none; border: none; cursor: pointer;
  padding: 8px 14px; border-radius: 6px; font-size: 0.93rem; font-weight: 500;
  transition: background 0.15s;
}
nav.main-nav a:hover, nav.main-nav button.nav-link:hover { background: rgba(255,255,255,0.1); }
nav.main-nav a.active, nav.main-nav button.nav-link.active { background: var(--red); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff;
  padding: 60px 0 70px;
}
.hero-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; }
.hero-text h1 { color: #fff; font-size: 2.3rem; margin-bottom: 12px; }
.hero-text p { color: #d7e2ef; font-size: 1.08rem; max-width: 520px; }
.hero-badge { flex: 0 0 auto; }
.hero-badge .logo-svg { width: 190px; height: 190px; }
.motto { display: inline-block; margin-top: 18px; padding: 8px 16px; background: var(--red); border-radius: 30px; font-weight: 600; letter-spacing: 0.02em; font-size: 0.9rem; }
.btn {
  display: inline-block; margin-top: 22px; background: var(--red); color: #fff;
  padding: 12px 26px; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--red-dark); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-secondary { background: var(--navy-light); }
.btn-small { padding: 6px 14px; font-size: 0.85rem; margin-top: 0; }
.btn-danger { background: var(--red); }

/* ---------- Sections ---------- */
main { min-height: 60vh; }
.page { padding: 50px 0; }
.block { padding: 50px 0; }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title h2 { font-size: 1.9rem; }
.section-title p { color: var(--gray-text); max-width: 640px; margin: 8px auto 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin: 40px 0; }
.stat-card { background: #fff; border-radius: 10px; padding: 22px; text-align: center; box-shadow: var(--shadow); }
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--red); font-family: Georgia, serif; }
.stat-card .label { color: var(--gray-text); font-size: 0.9rem; margin-top: 4px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: #fff; border-radius: 10px; padding: 24px; box-shadow: var(--shadow);
  border-top: 4px solid var(--navy-light);
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--gray-text); font-size: 0.94rem; }
.card.red-top { border-top-color: var(--red); }

.news-item { background: #fff; border-radius: 10px; padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 16px; display: flex; gap: 18px; align-items: baseline; }
.news-date { color: var(--red); font-weight: 700; white-space: nowrap; font-size: 0.85rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--gray-border); font-size: 0.92rem; }
th { background: var(--navy); color: #fff; font-weight: 600; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fbfd; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-success { background: #e1f4e9; color: var(--success); }
.badge-warning { background: #fbf0da; color: var(--warning); }
.badge-danger { background: #fbe2e4; color: var(--red-dark); }
.badge-info { background: #e3eaf3; color: var(--navy); }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: 10px; padding: 28px; box-shadow: var(--shadow); max-width: 460px; margin: 0 auto; }
.form-card.wide { max-width: 640px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-border); border-radius: 6px; background: #fbfcfd;
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 0.82rem; color: var(--gray-text); margin-top: 6px; }
.form-error { background: #fbe2e4; color: var(--red-dark); padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; margin-bottom: 12px; }
.demo-accounts { background: var(--off-white); border-radius: 8px; padding: 12px 16px; margin-top: 18px; font-size: 0.85rem; color: var(--gray-text); }
.demo-accounts code { background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--gray-border); }

/* ---------- Espace pro ---------- */
.espace-layout { display: flex; gap: 26px; align-items: flex-start; }
.espace-sidebar { flex: 0 0 220px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 10px; position: sticky; top: 90px; }
.espace-sidebar button {
  display: block; width: 100%; text-align: left; background: none; border: none; padding: 11px 14px;
  border-radius: 6px; cursor: pointer; font-size: 0.92rem; color: #2a3947; margin-bottom: 4px;
}
.espace-sidebar button:hover { background: var(--off-white); }
.espace-sidebar button.active { background: var(--navy); color: #fff; font-weight: 600; }
.espace-content { flex: 1; min-width: 0; }
.espace-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.pill-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.pill-tabs button { border: 1px solid var(--gray-border); background: #fff; padding: 7px 16px; border-radius: 20px; cursor: pointer; font-size: 0.88rem; }
.pill-tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.action-icons button { background: none; border: none; cursor: pointer; font-size: 1rem; margin-right: 6px; padding: 4px 6px; border-radius: 4px; }
.action-icons button:hover { background: var(--off-white); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(14,39,64,0.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal-box { background: #fff; border-radius: 10px; padding: 26px; max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto; }
.modal-box h3 { margin-bottom: 16px; }
.modal-close-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--gray-text); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-dark); color: #cbd8e6; padding: 34px 0 20px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 10px; }
.footer-col p, .footer-col a { color: #b9c8da; font-size: 0.88rem; display: block; margin-bottom: 6px; }
.footer-bottom { text-align: center; font-size: 0.8rem; color: #8fa2b8; margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 780px) {
  .espace-layout { flex-direction: column; }
  .espace-sidebar { position: static; width: 100%; display: flex; overflow-x: auto; }
  .espace-sidebar button { white-space: nowrap; }
  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .header-inner { flex-direction: column; gap: 10px; }
}
