/* =====================================================================
   Fin d'activité Rakuten France — feuille de style commune (FR / ES)
   ===================================================================== */
:root {
  --red: #B5221B;
  --red-dark: #8F1A14;
  --red-tint: #FBEAE6;
  --cream: #FDF5EC;
  --ink: #333;
  --ink-soft: #555;
  --ink-muted: #666;
  --line: #EADBC9;
  --line-soft: #F2E7DA;
  --rule: #E3CDB6;
  --panel: #F8F3EE;
  --white: #fff;
  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-script: 'Dancing Script', 'Brush Script MT', cursive;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 8px; }
li::marker { color: var(--red); }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  line-height: 1;
  font-feature-settings: 'liga';
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}
.accent { color: var(--red); }

/* ---------- Mise en page ---------- */
.page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 16px;
}
.lang-switch {
  width: 100%; max-width: 1200px;
  display: flex; justify-content: flex-end;
  padding-top: 16px;
}
.lang-switch ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px;
  font-size: 13px; font-weight: 700;
}
.lang-switch a,
.lang-switch span {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink); text-decoration: none;
}
.lang-switch [aria-current="page"] {
  background: var(--white); border: 1px solid var(--line); color: var(--red);
}
main {
  width: 100%; max-width: 1200px;
  display: flex; flex-direction: column;
  gap: clamp(32px, 5vw, 56px);
  padding: clamp(24px, 4vw, 40px) 0 clamp(56px, 8vw, 96px);
}

/* ---------- 1. Intro ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero__logo { width: 180px; height: 56px; margin-bottom: 24px; }
.hero__logo img,
.footer__logo img,
.divider__mark img {
  width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: multiply;
}
.hero__title {
  margin: 0 0 28px;
  font-family: var(--font-script); font-weight: 700;
  font-size: clamp(38px, 6vw, 60px); line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}
.hero__illustration {
  width: 100%; max-width: 520px;
  aspect-ratio: 16 / 8;
  margin-bottom: 32px;
  border-radius: 18px; overflow: hidden;
}
.hero__illustration img { width: 100%; height: 100%; object-fit: contain; }
.hero__text { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.hero__lead {
  margin: 0; font-weight: 700;
  font-size: clamp(17px, 2vw, 19px); line-height: 1.65;
  text-wrap: balance;
}
.hero__body {
  margin: 0;
  font-size: clamp(15px, 1.7vw, 16px); line-height: 1.95;
  text-wrap: pretty;
}
.hero__message-link { font-style: italic; text-underline-offset: 3px; white-space: nowrap; }
.hero__message-link .icon {
  font-size: 16px; font-style: normal;
  vertical-align: -3px; margin-left: 4px;
}

/* Accès à la FAQ */
.faq-access {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; text-align: center; margin-top: 8px;
}
.faq-access p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 12px 26px;
  border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn .icon { font-size: 18px; }
.btn--outline { border: 1px solid var(--red); background: transparent; color: var(--red); }
.btn--outline:hover { background: var(--red); color: var(--white); }
.btn--solid { border: none; background: var(--red); color: var(--white); }
.btn--solid:hover { background: var(--red-dark); color: var(--white); }

/* Séparateur intro / FAQ */
.divider {
  display: flex; align-items: center; gap: 16px;
  width: 100%; max-width: 520px; margin: 0 auto;
}
.divider__line { flex: 1; height: 1px; background: var(--rule); }
.divider__mark { width: 20px; height: 20px; flex: 0 0 20px; }

/* ---------- 2. FAQ ---------- */
.faq {
  scroll-margin-top: 24px;
  display: flex; flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}
.section-head {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
}
.eyebrow {
  margin: 0;
  font-size: 13px; letter-spacing: .18em; font-weight: 700;
  color: var(--red); text-transform: uppercase;
}
.faq__title {
  margin: 0; font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px); line-height: 1.3;
  text-wrap: balance;
}
.faq__intro {
  margin: 0; max-width: 640px;
  font-size: clamp(15px, 1.6vw, 16px); line-height: 1.8;
  text-wrap: pretty;
}

