/* Styles propres aux pages « public » (refonte 2026-09). Tout dans @layer pages ; composants partagés : assets/css/site.css. */
@layer pages {
  /* ==================== Accueil (index.php) ==================== */

  /* ---- Héros plein écran (photo assombrie, texte toujours clair quel que soit le thème) ---- */
  .home-hero {
    position: relative; isolation: isolate;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h) - env(safe-area-inset-top));
    display: flex; align-items: flex-end;
    color: #fff;
    background:
      linear-gradient(180deg, rgba(6, 9, 15, .35) 0%, rgba(6, 9, 15, .55) 45%, rgba(6, 9, 15, .92) 100%),
      linear-gradient(90deg, rgba(143, 15, 28, .45) 0%, rgba(143, 15, 28, 0) 60%),
      url(/assets/img/hero.jpg) center 35% / cover no-repeat,
      #0B0F17;
  }
  .home-hero::after {
    /* fondu vers le fond de page, pour que la suite enchaîne sans rupture */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: -1;
    background: linear-gradient(180deg, transparent, var(--bg));
  }
  .home-hero-inner {
    width: 100%; max-width: var(--maxw); margin-inline: auto;
    padding: 48px max(var(--gutter), env(safe-area-inset-right)) 40px max(var(--gutter), env(safe-area-inset-left));
    display: flex; flex-direction: column; gap: 16px;
  }
  .home-kicker {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 6px 12px; border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  }
  .home-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #FF3B4E; box-shadow: 0 0 0 4px rgba(255, 59, 78, .25); }
  .home-hero-title {
    font-family: var(--font-cond); font-weight: 800; text-transform: uppercase;
    font-size: clamp(3rem, 14vw, 6.5rem); line-height: .9; letter-spacing: -.005em;
    max-width: 14ch; overflow-wrap: break-word;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
  }
  .home-hero-sub { max-width: 36rem; font-size: 1.08rem; line-height: 1.5; color: rgba(255, 255, 255, .86); }
  .home-hero-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
  .home-hero-cta .btn { width: 100%; }
  .home-btn-glass {
    background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .home-btn-glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }
  .home-btn-white { background: #fff; color: #8F0F1C; }
  .home-btn-white:hover { background: rgba(255, 255, 255, .9); color: #8F0F1C; }
  .home-hero-points {
    list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px;
    font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .82);
  }
  .home-hero-points li { display: inline-flex; align-items: center; gap: 6px; }
  .home-hero-points svg { color: #4ADE80; }

  @media (min-width: 48rem) {
    .home-hero-cta { flex-direction: row; }
    .home-hero-cta .btn { width: auto; min-width: 200px; }
  }
  @media (min-width: 64rem) {
    .home-hero { min-height: min(760px, calc(100vh - var(--header-h))); align-items: center; }
    .home-hero-inner { padding-block: 80px; gap: 20px; }
    .home-hero-sub { font-size: 1.2rem; }
  }

  /* ---- Sections ---- */
  .page.home { gap: 56px; padding-top: 24px; }
  .home-section { scroll-margin-top: calc(var(--header-h) + 12px); display: flex; flex-direction: column; gap: 20px; }
  .home-section-head { display: flex; flex-direction: column; gap: 6px; max-width: 44rem; }
  .home-eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--red-text); }
  .home-section-title {
    font-family: var(--font-cond); font-weight: 800; text-transform: uppercase;
    font-size: clamp(2rem, 8.5vw, 3rem); line-height: .95;
  }
  .home-section-lead { color: var(--muted); }
  @media (min-width: 64rem) { .page.home { gap: 88px; padding-top: 40px; } }

  /* ---- Fonctionnalités : cartes à icône ---- */
  .home-features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .home-feature { display: flex; align-items: flex-start; gap: 14px; }
  .home-feature > * + * { margin-top: 0; }
  .home-feature h3 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .01em; }
  .home-feature p { margin-top: 4px; color: var(--muted); font-size: .95rem; }
  .home-feature-icon {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--red) 14%, var(--surface)); color: var(--red-text);
    border: 1px solid color-mix(in srgb, var(--red) 28%, transparent);
  }
  @media (min-width: 48rem) { .home-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
  @media (min-width: 64rem) {
    .home-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-feature { flex-direction: column; gap: 16px; padding: 24px; }
    .home-feature-icon { width: 52px; height: 52px; }
  }

  /* ---- Aperçu statistiques ---- */
  .home-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-stats-links { display: flex; flex-direction: column; gap: 10px; }
  .home-link-card { display: flex; align-items: center; gap: 14px; color: var(--text); }
  .home-link-card > * + * { margin-top: 0; }
  .home-link-card:hover { text-decoration: none; border-color: var(--muted); }
  .home-link-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
  .home-link-body strong { font-family: var(--font-cond); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; line-height: 1.1; }
  .home-link-text { font-size: .9rem; color: var(--muted); }
  .home-link-chev { flex-shrink: 0; color: var(--muted); transform: rotate(-90deg); display: inline-flex; }
  @media (min-width: 64rem) {
    .home-stats { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
    .home-stats-links { padding-top: 24px; }
  }

  /* ---- Tarifs ---- */
  .home-pricing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px; }
  .home-pricing > * + * { margin-top: 0; }
  .home-pricing-main, .home-pricing-calc { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .home-price { display: flex; flex-direction: column; gap: 2px; }
  .home-price-big { font-family: var(--font-cond); font-weight: 800; font-size: 72px; line-height: .9; color: var(--text); }
  .home-price-unit { font-weight: 600; color: var(--muted); }
  .home-checks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
  .home-checks li { display: flex; gap: 10px; align-items: flex-start; }
  .home-checks svg { flex-shrink: 0; margin-top: 2px; color: var(--up); }
  .home-pricing-calc { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
  .home-pricing-calc .price-breakdown { background: var(--surface); }
  .home-pricing-calc .range-value { background: var(--surface); }
  @media (min-width: 64rem) {
    .home-pricing { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 32px; align-items: center; }
    .home-price-big { font-size: 96px; }
    .home-pricing-calc { padding: 24px; }
  }

  /* ---- FAQ ---- */
  .home-faq { max-width: 52rem; }

  /* ---- Appel final ---- */
  .home-final {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 12px;
    padding: 28px 20px; border-radius: var(--r-lg); color: #fff;
    background:
      radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%),
      linear-gradient(135deg, var(--red), var(--red-deep));
  }
  .home-final-title {
    font-family: var(--font-cond); font-weight: 800; text-transform: uppercase;
    font-size: clamp(2.2rem, 10vw, 3.5rem); line-height: .92;
  }
  .home-final p { color: rgba(255, 255, 255, .9); max-width: 36rem; }
  @media (min-width: 64rem) { .home-final { padding: 48px; } }

  /* ==================== Statistiques publiques ==================== */
  .pub-rank { font-family: var(--font-cond); font-weight: 800; font-size: 1.15rem; color: var(--muted); }
  .pub-player { min-width: 150px; }
  .pub-sm { display: flex; align-items: center; gap: 6px; }
  @media (min-width: 48rem) { .pub-sm { display: none; } .pub-player { min-width: 190px; } }
  @media (max-width: 47.99rem) {
    .pub-table .player-cell { gap: 8px; }
    .pub-table img.mug { width: 30px; height: 30px; }
    .pub-table th, .pub-table td { padding-inline: 7px; }
  }
  .pub-detail { min-width: 220px; max-width: 420px; }
  .pub-sm-detail { display: block; margin-top: 4px; line-height: 1.45; }
  @media (min-width: 48rem) { .pub-sm-detail { display: none; } }
  @media (max-width: 47.99rem) {
    table.pub-table.table-list tr { align-items: flex-start; }
    table.pub-table.table-list td.tl-main { position: static; }
    table.pub-table.table-list .player-cell { align-items: flex-start; }
  }
  table.data td.pub-pts { font-family: var(--font-cond); font-weight: 800; font-size: 1.2rem; color: var(--text); }
  .pub-filters { display: flex; flex-direction: column; gap: 8px; }
  .pub-cta { display: flex; flex-direction: column; gap: 10px; }
  .pub-cta .actions .btn { flex: 1 1 auto; }
  @media (min-width: 48rem) { .pub-cta .actions .btn { flex: 0 0 auto; } }

  /* ==================== Entreprises / Entreprise ==================== */
  .co-offer .stat-value { font-size: 24px; }
  .co-points { font-family: var(--font-cond); font-weight: 800; font-size: 1.2rem; color: var(--blue); }
  .co-logo { border-radius: 10px; }
  .co-logo-lg { border-radius: 16px; }
  .co-head { display: flex; align-items: center; gap: 14px; }
  .co-head > div { min-width: 0; }
  .co-logo-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .co-logo-form input[type="file"] { max-width: 100%; min-width: 0; font-size: 14px; color: var(--muted); }
  .co-logo-form input[type="file"]::file-selector-button {
    min-height: 38px; margin-right: 10px; padding: 0 12px; border-radius: var(--r-sm);
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  }
  @media (max-width: 47.99rem) { .co-head .avatar-lg { width: 64px; height: 64px; font-size: 26px; } }
  .co-add-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  @media (min-width: 48rem) { .co-add-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; } }
  @media (max-width: 63.99rem) { .co-layout { display: flex; flex-direction: column; gap: 20px; } }
  .co-msgs { display: flex; flex-direction: column; gap: 12px; }
  .co-msg { display: flex; gap: 10px; align-items: flex-start; }
  .co-msg-bubble {
    flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 4px 14px 14px 14px;
    background: var(--surface-2); border: 1px solid var(--border);
  }
  .co-msg.mine { flex-direction: row-reverse; }
  .co-msg.mine .co-msg-bubble {
    border-radius: 14px 4px 14px 14px;
    background: color-mix(in srgb, var(--red) 12%, var(--surface)); border-color: color-mix(in srgb, var(--red) 30%, transparent);
  }
  .co-msg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
  .co-msg-meta form { margin: 0 0 0 auto; }
  .co-msg-body { margin-top: 4px; overflow-wrap: anywhere; }
  .co-del { width: 38px; padding: 0; }

  /* Pages juridiques (/conditions, /confidentialite) */
  .legal-intro { font-size: 1.05rem; line-height: 1.6; }
  .legal-toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
  .legal-toc a { font-weight: 600; }
  .legal-body { line-height: 1.65; }
  .legal-section + .legal-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
  .legal-section .section-title { margin-bottom: 10px; font-size: 20px; }
  .legal-section p + p, .legal-section p + ul, .legal-section ul + p { margin-top: 10px; }
  .legal-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; list-style: disc; }
  .legal-list li::marker { color: var(--red); }
  .legal-section { scroll-margin-top: calc(var(--header-h) + 16px); }
}
