﻿/* ===== PREMIERS SECOURS PAGE — SPECIFIC STYLES ===== */

/* Hero */
.ps-hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ps-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.ps-hero:hover .ps-hero__bg { transform: scale(1); }
.ps-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198,40,40,.9) 0%, rgba(230,57,70,.7) 100%);
}
.ps-hero__content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-top: 6rem;
  padding-bottom: 3rem;
}
.ps-hero__content .hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: var(--radius-full);
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.ps-hero__content h1 {
  font-size: clamp(1.85rem, 5.5vw, 2.85rem);
  font-family: 'Merriweather', serif;
  margin-bottom: 1rem;
  max-width: 720px;
  line-height: 1.25;
}
.ps-hero__content p {
  font-size: 1.1rem;
  opacity: .92;
  max-width: 620px;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}
.ps-hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.ps-hero__ctas .btn-secondary {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
}
.ps-hero__ctas .btn-secondary:hover { background: rgba(255,255,255,.25); }

/* Numéros d'urgence */
.ps-urgence {
  background: linear-gradient(135deg, #c62828 0%, #e63946 100%);
  padding: 2rem 0;
  color: #fff;
}
.ps-urgence__title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  opacity: .9;
}
.urgence-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.urgence-number {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: var(--radius-lg);
  padding: .85rem 1.5rem;
  text-align: center;
  min-width: 130px;
  transition: background .2s, transform .2s;
  cursor: default;
}
.urgence-number:hover { background: rgba(255,255,255,.25); transform: translateY(-2px); }
.urgence-number__num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .25rem;
}
.urgence-number__label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  opacity: .85;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Gestes rapides */
.ps-gestes {
  padding: 3rem 0 2.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}
