/* =================================================================
   SOS EHPAD — Design System Global
   Prefixe : sos-
   Version : 1.0 — Mars 2026
   ================================================================= */

/* --- Variables globales (charte graphique) --- */
:root {
  /* Couleurs principales */
  --sos-navy: #1e3a8a;
  --sos-navy-dark: #0f1b3d;
  --sos-blue: #2B6CB0;
  --sos-blue-light: #3B7DD8;
  --sos-teal: #5BA8A0;
  --sos-teal-hover: #4e9990;
  --sos-green: #7BC143;
  --sos-green-alt: #7ed957;
  --sos-green-dark: #5ca63a;
  --sos-green-deeper: #2b8a5e;
  --sos-cyan: #7de8ff;
  --sos-amber: #f59e0b;

  /* Fonds */
  --sos-bg: #F7FAFC;
  --sos-bg-alt: #f8fafc;
  --sos-card-bg: #FFFFFF;
  --sos-white: #FFFFFF;
  --sos-dark-bg: #0f172a;

  /* Texte */
  --sos-text: #2D3748;
  --sos-text-light: #718096;
  --sos-text-muted: #A0AEC0;

  /* Bordures & ombres */
  --sos-border: #E2E8F0;
  --sos-border-light: #EDF2F7;
  --sos-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --sos-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --sos-radius: 12px;
  --sos-radius-sm: 8px;
  --sos-radius-full: 50px;

  /* Layout */
  --sos-max-w: 1280px;
  --sos-content-w: 900px;

  /* Degrades */
  --sos-grad-hero: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2B6CB0 100%);
  --sos-grad-hero-alt: linear-gradient(135deg, #1a365d 0%, #2B6CB0 50%, #3B7DD8 100%);
  --sos-grad-cta: linear-gradient(135deg, #5ca63a 0%, #4a9e2f 100%);
  --sos-grad-teal: linear-gradient(135deg, #1e3a8a 0%, #5BA8A0 100%);

  /* Etats feedback */
  --sos-error: #E53E3E;
  --sos-error-bg: #FED7D7;
  --sos-success: #38A169;
  --sos-success-bg: #C6F6D5;
  --sos-info-bg: #EBF4FF;
  --sos-info-border: #BEE3F8;

  /* Typographie */
  --sos-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Helvetica, sans-serif;

  /* Transitions */
  --sos-transition: 0.2s ease;
  --sos-transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Prevent horizontal scroll on WooCommerce pages --- */
html:has(body.woocommerce-page),
body.woocommerce-page,
html:has(body.woocommerce),
body.woocommerce {
  overflow-x: clip !important;
}

/* --- Reset global --- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* --- Typographie de base --- */
html {
  font-size: 17px;
}
body {
  font-family: var(--sos-font);
  color: var(--sos-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Liens globaux --- */
a { transition: color var(--sos-transition); }

/* --- Conteneur --- */
.sos-container {
  max-width: var(--sos-max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Bouton CTA principal (vert) --- */
.sos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--sos-font);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--sos-radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--sos-transition);
  line-height: 1.4;
}
.sos-btn-primary {
  background: var(--sos-green);
  color: var(--sos-white);
}
.sos-btn-primary:hover {
  background: var(--sos-green-dark);
  transform: translateY(-1px);
  box-shadow: var(--sos-shadow-hover);
  color: var(--sos-white);
}
.sos-btn-outline {
  background: transparent;
  color: var(--sos-blue-light);
  border: 2px solid var(--sos-blue-light);
}
.sos-btn-outline:hover {
  background: var(--sos-blue-light);
  color: var(--sos-white);
}
.sos-btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

/* --- Badge --- */
.sos-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--sos-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sos-badge-navy {
  background: rgba(30,58,138,0.15);
  color: var(--sos-navy);
}
.sos-badge-teal {
  background: rgba(91,168,160,0.15);
  color: var(--sos-teal);
}
.sos-badge-green {
  background: rgba(123,193,67,0.15);
  color: var(--sos-green-dark);
}
.sos-badge-amber {
  background: rgba(245,158,11,0.15);
  color: #b45309;
}

/* --- Card de base --- */
.sos-card {
  background: var(--sos-card-bg);
  border: 1px solid var(--sos-border);
  border-radius: var(--sos-radius);
  overflow: hidden;
  transition: all var(--sos-transition);
}
.sos-card:hover {
  box-shadow: var(--sos-shadow-hover);
  transform: translateY(-2px);
}
.sos-card a {
  text-decoration: none;
  color: inherit;
}

/* --- Stat card (hero) --- */
.sos-stat {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--sos-radius);
  padding: 16px 20px;
  text-align: center;
}
.sos-stat-num {
  font-family: var(--sos-font);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--sos-white);
  line-height: 1.1;
}
.sos-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}

/* --- Section header (H2 avec bordure gauche) --- */
.sos-section-title {
  font-family: var(--sos-font);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sos-navy);
  border-left: 4px solid var(--sos-blue-light);
  padding-left: 16px;
  margin: 0 0 24px;
  line-height: 1.3;
}

