:root {
  --noire: #2a1111;
  --blanc: #fff;
  --jaune: #f5f517;
}

/* ===== TYPOGRAPHIE RESPONSIVE ===== */
.herotext {
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 3.125rem); /* S'adapte automatiquement */
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* ===== SLIDER LOGOS ===== */
.logo-slider {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
  background: #fff;
  border-top: 2px inset #f2eaea;
  border-bottom: 2px inset #f2eaea;
  padding: 20px 0;
}

.logo-track {
  display: inline-block;
  animation: scroll 20s linear infinite;
}

.logo-track img {
  height: 60px;
  margin: 0 40px;
  vertical-align: middle;
}

.logo-slider:hover .logo-track {
  animation-play-state: paused;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ===== FOOTER RESPONSIVE ===== */
.footer {
  box-sizing: border-box;
  margin-top: clamp(50px, 10vw, 150px);
  width: 100%;
  padding: clamp(30px, 8vw, 100px);
  background: #100404;
  color: #efefef;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}

.footer div {
  text-align: center;
  flex: 1 1 250px; /* Flex-grow, flex-shrink, flex-basis */
  min-width: 200px;
}

.col-2 {
  flex-grow: 2;
}

.footer div h3 {
  font-weight: 300;
  margin-bottom: 30px;
  letter-spacing: 1px;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

.col-1 a {
  display: block;
  text-decoration: none;
  color: #efefef;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.col-1 a:hover {
  color: var(--jaune);
}

form input {
  width: 100%;
  max-width: 400px;
  height: 45px;
  border-radius: 4px;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 40px;
  outline: none;
  border: none;
  padding: 0 15px;
}

form button {
  background: transparent;
  border: 2px solid #fff;
  border-radius: 30px;
  padding: 10px 30px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

form button:hover {
  background: var(--jaune);
  color: #000;
}

.social-icons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icons i {
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-icons i:hover {
  transform: translateY(-3px) scale(1.1);
  color: var(--jaune);
}

/* ===== DIVIDERS ===== */
.section-diviser {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--noire), var(--jaune));
  border-radius: 2px;
  margin: 1rem auto;
}

/* ===== ANIMATIONS GLOBALES ===== */
.hover-card {
  transition: all 0.5s ease;
}

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

.btn {
  transition: all 0.5s ease;
}

.btn:hover {
  transform: translateY(-5px);
}

/* ===== PAGES HERO ===== */
.page-hero,
.page-astucesante,
.page-contact {
  height: 40vh;
  min-height: 300px;
  background-color: var(--noire);
  padding: clamp(30px, 5vw, 50px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)),
    url(../Images/parapharmacieetsanté.jpg) center/cover;
}

.page-astucesante {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)),
    url(../Images/blogastuc1.webp) center/cover;
}

.page-contact {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)),
    url(../Images/contactez-nous.jpg) center/cover;
}

.page-astucesante h1,
.page-contact h1 {
  text-align: center;
  color: white;
  padding-top: 2rem;
  font-size: clamp(1.5rem, 4vw, 3rem);
}

/* ===== NAVBAR RESPONSIVE ===== */
.navbar {
  background-color: var(--blanc);
  padding: 0.5rem 0;
}

.navbar-nav .nav-link {
  color: var(--noire);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--jaune);
}

