/* ============================================
   EHPAD SAINT-JOSEPH AUBENAS — Senior Living Warmth
   Premium design: chaleureux, humain, accessible
   ============================================ */

:root {
  --bordeaux: #8B2252;
  --bordeaux-dark: #6B1A3F;
  --bordeaux-light: #A83267;
  --beige: #F5E6E0;
  --beige-dark: #EBD5CC;
  --olive: #6B7B3E;
  --olive-light: #8A9E52;
  --cream: #FDF8F5;
  --white: #ffffff;
  --gray-text: #5A5A5A;
  --text-dark: #2D2D2D;
  --font-heading: 'Literata', serif;
  --font-body: 'Poppins', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 28px rgba(0,0,0,0.1);
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.8;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--bordeaux);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--bordeaux-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--bordeaux);
}

h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 3px solid var(--bordeaux);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--bordeaux);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--beige);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--bordeaux);
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.logo-leaf {
  width: 40px;
  height: 40px;
  background: var(--olive);
  border-radius: 50% 10% 50% 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.logo-leaf::before {
  content: '';
  width: 2px;
  height: 18px;
  background: rgba(255,255,255,0.6);
  position: absolute;
  transform: rotate(30deg);
}

.logo-leaf::after {
  content: '';
  width: 12px;
  height: 2px;
  background: rgba(255,255,255,0.6);
  position: absolute;
  top: 55%;
  transform: rotate(-20deg);
}

/* Large text navigation for seniors */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 6px;
}

.main-nav a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.main-nav a:hover {
  color: var(--bordeaux);
  background: rgba(139,34,82,0.06);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--bordeaux);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--beige);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--beige) 40%, var(--beige-dark) 100%);
}

/* Decorative warm pattern */
.hero-bg-image::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(180deg, rgba(139,34,82,0.04), rgba(107,123,62,0.04));
  clip-path: ellipse(80% 100% at 100% 50%);
}

.hero-decor {
  position: absolute;
  right: 5%;
  bottom: 10%;
  width: 180px;
  height: 180px;
  border: 3px solid rgba(139,34,82,0.1);
  border-radius: 50%;
}

.hero-decor::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 2px solid rgba(107,123,62,0.1);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0;
  max-width: 640px;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--olive);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero h1 span {
  color: var(--olive);
  font-style: italic;
}

.hero-text {
  color: var(--gray-text);
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 32px;
}

.btn-warm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bordeaux);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(139,34,82,0.2);
}

.btn-warm:hover {
  background: var(--bordeaux-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139,34,82,0.3);
}

.btn-outline-warm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--bordeaux);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 50px;
  border: 2px solid var(--bordeaux);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline-warm:hover {
  background: var(--bordeaux);
  color: var(--white);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== RESIDENCE SECTION ===== */
.residence-section {
  padding: 80px 0;
}

.residence-header {
  text-align: center;
  margin-bottom: 48px;
}

.residence-header h2 {
  margin-bottom: 12px;
}

.residence-subtitle {
  color: var(--gray-text);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.residence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.residence-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--beige-dark);
  transition: all var(--transition);
}

.residence-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(139,34,82,0.85) 0%, rgba(139,34,82,0.2) 60%, transparent 100%);
  z-index: 1;
  transition: all var(--transition);
}

.residence-card:hover::before {
  background: linear-gradient(to top, rgba(139,34,82,0.9) 0%, rgba(139,34,82,0.4) 70%, rgba(139,34,82,0.1) 100%);
}

.residence-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.residence-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.residence-card:hover img { transform: scale(1.05); }

.residence-card-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  color: var(--white);
}

.residence-card-content h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.residence-card-content p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== PARALLAX ARDECHE SECTION ===== */
.ardeche-section {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--beige-dark);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.ardeche-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245,230,224,0.92), rgba(139,34,82,0.08));
}

.ardeche-content {
  position: relative;
  z-index: 2;
  padding: 64px 24px;
  max-width: 700px;
}

.ardeche-content h2 {
  margin-bottom: 16px;
}

.ardeche-content p {
  color: var(--gray-text);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ===== ARTICLES SECTION ===== */
.articles-section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.section-header h2 {
  position: relative;
  padding-bottom: 12px;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--olive);
  border-radius: 2px;
}

.view-all {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bordeaux);
  padding: 10px 24px;
  border: 2px solid var(--bordeaux);
  border-radius: 50px;
  transition: all var(--transition);
}

