/**
 * GRACE Homepage Styles - Version corrigée
 */

:root {
  --grace-primary: #1f96c8;
  --grace-primary-dark: #1a7ba8;
  --grace-orange: #f5a623;
  --grace-dark: #333333;
  --grace-gray: #f5f5f5;
  --grace-gray-dark: #e9e9e9;
  --grace-white: #ffffff;
  --grace-text: #666666;
  --grace-text-light: #888888;
}

/* ================================
   HEADER - Style original
   ================================ */
.header {
  background: var(--grace-white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header__top {
  background: var(--grace-white);
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}

.header__top .container {
  display: flex;
  justify-content: flex-end;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-form input {
  border: 1px solid #ddd;
  padding: 6px 12px;
  font-size: 0.85rem;
  width: 200px;
}

.search-form button {
  background: none;
  border: none;
  color: var(--grace-text-light);
  cursor: pointer;
  padding: 6px 10px;
}

.header__main {
  padding: 15px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img {
  height: 50px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

.main-nav li a {
  display: block;
  padding: 10px 15px;
  color: var(--grace-dark);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.3s;
}

.main-nav li a:hover,
.main-nav li.active a {
  color: var(--grace-primary);
}

.lang-switcher {
  display: flex;
  gap: 10px;
}

.lang-switcher a {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--grace-text);
  font-size: 0.85rem;
}

.lang-switcher img {
  width: 20px;
  height: auto;
}

/* ================================
   HERO SLIDER
   ================================ */
.hero-slider {
  position: relative;
  height: 400px;
  overflow: hidden;
  background: var(--grace-gray-dark);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--grace-white);
  max-width: 900px;
  width: 90%;
  padding: 20px;
}

.slide__content h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 400;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 1px;
}

.slide__content h2 strong {
  font-weight: 700;
  color: var(--grace-primary);
}

.slide__content p {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.slider__prev,
.slider__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  border: none;
  color: var(--grace-white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  z-index: 10;
}

.slider__prev:hover,
.slider__next:hover {
  background: rgba(0,0,0,0.5);
}

.slider__prev { left: 15px; }
.slider__next { right: 15px; }

.slider__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.slider__dot.active {
  background: var(--grace-primary);
}

/* ================================
   BUTTONS
   ================================ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn--primary {
  background: var(--grace-primary);
  color: var(--grace-white);
}

.btn--primary:hover {
  background: var(--grace-primary-dark);
}

.btn--outline-white {
  background: transparent;
  border-color: var(--grace-white);
  color: var(--grace-white);
}

.btn--outline-white:hover {
  background: var(--grace-white);
  color: var(--grace-primary);
}

/* ================================
   PARTNERS LOGOS
   ================================ */
.partners {
  padding: 25px 0;
  text-align: center;
  background: var(--grace-white);
  border-bottom: 1px solid #eee;
}

.partners__intro {
  margin-bottom: 15px;
  color: var(--grace-text);
  font-size: 0.9rem;
}

.partners__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.partners__logos img {
  height: 25px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s;
  filter: grayscale(100%);
}

.partners__logos a:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

/* ================================
   SECTION TITLES
   ================================ */
.section-title {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 25px;
  text-transform: uppercase;
  color: var(--grace-dark);
  letter-spacing: 1px;
}

.text-primary {
  color: var(--grace-primary);
}

/* ================================
   LATEST CONTENT
   ================================ */
.latest-content {
  padding: 40px 0;
  background: var(--grace-white);
}

.latest-content__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.content-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.content-card {
  background: var(--grace-white);
  border: 1px solid #eee;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.content-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.content-card__image {
  position: relative;
  height: 100px;
  background: var(--grace-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-card__type {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--grace-primary);
  color: var(--grace-white);
  padding: 3px 8px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content-card__title {
  padding: 12px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--grace-dark);
  line-height: 1.4;
  margin: 0;
}

.link-more {
  color: var(--grace-primary);
  text-decoration: none;
  font-size: 0.85rem;
}

.link-more:hover {
  text-decoration: underline;
}

/* ================================
   FEATURES (GRACE-Audit, Protocoles, Kit)
   ================================ */
.features {
  padding: 40px 0;
  background: var(--grace-gray);
}

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

.feature-box {
  background: var(--grace-white);
  padding: 30px 20px;
  text-align: center;
  border: 1px solid #eee;
}

.feature-box__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-box__icon i,
.feature-box__icon svg {
  font-size: 2.5rem;
  color: var(--grace-text-light);
}

.feature-box__title {
  margin-bottom: 12px;
  font-size: 1rem;
}

.feature-box__title a {
  color: var(--grace-primary);
  text-decoration: none;
}

.feature-box__title a:hover {
  text-decoration: underline;
}

.feature-box p {
  color: var(--grace-text);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ================================
   CTA BANNER (Espace Patient)
   ================================ */
.cta-banner {
  padding: 50px 0;
  text-align: center;
  color: var(--grace-white);
}

.cta-banner--patient {
  background: var(--grace-primary);
}

.cta-banner h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 2px;
}

.cta-banner p {
  max-width: 550px;
  margin: 0 auto 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ================================
   CENTERS SECTION
   ================================ */
.centers-section {
  padding: 50px 0;
  background: var(--grace-white);
}

.centers-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.centers-section__map img {
  max-width: 100%;
}

.centers-section__content h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--grace-dark);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 1px;
}

.centers-section__content p {
  color: var(--grace-text);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.centers-section__content strong {
  color: var(--grace-primary);
  font-weight: 600;
}

/* ================================
   STATS SECTION
   ================================ */
.stats-section {
  padding: 40px 0;
  background: var(--grace-primary);
  color: var(--grace-white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item__icon {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.9;
}

.stat-item__number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-item__label {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.3;
}

/* ================================
   MEMBERSHIP + TESTIMONIALS
   ================================ */
.membership-section {
  padding: 50px 0;
  background: var(--grace-white);
}

.membership-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.membership-benefits h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.benefits-list li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--grace-text);
  font-size: 0.9rem;
}

.benefits-list i {
  color: var(--grace-primary);
}

/* Testimonials */
.testimonials {
  background: var(--grace-gray);
  padding: 25px;
}

.testimonials h2 {
  font-size: 1rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.testimonial blockquote {
  font-style: italic;
  color: var(--grace-text);
  line-height: 1.6;
  margin: 0 0 15px 0;
  font-size: 0.9rem;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial__author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial__author strong {
  display: block;
  color: var(--grace-dark);
  font-size: 0.85rem;
}

.testimonial__author span {
  font-size: 0.8rem;
  color: var(--grace-text-light);
}

/* ================================
   NEWSLETTER
   ================================ */
.newsletter-section {
  padding: 40px 0;
  background: var(--grace-white);
  border-top: 1px solid #eee;
}

.newsletter-section__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  align-items: center;
}

.newsletter-section h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.newsletter-section__text p {
  color: var(--grace-text);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.newsletter-section__form label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.85rem;
  color: var(--grace-text);
}

.newsletter-section__form input[type="email"] {
  width: 100%;
  max-width: 400px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.newsletter-section__form button {
  padding: 10px 25px;
  font-size: 0.85rem;
}

/* ================================
   FOOTER
   ================================ */
.footer {
  background: #2c3e50;
  color: var(--grace-white);
  padding: 25px 0;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer__content p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer__links a {
  color: var(--grace-white);
  text-decoration: none;
  margin: 0 12px;
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer__links a:hover {
  opacity: 1;
}

.footer__social a {
  color: var(--grace-white);
  font-size: 1rem;
  margin-left: 12px;
  opacity: 0.7;
}

.footer__social a:hover {
  opacity: 1;
}

/* ================================
   CONTAINER
   ================================ */
.container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 992px) {
  .header__inner {
    flex-wrap: wrap;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
    margin-top: 15px;
  }
  
  .main-nav ul {
    justify-content: center;
  }
  
  .latest-content__grid,
  .centers-section__grid,
  .membership-section__grid,
  .newsletter-section__grid {
    grid-template-columns: 1fr;
  }
  
  .features__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 300px;
  }
  
  .slide__content h2 {
    font-size: 1.3rem;
  }
  
  .slide__content p {
    font-size: 0.9rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  
  .stat-item__number {
    font-size: 2rem;
  }
  
  .content-cards {
    grid-template-columns: 1fr;
  }
  
  .footer__content {
    flex-direction: column;
    text-align: center;
  }
  
  .partners__logos {
    gap: 20px;
  }
}

/* ================================
   HIDE DUPLICATE ELEMENTS
   ================================ */
.homepage .page-wrapper > .header ~ .header,
.homepage .partners + .partners {
  display: none;
}

/* ================================
   MENU STYLE - Version originale
   ================================ */
.main-nav ul.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.main-nav ul.menu > li {
  position: relative;
}

.main-nav ul.menu > li > a {
  display: block;
  padding: 15px 18px;
  color: var(--grace-dark);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}

.main-nav ul.menu > li > a:hover,
.main-nav ul.menu > li.menu-item--active-trail > a,
.main-nav ul.menu > li:hover > a {
  background: var(--grace-primary);
  color: var(--grace-white);
}

/* Dropdown */
.main-nav ul.menu > li > ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--grace-white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 1000;
}

.main-nav ul.menu > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav ul.menu > li > ul > li > a {
  display: block;
  padding: 10px 20px;
  color: var(--grace-dark);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  transition: background 0.2s;
}

.main-nav ul.menu > li > ul > li > a:hover {
  background: var(--grace-gray);
}

/* Espace membre - style vert/différent dans l'original */
.main-nav ul.menu > li.menu-item--espace-membre > a {
  /* On peut ajouter une classe spéciale si besoin */
}

/* Header layout ajusté */
.header__main .container {
  max-width: 1200px;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header__logo {
  flex-shrink: 0;
}

.header__logo img {
  height: 55px;
  width: auto;
}

.main-nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-start;
  margin-left: 30px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 8px;
}

.lang-switcher a {
  display: block;
}

.lang-switcher img {
  width: 24px;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.lang-switcher a:hover img,
.lang-switcher a.active img {
  opacity: 1;
}

/* Search in topbar */
.header__top {
  background: #f8f8f8;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.header__top .search-form {
  display: flex;
  justify-content: flex-end;
}

.header__top .search-form input {
  border: 1px solid #ddd;
  padding: 5px 12px;
  font-size: 0.8rem;
  width: 180px;
  background: var(--grace-white);
}

.header__top .search-form button {
  background: none;
  border: none;
  color: #999;
  padding: 5px 8px;
  cursor: pointer;
}

/* ================================
   SLIDER DOTS - Style Owl Carousel original
   ================================ */
.slider__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider__dot {
  background-color: #ffffff;
  border-radius: 10px;
  display: block;
  height: 10px;
  width: 10px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  border: none;
  padding: 0;
}

.slider__dot.active,
.slider__dot:hover {
  opacity: 1;
}

/* Slider prev/next buttons */
.slider__prev,
.slider__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  cursor: pointer;
  color: #ffffff;
  font-size: 40px;
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  background: rgba(0,0,0,0.3);
  border: none;
  border-radius: 50%;
  transition: background 0.3s;
}

.slider__prev:hover,
.slider__next:hover {
  background: rgba(0,0,0,0.5);
}

.slider__prev {
  left: 20px;
}

.slider__next {
  right: 20px;
}