.search {
  width: 100%; max-width: 760px; margin: 0 auto;
  position: relative; display: flex; align-items: center;
}
.search .icon {
  position: absolute; left: 22px;
  color: var(--red); font-size: 24px;
  pointer-events: none;
}
.search input {
  width: 100%; min-height: 60px;
  padding: 14px 22px 14px 56px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--white);
  font-family: inherit; font-size: 17px; color: var(--ink);
  box-shadow: 0 2px 0 rgba(181, 34, 27, .06);
}

.faq__layout {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
  scroll-margin-top: 16px;
  margin-top: 8px;
}

.faq-list { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.faq-list__bar {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  align-items: center; justify-content: space-between;
  min-height: 44px;
}
.faq-list__status { margin: 0; font-size: 14px; color: var(--ink-soft); }
.toggle-all {
  min-height: 44px; padding: 8px 4px;
  border: none; background: none;
  color: var(--red);
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.toggle-all .icon { font-size: 20px; text-decoration: none; }

.faq-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* Accordéon */
.faq-item { background: var(--white); border-radius: 20px; scroll-margin-top: 24px; }
.faq-item__heading { margin: 0; font-size: inherit; }
.faq-item__btn {
  width: 100%; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 2.5vw, 24px);
  border: none; background: none; border-radius: 20px;
  text-align: left;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.5;
  color: var(--ink); cursor: pointer;
}
.faq-item__chevron {
  flex: 0 0 34px; width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--red-tint); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  transition: transform .35s ease;
}
.faq-item__btn[aria-expanded="true"] .faq-item__chevron { transform: rotate(180deg); }
.faq-item__panel {
  display: grid; grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .4s ease, visibility .4s;
}
.faq-item.is-open .faq-item__panel { grid-template-rows: 1fr; visibility: visible; }
.faq-item__inner { overflow: hidden; min-height: 0; }
.faq-item__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px;
  margin: 0 clamp(16px, 2.5vw, 24px);
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink-muted);
}
.copy-link {
  min-height: 36px; padding: 4px 0;
  border: none; background: none;
  color: var(--red);
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.copy-link .icon { font-size: 18px; }

/* Contenu des réponses (HTML libre issu des données) */
.answer {
  padding: 8px clamp(16px, 2.5vw, 24px) 28px;
  max-width: 800px;
  font-size: 16px; line-height: 1.8; color: var(--ink);
  text-wrap: pretty;
}
.answer p { margin: 0 0 16px; }
.answer h4 { margin: 28px 0 10px; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.answer ul, .answer ol { margin: 0 0 16px; padding-left: 22px; }
.answer li { margin: 0 0 8px; padding-left: 4px; }
.answer strong { font-weight: 700; color: var(--ink); }
.answer b { font-weight: 700; }
.answer hr { border: none; border-top: 1px solid var(--line-soft); margin: 24px 0; }
.answer s { color: #888; }
.answer details { margin: 0 0 14px; border: 1px solid var(--line-soft); border-radius: 14px; padding: 0 18px; }
.answer summary { cursor: pointer; padding: 14px 0; font-weight: 700; line-height: 1.5; }
.answer aside[data-callout] { margin: 0 0 14px; padding: 16px 18px 2px; border-radius: 12px; background: var(--panel); font-size: 15px; }
.answer [data-img-note] {
  display: block; margin: 0 0 16px; padding: 24px 16px;
  border: 1px dashed var(--rule); border-radius: 12px;
  background: var(--cream); color: var(--ink-muted);
  font-size: 14px; text-align: center;
}
.answer a {
  color: var(--red); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.answer a .icon {
  font-size: .95em; vertical-align: -2px; margin-left: 3px;
  font-weight: 400; text-decoration: none; display: inline-block;
}
.answer .badge {
  margin: 0 0 20px; display: inline-block;
  padding: 6px 12px; border-radius: 8px;
  background: var(--cream); border: 1px dashed var(--red);
  color: var(--red);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.5;
}
.answer .retenir { margin: 24px 0 0; padding: 20px 24px 6px; border-radius: 16px; background: var(--cream); }
.answer .retenir__title {
  margin: 0 0 10px; font-weight: 700; color: var(--red);
  display: flex; align-items: center; gap: 8px;
}
.answer .retenir__title .icon { font-size: 22px; }

.no-results {
  background: var(--white); border-radius: 20px;
  padding: 32px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.no-results p { margin: 0; font-size: 17px; }
.no-results button {
  min-height: 44px; padding: 10px 22px;
  border-radius: 999px; border: 1px solid var(--red);
  background: var(--white); color: var(--red);
  font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer;
}

/* Bouton flottant « Retour aux questions » (mobile) */
.back-to-faq {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  min-height: 48px; padding: 10px 18px;
  border: none; border-radius: 999px;
  background: var(--red); color: var(--white);
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 20px rgba(60, 20, 10, .18);
}
.back-to-faq .icon { font-size: 20px; }
.back-to-faq[hidden] { display: none; }

/* ---------- 3. Contact ---------- */
.contact {
  scroll-margin-top: 24px;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(24px, 3.5vw, 36px);
}
.contact__head { max-width: 760px; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.contact__title { margin: 0; font-weight: 700; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.3; }
.contact__intro { margin: 0; font-size: clamp(16px, 1.8vw, 18px); line-height: 1.85; }
.contact-card {
  width: 100%; max-width: 620px;
  background: var(--white); border-radius: 24px;
  padding: 36px 28px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
}
.contact-card__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--red-tint); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.contact-card h3 { margin: 0; font-size: 21px; font-weight: 700; }
.contact-card p { margin: 0; font-size: 16px; line-height: 1.75; text-wrap: pretty; }
.contact-card .btn { margin-top: 6px; }

/* ---------- 4. Message des équipes ---------- */
.message {
  scroll-margin-top: 24px;
  background: var(--white); border-radius: 24px;
  padding: clamp(28px, 4vw, 48px) clamp(22px, 5vw, 72px);
  display: flex; justify-content: center; text-align: center;
}
.message__body {
  max-width: 700px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 15px; line-height: 1.75; text-wrap: pretty;
}
.message__body h2 {
  margin: 0 0 4px; font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3;
  text-wrap: balance;
}
.message__body p { margin: 0; }
.message__body .message__thanks { margin: 2px 0; color: var(--red); font-weight: 700; font-size: 16px; }

/* ---------- Pages légales (liens du footer) ---------- */
.legal-header { padding-top: clamp(24px, 4vw, 40px); display: flex; justify-content: center; }
.legal-header__logo { display: block; width: 180px; height: 56px; }
.legal-header__logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.legal {
  width: 100%; max-width: 880px; margin: 0 auto;
  background: var(--white); border-radius: 24px;
  padding: clamp(24px, 4vw, 48px) clamp(8px, 3vw, 32px);
}
.legal__back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 clamp(16px, 2.5vw, 24px);
  font-size: 14px; font-weight: 700; color: var(--red); text-decoration: none;
}
.legal__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal__back .icon { font-size: 18px; }
.legal__title {
  margin: 8px 0 16px; padding: 0 clamp(16px, 2.5vw, 24px);
  font-weight: 700; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3;
  text-wrap: balance;
}
.legal__body { max-width: none; overflow-wrap: anywhere; }
.legal__body h2 { margin: 32px 0 12px; font-size: 21px; line-height: 1.35; }
.legal__body h3 { margin: 32px 0 12px; font-size: 18px; line-height: 1.4; }
.answer li > ul, .answer li > ol { margin: 8px 0 0; }
.answer li > p { margin: 0; }
.legal__body blockquote {
  margin: 0 0 16px; padding: 14px 18px;
  border-left: 3px solid var(--red); border-radius: 0 12px 12px 0;
  background: var(--panel);
}
.legal__body blockquote p { margin: 0; }
.footer ul a[aria-current="page"] { color: var(--red); font-weight: 700; }

/* ---------- 5. Footer ---------- */
.footer {
  width: 100%; max-width: 1200px;
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; text-align: center;
}
.footer__logo { width: 140px; height: 44px; }
.footer ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 24px; font-size: 14px;
}
.footer ul a { color: var(--ink); text-underline-offset: 3px; display: inline-block; padding: 8px 0; }
.footer__copy { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* ---------- Apparition au scroll (activée par JS uniquement) ---------- */
.js-reveal [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s ease, transform .8s ease;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
