/*
  Charte RUSH, identique à la page de confirmation d'appel
  (projet rush-confirmation). Si la charte change, mettre à jour les
  deux projets à la main — voir README.md "Origine du design".
*/
@import url("https://pushsbfdlguqvpdapexo.supabase.co/storage/v1/object/public/resources/f542e25b-fd09-487a-be90-3d9f6eb4a1a8/site/fonts/fonts.css");

:root {
  --bg: #0a1020;
  --bg2: #101a30;
  --ink: #f4f1ec;
  --grey: #9aa4b8;
  --greydim: #5f6b82;
  --red: #f4331f;
  --red2: #ff5a3c;
  --line: rgba(255, 255, 255, 0.09);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-family: Montserrat, sans-serif;
}

/* ---------- En-tête ---------- */
.topbar {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font: 800 14px Montserrat, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand img {
  width: 32px;
  height: 32px;
  mix-blend-mode: lighten;
}

/* ---------- Section principale, visuel en fond à droite ---------- */
.stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.stage .visual {
  position: absolute;
  inset: 0;
  background: center right / cover no-repeat;
  animation: kb 18s ease-out both;
}
.stage .visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 10%, rgba(10, 16, 32, 0.88) 42%, rgba(10, 16, 32, 0.15) 75%),
    linear-gradient(0deg, var(--bg), transparent 30%),
    linear-gradient(180deg, var(--bg), transparent 18%);
}
@keyframes kb {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 56px;
}
.col {
  max-width: 500px;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(244, 51, 31, 0.5);
  background: rgba(244, 51, 31, 0.1);
  font: 700 12px Montserrat, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: ping 1.8s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(244, 51, 31, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(244, 51, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 51, 31, 0); }
}

/* ---------- Titres ---------- */
.hero h1,
.card h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.bar {
  width: 110px;
  height: 5px;
  border-radius: 3px;
  background: var(--red);
  margin: 20px 0;
}
.hero p,
.card p {
  color: #cfd4de;
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ---------- Formulaire ---------- */
form,
.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -30px rgba(244, 51, 31, 0.35);
}

.field {
  margin-bottom: 8px;
}
.field label {
  display: block;
  font: 700 12px Montserrat, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: rgba(10, 16, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  font: 500 16px Inter, sans-serif; /* 16px : évite le zoom auto sur iOS */
  padding: 14px 16px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder {
  color: var(--greydim);
}
.field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(244, 51, 31, 0.18);
}
.field input.invalid {
  border-color: var(--red);
  background: rgba(244, 51, 31, 0.08);
}
/* Menus déroulants (qualification) : même rendu que les champs texte */
.field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(10, 16, 32, 0.6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239aa4b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  font: 500 16px Inter, sans-serif;
  padding: 14px 44px 14px 16px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field select:required:invalid {
  color: var(--greydim);
}
.field select option {
  color: var(--ink);
  background: var(--bg2);
}
.field select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(244, 51, 31, 0.18);
}
.field select.invalid {
  border-color: var(--red);
  background-color: rgba(244, 51, 31, 0.08);
}
/* Téléphone : sélecteur de pays (drapeau + indicatif) devant le numéro */
.phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-row input {
  flex: 1;
  min-width: 0;
}
.cc {
  position: relative;
  flex: none;
}
.cc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  background: rgba(10, 16, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  font: 500 16px Inter, sans-serif;
  padding: 0 12px 0 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cc-btn::after {
  content: "";
  width: 12px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239aa4b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
.cc-btn:focus-visible,
.cc-btn[aria-expanded="true"] {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(244, 51, 31, 0.18);
}
.cc-flag {
  font-size: 20px;
  line-height: 1;
}
.cc-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  max-width: calc(100vw - 48px);
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  color-scheme: dark;
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
}
.cc-list[hidden] {
  display: none;
}
.cc-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink);
  font: 500 15px Inter, sans-serif;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: pre;
}
.cc-list button:hover,
.cc-list button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* Note sous les questions : pourquoi des infos justes servent la personne */
.fit-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 14px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--grey);
}
.fit-note svg {
  flex: none;
  margin-top: 2px;
  color: #3ddc97;
}

.field-error {
  color: var(--red2);
  font-size: 12.5px;
  margin-top: 5px;
  min-height: 16px;
}

/* ---------- Bouton ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 17px 24px;
  border: none;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font: 800 14px Montserrat, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(244, 51, 31, 0.75);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
  background: var(--red2);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -10px rgba(244, 51, 31, 0.9);
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.btn .spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.loading .spinner {
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.reassure {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--grey);
  text-align: center;
}
.reassure a {
  color: var(--grey);
}

.error-message {
  color: var(--ink);
  background: rgba(244, 51, 31, 0.12);
  border: 1px solid rgba(244, 51, 31, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.5;
}
.error-message[hidden] {
  display: none;
}

/* ---------- Page de confirmation ---------- */
.card {
  padding: 34px 30px 30px;
}
.card h1 {
  font-size: clamp(30px, 3.8vw, 42px);
}
.card p {
  margin-bottom: 26px;
}

/* ---------- Page ressource (ressources/<id>/, _template/ressource.html) ---------- */
.doc {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}
.doc h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
}
.doc .lead {
  color: #cfd4de;
  font-size: 18px;
  margin: 0 0 24px;
}
.btn-inline {
  width: auto;
}
.content {
  margin-top: 40px;
  color: #cfd4de;
}
.content h2,
.skool-cta h2,
.popup h2 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  margin: 36px 0 12px;
}
.content a {
  color: var(--red2);
}
.content img,
.content iframe {
  max-width: 100%;
  border-radius: 12px;
}
.skool-cta {
  margin-top: 56px;
}
.skool-cta h2,
.popup h2 {
  margin-top: 0;
}

/* Pop-up Skool : <dialog> natif (focus, Échap et fond gérés par le navigateur). */
.popup {
  position: fixed;
  width: min(440px, calc(100% - 32px));
  color: var(--ink);
  background: var(--bg2);
  text-align: center;
}
.popup::backdrop {
  background: rgba(5, 8, 16, 0.75);
}
.popup p {
  color: #cfd4de;
  margin: 0 0 20px;
}
.popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  color: var(--grey);
  font-size: 26px;
  cursor: pointer;
}
.popup-later {
  margin-top: 12px;
  background: none;
  border: 0;
  color: var(--grey);
  font: 500 14px Inter, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Pied de page ---------- */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  color: var(--grey);
  font-size: 13px;
}
.foot .in {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.foot p {
  margin: 2px 0;
}
.foot strong {
  color: var(--ink);
}
.foot a {
  color: var(--ink);
}

/* ---------- Apparition ---------- */
.rv {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--d, 0) * 110ms + 100ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Mobile : visuel en haut, contenu dessous ---------- */
@media (max-width: 760px) {
  .stage {
    display: block;
  }
  .stage .visual {
    bottom: auto;
    height: 300px;
    background-position: 75% center;
  }
  .stage .visual::after {
    background: linear-gradient(0deg, var(--bg) 3%, rgba(10, 16, 32, 0) 60%);
  }
  .wrap {
    padding-top: 220px;
    padding-bottom: 50px;
  }
  .topbar {
    padding: 18px 20px;
  }
  form,
  .card {
    padding: 22px 18px 18px;
  }
}

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