/*
  RencontreCougarGratuit.fr — design notes
  Sujet : guide indépendant rencontre cougar/femme mature en France.
  Header minimal (logo seul, pas de nav) sur toutes les pages : objectif =
  amener le H1 + premier paragraphe le plus haut possible dans le source HTML,
  sans réordonnancement CSS (order/flex-direction) — plus simple, zéro risque
  de divergence DOM/visuel. La nav complète vit dans le footer.
  Peu de classes ajoutées aux templates — la plupart des règles ciblent les
  balises nues, la position structurelle, ou des attributs déjà émis par Hugo
  (rel="sponsored").
*/

:root {
  --ink: #241417;
  --bg: #fffdfb;
  --panel: #f7ece7;
  --paper: #fbf3ee;
  --gold: #a9762c;
  --burgundy: #7a1f2b;
  --line: #e4d3ca;

  --display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

html {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- header (logo + nav compacte) ---- */

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

header a.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.01em;
  color: var(--burgundy);
  text-decoration: none;
}

header img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.25rem;
}

header nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

header nav a:hover {
  color: var(--burgundy);
}

header nav details {
  position: relative;
}

header nav summary {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
}

header nav summary::-webkit-details-marker {
  display: none;
}

header nav summary::after {
  content: " ▾";
}

header nav details[open] summary {
  color: var(--burgundy);
}

header nav details ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0;
  min-width: 12rem;
}

header nav details li {
  padding: 0;
}

header nav details li a {
  display: block;
  padding: 0.4rem 0.75rem;
  text-transform: none;
  font-family: var(--body);
  font-size: 0.85rem;
  letter-spacing: normal;
  color: var(--ink);
}

header nav details li a:hover {
  color: var(--burgundy);
}

@media (min-width: 40rem) {
  header nav details ul {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    margin: 0;
    padding: 1rem 0 0.4rem;
    background: #fffdfb;
    background-clip: padding-box;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
}

/* ouverture au survol sur les appareils avec un vrai pointeur (pas au tap sur tactile) */
@media (hover: hover) and (min-width: 40rem) {
  header nav details ul {
    display: none;
  }

  header nav details:hover ul {
    display: block;
  }
}

/* ---- layout (contenu + sidebar) ---- */

.layout {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- contenu principal ---- */

main {
  padding: 2rem 0 3rem;
  min-width: 0;
}

h1 {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--burgundy);
}

h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--burgundy);
}

/* CTA principal (lien sponsorisé) */
a[rel~="sponsored"] {
  display: inline-block;
  background: var(--burgundy);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

a[rel~="sponsored"]:hover {
  background: #5e181f;
}

/* neutralise le style bouton pour les liens sponsorisés qui enveloppent une image
   (piège récurrent déjà rencontré sur randkimilf.pl — toujours redéclarer ici) */
figure.article-photo a[rel~="sponsored"],
figure.hero-image a[rel~="sponsored"],
.profile-grid a[rel~="sponsored"] {
  all: unset;
  display: block;
  cursor: pointer;
}

.article-photo {
  margin: 1.5rem 0;
}

.article-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---- hero (H1 + accroche + CTA + image, compact — CTA visible sans scroll) ---- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0 0 1.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.hero-content h1 {
  margin: 0;
}

.hero-content p {
  font-size: 1.0625rem;
  color: #5c4c50;
  margin: 0;
}

.cta-button {
  align-self: flex-start;
}

.hero-image {
  margin: 0;
  align-self: center;
}

.hero-image img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
}

@media (min-width: 40rem) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .hero-content {
    flex: 1.3;
  }

  .hero-image {
    flex: 1;
    align-self: center;
  }

  .hero-image img {
    max-width: 280px;
  }
}

/* ---- bande pleine largeur derrière le hero (accueil uniquement) ---- */