/* --- Tag/categorie pill --- */
.sos-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--sos-radius-full);
  color: var(--sos-teal);
  background: rgba(91,168,160,0.1);
  text-decoration: none;
  transition: all var(--sos-transition);
}
.sos-tag:hover {
  background: rgba(91,168,160,0.2);
}

/* --- Champ de recherche (reusable) --- */
.sos-search-input {
  width: 100%;
  padding: 14px 20px;
  font-family: var(--sos-font);
  font-size: 15px;
  color: var(--sos-text);
  background: var(--sos-bg);
  border: 2px solid var(--sos-border);
  border-radius: var(--sos-radius-full);
  outline: none;
  transition: border-color var(--sos-transition);
}
.sos-search-input:focus {
  border-color: var(--sos-blue-light);
}
.sos-search-input::placeholder {
  color: var(--sos-text-muted);
}

/* --- Loading spinner --- */
.sos-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--sos-border);
  border-top-color: var(--sos-blue-light);
  border-radius: 50%;
  animation: sos-spin 0.7s linear infinite;
}
@keyframes sos-spin { to { transform: rotate(360deg); } }

/* --- Screen reader only --- */
.sos-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Utilitaires texte --- */
.sos-text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sos-text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .sos-container { padding: 0 16px; }
  .sos-btn { padding: 10px 22px; font-size: 14px; }
  .sos-section-title { font-size: 1.25rem; }
}
@media (max-width: 480px) {
  .sos-btn { padding: 10px 18px; font-size: 13px; }
}

/* --- Google AdSense containers --- */
.sos-ad {
  margin: 32px auto;
  max-width: 100%;
  overflow: hidden;
  clear: both;
}
.sos-ad-horizontal {
  margin: 36px auto;
}
.sos-ad-square {
  margin: 24px auto;
}
.sos-ad-vertical {
  margin: 20px 0;
}
.sos-ad ins { display: block; }

/* --- Landing pages : masquer titre WP et coller hero --- */
.page-id-44946 .wp-block-post-title,
.page-id-44290 .wp-block-post-title,
.page-id-44777 .wp-block-post-title {
  display: none !important;
}
.page-id-44946 .entry-content,
.page-id-44946 .wp-block-post-content,
.page-id-44290 .entry-content,
.page-id-44290 .wp-block-post-content,
.page-id-44777 .entry-content,
.page-id-44777 .wp-block-post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.page-id-44946 .g6-hero,
.page-id-44290 .sso-announce,
.page-id-44777 .vds-hero {
  margin-top: 0 !important;
}

/* --- Print --- */
@media print {
  .sos-btn, .sos-badge, .sos-spinner, .sos-ad { display: none !important; }
}

/* === PARTNER BANNERS (unified dossier-expert style) === */
.sos-partner-banners {
  max-width: var(--sos-max-w, 1280px);
  margin: 0 auto 32px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sos-partner-banner-item { width: 100%; }
.sos-partner-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(30,58,138,0.04) 0%, rgba(59,125,216,0.06) 100%);
  border: 1px solid var(--sos-border, #E2E8F0);
  border-left: 4px solid #2DCCD3;
  border-radius: var(--sos-radius, 12px);
  transition: box-shadow 0.2s;
}
.sos-partner-banner-inner:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.sos-partner-banner-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sos-partner-banner-icon svg {
  width: 24px;
  height: 24px;
  stroke: #2DCCD3;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sos-partner-banner-content {
  flex: 1;
  min-width: 0;
}
.sos-partner-banner-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.sos-partner-banner-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--sos-text, #2D3748);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
}
.sos-partner-banner-title:hover {
  color: var(--sos-blue, #2B6CB0);
}
.sos-partner-banner-desc {
  font-size: 13px;
  color: var(--sos-text-light, #718096);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sos-partner-banner-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-teal, #5BA8A0);
  text-decoration: none;
  white-space: nowrap;
}
.sos-partner-banner-cta:hover { color: var(--sos-blue, #2B6CB0); }
.sos-partner-banner-cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.sp-partner-banners { margin-bottom: 32px; }
@media (max-width: 768px) {
  .sos-partner-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
  }
  .sos-partner-banner-icon { display: none; }
  .sos-partner-banner-cta { align-self: flex-start; }
}
