/* ==========================================================================
   RISEREALMS – DESIGN DU SITE
   Sommaire :
   1. Couleurs (clair / sombre)
   2. Base
   3. Boutons
   4. En-tête et accueil
   5. Sections (offres, avis, étapes, FAQ)
   6. Fenêtre de commande
   7. Pied de page
   8. Mobile
   ========================================================================== */


/* ==========================================================================
   1. COULEURS
   Pour changer une couleur, modifie-la ici : elle change partout sur le site.
   ========================================================================== */
:root {
  --bg:         #F6F3FF;   /* fond de la page */
  --surface:    #FFFFFF;   /* fond des cartes */
  --text:       #1B1536;   /* texte principal */
  --muted:      #5E5885;   /* texte secondaire */
  --accent:     #C81E93;   /* rose (boutons, étoiles) */
  --accent-ink: #FFFFFF;   /* texte sur les boutons roses */
  --violet:     #5B3FE0;   /* violet (numéros d'étapes) */
  --line:       #DDD6F5;   /* bordures */

  color-scheme: light;

  /* Évite que le contenu passe sous l'encoche des téléphones */
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Mode sombre automatique selon le réglage de l'appareil */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #130F2A;
    --surface:    #1E1840;
    --text:       #F1EEFF;
    --muted:      #A9A3D0;
    --accent:     #FF6FD8;
    --accent-ink: #1B0F2A;
    --violet:     #8E7BFF;
    --line:       #342C63;
    color-scheme: dark;
  }
}


/* ==========================================================================
   2. BASE
   ========================================================================== */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }          /* pas de zoom surprise du texte sur téléphone */
img  { max-width: 100%; }
.rev p, .note, .summary { overflow-wrap: anywhere; }   /* un long mot ne fait pas déborder la page */

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Instrument Sans", system-ui, sans-serif;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Conteneur centré (largeur maximale du contenu) */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.centered { text-align: center; }

/* Un élément avec l'attribut « hidden » doit vraiment disparaître */
[hidden] { display: none !important; }


/* ==========================================================================
   3. BOUTONS
   .btn        = bouton rose
   .btn.ghost  = bouton transparent avec bordure
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 16px "Instrument Sans", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--line);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* ==========================================================================
   4. EN-TÊTE ET ACCUEIL
   ========================================================================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 800 22px "Bricolage Grotesque", sans-serif;
  text-decoration: none;
}
.logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.logo span span { color: var(--accent); }

nav a {
  margin-left: 22px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
nav a:hover { color: var(--text); }

.hero {
  max-width: 760px;
  padding: 64px 0 96px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
}
.hero p {
  max-width: 46ch;
  margin: 22px 0 32px;
  color: var(--muted);
  font-size: 19px;
}


/* ==========================================================================
   5. SECTIONS
   ========================================================================== */
section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

section h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 44px);
}

.lead {
  max-width: 56ch;
  margin: 0 0 40px;
  color: var(--muted);
}

/* --- Offres ------------------------------------------------------------- */
#offres { text-align: center; }
#offres .lead { margin-inline: auto; }

/* Zone des offres plus large pour 4 cartes côte à côte */
#offres .wrap { max-width: 1240px; }

.packs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* 4 cartes côte à côte */
  gap: 16px;
  margin: 0 auto;
}

.pack {
  display: flex;
  flex-direction: column;
  padding: 28px;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 24px;
}
.pack.best {
  border: 2.5px solid var(--accent);   /* pack mis en avant */
}
.pack h3 { font-size: 24px; }
.pack .badge {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}
.pack .price {
  margin: 14px 0 2px;
  font: 800 42px "Bricolage Grotesque", sans-serif;
}
.pack ul {
  flex: 1;                /* pousse le bouton en bas de la carte */
  margin: 16px 0 24px;
  padding-left: 20px;
  color: var(--muted);
}

/* --- Avis clients ------------------------------------------------------- */
#avis h2 { margin-bottom: 32px; }

