/*
Theme Name: Emilie Kinésithérapie
Theme URI: https://emiliebuissiere.fr
Author: Emilie Bussière
Author URI: https://emiliebuissiere.fr
Description: A simple and elegant portal theme for Emilie Bussière, Kinésithérapeute
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emilie-kine
Tags: one-column, custom-colors, custom-logo, featured-images
*/

/* ===================================
   CSS VARIABLES & ROOT
   =================================== */
:root {
  /* Color Palette - Sage & Warm Tones */
  --color-primary: #7B9E87;
  --color-primary-dark: #5A7D66;
  --color-primary-light: #A8C4B0;
  --color-accent: #D4A574;
  --color-accent-dark: #B8864F;

  /* Neutrals */
  --color-cream: #FBF9F6;
  --color-sand: #F5F0E8;
  --color-stone: #E8E2D9;
  --color-charcoal: #2C3E35;
  --color-text: #3D4A42;
  --color-text-light: #6B7770;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   RESET & BASE
   =================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

p {
  margin-bottom: var(--space-sm);
}

/* ===================================
   LAYOUT
   =================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

/* ===================================
   PORTAL HERO
   =================================== */
.portal-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(123, 158, 135, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-cream) 0%, var(--color-sand) 100%);
}

.portal-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237B9E87' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.portal-content {
  position: relative;
  z-index: 1;
  padding: var(--space-md);
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo / Image */
.portal-logo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-primary-light);
  box-shadow: 0 8px 40px rgba(123, 158, 135, 0.2);
  margin-bottom: var(--space-md);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.portal-logo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  box-shadow: 0 8px 40px rgba(123, 158, 135, 0.2);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.portal-logo-placeholder svg {
  width: 60px;
  height: 60px;
  fill: white;
}

/* Title */
.portal-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-xs);
  color: var(--color-charcoal);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.portal-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Tagline */
.portal-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
  animation: fadeInUp 1s ease-out 0.5s both;
}

/* ===================================
   BUTTONS & LINKS
   =================================== */
.portal-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.portal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.portal-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.portal-link:hover::before {
  left: 100%;
}

.portal-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Primary Button - Agenda */
.portal-link--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(123, 158, 135, 0.3);
}

.portal-link--primary:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 158, 135, 0.4);
}

/* Secondary Button */
.portal-link--secondary {
  background: white;
  color: var(--color-charcoal);
  border: 2px solid var(--color-stone);
}

.portal-link--secondary:hover {
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ===================================
   SOCIAL ICONS
   =================================== */
.portal-socials {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  animation: fadeInUp 1s ease-out 0.7s both;
  position: relative;
  z-index: 2;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  color: var(--color-text);
  border: 2px solid var(--color-stone);
  transition: all var(--transition-smooth);
}

.social-link svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.social-link:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.social-link--instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-link--facebook:hover {
  background: #1877f2;
}

.social-link--linkedin:hover {
  background: #0a66c2;
}

.social-link--email:hover {
  background: var(--color-accent);
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* ===================================
   DECORATIVE ELEMENTS
   =================================== */
.decorative-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: var(--space-md) auto;
}

/* ===================================
   FOOTER
   =================================== */
.portal-footer {
  position: absolute;
  bottom: var(--space-md);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  animation: fadeInUp 1s ease-out 0.8s both;
  z-index: 0;
}

.portal-footer a {
  color: var(--color-primary);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  .portal-logo,
  .portal-logo-placeholder {
    width: 120px;
    height: 120px;
  }

  .portal-links {
    max-width: 280px;
  }

  .portal-socials {
    gap: var(--space-sm);
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .portal-footer {
    display: none;
  }
}

/* ===================================
   WORDPRESS SPECIFIC
   =================================== */
.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Admin bar adjustment */
body.admin-bar .portal-hero {
  min-height: calc(100vh - 32px);
}

@media (max-width: 782px) {
  body.admin-bar .portal-hero {
    min-height: calc(100vh - 46px);
  }
}

/* ===================================
   ANIMATED BACKGROUND SHAPES
   =================================== */
.portal-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.portal-bg__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: morphShape 25s infinite ease-in-out;
}

.portal-bg__shape--1 {
  width: 400px;
  height: 400px;
  top: -150px;
  right: -100px;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  animation-delay: 0s;
}

.portal-bg__shape--2 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: -100px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  animation-delay: -8s;
}

