/* ═════════════════════════════════════════════════════════════════════════════
   ALLÔPHARMA — STYLES PAGE PILULIER & RAPPELS (Standard 100M€+)
   Conforme à DESIGN.md et docs/standards/UI-RADIUS-AND-SHADOW-STANDARDS.md
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
  --c-brand: #0b6b4f;
  --c-brand-dark: #074734;
  --c-brand-soft: #e8f5ef;
  --c-brand-border: #a7f3d0;
  
  --c-blue-500: #2563eb;
  --c-blue-soft: #eff6ff;
  --c-blue-border: #bfdbfe;
  
  --c-amber-500: #d97706;
  --c-amber-soft: #fef3c7;
  
  --c-bg-page: #f8fafc;
  --c-surface: #ffffff;
  --c-surface-alt: #f1f5f9;
  
  --c-text-main: #0f172a;
  --c-text-body: #334155;
  --c-text-muted: #64748b;
  --c-line-soft: #e2e8f0;
  --c-line-strong: #cbd5e1;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 6px 18px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
}

body.rappels-redesign {
  background: var(--c-bg-page);
  color: var(--c-text-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── HERO SECTION ── */
.rap-hero-section {
  padding: 110px 24px 48px;
  background: linear-gradient(180deg, #ffffff 0%, var(--c-bg-page) 100%);
  border-bottom: 1px solid var(--c-line-soft);
}

.rap-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.rap-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
}

.rap-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  border: 1px solid var(--c-brand-border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.rap-hero-h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text-main);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.rap-hero-h1 .highlight {
  color: var(--c-brand);
}

.rap-hero-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--c-text-muted);
  max-width: 620px;
  margin: 0 0 24px;
}

/* Sceau Déontologique */
.rap-trust-seal {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--c-line-soft);
  border-left: 3px solid var(--c-brand);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  max-width: 620px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--c-text-body);
  margin-bottom: 24px;
}

.rap-trust-seal svg {
  color: var(--c-brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.rap-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-rap-primary {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-brand);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0 22px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn-rap-primary:hover {
  background: var(--c-brand-dark);
}

.btn-rap-secondary {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--c-text-main);
  border: 1px solid var(--c-line-strong);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-rap-secondary:hover {
  background: var(--c-surface-alt);
  border-color: var(--c-text-muted);
}

/* ── SIMULATEUR INTERACTIF DE PILULIER (COLONNE DROITE) ── */
.rap-simulator-card {
  background: #ffffff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-line-soft);
}

.sim-date-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-observance-score {
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-brand-border);
}

/* Barre de progression d'observance */
.observance-tracker-box {
  background: var(--c-surface-alt);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.tracker-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--c-text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.tracker-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--c-line-soft);
  border-radius: 3px;
  overflow: hidden;
}

.tracker-bar-fill {
  height: 100%;
  width: 66%;
  background: var(--c-brand);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Onglets Moments de la Journée */
.moments-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.moment-tab-btn {
  background: var(--c-bg-page);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.moment-tab-btn:hover {
  background: #ffffff;
  border-color: var(--c-text-main);
  color: var(--c-text-main);
}

.moment-tab-btn.active {
  background: var(--c-brand-soft);
  border-color: var(--c-brand);
  color: var(--c-brand);
}

/* Liste des Prises */
.pill-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.pill-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.pill-card-row.taken {
  background: var(--c-bg-page);
  opacity: 0.85;
}

.pill-card-row.taken .pill-name {
  text-decoration: line-through;
  color: var(--c-text-muted);
}

.pill-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-time-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-text-muted);
  background: var(--c-surface-alt);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  min-width: 44px;
  text-align: center;
}

.pill-info-details {
  display: flex;
  flex-direction: column;
}

.pill-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text-main);
  line-height: 1.3;
}

.pill-dosage {
  font-size: 0.76rem;
  color: var(--c-text-muted);
}

.btn-toggle-take {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--c-line-strong);
  background: #ffffff;
  color: var(--c-text-body);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-take:hover {
  background: var(--c-surface-alt);
}