.revs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 220px));   /* cartes plus petites */
  justify-content: center;
  gap: 12px;
  text-align: left;
}
.revs:empty { display: none; }

.rev {
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
}
.rev .stars {
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.1em;
}
.rev .pack-label {
  display: inline-block;
  margin: 6px 0 0;
  padding: 1px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
.rev p { margin: 6px 0 8px; }

/* Boutons « Voir plus d'avis » / « Réduire » et « Laisser un avis » */
.rev-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* --- Étapes (numérotées automatiquement) -------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.steps > div { counter-increment: step; }
.steps > div::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-weight: 700;
}
.steps h3 { margin-bottom: 6px; font-size: 21px; }
.steps p  { margin: 0; color: var(--muted); }

/* --- FAQ ---------------------------------------------------------------- */
details {
  max-width: 760px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
details p { margin: 10px 0 0; color: var(--muted); }


/* ==========================================================================
   6. FENÊTRE DE COMMANDE
   ========================================================================== */
dialog {
  width: calc(100% - 32px);
  max-width: 480px;
  padding: 28px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--line);
  border-radius: 24px;
}
dialog::backdrop { background: rgba(10, 6, 30, 0.65); }
dialog h3 { margin-bottom: 6px; font-size: 28px; }

.summary { margin: 0 0 18px; color: var(--muted); }

.code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.code small { display: block; color: var(--muted); font-size: 13px; }
.code strong {
  font: 800 24px "Bricolage Grotesque", sans-serif;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.code .btn { padding: 10px 18px; }

/* Formulaire d'avis */
.fld { margin-bottom: 14px; }
.fld label { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; }
.fld input, .fld select, .fld textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
.honey { position: absolute; left: -9999px; opacity: 0; }

#paypalButtons { margin: 18px 0 8px; }
.done { margin: 0 0 14px; font-weight: 600; }
#payLink { margin-top: 8px; }
.cta { margin-top: 20px; }
.note { margin: 0 0 20px; color: var(--muted); font-size: 14px; }


/* ==========================================================================
   7. PIED DE PAGE
   ========================================================================== */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* Copyright à gauche, lien Discord à droite */
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
footer a {
  color: var(--text);
  font-weight: 600;
}


/* ==========================================================================
   8. MOBILE
   ========================================================================== */
/* Écrans moyens : 2 cartes par ligne */
@media (max-width: 1100px) {
  .packs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .packs, .steps { grid-template-columns: 1fr; }
  nav a:not(.keep) { display: none; }   /* sur mobile, seul « Commander » reste */
}

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* ==========================================================================
   9. TÉLÉPHONE (écrans de 600 px et moins)
   ========================================================================== */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }

  /* En-tête et accueil plus compacts */
  header { padding: 16px 0; }
  .logo { gap: 10px; font-size: 20px; }
  .logo img { width: 38px; height: 38px; }
  .hero { padding: 28px 0 56px; }
  .hero p { margin: 16px 0 24px; font-size: 17px; }

  /* Sections moins hautes */
  section { padding: 48px 0; }
  .lead { margin-bottom: 28px; }

  /* Offres */
  .pack { padding: 22px; }
  .pack .price { font-size: 36px; }
  .btn { padding: 14px 22px; }

  /* Étapes et FAQ */
  .steps { gap: 24px; }
  details { padding: 14px 0; }
  summary { font-size: 17px; }

  /* Avis : 2 cartes par ligne, boutons pleine largeur */
  .revs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rev { padding: 12px; }
  .rev .pack-label { border-radius: 10px; }
  .rev-actions .btn { flex: 1 1 100%; }

  /* Fenêtres (commande et avis) : tiennent dans l'écran et défilent si besoin */
  dialog {
    padding: 20px;
    max-height: 90vh;                    /* repli pour les anciens navigateurs */
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
  dialog h3 { font-size: 24px; }
  .code { flex-wrap: wrap; }
  .code strong { font-size: 20px; }
  .cta .btn { flex: 1 1 auto; text-align: center; }
}
