/* =========================================================
   Paroles de Femmes — Design system
   Palette : violet profond, rose poudré, blanc cassé, beige clair
   Objectif : chaleureux, sobre, accessible (contrastes AA), responsive.
   ========================================================= */

:root {
  /* Couleurs */
  --violet-profond: #4a2c6f;
  --violet-soft:    #6b4a96;
  --rose-poudre:    #e7c6d4;
  --rose-clair:     #f6e7ee;
  --blanc-casse:    #fbf8f4;
  --beige-clair:    #f0e9df;
  --texte:          #2b2230;
  --texte-doux:     #5a4f63;
  --urgence:        #b4123f;
  --urgence-fond:   #fdeaf0;
  --focus:          #1f6feb;
  --blanc:          #ffffff;

  /* Typographie */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-base: 1.0625rem;   /* 17px, lisible */
  --lh-base: 1.65;

  /* Rayons & ombres */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 6px 24px rgba(74, 44, 111, 0.10);
  --shadow-soft: 0 2px 10px rgba(74, 44, 111, 0.07);

  /* Espacements */
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--texte);
  background: var(--blanc-casse);
  -webkit-font-smoothing: antialiased;
}

/* Accessibilité : focus toujours visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Lien d'évitement clavier */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--violet-profond);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

img { max-width: 100%; height: auto; }

a { color: var(--violet-profond); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============== Barre d'urgence / sortie rapide ============== */
.topbar {
  background: var(--violet-profond);
  color: #fff;
  font-size: 0.95rem;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar p { margin: 0; }
.topbar a { color: #fff; text-decoration: underline; }

.btn-quit {
  background: #fff;
  color: var(--violet-profond);
  border: none;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
}
.btn-quit:hover { background: var(--rose-clair); }

/* ============== En-tête / navigation ============== */
.site-header {
  background: var(--blanc-casse);
  border-bottom: 1px solid var(--beige-clair);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--violet-profond);
  text-decoration: none;
}
.brand .mark {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  background: var(--rose-poudre);
  border-radius: 50%;
}
.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--texte);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.nav a:hover, .nav a[aria-current="page"] {
  background: var(--rose-clair);
  color: var(--violet-profond);
}
.nav-toggle { display: none; }

/* ============== Boutons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.2;
}
.btn-primary { background: var(--violet-profond); color: #fff; }
.btn-primary:hover { background: var(--violet-soft); }
.btn-secondary { background: var(--rose-poudre); color: var(--violet-profond); }
.btn-secondary:hover { background: var(--rose-clair); }
.btn-outline { background: transparent; color: var(--violet-profond); border-color: var(--violet-profond); }
.btn-outline:hover { background: var(--rose-clair); }
.btn-help { background: var(--urgence); color: #fff; }
.btn-help:hover { background: #94042f; }

/* ============== Hero / Accueil ============== */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, var(--rose-clair), transparent),
    linear-gradient(180deg, var(--blanc-casse), var(--beige-clair));
  padding: 64px 0 56px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  color: var(--violet-profond);
  margin: 0 0 14px;
  max-width: 18ch;
}
.hero .lead {
  font-size: 1.2rem;
  color: var(--texte-doux);
  max-width: 56ch;
  margin: 0 0 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============== Cartes d'accès ============== */
.section { padding: 56px 0; }
.section h2 {
  color: var(--violet-profond);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
}
.section .sub { color: var(--texte-doux); margin: 0 0 32px; max-width: 60ch; }

.cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: var(--blanc);
  border: 1px solid var(--beige-clair);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--rose-clair);
  border-radius: 14px;
  font-size: 1.6rem;
}
.card h3 { margin: 6px 0 0; color: var(--violet-profond); font-size: 1.25rem; }
.card p { margin: 0; color: var(--texte-doux); }
.card .more { margin-top: auto; font-weight: 700; color: var(--violet-profond); }

/* ============== Bloc d'urgence ============== */
.emergency {
  background: var(--urgence-fond);
  border: 1px solid #f3c2d0;
  border-left: 6px solid var(--urgence);
  border-radius: var(--radius);
  padding: 26px;
}
.emergency h2 { color: var(--urgence); margin-top: 0; }
.emergency-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 10px;
}
.emergency-num {
  background: #fff;
  border: 1px solid #f3c2d0;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.emergency-num .num {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--urgence);
  text-decoration: none;
}
.emergency-num .lbl { color: var(--texte-doux); font-size: 0.95rem; }
.emergency .note { font-size: 0.95rem; color: var(--texte-doux); margin: 6px 0 0; }

/* ============== Pied de page ============== */
.site-footer {
  background: var(--violet-profond);
  color: #efe7f5;
  padding: 48px 0 28px;
  margin-top: 40px;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.footer-grid h4 { margin: 0 0 12px; color: #fff; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.9rem;
  color: #d9cce6;
}

/* ============== Disclaimer générique ============== */
.disclaimer {
  background: var(--rose-clair);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--texte-doux);
  font-size: 0.97rem;
}

/* ============== Messagerie interne ============== */
.messages-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2fr);
  gap: 22px;
  align-items: start;
}
.conversation-list { display: grid; gap: 10px; }
.conversation-list .card { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.message-thread { display: grid; gap: 12px; min-height: 240px; }
.message-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--beige-clair);
}
.message-bubble.mine { margin-left: auto; background: var(--rose-clair); }
.message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble small { color: var(--texte-doux); }

/* ============== Responsive ============== */
@media (max-width: 880px) {
  .cards { grid-template-columns: 1fr; }
  .emergency-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .messages-layout { grid-template-columns: 1fr; }

  .nav-toggle {
    display: inline-flex;
    background: var(--rose-poudre);
    color: var(--violet-profond);
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
  }
  .nav.open { display: flex; }
  .site-header .container { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .emergency-grid { grid-template-columns: 1fr; }
  .topbar .container { flex-direction: column; align-items: flex-start; }
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