.pill-card-row.taken .btn-toggle-take {
  background: var(--c-brand-soft);
  border-color: var(--c-brand-border);
  color: var(--c-brand);
}

/* Zone d'ajout dynamique avec API Backend */
.sim-add-box {
  background: var(--c-surface-alt);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: relative;
}

.sim-add-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}

.sim-search-row {
  display: flex;
  gap: 8px;
}

.sim-search-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--c-text-main);
  outline: none;
}

.sim-search-input:focus {
  border-color: var(--c-brand);
}

.btn-sim-add {
  height: 36px;
  padding: 0 14px;
  background: var(--c-brand);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-sim-add:hover {
  background: var(--c-brand-dark);
}

.sim-api-feedback {
  font-size: 0.74rem;
  color: var(--c-text-muted);
  margin-top: 6px;
}

/* ── 4 PILIERS D'OBSERVANCE ── */
.rap-pillars-section {
  max-width: 1240px;
  margin: 64px auto;
  padding: 0 24px;
}

.section-header-centered {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-label-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.section-main-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--c-text-main);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-subtext {
  font-size: 0.96rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin: 0;
}

.pillars-4col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pillar-item-card {
  background: #ffffff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.pillar-icon-box {
  width: 40px;
  height: 40px;
  background: var(--c-brand-soft);
  border: 1px solid var(--c-brand-border);
  color: var(--c-brand);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.pillar-item-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text-main);
  margin: 0 0 8px;
}

.pillar-item-card p {
  font-size: 0.86rem;
  color: var(--c-text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── BANNIÈRE MODE AIDANT / FAMILLE ── */
.rap-family-section {
  max-width: 1240px;
  margin: 64px auto;
  padding: 0 24px;
}

.family-banner-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 85% 15%, rgba(52, 211, 153, 0.16), transparent 50%),
              linear-gradient(135deg, #053b2c 0%, #084c37 50%, #0b5f45 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -12px rgba(5, 59, 44, 0.35), var(--shadow-card);
  padding: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.family-watermark-bg {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 220px;
  height: 220px;
  color: #ffffff;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

.family-banner-copy {
  position: relative;
  z-index: 2;
}

.family-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.family-badge-dot {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #34d399;
}

.family-banner-title {
  color: #ffffff !important;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
}

.family-banner-desc {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

.family-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.family-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
}

.family-feature-pill svg {
  color: #6ee7b7;
}

.family-action-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.family-action-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.family-action-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.btn-family-register {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #064e3b !important;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-family-register:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

/* ── FAQ ACCORDÉON SEO ── */
.rap-faq-section {
  max-width: 860px;
  margin: 64px auto;
  padding: 0 24px;
}

.faq-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.faq-item-details {
  background: #ffffff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.faq-item-details[open] {
  border-color: var(--c-brand);
}

.faq-item-summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--c-text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item-summary::-webkit-details-marker {
  display: none;
}

.faq-item-summary svg {
  color: var(--c-text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item-details[open] .faq-item-summary svg {
  transform: rotate(180deg);
  color: var(--c-brand);
}

.faq-item-content {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--c-text-body);
}

/* ── PASSERELLE RUPTURE DE STOCK ── */
.rap-bridge-banner {
  max-width: 1240px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.bridge-banner-card {
  background: #ffffff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.bridge-banner-copy h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text-main);
  margin: 0 0 6px;
}

.bridge-banner-copy p {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  margin: 0;
}

.btn-bridge-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-brand);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-bridge-signal:hover {
  background: var(--c-brand-dark);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .rap-hero-grid {
    grid-template-columns: 1fr;
  }

  .pillars-4col-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .family-banner-card {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .rap-hero-section {
    padding-top: 86px;
  }

  .pillars-4col-grid {
    grid-template-columns: 1fr;
  }

  .moments-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .rap-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-rap-primary,
  .btn-rap-secondary {
    justify-content: center;
  }
}
