/* KTO — the homepage design system, reusable on standalone pages
 * -------------------------------------------------------------
 * index.html carries its whole look in an inline <style>, so any page built on
 * the plain "SEO template" (small blue uppercase h2s, black CTA box) looked
 * like a different site. This file lifts the parts that are not homepage-
 * specific — section rhythm, the label/title pair, the two buttons, the card
 * grid, the stat band, the scroll reveal — so a content page can be built from
 * the same components.
 *
 * Values are copied from index.html deliberately; if the homepage's look
 * changes, change it there and mirror it here.
 * Used by: programme-fidelite.html, parrainage.html (+ /ar/ mirrors).
 */

/* The SEO template these pages are built on caps <main> at ~880px and pads it.
   A homepage-themed page runs full-bleed and lets each section own its padding. */
main.kt-main { max-width: none; width: 100%; margin: 0; padding: 0; }

/* ===== SECTION RHYTHM ===== */
.kt-main section { padding: 96px 80px; position: relative; z-index: 2; }
/* Sections stay full-bleed so their backgrounds run edge to edge, but their
   CONTENT is a centred column — without this the text hugs the left edge and
   leaves half the screen empty on a wide monitor. */
.kt-main section > * { max-width: 1280px; margin-inline: auto; }
.kt-main section.kt-tight { padding-top: 0; }
.kt-main section.kt-gray { background: var(--gray-100, #f4f4f4); }

.kt-main .section-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--kto-blue, #1a6fb8); font-weight: 500; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.kt-main .section-label::after {
  content: ''; height: 1px; width: 40px; background: var(--kto-blue, #1a6fb8);
}
.kt-main .section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 600; line-height: 1.1; margin-bottom: 16px;
}
.kt-main .section-title em { font-style: italic; color: var(--kto-blue, #1a6fb8); }
.kt-main .section-subtitle {
  font-size: 15px; color: var(--gray-600, #555); line-height: 1.7; max-width: 560px;
}
.kt-main .section-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 52px; gap: 40px; flex-wrap: wrap;
}
/* Centered variant — the homepage newsletter band uses this treatment. */
.kt-main .kt-center { text-align: center; }
.kt-main .kt-center .section-label { justify-content: center; }
.kt-main .kt-center .section-label::after { display: none; }
.kt-main .kt-center .section-label::before {
  content: ''; height: 1px; width: 40px; background: var(--kto-blue, #1a6fb8);
}
.kt-main .kt-center .section-subtitle { margin-inline: auto; }

/* ===== OPENING SECTION = THE HERO =====
 * Same dark gradient band as partenaires.html and the content pages, so every
 * page in the set opens the same way. These sections are already full-bleed,
 * so no rounding is needed here. */
.kt-main > section:first-of-type {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: #fff;
  padding-block: clamp(64px, 7vw, 108px);
}
.kt-main > section:first-of-type::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 22% 30%, rgba(43,143,212,0.26) 0%, transparent 58%),
    radial-gradient(circle at 82% 78%, rgba(201,169,97,0.16) 0%, transparent 55%);
}
.kt-main > section:first-of-type { text-align: center; }
.kt-main > section:first-of-type .section-label {
  color: rgba(255,255,255,0.6);
  justify-content: center;
}
.kt-main > section:first-of-type .section-label::after { background: rgba(255,255,255,0.4); }
.kt-main > section:first-of-type .section-label::before {
  content: '';
  height: 1px;
  width: 40px;
  background: rgba(255,255,255,0.4);
}
.kt-main > section:first-of-type .section-subtitle { margin-inline: auto; }
.kt-main > section:first-of-type .kt-actions { justify-content: center; }
.kt-main > section:first-of-type .section-header { justify-content: center; }
.kt-main > section:first-of-type .section-title { color: #fff; }
.kt-main > section:first-of-type .section-title em {
  font-family: 'Montserrat', serif;
  font-weight: 400;
  color: var(--gold, #c9a961);
}
.kt-main > section:first-of-type .section-subtitle { color: rgba(255,255,255,0.78); }
.kt-main > section:first-of-type .section-subtitle strong { color: #fff; }
.kt-main > section:first-of-type .section-header { margin-bottom: 0; }
/* On the dark band the outline button needs white edges, not black. */
.kt-main > section:first-of-type .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.kt-main > section:first-of-type .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}
.kt-main > section:first-of-type .btn-primary {
  background: var(--kto-blue, #1a6fb8);
}
.kt-main > section:first-of-type .btn-primary:hover { background: #1f6fa8; }

/* The stat band sits directly under the hero — no gap. */
.kt-main > section.kt-tight { padding-top: clamp(40px, 4vw, 64px); }

/* ===== BUTTONS (identical to the homepage's) ===== */
.kt-main .btn-primary,
.kt-main .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  border-radius: 8px; cursor: pointer; text-decoration: none;
}
.kt-main .btn-primary {
  padding: 16px 24px; background: var(--black, #0a0a0a); color: var(--white, #fafafa);
  border: none; transition: background 0.2s;
}
.kt-main .btn-primary:hover { background: #333; }
.kt-main .btn-outline {
  padding: 15px 24px; background: var(--white, #fafafa); color: var(--black, #0a0a0a);
  border: 1.5px solid var(--black, #0a0a0a); transition: all 0.2s;
}
.kt-main .btn-outline:hover { background: var(--gray-100, #f4f4f4); }
.kt-main .btn-wa { background: #25d366; color: #fff; border: none; padding: 16px 24px; }
.kt-main .btn-wa:hover { background: #1da851; }
.kt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.kt-main .kt-center .kt-actions { justify-content: center; }

/* ===== CARD GRID (the homepage "Services KTO" card) ===== */
.kt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.kt-card {
  display: block; background: var(--white, #fafafa);
  border: 1px solid var(--gray-200, #e8e8e8); border-radius: 18px;
  padding: 40px 36px; text-decoration: none; color: inherit;
  transition: transform .3s cubic-bezier(0.4,0,0.2,1), box-shadow .3s ease, border-color .3s ease;
}
a.kt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(26,111,184,0.14);
  border-color: var(--kto-blue, #1a6fb8);
}
.kt-card-icon { width: 56px; height: 56px; margin-bottom: 20px; color: var(--kto-blue, #1a6fb8); }
.kt-card-icon svg { width: 100%; height: 100%; }
.kt-badge {
  display: inline-block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 600; color: var(--kto-blue, #1a6fb8); background: #eff6ff;
  padding: 6px 12px; border-radius: 20px; margin-bottom: 16px;
}
.kt-card h3 { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.kt-card p { font-size: 14.5px; color: var(--gray-600, #555); line-height: 1.7; margin-bottom: 0; }
.kt-card p + p { margin-top: 12px; }
.kt-card-cta {
  display: inline-block; margin-top: 20px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  color: var(--black, #0a0a0a); border-bottom: 1.5px solid var(--black, #0a0a0a); padding-bottom: 2px;
}
a.kt-card:hover .kt-card-cta { color: var(--kto-blue, #1a6fb8); border-color: var(--kto-blue, #1a6fb8); }

/* ===== STAT BAND (the homepage "L'excellence KTO" grid) ===== */
.kt-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--gray-200, #e8e8e8); border: 1px solid var(--gray-200, #e8e8e8);
}
.kt-stat { background: var(--white, #fafafa); padding: 48px 32px; text-align: center; transition: background .2s ease; }
.kt-stat:hover { background: var(--gray-100, #f4f4f4); }
.kt-stat b {
  display: block; font-family: 'Montserrat', sans-serif;
  font-size: 40px; font-weight: 700; line-height: 1; color: var(--kto-blue, #1a6fb8);
  letter-spacing: -1px; margin-bottom: 12px;
}
.kt-stat span { display: block; font-size: 13px; color: var(--gray-600, #555); line-height: 1.7; }

/* ===== NUMBERED STEPS ===== */
.kt-steps { list-style: none; counter-reset: ktstep; padding: 0; margin: 0; display: grid; gap: 22px; }
.kt-step {
  counter-increment: ktstep; position: relative;
  padding-inline-start: 62px; min-height: 44px;
  font-size: 16px; color: var(--gray-600, #555); line-height: 1.75;
}
.kt-step::before {
  content: counter(ktstep);
  position: absolute; inset-inline-start: 0; top: -2px;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #1a6fb8 0%, #2b8fd4 100%); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-size: 17px; font-weight: 600;
}
.kt-step strong { color: var(--black, #0a0a0a); font-weight: 600; }

/* ===== COMPARISON TABLE ===== */
.kt-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.kt-table th, .kt-table td {
  text-align: start; padding: 16px 18px;
  border-bottom: 1px solid var(--gray-200, #e8e8e8); color: var(--gray-600, #555);
}
.kt-table thead th {
  font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: #fff; background: var(--kto-blue, #1a6fb8); border-bottom: none;
}
.kt-table thead th:first-child { border-start-start-radius: 10px; }
.kt-table thead th:last-child  { border-start-end-radius: 10px; }
.kt-table tbody tr:nth-child(even) { background: #f8fbff; }
.kt-table tbody th { font-weight: 500; color: var(--gray-600, #555); }
.kt-table td strong, .kt-table td b { color: var(--black, #0a0a0a); font-weight: 600; }
.kt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== NOTE / CALLOUT ===== */
.kt-note {
  border-inline-start: 3px solid var(--kto-blue, #1a6fb8);
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%); border-radius: 4px;
  padding: 20px 24px; margin-top: 24px;
  font-size: 15px; color: var(--gray-600, #555); line-height: 1.75;
}
.kt-note strong { color: var(--black, #0a0a0a); }

/* ===== PROSE ===== */
.kt-prose { font-size: 16px; color: var(--gray-600, #555); line-height: 1.8; max-width: 740px; }
.kt-prose p { margin-bottom: 16px; }
.kt-prose ul { padding-inline-start: 22px; margin: 6px 0 16px; }
.kt-prose li { margin-bottom: 8px; }
.kt-prose strong { color: var(--black, #0a0a0a); font-weight: 600; }
.kt-prose a { color: var(--kto-blue, #1a6fb8); }

/* ===== FAQ ===== */
.kt-faq { border-bottom: 1px solid var(--gray-200, #e8e8e8); }
.kt-faq:first-of-type { border-top: 1px solid var(--gray-200, #e8e8e8); }
.kt-faq summary {
  cursor: pointer; list-style: none; padding: 22px 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 600;
  color: var(--black, #0a0a0a);
}
.kt-faq summary::-webkit-details-marker { display: none; }
.kt-faq summary:hover { color: var(--kto-blue, #1a6fb8); }
.kt-faq summary > i {
  flex: 0 0 auto; font-style: normal; font-size: 22px; font-weight: 300; line-height: 1;
  color: var(--kto-blue, #1a6fb8); transition: transform .2s ease;
}
.kt-faq[open] summary > i { transform: rotate(45deg); }
.kt-faq > div {
  padding: 0 4px 24px; color: var(--gray-600, #555);
  font-size: 15.5px; line-height: 1.8; max-width: 760px;
}
.kt-faq > div a { color: var(--kto-blue, #1a6fb8); }

/* ===== SCROLL REVEAL (see kto-reveal.js) ===== */
.kt-main .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.kt-main .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .kt-main .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .kt-main section { padding: 64px 32px; }
  .kt-card { padding: 32px 26px; }
  .kt-stat { padding: 36px 24px; }
  .kt-stat b { font-size: 34px; }
}
@media (max-width: 560px) {
  .kt-main section { padding: 52px 20px; }
  .kt-actions .btn-primary, .kt-actions .btn-outline, .kt-actions .btn-wa { width: 100%; }
}
