/*
Theme Name: Espace K2 Bien-être
Description: Thème WordPress personnalisé pour le cabinet de kinésithérapie Espace K2 à Nîmes. Design moderne avec palette de couleurs naturelles (sable, cacao, cuivre).
Version: 1.0.0
Author: Espace K2
Text Domain: espace-k2
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset et base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #523e36;
  background-color: #faf9f7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

/* Container système */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Color system K2 */
:root {
  /* Sand colors */
  --sand-50: #faf9f7;
  --sand-100: #f4f2ed;
  --sand-200: #e8e3d9;
  --sand-300: #d9d0c0;
  --sand-400: #c7b8a2;
  --sand-500: #b5a088;
  --sand-600: #9d8870;
  --sand-700: #82705c;
  --sand-800: #695c4d;
  --sand-900: #564c42;

  /* Cacao colors */
  --cacao-50: #f7f5f3;
  --cacao-100: #ede8e3;
  --cacao-200: #ddd2c7;
  --cacao-300: #c8b6a3;
  --cacao-400: #b19580;
  --cacao-500: #9e7c64;
  --cacao-600: #906a58;
  --cacao-700: #78574a;
  --cacao-800: #62493f;
  --cacao-900: #523e36;

  /* Copper colors */
  --copper-50: #fdf8f6;
  --copper-100: #f9ede8;
  --copper-200: #f3dbd0;
  --copper-300: #ebc0ab;
  --copper-400: #e19d7e;
  --copper-500: #d87d5a;
  --copper-600: #ca6642;
  --copper-700: #aa5137;
  --copper-800: #8b4432;
  --copper-900: #723a2d;

  /* Orange colors */
  --orange-50: #fef7ed;
  --orange-100: #fdedd4;
  --orange-200: #fbd7a8;
  --orange-300: #f8bc71;
  --orange-400: #f59638;
  --orange-500: #f37817;
  --orange-600: #e45d0d;
  --orange-700: #bd470d;
  --orange-800: #973813;
  --orange-900: #7c2f13;
}

/* Utility classes */
.text-gradient {
  background: linear-gradient(135deg, #e45d0d 0%, #ca6642 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-primary {
  background: linear-gradient(135deg, #f59638 0%, #e45d0d 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #b5a088 0%, #9e7c64 100%);
}

.section-padding {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--copper-600);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: var(--copper-700);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: white;
}

.btn-secondary {
  background-color: var(--sand-100);
  color: var(--cacao-800);
  border: 1px solid var(--sand-300);
}

.btn-secondary:hover {
  background-color: var(--sand-200);
  color: var(--cacao-800);
  text-decoration: none;
}

/* Card styles */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Header styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--cacao-800);
  text-decoration: none;
}

.logo-copper {
  color: var(--copper-600);
}

.logo img {
  height: 3rem;
  width: 3rem;
}

.nav-desktop {
  display: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
  }
}

.nav-link {
  color: var(--cacao-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--copper-600);
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.hamburger {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cacao-700);
  transition: all 0.3s ease;
}

.hamburger span:nth-child(2) {
  margin: 0.25rem 0;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.3rem, 0.3rem);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.3rem, -0.3rem);
}

.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--sand-200);
  padding: 1.5rem;
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav .nav-link {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--sand-200);
}

.mobile-nav .nav-link:last-child {
  border-bottom: none;
}

.mobile-nav .btn {
  margin-top: 1rem;
  align-self: flex-start;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sand-50), var(--sand-100), var(--copper-50));
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(82, 62, 54, 0.2), transparent);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 64rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--cacao-800);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4.5rem;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--cacao-600);
  margin-bottom: 2rem;
  font-weight: 300;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--cacao-500);
  margin-bottom: 3rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-location {
  margin-top: 4rem;
  color: var(--cacao-400);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .hero-location {
    font-size: 1rem;
  }
}

.hero-decorative {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  animation: pulse 2s infinite;
}

.hero-decorative:nth-child(1) {
  top: 5rem;
  left: 2.5rem;
  width: 5rem;
  height: 5rem;
  background: var(--copper-200);
}

.hero-decorative:nth-child(2) {
  bottom: 5rem;
  right: 2.5rem;
  width: 8rem;
  height: 8rem;
  background: var(--orange-200);
  animation-delay: 1s;
}