.portal-bg__shape--3 {
  width: 200px;
  height: 200px;
  top: 40%;
  right: 10%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  animation-delay: -16s;
}

.portal-bg__shape--4 {
  width: 250px;
  height: 250px;
  bottom: -80px;
  right: 30%;
  background: linear-gradient(135deg, var(--color-stone), var(--color-primary-light));
  animation-delay: -12s;
}

@keyframes morphShape {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    transform: translate(30px, -50px) scale(1.1) rotate(45deg);
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9) rotate(90deg);
    border-radius: 50% 60% 30% 60% / 30% 40% 70% 50%;
  }
  75% {
    transform: translate(40px, 30px) scale(1.05) rotate(135deg);
    border-radius: 40% 30% 60% 50% / 60% 50% 40% 30%;
  }
}

/* ===================================
   PORTAL LOGO IMPROVEMENTS
   =================================== */
.portal-logo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-md);
  box-shadow: 0 8px 40px rgba(123, 158, 135, 0.3);
  animation: fadeInUp 1s ease-out 0.2s both;
  border: 4px solid var(--color-primary-light);
}

.portal-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===================================
   SCROLL INDICATOR
   =================================== */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
  color: var(--color-text-light);
  font-size: 0.85rem;
  animation: fadeInUp 1s ease-out 1s both;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.scroll-indicator:hover {
  color: var(--color-primary);
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

@media (max-width: 768px) {
  .scroll-indicator {
    display: none;
  }
}

/* ===================================
   PREVIEW SECTION (HOME)
   =================================== */
.preview-section {
  padding: var(--space-xl) 0;
  background: var(--color-sand);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.preview-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.preview-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.preview-card__image {
  height: 200px;
  overflow: hidden;
}

.preview-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card:hover .preview-card__image img {
  transform: scale(1.08);
}

.preview-card__content {
  padding: var(--space-md);
}

.preview-card__content h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-xs);
}

.preview-card__content p {
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}

.preview-card__icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin-bottom: var(--space-md);
}

.preview-card__icon svg {
  width: 32px;
  height: 32px;
}

.preview-card--accent {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
}

.preview-card--accent h3 {
  color: white;
}

.preview-card--accent p {
  color: rgba(255, 255, 255, 0.85);
}

.preview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  transition: all var(--transition-fast);
}

.preview-link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.preview-link:hover {
  color: var(--color-accent-dark);
}

.preview-link:hover svg {
  transform: translateX(4px);
}

.preview-link--white {
  color: white;
}

.preview-link--white:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Preview section animations */
.preview-section [data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.preview-section [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.preview-section [data-delay="100"] { transition-delay: 0.1s; }
.preview-section [data-delay="200"] { transition-delay: 0.2s; }

@media (max-width: 1024px) {
  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-card--accent {
    grid-column: span 2;
  }
}

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

  .preview-card--accent {
    grid-column: span 1;
  }

  .portal-bg__shape--1 {
    width: 250px;
    height: 250px;
  }

  .portal-bg__shape--2 {
    width: 200px;
    height: 200px;
  }

  .portal-bg__shape--3,
  .portal-bg__shape--4 {
    display: none;
  }
}

/* ===================================
   HOME FOOTER
   =================================== */
.home-footer {
  background: var(--color-charcoal);
  color: white;
  padding: var(--space-lg) 0 var(--space-md);
}

.home-footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-footer__brand h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: white;
  margin: 0;
}

.home-footer__brand p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 0.9rem;
}

.home-footer__nav {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.home-footer__nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.home-footer__nav a:hover {
  color: var(--color-primary-light);
}

.home-footer__social {
  display: flex;
  gap: var(--space-sm);
}

.home-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all var(--transition-fast);
}

.home-footer__social a:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.home-footer__social svg {
  width: 18px;
  height: 18px;
}

.home-footer__bottom {
  padding-top: var(--space-md);
  text-align: center;
}

.home-footer__bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 768px) {
  .home-footer__content {
    flex-direction: column;
    text-align: center;
  }

  .home-footer__nav {
    justify-content: center;
  }

  .home-footer__social {
    justify-content: center;
  }
}

