/* Troupeasy : pages de ressources gratuites (carnet d'agnelage, puis
   d'autres modèles). Se charge après style.css et en reprend les jetons.
   Maquettes : troupeasy/context/mockup/20261109_troupeasy-landing-carnet-agnelage/ */

:root {
  --gray-700: #3F4452;          /* texte secondaire sur fond lin (contraste) */
  --cta: var(--green);          /* bouton principal des pages ressources */
  --error-border: #E5407F;
  --error-bg: #FFF7FA;
  --error-text: #A8194F;
}

.rs-wrap { width: min(1200px, 100%); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
@media (max-width: 759px) { .rs-wrap { padding-left: 16px; padding-right: 16px; } }

.rs-eyebrow { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); }
.rs-h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.rs-link-arrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; color: var(--blue-700); }
.rs-link-arrow:hover { color: var(--deep-blue); text-decoration: underline; }
.rs-link-arrow .icon { width: 20px; height: 20px; }

/* ---- En-tête simplifié (une seule cible : l'application) ---- */
.rs-nav-cta { margin-left: auto; font-weight: 700; font-size: 15px; color: var(--deep-blue); padding: 8px 4px; }
.rs-nav-cta:hover { text-decoration: underline; }
.rs-nav-cta .court { display: none; }
@media (max-width: 459px) {
  .rs-nav-cta .long { display: none; }
  .rs-nav-cta .court { display: inline; }
}

/* ---- Hero ---- */
.rs-hero { background: var(--linen); overflow: hidden; }
.rs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "intro visuel" "form visuel" "puces visuel";
  grid-template-rows: auto auto 1fr;
  column-gap: 40px;
  padding-top: 64px;
}
.rs-intro { grid-area: intro; display: flex; flex-direction: column; gap: 24px; }
.rs-pastille {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-100); color: var(--green-700);
  font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 14px; border-radius: var(--radius-pill);
}
.rs-pastille .icon { width: 18px; height: 18px; }
.rs-hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }
.rs-sous-titre { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.5; color: var(--gray-700); max-width: 34em; text-wrap: pretty; }

.rs-form-zone { grid-area: form; margin-top: 24px; position: relative; z-index: 2; scroll-margin-top: 90px; }

.rs-puces { grid-area: puces; margin: 24px 0 0; padding: 0 0 72px; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; font-weight: 600; color: var(--gray-700); align-self: start; }
.rs-puces li { display: flex; align-items: center; gap: 6px; }
.rs-puces .icon { width: 20px; height: 20px; color: var(--green); }

.rs-visuel { grid-area: visuel; position: relative; min-height: 560px; }
.rs-visuel .rs-carnet {
  position: absolute; left: 0; top: 8px; width: min(420px, 80%); height: auto;
  background: var(--white); border-radius: 6px; box-shadow: 0 14px 40px rgba(10, 12, 32, .16);
  transform: rotate(-4deg);
}
.rs-visuel .rs-badge-pdf {
  position: absolute; left: min(300px, 57%); top: 0;
  background: var(--navy); color: var(--white); font-size: 13px; font-weight: 800; letter-spacing: .04em;
  padding: 7px 12px; border-radius: var(--radius-pill); transform: rotate(-4deg);
}
.rs-visuel .rs-xavier { position: absolute; right: -24px; bottom: 0; width: min(520px, 100%); height: auto; }

@media (max-width: 999px) {
  .rs-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "visuel" "form" "puces";
    grid-template-rows: auto;
    padding-top: 28px;
  }
  .rs-intro { gap: 18px; }
  .rs-pastille { font-size: 12px; padding: 7px 12px; }
  .rs-visuel { min-height: 0; height: clamp(280px, 72vw, 460px); margin-top: 8px; }
  .rs-visuel .rs-carnet { width: 64%; top: 20px; }
  .rs-visuel .rs-badge-pdf { left: 46%; top: 6px; font-size: 12px; }
  .rs-visuel .rs-xavier { width: 77%; right: -30px; }
  .rs-form-zone { margin-top: -48px; }
  .rs-puces { flex-direction: column; padding-bottom: 40px; }
}