.view-all:hover {
  background: var(--bordeaux);
  color: var(--white);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* Article Card — warmth design */
.article-card {
  background: var(--white);
  border-left: 4px solid var(--bordeaux);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.article-card:hover .card-image img {
  transform: scale(1.03);
}

.card-image {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--beige);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-bottom: 12px;
}

.card-body h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.card-body h3 a { color: var(--bordeaux); }
.card-body h3 a:hover { color: var(--bordeaux-dark); }

.card-excerpt {
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--olive);
  transition: gap var(--transition);
}

.card-link:hover { gap: 12px; color: var(--olive-light); }
.card-link::after { content: '\2192'; }

/* ===== SINGLE ARTICLE ===== */
.article-single {
  padding: 48px 0 80px;
}

.article-content {
  max-width: 740px;
  margin: 0 auto;
}

.article-hero-img {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}

.article-header {
  margin-bottom: 36px;
}

.article-header h1 {
  margin-bottom: 16px;
  line-height: 1.35;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 2px solid var(--beige);
  border-bottom: 2px solid var(--beige);
  font-size: 0.9rem;
  color: var(--gray-text);
}

/* Large readable content */
.article-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
}

.article-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--olive);
}

.article-content p {
  margin-bottom: 22px;
  font-size: 1.1rem;
  line-height: 1.9;
}

.article-content ul, .article-content ol {
  margin: 22px 0;
  padding-left: 28px;
}

.article-content li {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.article-content blockquote {
  border-left: 4px solid var(--bordeaux);
  background: var(--beige);
  padding: 28px 32px;
  margin: 36px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--bordeaux-dark);
}

.article-content img {
  border-radius: var(--radius-sm);
  margin: 36px 0;
  box-shadow: var(--shadow);
}

.article-content a {
  color: var(--bordeaux);
  border-bottom: 1px solid var(--beige-dark);
}

.article-content a:hover { border-bottom-color: var(--bordeaux); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bordeaux);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Wheelchair accessible icon in CSS */
.footer-accessible {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

.accessible-icon {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.accessible-icon::before {
  content: '\2660';
  transform: rotate(180deg);
}

.footer-col h4 {
  color: var(--beige);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--beige); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .residence-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--beige);
    border-top: 1px solid var(--beige-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .main-nav.active { display: block; }

  .main-nav ul {
    flex-direction: column;
    padding: 16px;
  }

  .main-nav a { font-size: 1.1rem; padding: 12px 16px; }

  .hero { min-height: 360px; }
  .hero-content { padding: 48px 0; }
  .hero-decor { display: none; }

  .residence-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-meta-bar { flex-wrap: wrap; gap: 12px; }

  .ardeche-section {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; }
  .btn-warm, .btn-outline-warm { width: 100%; justify-content: center; }
}

/* No aggressive animations for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .ardeche-section { display: none; }
  .article-content { max-width: 100%; }
  body { font-size: 12pt; }
}

/* ================================================================
   UPGRADED SINGLE ARTICLE — SEO Features
   ================================================================ */

.ehpads-article {
  padding: 48px 0 80px;
}

.ehpads-article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.ehpads-breadcrumb {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ehpads-breadcrumb a {
  font-weight: 600;
  transition: color 0.2s ease;
}

.ehpads-breadcrumb a:hover {
  opacity: 0.8;
}

.ehpads-breadcrumb span {
  color: #ccc;
}

.ehpads-article-header {
  margin-bottom: 32px;
}

.ehpads-article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.ehpads-article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #888;
  flex-wrap: wrap;
}

.ehpads-meta-sep {
  color: #ccc;
}

.ehpads-reading-time {
  font-weight: 500;
}

.ehpads-article-cover {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
}

.ehpads-article-cover img {
  width: 100%;
  height: auto;
}

.ehpads-article-body {
  font-size: 1.05rem;
  line-height: 1.85;
}

.ehpads-article-body h2 {
  margin: 48px 0 16px;
}

.ehpads-article-body h3 {
  margin: 36px 0 12px;
}

.ehpads-article-body p {
  margin-bottom: 20px;
}

.ehpads-article-body ul,
.ehpads-article-body ol {
  margin: 16px 0 24px 24px;
}

.ehpads-article-body li {
  margin-bottom: 8px;
}

.ehpads-article-body blockquote {
  border-left: 4px solid currentColor;
  padding: 20px 28px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.ehpads-article-body img {
  border-radius: 8px;
  margin: 28px 0;
}

.ehpads-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid #e5e5e5;
}

.ehpads-related h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.ehpads-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ehpads-related-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ehpads-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

.ehpads-related-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ehpads-related-card:hover img {
  transform: scale(1.05);
}

.ehpads-related-card h4 {
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ehpads-related-card a {
  display: block;
  color: inherit;
}

@media (max-width: 768px) {
  .ehpads-related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ehpads-article-header h1 {
    font-size: 1.8rem;
  }
}
