/* ==========================================================================
   Game Theory Co. — feuille de style
   Mobile d'abord. Couleurs tirées du kit logo (octobre 2026).
   Tous les couples texte/fond respectent WCAG AA (contraste >= 4,5:1).
   ========================================================================== */

:root {
  --encre: #1C2B2A;        /* texte et alvéoles sur fond clair */
  --miel: #EBA92A;         /* accent (jamais comme texte sur fond clair) */
  --miel-fonce: #C98A12;   /* accent plus foncé pour les bordures/soulignés */
  --creme: #F3EAD6;        /* texte sur fond sombre */
  --fond: #FBF8F1;         /* fond clair */
  --fond-alt: #F3EAD6;     /* bandes alternées */
  --fond-sombre: #141D1C;  /* fond sombre */
  --sombre-2: #1C2B2A;     /* cartes sur fond sombre */
  --texte: #1C2B2A;
  --texte-2: #4A5755;      /* texte secondaire sur clair : 7,1:1 */
  --texte-sur-sombre-2: #C9C2B2; /* texte secondaire sur sombre : ~9:1 */
  --ligne: #E2D9C4;
  --erreur: #9B2C20;       /* rouge brique, 7:1 sur fond clair */
  --succes: #1F5E3A;

  --police: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rayon: 12px;
  --mesure: 62ch;
  --conteneur: 1120px;
  --gouttiere: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* l'en-tête collant ne cache pas les titres ancrés */
  -webkit-text-size-adjust: 100%;
}
[id] { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 1.1rem + 2vw, 2.25rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }

p { margin: 0 0 1em; max-width: var(--mesure); }
ul, ol { margin: 0; padding: 0; }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--miel-fonce); }

:focus-visible {
  outline: 3px solid var(--miel);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--dark :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--miel); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  padding: 10px 14px;
  background: var(--encre);
  color: var(--creme);
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--conteneur);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}
.container--narrow { max-width: 820px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn--primary { background: var(--miel); color: var(--encre); border-color: var(--miel); }
.btn--primary:hover { background: #F2B63A; border-color: #F2B63A; }
.btn--ghost { background: transparent; color: var(--creme); border-color: rgba(243, 234, 214, .5); }
.btn--ghost:hover { border-color: var(--creme); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn--block { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--ligne);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand img { width: 170px; height: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  border: 1.5px solid var(--encre);
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: var(--encre);
  cursor: pointer;
}
.nav-toggle__bar {
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle__bar::before, .nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

.nav { display: none; width: 100%; padding-bottom: 12px; }
.nav.is-open { display: block; }
.nav__list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav__list a:not(.btn) {
  display: block;
  padding: 10px 4px;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.nav__list a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--miel-fonce); }
.nav__list .btn { margin-top: 8px; }

/* Le menu complet tient sur une ligne à partir de 1 015 px environ (version française, la plus longue). */
@media (min-width: 1060px) {
  .nav-toggle { display: none; }
  .nav { display: block; width: auto; padding-bottom: 0; }
  .nav__list { flex-direction: row; align-items: center; gap: 22px; }
  .nav__list .btn { margin-top: 0; margin-left: 6px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 6vw + 24px, 104px); }
.section--tight { padding-block: clamp(44px, 5vw + 16px, 80px); }
.section--alt { background: var(--fond-alt); }
.section--dark { background: var(--fond-sombre); color: var(--creme); }
.section__title { margin-bottom: .6em; }

.kicker {
  margin: 0 0 10px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.kicker--light, .hero .kicker { color: var(--miel); } /* Miel sur sombre : 7,2:1 */

.note { color: var(--texte-2); margin-top: 24px; }

/* ---------- Accueil ---------- */
.hero {
  background: var(--fond-sombre);
  color: var(--creme);
  padding-block: clamp(56px, 8vw + 20px, 128px);
  background-image:
    radial-gradient(60% 50% at 100% 0%, rgba(235, 169, 42, .14), transparent 70%);
}
.hero__inner { max-width: 820px; }
.hero h1 { margin-bottom: .6em; }
.hero__lead { font-size: clamp(1.1rem, 1rem + .6vw, 1.3rem); max-width: 56ch; }
.hero__lead strong { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero__points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--texte-sur-sombre-2);
  font-size: .95rem;
}
.hero__points li { display: flex; align-items: center; gap: 8px; }
.hero__points li::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--miel);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  flex: none;
}

/* ---------- Cartes ---------- */
.cards { list-style: none; display: grid; gap: 16px; }
.card {
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  padding: 22px 22px 8px;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--texte-2); }
.card--accent { border-top: 4px solid var(--miel); }
@media (min-width: 720px) {
  .cards--3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---------- Étapes ---------- */
.steps { list-style: none; display: grid; gap: 22px; counter-reset: etape; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step__num {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--encre);
  color: var(--creme);
  font-weight: 600;
  font-size: 1.1rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.step h3 { margin-top: 6px; }
.step p { color: var(--texte-2); }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .step { flex-direction: column; }
}

/* ---------- Deux colonnes ---------- */
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) {
  .split { grid-template-columns: 5fr 6fr; gap: 56px; }
  .split--reverse { grid-template-columns: 6fr 5fr; }
  .split--reverse .split__text { order: 2; }
}