.hero-band {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.hero-band-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero-band .hero {
  margin: 0;
}

.hero-note {
  font-size: 0.875rem;
  color: #5c4c50;
}

/* ---- aperçu de profils ---- */

.profile-preview-band {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.profile-preview-band-inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.profile-preview {
  margin: 0;
}

.profile-preview h2 {
  margin: 0 0 1.25rem;
}

.profile-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (min-width: 30rem) {
  .profile-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 50rem) {
  .profile-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }
}

.profile-grid li {
  margin: 0;
}

.profile-grid a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.profile-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.profile-grid figcaption {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  text-align: center;
  color: var(--ink);
}

/* contenu gated : dernières cartes floutées, incitent à l'inscription pour "débloquer" */
.profile-grid--gated li:nth-last-child(-n+3) a {
  position: relative;
}

.profile-grid--gated li:nth-last-child(-n+3) img {
  filter: blur(6px);
}

.profile-grid--gated li:nth-last-child(-n+3) figcaption {
  filter: blur(3px);
}

.profile-grid--gated li:nth-last-child(-n+3) a::after {
  content: "🔒 Débloquer";
  position: absolute;
  inset: 0 0 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: rgba(36, 20, 23, 0.45);
  border-radius: 8px;
}

/* ---- comment ça marche ---- */

.how-it-works {
  margin: 3.5rem 0;
}

.how-it-works h2 {
  margin-top: 0;
}

.how-it-works ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40rem) {
  .how-it-works ol {
    grid-template-columns: repeat(3, 1fr);
  }
}

.how-it-works li {
  position: relative;
  padding-left: 2.75rem;
}

.how-it-works .step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--burgundy);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-it-works strong {
  display: block;
  font-family: var(--display);
  color: var(--burgundy);
  margin-bottom: 0.2rem;
}

.how-it-works p {
  font-size: 0.9rem;
  color: #5c4c50;
  margin: 0;
}

/* ---- cartes de contenu (accueil) ---- */

.content-cards {
  margin: 3.5rem 0;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--gold);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--burgundy);
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: #5c4c50;
}

/* ---- CTA intermédiaire (avant la FAQ accueil) ---- */

.cta-inline {
  text-align: center;
  margin: 3.5rem 0;
}

/* ---- FAQ accueil ---- */

.home-faq {
  margin: 3.5rem 0;
}

/* liste articles homepage */
.article-index {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.article-index li {
  border-bottom: 1px solid var(--line);
}

.article-index a {
  display: block;
  padding: 0.9rem 0;
  text-decoration: none;
  color: inherit;
}

.article-index strong {
  display: block;
  color: var(--burgundy);
  font-family: var(--display);
}

.article-index span {
  display: block;
  font-size: 0.9rem;
  color: #5c4c50;
  margin-top: 0.15rem;
}

/* points forts (checklist de réassurance) */
.points-forts {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.points-forts h3 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--burgundy);
}

.points-forts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.points-forts li {
  padding: 0.35rem 0 0.35rem 1.6rem;
  position: relative;
}

.points-forts li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* tableaux comparatifs */
main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

main th,
main td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

main th {
  font-family: var(--display);
  color: var(--burgundy);
  background: var(--panel);
  font-weight: 700;
}

main tr:last-child td {
  border-bottom: none;
}

/* ---- footer (même style visuel que le header) ---- */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--panel);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: #5c4c50;
}

footer > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--burgundy);
  text-decoration: none;
}

footer img {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

footer nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

footer p {
  margin: 0 0 0 auto;
}

@media (max-width: 40rem) {
  footer p {
    margin-left: 0;
  }
}

/* ---- sticky mobile CTA (id, not class -- one instance per page) ---- */

#sticky-cta {
  display: none;
}

@media (max-width: 30rem) {
  #sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--panel);
    border-top: 1px solid var(--line);
    text-align: center;
  }

  #sticky-cta a[rel~="sponsored"] {
    display: block;
    width: 100%;
    margin: 0;
  }

  main {
    padding-bottom: 5.5rem;
  }
}
