/* ==============================================
   « Êtes-vous prêt pour le Golfe ? » (/test-golfe): the test, one question
   per screen, and its result
   ============================================== */

.tg-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 36px) 0 64px;
  background:
    radial-gradient(900px 420px at 90% 0%, rgba(201, 168, 76, 0.22), transparent 60%),
    linear-gradient(160deg, var(--navy-dark), var(--navy) 60%, var(--navy-light));
  color: var(--white);
}
.tg-hero-glyph {
  position: absolute;
  right: -1%;
  bottom: -18%;
  font-family: var(--font-arabic);
  font-size: clamp(7rem, 18vw, 15rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  user-select: none;
}
.tg-hero-inner { position: relative; max-width: 760px; }
.tg-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 1px solid rgba(201, 168, 76, 0.5); border-radius: var(--radius-full); color: var(--gold-light); font-size: 0.8rem; letter-spacing: 0.04em; }
.tg-hero h1 { margin: 16px 0 12px; font-family: var(--font-heading); font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.12; color: var(--white); }
.tg-lead { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; line-height: 1.65; }
.tg-free { margin: 16px 0 0; font-size: 0.86rem; color: rgba(255, 255, 255, 0.65); }
.tg-free i { margin-right: 6px; color: var(--gold-light); }

.tg-section { padding: 0 0 72px; background: var(--off-white); }
.tg-container { max-width: 760px; }

/* ---------- The questions ---------- */
.tg-form { position: relative; margin-top: -32px; padding: 28px; border-radius: 20px; background: var(--white); box-shadow: 0 14px 40px rgba(11, 26, 51, 0.12); }
.tg-progress { margin-bottom: 18px; }
.tg-progress-text { display: block; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted); }
.tg-progress-text strong { color: var(--navy); }
.tg-bar { height: 8px; border-radius: var(--radius-full); background: var(--gray-200); overflow: hidden; }
.tg-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transition: width 0.35s ease; }
.tg-question { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.tg-question legend { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 0; font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.3; color: var(--navy); }
.tg-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-top: 1px; border-radius: 50%; background: var(--gold); color: var(--navy-dark); font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; }
.tg-hint { margin: -6px 0 14px 42px; font-size: 0.88rem; color: var(--text-muted); }
.tg-options { display: grid; gap: 10px; }
.tg-options--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tg-option { position: relative; display: block; cursor: pointer; }
.tg-option input { position: absolute; opacity: 0; pointer-events: none; }
.tg-option span { display: flex; align-items: center; min-height: 52px; padding: 12px 16px; border: 2px solid var(--gray-200); border-radius: 14px; background: var(--white); font-size: 0.98rem; font-weight: 500; color: var(--text); transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.tg-option:hover span { border-color: var(--gold-light); }
.tg-option input:focus-visible + span { outline: 3px solid rgba(201, 168, 76, 0.45); outline-offset: 2px; }
.tg-option input:checked + span { border-color: var(--gold); background: #fbf3dd; color: var(--navy); font-weight: 600; }
.tg-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-back { padding: 8px 0; border: 0; background: none; font: inherit; font-size: 0.92rem; color: var(--text-muted); cursor: pointer; }
.tg-back:hover { color: var(--navy); }
.tg-submit { margin-left: auto; }

/* With the script: one question at a time */
.tg-form.is-stepped .tg-question { display: none; margin-bottom: 18px; }
.tg-form.is-stepped .tg-question.is-current { display: block; animation: tg-in 0.3s ease; }
.tg-form.is-stepped .tg-submit[hidden] { display: none; }
@keyframes tg-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tg-form.is-stepped .tg-question.is-current { animation: none; }
  .tg-bar span { transition: none; }
}

/* ---------- The result ---------- */
.tg-hero--result { padding-bottom: 72px; }
.tg-result-head { position: relative; display: flex; align-items: center; gap: 32px; max-width: 760px; }
.tg-score {
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--score) * 1%), rgba(255, 255, 255, 0.14) 0);
}
.tg-score::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--navy); }
.tg-score strong, .tg-score span { position: relative; }
.tg-score strong { font-family: var(--font-heading); font-size: 3rem; line-height: 1; color: var(--white); }
.tg-score span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.tg-result-text h1 { margin-top: 12px; }