/* ---------- Liste à crochets ---------- */
.checklist { list-style: none; display: grid; gap: 14px; }
.checklist li {
  position: relative;
  padding-left: 36px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--miel);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 7px; top: 9px;
  width: 7px; height: 11px;
  border: solid var(--encre);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- Valeurs ---------- */
.values { list-style: none; display: grid; gap: 18px; }
.values li {
  padding: 18px 20px;
  border-left: 4px solid var(--miel);
  background: #fff;
  border-radius: 0 var(--rayon) var(--rayon) 0;
}
.values h3 { font-size: 1.08rem; margin-bottom: .3em; }
.values p { margin: 0; color: var(--texte-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq__item {
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
}
.faq__item summary {
  cursor: pointer;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  list-style: none;
  position: relative;
  border-radius: var(--rayon);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 20px; top: 50%;
  width: 10px; height: 10px;
  border: solid var(--encre);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq__item p { padding: 0 20px 18px; margin: 0; color: var(--texte-2); max-width: none; }

/* ---------- Contact ---------- */
.section--dark .kicker { color: var(--miel); }
.section--dark p { color: var(--creme); }
.contact-alt { margin-top: 28px; line-height: 1.8; }
.contact-alt a { font-weight: 600; word-break: break-word; }

.form {
  background: var(--sombre-2);
  border: 1px solid rgba(243, 234, 214, .12);
  border-radius: var(--rayon);
  padding: 22px 20px;
  display: grid;
  gap: 16px;
}
@media (min-width: 540px) { .form { padding: 28px; } }
.form__row { display: grid; gap: 6px; }
.form__grid { display: grid; gap: 16px; }
@media (min-width: 540px) { .form__grid { grid-template-columns: 1fr 1fr; } }

.form label { font-weight: 600; font-size: .98rem; }
.label-hint { font-weight: 400; color: var(--texte-sur-sombre-2); }
.form input, .form select, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--encre);
  background: var(--fond);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 48px;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
  outline: 3px solid var(--miel);
  outline-offset: 2px;
}
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #E57A6C; }
.form__error { color: #F4A99D; font-size: .92rem; margin: 0; }

.form__trap {
  position: absolute !important;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__status { margin: 0; min-height: 1.5em; font-weight: 500; }
.form__status.is-error { color: #F4A99D; }
.form__status.is-success { color: #B9E4C9; }
.form__legal { font-size: .88rem; color: var(--texte-sur-sombre-2) !important; margin: 0; }

.form.is-sent .form__row, .form.is-sent .form__grid, .form.is-sent .btn, .form.is-sent .form__legal { display: none; }
.form.is-sent .form__status { font-size: 1.1rem; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--fond-sombre);
  color: var(--creme);
  border-top: 1px solid rgba(243, 234, 214, .12);
  padding-block: 40px;
}
.site-footer__inner { display: grid; gap: 12px; }
.site-footer img { width: 170px; margin-bottom: 8px; }
.site-footer p { margin: 0; }
.site-footer__legal { color: var(--texte-sur-sombre-2); font-size: .92rem; }
.site-footer a { word-break: break-word; }

/* ---------- Pages secondaires ---------- */
.page { padding-block: clamp(40px, 5vw + 16px, 80px); }
.page h1 { margin-bottom: .4em; }
.page h2 { font-size: 1.4rem; margin-top: 1.8em; }
.page .lead { font-size: 1.15rem; color: var(--texte-2); }
.page ul { padding-left: 1.2em; margin-bottom: 1em; max-width: var(--mesure); }
.page li { margin-bottom: .4em; }
.page--center { text-align: center; }
.page--center p { margin-inline: auto; }
.page--center img { margin: 0 auto 24px; width: 120px; }

/* ---------- Utilitaires ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Exemple concret ---------- */
.sample { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 960px) { .sample { grid-template-columns: 7fr 4fr; gap: 24px; align-items: start; } }
.sample__file, .sample__flag {
  min-width: 0; /* évite que le tableau fasse déborder la page */
  background: var(--sombre-2);
  border: 1px solid rgba(243, 234, 214, .14);
  border-radius: var(--rayon);
  padding: 18px 18px 14px;
}
.sample__label {
  margin: 0 0 12px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--miel) !important;
  max-width: none;
}
.sample__meta { color: var(--texte-sur-sombre-2); text-transform: none; letter-spacing: 0; font-weight: 500; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sample__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .92rem;
  color: var(--creme);
}
.sample__table th, .sample__table td { padding: 8px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid rgba(243, 234, 214, .12); }
.sample__table th { font-weight: 600; color: var(--texte-sur-sombre-2); font-size: .82rem; letter-spacing: .03em; }
.sample__table td:nth-child(n+4), .sample__table th:nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }
.sample__more td { color: var(--texte-sur-sombre-2); text-align: left !important; border-bottom: 0; }
.sample__flag { border-left: 4px solid var(--miel); }
.sample__flag-title { font-weight: 600; margin-bottom: .4em; }
.sample__flag p { max-width: none; }
.sample__note { font-size: .85rem; color: var(--texte-sur-sombre-2) !important; margin: 0; }

/* ---------- Tarification ---------- */
.tarifs { gap: 12px; }
.tarifs .card { padding: 18px 20px 6px; }
.tarifs h3 { font-size: 1.08rem; }

/* ---------- Pied de page : liens ---------- */
.site-footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 6px 0 10px; }
.site-footer__links a { text-decoration: none; font-weight: 500; }
.site-footer__links a:hover { text-decoration: underline; }

/* ---------- Page À propos ---------- */
.team-photo {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--rayon);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ligne);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo--placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border: 2px dashed var(--ligne);
  color: var(--texte-2);
  font-weight: 500;
}
.team-photo--placeholder img { width: 72px; height: 72px; margin-bottom: 12px; object-fit: contain; }
.team-list { list-style: none; display: grid; gap: 16px; margin-top: 20px; }
.team-list li { padding-left: 16px; border-left: 4px solid var(--miel); }
.team-list h3 { margin-bottom: .1em; }
.team-list p { margin: 0; color: var(--texte-2); }
.hero--compact { padding-block: clamp(44px, 6vw + 16px, 88px); }
.hero--compact h1 { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.6rem); }
@media (min-width: 720px) {
  .cards--2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.team .card { padding-bottom: 14px; }
.team__role {
  color: var(--texte-2) !important;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .8em;
}
.link-more { font-weight: 600; }
.section--dark .section__title { color: var(--creme); }