/* ---- Formulaire ---- */
.rs-form-carte {
  background: var(--white); border-radius: var(--radius-xl); padding: 28px;
  box-shadow: 0 14px 40px rgba(10, 12, 32, .10); max-width: 520px;
}
@media (max-width: 759px) { .rs-form-carte { padding: 20px; border-radius: 20px; } }
.rs-form { display: flex; flex-direction: column; gap: 14px; }
.rs-form label { font-size: 15px; font-weight: 700; color: var(--navy); }
.rs-form-ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.rs-form input[type="email"] {
  flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 16px;
  border-radius: var(--radius-md); border: 1px solid var(--gray-300); background: var(--white);
  font-family: inherit; font-size: 17px; color: var(--gray-900);
}
.rs-form input[type="email"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(95, 129, 152, .45); }
.rs-form input[type="email"][aria-invalid="true"] { border-color: var(--error-border); background: var(--error-bg); }
.rs-form input[type="email"]:read-only { background: var(--gray-100); color: var(--gray-700); }
.rs-bouton {
  flex: 1 0 auto; height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius-md);
  background: var(--cta); color: var(--white); font-family: inherit; font-size: 17px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  transition: filter .12s, transform .12s;
}
.rs-bouton:hover { filter: brightness(0.94); }
.rs-bouton:active { transform: scale(0.98); }
.rs-bouton .icon { width: 22px; height: 22px; }
.rs-bouton svg[hidden] { display: none; }
.rs-bouton[aria-busy="true"] { opacity: .7; cursor: progress; }
.rs-bouton[aria-busy="true"] .icon { animation: rs-tourne 1s linear infinite; }
@keyframes rs-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rs-bouton[aria-busy="true"] .icon { animation: none; } }

.rs-message { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; font-weight: 600; color: var(--error-text); line-height: 1.4; }
.rs-message[hidden] { display: none; }
.rs-message .icon { width: 20px; height: 20px; margin-top: 1px; }
.rs-suggestion { font-size: 15px; color: var(--gray-700); }
.rs-suggestion[hidden] { display: none; }
.rs-suggestion button { font: inherit; font-weight: 700; color: var(--blue-700); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

.rs-legal { font-size: 13px; line-height: 1.5; color: var(--gray-500); text-wrap: pretty; }
.rs-legal a { color: var(--blue-700); }
.rs-legal a:hover { color: var(--deep-blue); }

/* Champ piège : hors écran pour les humains (et les lecteurs d'écran). */
.rs-piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Succès */
.rs-succes { display: flex; gap: 18px; align-items: flex-start; }
.rs-succes[hidden] { display: none; }
.rs-succes-icone { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--green-100); display: flex; align-items: center; justify-content: center; }
.rs-succes-icone .icon { width: 30px; height: 30px; color: var(--green-700); }
.rs-succes h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.rs-succes p { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--gray-700); }
.rs-succes strong { color: var(--navy); word-break: break-all; }
.rs-renvoyer { margin-top: 12px; font: inherit; font-size: 15px; font-weight: 700; color: var(--blue-700); background: none; border: 0; padding: 0; cursor: pointer; }
.rs-renvoyer:hover { text-decoration: underline; }
.rs-renvoyer:disabled { color: var(--gray-500); cursor: default; text-decoration: none; }

/* ---- Sections ---- */
.rs-section { padding-top: clamp(56px, 8vw, 88px); padding-bottom: clamp(56px, 8vw, 88px); }
.rs-bg-paper { background: var(--paper); }
.rs-bg-linen-soft { background: var(--linen-soft); }
.rs-bg-navy { background: var(--navy); color: var(--white); }

