/* ============================================================
   NAFSOLÉA — Socle « Le carnet » (refonte 2026, phase 3)
   Chargée APRÈS style.css sur toutes les pages publiques et les
   espaces patient / psy. Elle unifie ce que les pages avaient
   chacune redéfini : titres, boutons, étiquettes, cartes, focus.
   Règle : une page ne redéfinit plus ses boutons ni ses titres ;
   elle utilise les classes ci-dessous.
   Polices : Poppins (tout) · Cormorant Garamond italique (UN mot
   d'accent, numéros, citations : .serif-it / .accent) · Caveat
   (signature « Fait avec ♥ », rare) · Tajawal (arabe).
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
  --paper:        #FDFAF2;
  --line:         #E6E1D6;   /* filets sur fond papier */
  --line-soft:    #EDE8DC;
  --ink:          #2B3B5E;
  --ink-soft:     #5A6E8A;   /* contraste 4,9:1 sur papier */
  --text-muted:   #5A6E8A;   /* remplace #8FA8C4 (contraste insuffisant) */
  --radius-ui:    10px;
  --font-accent:  'Cormorant Garamond', Georgia, serif;
  --success-bg:   #E6F0E8; --success-ink: #2F5D3A;
  --warning-bg:   #FBEFD9; --warning-ink: #7A4E0B;
  --danger-bg:    #F8E3E1; --danger-ink:  #8E2B22;
}

/* ── Fond et texte ─────────────────────────────────────────── */
body { background: var(--paper); }
p { color: var(--ink-soft); }

/* ── Titres : Poppins partout (même si une page demande Fraunces) ── */
h1, h2, h3, h4,
.page-hero h1, .hero h1, .section-header h2,
.psy-hero-name, .psy-name {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-style: normal !important;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-weight: 600 !important; font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.08; }
h2 { font-weight: 600 !important; font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.15; }
h3 { font-weight: 600; }

/* Le mot d'accent : Cormorant italique rose, jamais dans un paragraphe courant */
h1 .serif-it, h2 .serif-it, h3 .serif-it, .serif-it, .accent {
  font-family: var(--font-accent) !important;
  font-style: italic !important;
  font-weight: 500;
  color: var(--rose);
  letter-spacing: 0;
  font-size: 1.16em;
}
p .serif-it, li .serif-it, .lead .serif-it {
  /* dans le texte courant : on garde le sens, pas l'effet */
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: 600;
  font-size: 1em;
  color: var(--ink);
}

/* ── Étiquette de section : fini la pastille rose en majuscules ── */
.label, .section-header .label, .page-hero .label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: .95rem;
  font-weight: 500;
  color: var(--blue-text);
}
.label::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--rose);
  border-radius: 0;
}
.text-center .label, .section-header.text-center .label,
[style*="text-align:center"] .label, [style*="text-align: center"] .label { align-items: center; }
.label--sage { background: none; color: var(--blue-text); }

/* ── Boutons : un seul dessin, deux conventions de noms acceptées ── */
.btn, .btn-primary, .btn-secondary, .btn-outline, .btn-success, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-ui);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  box-shadow: none;
  transform: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover, .btn:active,
.btn--primary:hover, .btn--primary:active,
.btn--secondary:hover, .btn--terracotta:hover,
.btn-primary:hover, .btn-secondary:hover, .btn-outline:hover {
  transform: none;
  box-shadow: none;
}
/* Action d'engagement (réserver, payer) : rose */
.btn--primary, .btn--terracotta, .btn-primary {
  background: var(--rose); border: 1px solid var(--rose); color: #fff;
}
.btn--primary:hover, .btn--terracotta:hover, .btn-primary:hover {
  background: #9B3362; border-color: #9B3362; color: #fff;
}
/* Secondaire : contour bleu nuit */
.btn--secondary, .btn--outline, .btn-secondary, .btn-outline {
  background: #fff; border: 1px solid var(--ink); color: var(--ink);
}
.btn--secondary:hover, .btn--outline:hover, .btn-secondary:hover, .btn-outline:hover {
  background: var(--blue-pale); border-color: var(--ink); color: var(--ink);
}
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm, .btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }
.btn:disabled, .btn[disabled], .btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* ── Formulaires ───────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="search"], input[type="date"], input[type="datetime-local"],
select, textarea {
  border-radius: var(--radius-ui);
  border: 1px solid #CFE2F3;
  font-family: 'Poppins', sans-serif;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  color: var(--ink);
  background-color: #fff;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select { min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }

/* ── Cartes : bordure fine, pas d'ombre au repos ───────────── */
.problem-card, .step-card, .value-card, .review-card, .testimonial-card,
.psychologist-card, .blog-card, .psy-card, .psy-full-card, .postcard, .or-card {
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid var(--line);
  transform: none;
}
.problem-card:hover, .step-card:hover, .value-card:hover, .review-card:hover,
.psychologist-card:hover, .blog-card:hover, .psy-card:hover, .psy-full-card:hover {
  box-shadow: 0 8px 28px rgba(43,59,94,.10);
  transform: none;
}

/* ── Étiquettes (tags) : une seule famille sobre ───────────── */
.tag, .tag--sage {
  background: var(--blue-pale);
  color: var(--blue-text);
  border: 0;
  border-radius: 999px;
  font-weight: 500;
}

/* ── Apparitions au défilement : supprimées (laissaient des blocs vides) ── */
.reveal, .reveal.visible { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ── Lisibilité : plus de texte justifié (trous sur téléphone) ── */
.psy-section p, .psy-section .rich-content, .art-content.justified,
[style*="text-align: justify"], [style*="text-align:justify"] { text-align: left !important; }

/* ── Accessibilité clavier ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100000;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius-ui);
}
.skip-link:focus { top: 12px; }

/* ── Moins d'éléments flottants sur téléphone ──────────────── */
@media (max-width: 768px) {
  #naf-chat-bubble { display: none !important; }   /* « Besoin d'aide ? » : le bouton rond suffit */
  .scroll-top { display: none !important; }        /* bouton « haut de page » */
}

/* ── Arabe : Tajawal (choix de Sarah, 28/09/2026) au lieu de Cairo ── */
.lang-ar, .lang-ar body,
.lang-ar h1, .lang-ar h2, .lang-ar h3, .lang-ar h4, .lang-ar h5, .lang-ar h6,
.lang-ar p, .lang-ar a, .lang-ar button, .lang-ar input, .lang-ar textarea, .lang-ar select,
.lang-ar label, .lang-ar span, .lang-ar li, [lang="ar"] {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* ── Mouvement réduit ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── Pages de connexion / inscription : plus de débordement à droite sur téléphone ── */
.auth-form-wrap { min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 480px) {
  .btn, .btn-primary, .btn-secondary, .btn-outline { white-space: normal; text-align: center; }
}

/* ── Pied de page partagé : 5 colonnes (marque + Plateforme, Ressources, Professionnels, Contact) ── */
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)) !important; gap: 32px !important; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* L'attribut hidden doit toujours masquer un bouton ou un lien stylé (.btn impose un display) */
.btn[hidden], button[hidden], a[hidden] { display: none !important; }
