/* =============================================================
   ETS ALL IN ONE — design system
   Palette : navy #0F4763 (marque), magenta #BD499F, orange #FFB000,
             vert #34A93D, bleu #3F6FD6, ink #16252e, paper #fff
   Type    : Space Grotesk (display) / Inter (texte)
   ============================================================= */

:root {
  --navy: #0F4763;
  --navy-deep: #0B3146;
  --magenta: #BD499F;
  --orange: #FFB000;
  --green: #34A93D;
  --blue: #3F6FD6;
  --ink: #16252e;
  --muted: #5b6b74;
  --paper: #ffffff;
  --paper-dim: #f4f7f9;
  --line: #e6ecef;
  --white: #ffffff;
  --radius: 16px;
  --max-width: 1160px;
  --shadow-lg: 0 24px 60px -20px rgba(15, 71, 99, 0.28);
  --shadow-sm: 0 8px 20px -12px rgba(15, 71, 99, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--magenta);
  display: inline-block;
  margin-bottom: 0.8em;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.ribbon {
  height: 6px; width: 100%;
  background: linear-gradient(90deg, var(--orange) 0 25%, var(--green) 25% 50%, var(--blue) 50% 75%, var(--magenta) 75% 100%);
}

/* ---------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem;
  padding: 0.85em 1.6em; border: none; border-radius: 999px; cursor: pointer;
  text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary { background: var(--magenta); color: white; box-shadow: 0 10px 22px -10px rgba(189,73,159,0.65); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(189,73,159,0.7); }
.btn-outline { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-outline-navy { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-outline-navy:hover { border-color: var(--navy); background: var(--paper-dim); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 0.5em 1.1em; font-size: 0.82rem; }
.btn-danger { background: #b7412f; color: white; }

/* ---------------------------------------------------------- Header */
.site-header {
  background: rgba(255,255,255,0.94); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--navy); font-size: 0.94rem; font-weight: 500; position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--magenta); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--magenta); }
.nav-toggle { display: none; }

.lang-switch-link {
  border: 1.5px solid var(--line) !important;
  border-radius: 999px;
  padding: 4px 12px !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  color: var(--navy) !important;
}
.lang-switch-link:hover { border-color: var(--magenta) !important; }
.lang-switch-link.active::after { display: none; }

@media (max-width: 780px) {
  .nav-links {
    position: fixed; inset: 78px 0 0 0; background: white; flex-direction: column;
    justify-content: flex-start; padding: 32px 24px; gap: 22px;
    transform: translateX(100%); transition: transform 0.25s ease; border-top: 1px solid var(--line);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: inline-flex; background: none; border: none; color: var(--navy); font-size: 1.6rem; cursor: pointer; }
}

/* ---------------------------------------------------------- Hero */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: white; padding: 90px 0 70px; position: relative; overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { color: white; }
.hero p.lead { color: rgba(255,255,255,0.85); font-size: 1.08rem; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; } .hero-visual { order: -1; } }

.hero-visual svg { width: 100%; height: auto; }

/* ---------------------------------------------------------- Sections */
.section { padding: 76px 0; }
.section-dim { background: var(--paper-dim); }
.section-navy { background: var(--navy); color: white; }
.section-navy h2 { color: white; }
.section-navy p { color: rgba(255,255,255,0.8); }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------------------------------------------------------- Domain cards */
.domain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1000px) { .domain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .domain-grid { grid-template-columns: 1fr; } }

.domain-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 4px solid var(--c, var(--magenta));
}
.domain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.domain-num {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.78rem;
  color: var(--c, var(--magenta)); letter-spacing: 0.1em;
}
.domain-icon {
  width: 42px; height: 42px; margin: 14px 0; color: var(--c, var(--magenta));
}
.domain-card h3 { margin-bottom: 8px; }
.domain-card p { font-size: 0.92rem; margin-bottom: 14px; }
.domain-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.domain-tags li { font-size: 0.84rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.domain-tags li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--magenta)); flex-shrink: 0; }

/* ---------------------------------------------------------- Formations / pricing */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.fbtn {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.86rem;
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: white; color: var(--navy); cursor: pointer;
}
.fbtn.active, .fbtn:hover { background: var(--navy); color: white; border-color: var(--navy); }

.dom-block { margin-bottom: 46px; }
.dom-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dom-bar .pill { width: 10px; height: 10px; border-radius: 50%; }
.dom-bar h2 { margin: 0; font-size: 1.3rem; }
.dom-bar .ln { flex: 1; height: 1px; background: var(--line); }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .price-grid { grid-template-columns: 1fr; } }