.rs-contenu { display: flex; flex-direction: column; gap: 40px; }
.rs-contenu-tete { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.rs-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.rs-carte { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; background: var(--white); }
.rs-carte .icon { width: 30px; height: 30px; color: var(--blue); }
.rs-carte h3 { font-size: 19px; font-weight: 800; }
.rs-carte p { font-size: 15px; line-height: 1.55; color: var(--gray-700); }
.rs-femelles { color: #C2185B; font-weight: 700; }
.rs-males { color: #1F6FA8; font-weight: 700; }

.rs-pourquoi { display: flex; flex-wrap: wrap; gap: 56px; }
.rs-pourquoi-texte { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.rs-pourquoi-texte p { font-size: 17px; line-height: 1.65; color: var(--gray-700); }
.rs-pourquoi-texte strong { color: var(--navy); }
.rs-regles { flex: 1 1 380px; min-width: 0; align-self: flex-start; background: var(--white); border-radius: var(--radius-xl); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 759px) { .rs-pourquoi { gap: 32px; } .rs-regles { padding: 24px; } }
.rs-regles-tete { display: flex; align-items: center; gap: 10px; }
.rs-regles-tete span { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-100); display: flex; align-items: center; justify-content: center; }
.rs-regles-tete .icon { width: 24px; height: 24px; color: var(--blue-700); }
.rs-regles h3 { font-size: 19px; font-weight: 800; }
.rs-regles ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.5; color: var(--gray-900); }
.rs-regles li { display: flex; gap: 10px; }
.rs-regles li .icon { width: 22px; height: 22px; color: var(--green); }
.rs-regles-note { font-size: 13px; line-height: 1.5; color: var(--gray-500); }

.rs-video-bloc { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.rs-video-texte { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rs-video-texte p { font-size: 17px; line-height: 1.6; color: var(--gray-700); }
.rs-video { flex: 1 1 520px; min-width: 0; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); background: var(--navy); position: relative; overflow: hidden; display: block; }
@media (max-width: 759px) { .rs-video-bloc { gap: 28px; } .rs-video { flex-basis: 100%; } }
.rs-video img, .rs-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.rs-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .95); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(10, 12, 32, .3); transition: transform .15s; }
.rs-video:hover .rs-video-play { transform: translate(-50%, -50%) scale(1.06); }
.rs-video-play .icon { width: 44px; height: 44px; color: var(--navy); }

.rs-pont { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.rs-pont-texte { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rs-pont-texte img { width: 56px; height: auto; }
.rs-pont-texte h2 { color: var(--white); }
.rs-pont-texte p { font-size: 18px; line-height: 1.6; color: var(--blue-100); max-width: 34em; }
.rs-pont-action { flex: 0 1 auto; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.rs-pont-action .rs-bouton { height: 56px; padding: 0 26px; font-size: 18px; text-decoration: none; }
.rs-pont-action span { font-size: 14px; color: #9DB3C1; }

/* ---- Pages « envoyé » et « erreur » (formulaire sans JavaScript) ---- */
.rs-simple { padding: clamp(56px, 8vw, 96px) 0; min-height: 55vh; }
.rs-simple .rs-wrap { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.rs-simple h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
.rs-simple p { font-size: 17px; line-height: 1.6; color: var(--gray-700); }
.rs-simple .rs-bouton { align-self: flex-start; text-decoration: none; }

/* ==== Appel à testeurs (identification temporaire) ==== */
.rs-hero--testeurs .rs-hero-grid { padding-bottom: 72px; }
.rs-hero--testeurs .rs-puces { padding-bottom: 0; }
.rs-carte-sombre { grid-area: visuel; position: relative; height: 560px; border-radius: var(--radius-xl); background: #0F131E; overflow: hidden; align-self: start; }
.rs-badge-proto {
  position: absolute; left: 28px; top: 28px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: var(--white);
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 12px; border-radius: var(--radius-pill);
}
.rs-badge-proto .icon { width: 16px; height: 16px; }
.rs-carte-sombre .rs-photo-hero { position: absolute; right: 28px; top: 28px; z-index: 2; width: min(300px, 55%); height: 360px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.rs-carte-sombre .rs-packshot { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%); mask-image: linear-gradient(to bottom, transparent, #000 35%); }
@media (max-width: 999px) {
  .rs-hero--testeurs .rs-hero-grid { padding-bottom: 40px; }
  .rs-hero--testeurs .rs-form-zone { margin-top: 20px; }
  .rs-carte-sombre { height: clamp(320px, 92vw, 520px); margin-top: 8px; }
  .rs-carte-sombre .rs-photo-hero { right: 18px; top: 18px; width: 55%; height: 72%; }
  .rs-badge-proto { left: 18px; top: 18px; font-size: 12px; padding: 7px 11px; }
}

.rs-etapes { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.rs-etape { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--white); }
.rs-etape-num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--blue-700); color: var(--white); font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.rs-etape h3 { font-size: 19px; font-weight: 800; }
.rs-etape p { font-size: 15px; line-height: 1.55; color: var(--gray-700); margin-top: 6px; }
@media (max-width: 759px) { .rs-etape { flex-direction: row; align-items: flex-start; padding: 18px; } }

.rs-protos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
@media (max-width: 359px) { .rs-protos { grid-template-columns: minmax(0, 1fr); } }
.rs-proto { border: 1px solid var(--gray-200); border-radius: var(--radius-xl); overflow: hidden; background: var(--white); display: flex; flex-direction: column; }
.rs-proto img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.rs-proto-texte { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.rs-proto h3 { font-size: 20px; font-weight: 800; }
.rs-proto p { font-size: 15px; line-height: 1.6; color: var(--gray-700); }
.rs-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.rs-chips li { background: #EAF1F5; color: var(--deep-blue); font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; }
.rs-note { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--gray-700); max-width: 760px; }
.rs-note .icon { width: 22px; height: 22px; color: var(--blue); }
.rs-regles li .icon.rs-attention { color: #E3A62F; }

.rs-galerie { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 899px) { .rs-galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rs-galerie figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rs-galerie img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; display: block; }
.rs-galerie figcaption { font-size: 14px; color: var(--gray-500); }

/* ---- Questionnaire testeur ---- */
.rs-q-page { background: var(--linen); padding: clamp(36px, 6vw, 64px) 0 clamp(56px, 8vw, 88px); min-height: 70vh; }
.rs-q-colonne { width: min(760px, 100%); margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 20px; }
.rs-q-tete { display: flex; flex-direction: column; gap: 14px; }
.rs-q-tete h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
.rs-q-tete p { font-size: 17px; line-height: 1.55; color: var(--gray-700); }
.rs-q-form { display: flex; flex-direction: column; gap: 20px; }
.rs-q-bloc { background: var(--white); border-radius: var(--radius-xl); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 759px) { .rs-q-bloc { padding: 20px; border-radius: 20px; } }
.rs-q-bloc h2 { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; }
.rs-q-num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-700); color: var(--white); font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rs-q-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 599px) { .rs-q-grille { grid-template-columns: minmax(0, 1fr); } }
.rs-champ { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rs-champ.rs-large { grid-column: 1 / -1; }
.rs-champ > label, .rs-question { font-size: 15px; font-weight: 700; color: var(--navy); padding: 0; }
.rs-question .rs-facultatif { font-weight: 400; color: var(--gray-500); }
.rs-champ input, .rs-champ textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--radius-md); border: 1px solid var(--gray-300);
  background: var(--white); font-family: inherit; font-size: 16px; color: var(--gray-900);
}
.rs-champ textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.rs-champ input:focus, .rs-champ textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(95, 129, 152, .45); }
.rs-champ [aria-invalid="true"] { border-color: var(--error-border); background: var(--error-bg); }
.rs-aide { font-size: 13px; line-height: 1.5; color: var(--gray-500); }
.rs-groupe { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rs-choix-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-choix { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--gray-300); border-radius: var(--radius-md); background: var(--white); font-size: 15px; color: var(--gray-900); cursor: pointer; }
.rs-choix input { margin: 0; width: 18px; height: 18px; accent-color: var(--green); }
.rs-choix:has(input:checked) { border-color: var(--green); background: var(--green-100); }
.rs-choix:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(95, 129, 152, .45); }
.rs-groupe.rs-invalide .rs-choix { border-color: var(--error-border); }
.rs-erreur-champ { font-size: 14px; font-weight: 600; color: var(--error-text); }
.rs-erreur-champ[hidden] { display: none; }
.rs-engagement { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--gray-900); cursor: pointer; }
.rs-engagement input { flex: none; margin: 2px 0 0; width: 20px; height: 20px; accent-color: var(--green); }
.rs-q-bloc .rs-bouton { align-self: flex-start; flex: none; }
@media (max-width: 599px) { .rs-q-bloc .rs-bouton { align-self: stretch; } }
.rs-q-etat { background: var(--white); border-radius: var(--radius-xl); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.rs-q-etat[hidden], .rs-q-form[hidden] { display: none; }
.rs-q-etat h2 { font-size: 24px; font-weight: 800; }
.rs-q-etat p { font-size: 16px; line-height: 1.55; color: var(--gray-700); }
.rs-q-etat .rs-bouton { align-self: flex-start; text-decoration: none; }

/* Pied de page réduit à sa dernière ligne (pages simples) */
.footer > .footer-bottom:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rs-simple + .footer, .rs-q-page + .footer { padding-top: 24px; padding-bottom: 24px; }
