/*
Theme Name: Etch Child Theme
Description: Thème enfant du site du livre du Dr Alexis Delobaux.
Template: etch-theme
Version: 1.0.1
Text Domain: etch-child-theme
Requires PHP: 8.0
*/

/* ==========================================================================
   PAGE RÉSULTAT : ESPACEMENT, SCORE FLOUTÉ & AMÉLIORATION DE CONVERSION
   ========================================================================== */

/* 1. ESPACEMENT & ÉLÉVATION DE LA CARTE FORMULAIRE (Recevoir mon récapitulatif) */
[data-report-access-gate] {
  margin-bottom: clamp(36px, 4.5vw, 54px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease;
}

[data-report-access-gate][hidden] {
  display: none !important;
}

/* Alignement et finition de la section résultat */
.route[data-page="resultat"] .result-page,
#route-resultat .result-page {
  padding-bottom: clamp(48px, 6vw, 80px) !important;
}

/* 2. SCORE FLOUTÉ (INCITATION À LA COLLECTE D'E-MAIL) */
.result-total {
  position: relative;
  transition: filter 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease, opacity 0.3s ease;
}

.is-score-locked .result-total {
  filter: blur(8.5px);
  -webkit-filter: blur(8.5px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  transform: scale(0.97);
  opacity: 0.88;
}

/* Masquage de l'interprétation automatique si score verrouillé pour éviter de divulguer la tranche */
.is-score-locked .approved-result {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  opacity: 0.6;
}

/* 3. INTERACTION & BADGE SUR LA CARTE DE SCORE VERROUILLÉE */
.result-count-box.is-locked {
  cursor: pointer;
  border-radius: 12px;
  padding: 8px;
  margin: -8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.result-count-box.is-locked:hover {
  background: rgba(174, 57, 88, 0.04);
}

.result-count-box.is-locked:hover .result-total {
  opacity: 1;
}

.score-unlock-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.015em;
  color: #ffffff;
  background: var(--primary, #ae3958);
  border: 1px solid var(--primary, #ae3958);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(174, 57, 88, 0.2);
  text-decoration: none;
  white-space: nowrap;
}

.score-unlock-pill:hover,
.score-unlock-pill:focus-visible {
  background: #942b46;
  border-color: #942b46;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(174, 57, 88, 0.32);
}

.score-unlock-pill .icon-lock {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
  flex-shrink: 0;
}

/* 4. ÉTAT DES BOUTONS DE TÉLÉCHARGEMENT/IMPRESSION EN ATTENTE D'E-MAIL */
.result-tools .button.outline.is-locked,
.result-tools .button.text.is-locked {
  opacity: 0.65;
  cursor: pointer;
  position: relative;
}

/* 5. RESPONSIVE ADAPTATIONS */
@media (max-width: 780px) {
  [data-report-access-gate] {
    margin-bottom: 28px !important;
  }
  .result-count-box.is-locked {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 0;
    margin: 0;
  }
  .score-unlock-pill {
    margin-top: 2px;
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   PAGE PRESSE & ARTICLES : AMÉLIORATION DE LA GRILLE ET DES CARTES MÉDIAS
   ========================================================================== */

/* En-tête et lien de retour (alignement gauche parfait) */


.route[data-page="presse"] .page-top .back-link,
#route-presse .page-top .back-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--muted, #657079) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
}

.route[data-page="presse"] .page-top .back-link:hover,
#route-presse .page-top .back-link:hover {
  color: var(--ink, #1f282d) !important;
  transform: translateX(-2px) !important;
}

/* Grilles Presse */
.lipo-press-library {
  display: grid !important;
  gap: 28px !important;
  width: 100% !important;
  margin-top: 20px !important;
  margin-bottom: 44px !important;
}

/* Section 1 : 4 articles nationaux en grille 2x2 équilibrée */
.lipo-press-library-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Section 2 : 11 articles en grille 3 colonnes */
.lipo-press-library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Cartes Articles */
.lipo-media-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 32px 28px !important;
  background: var(--ivory, #faf8f5) !important;
  border: 1px solid var(--line, #e6e2de) !important;
  border-radius: 14px !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.lipo-media-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px rgba(36, 49, 57, 0.08) !important;
  border-color: rgba(174, 57, 88, 0.3) !important;
}

/* Logos des médias : intégration élégante transparente */
.lipo-media-card .lipo-press-logo {
  display: block !important;
  width: auto !important;
  max-width: 190px !important;
  height: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  margin: 0 auto 22px !important;
  background: transparent !important;
  border: none !important;
}

.lipo-media-card h2 {
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: var(--ink, #1f282d) !important;
  margin: 0 0 10px !important;
}

.lipo-media-card .caption {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--primary, #ae3958) !important;
  margin: 0 0 12px !important;
}

.lipo-media-card p:not(.caption) {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--ink-soft, #556068) !important;
  margin: 0 0 24px !important;
  flex-grow: 1 !important;
}

.lipo-media-card a {
  align-self: flex-start !important;
  margin-top: auto !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--primary, #ae3958) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: color 0.2s ease, gap 0.2s ease !important;
}

.lipo-media-card a:hover {
  color: #942b46 !important;
  gap: 10px !important;
  text-decoration: underline !important;
}

/* Séparateurs de sections */
.press-section-divider {
  margin-top: 54px !important;
  margin-bottom: 24px !important;
  padding-top: 36px !important;
  border-top: 1px solid var(--line, #e6e2de) !important;
  width: 100% !important;
  text-align: left !important;
}

.press-section-divider.is-first {
  margin-top: 24px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.press-section-divider h2 {
  font-size: clamp(23px, 2.4vw, 29px) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin-bottom: 10px !important;
  color: var(--ink, #1f282d) !important;
}

.press-section-divider p {
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  color: var(--muted, #657079) !important;
  margin: 0 !important;
}

/* Responsivité tablettes & mobiles */
@media (max-width: 1050px) {
  .lipo-press-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
  .lipo-press-library-4 {
    gap: 22px !important;
  }
}

@media (max-width: 680px) {
  .lipo-press-library-4,
  .lipo-press-library-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .lipo-media-card {
    padding: 24px 20px !important;
  }
  .press-section-divider {
    margin-top: 38px !important;
    padding-top: 28px !important;
  }
}

/* ==========================================================================
   HOMEPAGES (ACCUEIL & PRÉCOMMANDE) : RESPIRATION BANDEAU RÉSULTAT & SECTION LIVRE
   ========================================================================== */
main .section.result-return,
.section.result-return {
  padding-top: clamp(28px, 3.5vw, 40px) !important;
  padding-bottom: clamp(52px, 6vw, 76px) !important;
}

main .section.book-section,
.section.book-section {
  padding-top: clamp(52px, 6vw, 76px) !important;
}

main .lipo-newsletter-section + .book-section {
  padding-top: clamp(48px, 5.5vw, 72px) !important;
}