.navbar-brand .logo {
  width: 56px;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Desktop */
@media screen and (min-width: 1024px) {
  .navbar-nav .nav-item {
    padding: 0 1rem;
  }
}

/* Tablettes */
@media screen and (max-width: 768px) {
  .footer {
    padding: 50px 30px;
    flex-direction: column;
    align-items: center;
  }

  .footer div {
    width: 100%;
    margin-bottom: 30px;
  }

  form input {
    max-width: 100%;
  }

  /* Valeurs */
  .valeurs img {
    width: 80%;
    max-width: 400px;
  }

  /* Services */
  .services-section .row {
    text-align: center;
  }

  .services-section .col-md-6 {
    margin-bottom: 2rem;
  }
}

/* Mobile ≤ 576px */
@media (max-width: 576px) {
  /* Navbar mobile optimisée */
  .navbar > .container-lg {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 999;
    transition: all 0.3s ease;
  }

  .navbar-collapse:not(.show) {
    display: none !important;
  }

  .navbar-collapse.show {
    display: block !important;
  }

  .navbar-nav {
    flex-direction: column;
    text-align: center;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    font-size: 1.1rem;
  }

  .navbar .btn {
    display: block;
    width: 100%;
    margin-top: 1rem;
  }

  .navbar-toggler {
    border: none;
  }

  .navbar-toggler-icon {
    filter: invert(0);
  }

  .navbar-brand .logo {
    width: 50px;
  }

  /* Footer mobile */
  .footer {
    padding: 30px 20px;
    margin-top: 80px;
  }

  .footer div h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
  }

  form input {
    height: 40px;
    font-size: 14px;
  }

  form button {
    padding: 8px 20px;
    font-size: 14px;
  }

  .social-icons i {
    font-size: 20px;
  }

  /* Hero text mobile */
  .herotext {
    font-size: 1.5rem;
    font-weight: 500;
    padding: 0 1rem;
  }

  /* Valeurs mobile */
  .valeurs {
    text-align: center;
    padding: 1rem;
  }

  .valeurs img {
    width: 100%;
    max-width: 350px;
    height: auto;
  }

  .valeurs h4 {
    font-size: 1.2rem;
    margin-top: 1rem;
  }

  .valeurs p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Services mobile */
  .services-section .row {
    text-align: center;
  }

  .services-section .col-md-6 img {
    margin: 0 auto 1.5rem auto;
    width: 100%;
    max-width: 400px;
  }

  .services-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .services-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0 1rem;
  }

  /* Logo slider mobile */
  .logo-track img {
    height: 40px;
    margin: 0 20px;
  }

  .logo-slider {
    padding: 15px 0;
  }
}

/* ===== BLOG & ASTUCES SANTÉ ===== */
.categories {
  background-color: white;
  padding: 2rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-btn {
  padding: 0.6rem 1.5rem;
  margin: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  background: white;
  color: #555;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.category-btn:hover,
.category-btn.active {
  background: #2c5f7c;
  color: white;
  border-color: #2c5f7c;
  transform: translateY(-2px);
}

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

.article-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-category {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: #e8f4f8;
  color: #2c5f7c;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.article-title {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  color: #2c5f7c;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.article-excerpt {
  color: #666;
  font-size: clamp(0.9rem, 2vw, 0.95rem);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: #999;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.article-meta i {
  margin-right: 0.3rem;
}

.read-more {
  color: #2c5f7c;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}

.read-more:hover {
  color: #1a3d4d;
}

.featured-article {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-badge {
  background: #ff6b6b;
  color: white;
  padding: 0.5rem 1.5rem;
  display: inline-block;
  border-radius: 0 0 15px 0;
  font-weight: 600;
}

/* Sidebar */
.sidebar-widget {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.widget-title {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700;
  color: #2c5f7c;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid #2c5f7c;
}

.popular-post {
  display: flex;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.popular-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.popular-post-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.popular-post-content h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.popular-post-date {
  font-size: 0.8rem;
  color: #999;
}

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #f0f0f0;
  color: #555;
  border-radius: 20px;
  margin: 0.3rem;
  font-size: 0.85rem;
  transition: all 0.3s;
  cursor: pointer;
}

.tag:hover {
  background: #2c5f7c;
  color: white;
}

/* Responsive blog mobile */
@media (max-width: 576px) {
  .articles-section {
    padding: 2rem 0;
  }

  .article-image {
    height: 180px;
  }

  .article-content {
    padding: 1rem;
  }

  .popular-post {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .popular-post-img {
    margin-right: 0;
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 16/9;
  }

  .category-btn {
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    font-size: 0.85rem;
  }
}

/* Extra petit mobile */
@media (max-width: 380px) {
  .herotext {
    font-size: 1.3rem;
  }

  .valeurs h4 {
    font-size: 1rem;
  }

  .valeurs p {
    font-size: 0.85rem;
  }

  .services-section h3 {
    font-size: 1.1rem;
  }

  .services-section p {
    font-size: 0.9rem;
  }
}

/*loader css for pharmacie malon*/

/* Le loader recouvre tout l'écran */
#transition-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff; /* couleur de fond */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 9999;
}

/* Quand il est actif */
#transition-loader.active {
  opacity: 1;
  pointer-events: all;
}

.hidden md:flex items-center space-x-4 {
  transition: transform 0.3s ease;
}

.hidden md:flex items-center space-x-4:hover {
  transform: scale(1.1);
}