.tg-axes { position: relative; margin-top: -32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; padding: 22px 24px; border-radius: 20px; background: var(--white); box-shadow: 0 14px 40px rgba(11, 26, 51, 0.12); }
.tg-axis-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.9rem; color: var(--text); }
.tg-axis-head strong { color: var(--navy); }

.tg-country { margin-top: 24px; padding: 24px; border-radius: 20px; border: 2px solid var(--gold); background: linear-gradient(165deg, #fbf3dd, var(--white) 60%); }
.tg-tag { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--gold); color: var(--navy-dark); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.tg-country h2 { margin: 4px 0 8px; font-family: var(--font-heading); font-size: 1.7rem; color: var(--navy); }
.tg-country p { margin: 0 0 12px; line-height: 1.6; color: var(--text); }
.tg-note { font-size: 0.92rem; color: var(--text-muted) !important; }
.tg-note i { color: #2e8b57; margin-right: 4px; }
.tg-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); text-decoration: none; }
.tg-link:hover { color: var(--gold-dark); }
.tg-link i { font-size: 0.8rem; color: var(--gold-dark); }
.tg-country .tg-note:last-child { margin: 12px 0 0; }

.tg-title { margin: 40px 0 16px; font-family: var(--font-heading); font-size: 1.6rem; color: var(--navy); }
.tg-priorities { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tg-priority { display: flex; gap: 16px; padding: 20px; border-radius: 16px; background: var(--white); box-shadow: var(--shadow-sm); }
.tg-priority-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-weight: 700; }
.tg-priority h3 { margin: 4px 0 6px; font-size: 1.08rem; color: var(--navy); }
.tg-priority p { margin: 0 0 8px; font-size: 0.94rem; line-height: 1.6; color: var(--text); }
/* One link per line, the arrow after the last word even when it wraps */
.tg-priority .tg-link { display: table; margin-top: 4px; font-size: 0.92rem; }
.tg-priority .tg-link i { margin-left: 4px; }

.tg-offer { margin-top: 40px; padding: 32px 28px; border-radius: 20px; text-align: center; background: linear-gradient(160deg, var(--navy-dark), var(--navy)); color: var(--white); }
.tg-offer h2 { margin: 0 0 22px; font-family: var(--font-heading); font-size: clamp(1.4rem, 3vw, 1.8rem); color: var(--white); }
.tg-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; text-align: left; }
.tg-pillar { padding: 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.tg-pillar i { font-size: 1.3rem; color: var(--gold-light); }
.tg-pillar h3 { margin: 10px 0 6px; font-size: 1rem; color: var(--white); }
.tg-pillar p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: rgba(255, 255, 255, 0.78); }
.tg-offer-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 26px; }
.tg-offer-note { font-size: 0.84rem; color: rgba(255, 255, 255, 0.65); }
.tg-offer-more { display: inline-block; margin-top: 10px; font-size: 0.9rem; font-weight: 600; color: var(--gold-light); text-decoration: none; }
.tg-offer-more:hover { color: var(--white); }

.tg-share { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; padding: 18px 22px; border-radius: 16px; background: var(--white); box-shadow: var(--shadow-sm); }
.tg-share p { margin: 0; color: var(--text); }
.tg-share-actions { display: flex; align-items: center; gap: 16px; }
.tg-again { font-size: 0.9rem; color: var(--text-muted); text-decoration: none; }
.tg-again:hover { color: var(--navy); }

@media (max-width: 720px) {
  /* The first question within reach of the thumb */
  .tg-hero { padding: calc(var(--nav-height) + 18px) 0 48px; }
  .tg-hero h1 { margin: 12px 0 8px; font-size: 1.85rem; }
  .tg-hero .tg-lead { font-size: 0.96rem; line-height: 1.55; }
  .tg-free { margin-top: 10px; font-size: 0.8rem; }
  .tg-hero--result { padding-bottom: 56px; }
  .tg-form { padding: 20px 16px; border-radius: 16px; }
  .tg-question legend { font-size: 1.18rem; }
  .tg-options--many { grid-template-columns: minmax(0, 1fr); }
  .tg-hint { margin-left: 0; }
  .tg-result-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .tg-score { width: 120px; height: 120px; }
  .tg-score strong { font-size: 2.4rem; }
  .tg-axes { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .tg-country, .tg-priority { padding: 18px 16px; }
  .tg-pillars { grid-template-columns: minmax(0, 1fr); }
  .tg-offer { padding: 26px 16px; }
  .tg-share { padding: 16px; }
}