.hero-decorative:nth-child(3) {
  top: 50%;
  left: 1.25rem;
  width: 4rem;
  height: 4rem;
  background: var(--sand-300);
  animation-delay: 2s;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Footer */
.footer {
  background: var(--cacao-900);
  color: var(--sand-100);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.footer h3 {
  color: var(--copper-400);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer a {
  color: var(--sand-200);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--copper-400);
}

.footer-bottom {
  border-top: 1px solid var(--cacao-700);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: var(--sand-300);
}

/* Responsive utilities */
.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md-block {
    display: block;
  }
  
  .md-hidden {
    display: none;
  }
}

/* WordPress specific styles */
.wp-block-image {
  margin: 0;
}

.wp-block-image img {
  height: auto;
  max-width: 100%;
}

/* Blog Styles */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.blog-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
  position: relative;
  overflow: hidden;
}

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

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

.blog-placeholder {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, var(--sand-100), var(--copper-100));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cacao-600);
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--cacao-500);
}

.blog-date {
  color: var(--cacao-600);
}

.blog-separator {
  color: var(--cacao-400);
}

.blog-categories a {
  color: var(--copper-600);
  text-decoration: none;
  font-weight: 500;
}

.blog-categories a:hover {
  color: var(--copper-700);
}

.blog-card-title {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.blog-card-title a {
  color: var(--cacao-800);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-card-title a:hover {
  color: var(--copper-600);
}

.blog-card-excerpt {
  color: var(--cacao-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.blog-read-more {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--cacao-500);
}

.blog-author img {
  border-radius: 50%;
}

/* Blog Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.blog-pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.blog-pagination a,
.blog-pagination span {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--cacao-700);
  border: 1px solid var(--sand-300);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.blog-pagination a:hover {
  background: var(--copper-600);
  color: white;
  border-color: var(--copper-600);
}

.blog-pagination .current {
  background: var(--copper-600);
  color: white;
  border-color: var(--copper-600);
}

/* Newsletter */
.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .newsletter-form {
    flex-direction: column;
  }
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--sand-300);
  border-radius: 0.5rem;
  font-size: 1rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--copper-600);
  box-shadow: 0 0 0 3px rgba(202, 102, 66, 0.1);
}

/* Article Single Page */
.article-single {
  max-width: 1000px;
  margin: 0 auto;
}

.article-breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.article-breadcrumb a:hover {
  color: var(--copper-600);
}

.article-title {
  font-size: 2.5rem;
  color: var(--cacao-800);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

.article-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-body {
  color: var(--cacao-700);
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-body h2 {
  color: var(--cacao-800);
  margin: 2rem 0 1rem;
  font-size: 1.8rem;
}

.article-body h3 {
  color: var(--cacao-800);
  margin: 1.5rem 0 1rem;
  font-size: 1.4rem;
}

.article-body h4 {
  color: var(--cacao-800);
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  background: var(--sand-50);
  border-left: 4px solid var(--copper-600);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
  font-style: italic;
  color: var(--cacao-600);
}

.article-body code {
  background: var(--sand-100);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--cacao-800);
}

.article-body pre {
  background: var(--cacao-900);
  color: var(--sand-100);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-tags a:hover {
  background: var(--copper-600);
  color: white;
}

.article-share a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Related Articles */
.related-articles {
  background: var(--sand-50);
  margin-top: 4rem;
  border-radius: 1rem;
  padding: 3rem 0;
}

.related-articles .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.related-articles .card h4 a:hover {
  color: var(--copper-600);
}

/* Archive Pages */
.archive-hero {
  background: linear-gradient(135deg, var(--sand-50), var(--sand-100), var(--copper-50));
}

.blog-empty {
  text-align: center;
  padding: 4rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-card-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .article-share {
    text-align: center;
  }
  
  .article-share div {
    justify-content: center;
  }
}

/* Accessibility */
.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;
}

/* Focus styles */
.btn:focus,
.nav-link:focus,
button:focus {
  outline: 2px solid var(--copper-600);
  outline-offset: 2px;
}

/* Blog specific focus styles */
.blog-card:focus-within {
  outline: 2px solid var(--copper-600);
  outline-offset: 2px;
}

.blog-card-title a:focus,
.blog-read-more:focus {
  outline: 2px solid var(--copper-600);
  outline-offset: 2px;
}