.price-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; border-top: 3px solid var(--c, var(--magenta));
}
.price-card h3 { font-size: 1.02rem; margin-bottom: 10px; }
.pc-price { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--navy); margin-bottom: 14px; }
.pc-price small { font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.pc-meta { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.pc-meta li { font-size: 0.84rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pc-meta svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--c, var(--magenta)); }

/* ---------------------------------------------------------- Feature list */
.feature-list { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .feature-list { grid-template-columns: 1fr; } }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item .dot { width: 8px; height: 8px; background: var(--magenta); border-radius: 50%; margin-top: 8px; flex-shrink: 0; }
.feature-item strong { display: block; color: var(--navy); font-family: 'Space Grotesk', sans-serif; margin-bottom: 2px; }
.feature-item p { margin: 0; font-size: 0.92rem; }

/* ---------------------------------------------------------- Quote */
.quote-block {
  background: var(--paper-dim); border-radius: var(--radius); padding: 34px 32px;
  border-left: 4px solid var(--magenta);
}
.quote-block p { font-size: 1.08rem; color: var(--ink); font-style: italic; margin-bottom: 16px; }
.quote-author { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.quote-author span { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

/* ---------------------------------------------------------- Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.contact-card .k { font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; color: var(--magenta); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 4px; }
.contact-card .v { color: var(--navy); font-weight: 600; }

form .field { margin-bottom: 18px; }
form label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-family: 'Space Grotesk', sans-serif; }
form input, form textarea, form select {
  width: 100%; padding: 0.75em 0.9em; border: 1.5px solid var(--line); background: white;
  font-family: inherit; font-size: 0.95rem; border-radius: 10px; color: var(--ink);
}
form input:focus, form textarea:focus, form select:focus { border-color: var(--navy); outline: none; }
form textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.alert { padding: 14px 18px; border-left: 3px solid var(--navy); background: var(--paper-dim); font-size: 0.9rem; margin-bottom: 22px; border-radius: 8px; }
.alert-success { border-color: #1c7a4d; background: #eaf7ee; color: #1c5c39; }
.alert-error { border-color: #b7412f; background: #fbeae7; color: #8a2f1f; }

/* ---------------------------------------------------------- Footer */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.75); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: white; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: 0.9rem; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: rgba(255,255,255,0.5); }

/* ---------------------------------------------------------- About page */
.legal-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.legal-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.legal-table td:first-child { color: var(--navy); font-weight: 600; width: 40%; }

/* ---------------------------------------------------------- Admin (reprend la structure KB Services) */
.admin-body { background: var(--paper-dim); min-height: 100vh; }
.admin-shell { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-topbar { background: var(--navy); color: white; padding: 18px 0; margin-bottom: 36px; }
.admin-topbar .container { display: flex; justify-content: space-between; align-items: center; }
.admin-topbar strong { font-family: 'Space Grotesk', sans-serif; }
@media (max-width: 640px) {
  .admin-topbar .container { flex-direction: column; align-items: flex-start; gap: 12px; }
  .admin-shell { padding-left: 16px; padding-right: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .msg-actions { flex-direction: column; align-items: stretch; }
  .msg-actions .btn, .msg-actions form { width: 100%; }
}
.login-shell { max-width: 400px; margin: 90px auto; background: white; padding: 40px 32px; border-radius: var(--radius); border: 1px solid var(--line); }
.login-shell h1 { font-size: 1.5rem; text-align: center; }
.login-shell .sub { text-align: center; font-size: 0.86rem; margin-bottom: 26px; }

.admin-card { background: white; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 22px; overflow: hidden; }
.admin-card-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.admin-card-head h2 { font-size: 1.05rem; margin: 0; }
.badge { background: var(--orange); color: var(--navy-deep); font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.msg-row { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.msg-row:last-child { border-bottom: none; }
.msg-row.unread { background: #fff9ec; }
.msg-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.msg-top strong { color: var(--navy); }
.msg-meta { font-size: 0.76rem; color: var(--muted); }
.msg-subject { font-weight: 600; color: var(--blue); margin-bottom: 6px; font-size: 0.92rem; }
.msg-body { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; white-space: pre-wrap; }
.msg-actions { display: flex; gap: 10px; }
.empty-state { padding: 40px 22px; text-align: center; color: var(--muted); font-size: 0.92rem; }

.domain-edit, .course-edit { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.domain-edit:last-child, .course-edit:last-child { border-bottom: none; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.checkbox-row input { width: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.stat-card .n { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-card .l { font-size: 0.76rem; color: var(--muted); margin-top: 6px; }

.admin-subnav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-subnav a { font-size: 0.84rem; padding: 7px 14px; border: 1px solid var(--line); background: white; color: var(--navy); border-radius: 8px; }
.admin-subnav a.active { background: var(--navy); color: white; border-color: var(--navy); }

.page-hero { background: var(--navy); color: white; padding: 64px 0 50px; }
.page-hero h1 { color: white; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0; }

.not-found { text-align: center; padding: 120px 24px; }
.not-found .code { font-family: 'Space Grotesk', sans-serif; font-size: 5rem; color: var(--navy); font-weight: 700; }