.ps-gestes__title {
  text-align: center;
  font-family: 'Merriweather', serif;
  font-size: 1.7rem;
  color: var(--color-secondary);
  margin-bottom: .5rem;
}
.ps-gestes__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: .95rem;
}
.gestes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}
.geste-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  border-top: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.geste-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--color-primary-dark);
}
.geste-card--blue  { border-top-color: #457b9d; }
.geste-card--green { border-top-color: #2a9d8f; }
.geste-card--orange{ border-top-color: #f4a261; }
.geste-card__icon { font-size: 2.5rem; margin-bottom: .75rem; display: block; }
.geste-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: .5rem;
}
.geste-card__desc {
  font-size: .875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Layout principal */
.ps-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
  align-items: start;
}
.ps-main { min-width: 0; }
.ps-main section { margin-bottom: 3.5rem; }
.ps-main h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  color: var(--color-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ps-main h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 1.5rem 0 .75rem;
}
.ps-main p { color: #495057; line-height: 1.85; margin-bottom: 1rem; }
.ps-main ul, .ps-main ol { padding-left: 1.5rem; color: #495057; line-height: 1.85; margin-bottom: 1rem; }
.ps-main li { margin-bottom: .4rem; }

/* Étapes numérotées */
.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}
.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid #e9ecef;
  margin-bottom: .75rem;
  box-shadow: var(--shadow-sm);
}
.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Boîte d'alerte */
.alert-box {
  background: #fff3f3;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.alert-box__icon { font-size: 1.5rem; flex-shrink: 0; }
.alert-box__content { color: #c62828; font-size: .925rem; line-height: 1.7; }
.alert-box__content strong { color: #b71c1c; }

.info-box {
  background: #e8f4fd;
  border-left: 4px solid #457b9d;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .9rem;
  color: #1d3557;
  line-height: 1.7;
}

/* Articles premiers secours */
.ps-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.ps-article-card {
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e9ecef;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.ps-article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ps-article-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.ps-article-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.ps-article-card__tag {
  display: inline-block;
  background: #ffebee;
  color: var(--color-primary);
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .65rem;
  border-radius: var(--radius-full);
  margin-bottom: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ps-article-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.4;
  margin-bottom: .5rem;
}
.ps-article-card__excerpt { font-size: .875rem; color: var(--color-text-muted); line-height: 1.6; flex: 1; }
.ps-article-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #f0f0f0;
  font-size: .8rem;
  color: var(--color-text-muted);
}
.ps-article-card__link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: .85rem;
}
.ps-article-card__link:hover { text-decoration: underline; }

/* Sidebar */
.ps-sidebar { position: sticky; top: calc(var(--header-height) + 1.5rem); }
.ps-toc {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid #e9ecef;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.ps-toc h3 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}
.ps-toc ul { list-style: none; padding: 0; }
.ps-toc li { border-bottom: 1px solid #f0f0f0; }
.ps-toc li:last-child { border-bottom: none; }
.ps-toc a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 0;
  font-size: .875rem;
  color: #495057;
  text-decoration: none;
  transition: color .15s;
}
.ps-toc a:hover { color: var(--color-primary); }

.ps-cta-box {
  background: linear-gradient(135deg, var(--color-primary), #c62828);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  color: #fff;
  text-align: center;
}
.ps-cta-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.ps-cta-box p  { font-size: .85rem; opacity: .9; margin-bottom: 1rem; line-height: 1.6; }
.ps-cta-box .btn {
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  border: none;
  padding: .65rem 1.25rem;
  font-size: .875rem;
  width: 100%;
  display: block;
  text-align: center;
}
.ps-cta-box .btn:hover { background: #ffebee; }

/* Tableau gestes rapides */
.quick-ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.quick-ref-table thead tr {
  background: var(--color-secondary);
  color: #fff;
}
.quick-ref-table th { padding: .7rem 1rem; text-align: left; font-weight: 600; }
.quick-ref-table td { padding: .65rem 1rem; border-bottom: 1px solid #e9ecef; }
.quick-ref-table tbody tr:nth-child(even) { background: #f8f9fa; }
.quick-ref-table tbody tr:last-child td { border-bottom: none; }
.quick-ref-table .badge-urgent {
  background: #ffebee;
  color: #c62828;
  border-radius: var(--radius-full);
  padding: .15rem .65rem;
  font-size: .75rem;
  font-weight: 700;
}
.quick-ref-table .badge-ok {
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: var(--radius-full);
  padding: .15rem .65rem;
  font-size: .75rem;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1024px) {
  .ps-layout { grid-template-columns: 1fr; }
  .ps-sidebar { position: static; }
  .ps-toc { display: none; }
}
@media (max-width: 640px) {
  .urgence-numbers { gap: .75rem; }
  .urgence-number { min-width: 100px; padding: .65rem 1rem; }
  .urgence-number__num { font-size: 1.6rem; }
  .gestes-grid { grid-template-columns: 1fr 1fr; }
  .ps-articles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .gestes-grid { grid-template-columns: 1fr; }
}

/* ===== MODE SOMBRE ===== */
[data-theme="dark"] .ps-gestes {
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
}
[data-theme="dark"] .ps-gestes__title  { color: #e2e8f0; }

[data-theme="dark"] .geste-card {
  background: #1a1d27;
  border-color: var(--color-border);
  color: var(--color-text);
}
[data-theme="dark"] .geste-card__title { color: #e2e8f0; }
[data-theme="dark"] .geste-card__desc  { color: var(--color-text-muted); }

[data-theme="dark"] .ps-main h2 {
  color: #e2e8f0;
  border-bottom-color: var(--color-border);
}
[data-theme="dark"] .ps-main h3  { color: #e2e8f0; }
[data-theme="dark"] .ps-main p,
[data-theme="dark"] .ps-main ul,
[data-theme="dark"] .ps-main ol  { color: var(--color-text-muted); }

[data-theme="dark"] .steps-list li {
  background: #1a1d27;
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

[data-theme="dark"] .alert-box {
  background: #2a1010;
  border-color: var(--color-primary);
}
[data-theme="dark"] .alert-box__content         { color: #f48080; }
[data-theme="dark"] .alert-box__content strong  { color: #ff8080; }

[data-theme="dark"] .info-box {
  background: #0f1e2d;
  border-left-color: #457b9d;
  color: #94a3b8;
}

/* Tableau */
[data-theme="dark"] .quick-ref-table thead tr { background: #252836; }
[data-theme="dark"] .quick-ref-table td        { border-bottom-color: var(--color-border); color: var(--color-text-muted); }
[data-theme="dark"] .quick-ref-table tbody tr:nth-child(even) { background: #14161f; }
[data-theme="dark"] .quick-ref-table .badge-urgent { background: #3a1010; color: #f48080; }
[data-theme="dark"] .quick-ref-table .badge-ok     { background: #0d2510; color: #6fcf97; }

/* Sidebar TOC */
[data-theme="dark"] .ps-toc {
  background: #1a1d27;
  border-color: var(--color-border);
}
[data-theme="dark"] .ps-toc h3 { color: #94a3b8; }
[data-theme="dark"] .ps-toc li { border-bottom-color: var(--color-border); }
[data-theme="dark"] .ps-toc a  { color: var(--color-text-muted); }
[data-theme="dark"] .ps-toc a:hover { color: var(--color-primary); }

/* Cartes articles */
[data-theme="dark"] .ps-article-card {
  background: #1a1d27;
  border-color: var(--color-border);
}
[data-theme="dark"] .ps-article-card__title   { color: #e2e8f0; }
[data-theme="dark"] .ps-article-card__excerpt { color: var(--color-text-muted); }
[data-theme="dark"] .ps-article-card__meta {
  border-top-color: var(--color-border);
  color: var(--color-text-muted);
}
/* Pastille rose claire résiduelle en sombre */
[data-theme="dark"] .ps-article-card__tag { background: #3a1010; color: #f48080; }
