/* ==========================
   GLOBAL
   ========================== */
html, body {
    height: 100%;
    margin: 0;
    font-family: "Poppins";
    display: flex;
    flex-direction: column;

    /* Background global moderne */
    background:
        linear-gradient(rgba(0, 0, 0, 0.781), rgba(0, 0, 0, 0.445)),
        url("Images/pharmaceutical-factory-woman-worker.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Background spécifique pour la page Configurator */
html.config-page, body.config-page {
    height: 100%;
    margin: 0;
    font-family: "Poppins";
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)),
        url("Images/plansBG.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}


/* ==========================
   NAVBAR — GLASSMORPHISM
   ========================== */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.lang-switch button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.4;
    transition: 0.2s;
}

.lang-switch button img {
    width: 26px;
    height: auto;
    display: block;
}

.lang-switch button.active {
    opacity: 1;
    outline-offset: 2px;
    border-radius: 4px;
}

.lang-switch button:hover {
    opacity: 0.85;
}


.navbar {
    position: sticky;
    top: 0;
    height: 3.6rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 25px;
    background:#397C83;

}

.config-page .navbar {
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 25px;
    background: #397C83;
    border-bottom: 1px solid rgba(255, 255, 255, 0.349);
}
body.config-page {
    padding-top: 60px; /* ✅ compense la navbar fixed */
}

.navbar .Logo {
    height: 7rem;
    transition: transform .3s;
    padding-top: 0.83rem;
}

.navbar .LogoP {
    height: 5rem;
    transition: transform .3s;
    padding-top: 1rem;
}



.navbar .Logo:hover {
    transform: scale(1.01);
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar ul li a {
    text-decoration: none;
    color: #f2f2f2;
    font-size: 18px;
    padding: 8px;
    font-weight: 400;  
    transition: .3s;
}

.navbar ul li a:hover {
    color: #f2f2f2;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.856);
}

/* ==========================
   ABOUT US
   ========================== */

.AboutUs {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.582);
    padding: 30px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 1.1rem;
    line-height: 1.55;
    color: #1B1E21;

    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.AboutUs p {
    margin: 0.6em 0;
}

/* Titres intégrés via <strong> */
.AboutUs p strong {
    display: block;
    margin-top: 0.6em;
    margin-bottom: 0.2em;

    font-size: 1.25rem;
    font-weight: 600;
    color: #03406b;
}

/* Premier titre */
.AboutUs p:first-child strong {
    margin-top: 1;
    font-size: 1.35rem;
}

/* ==========================
   HOME CONTENT
   ========================== */
.content {
    padding: 35px 30px 4px;
    color: #f2f2f2;
    flex: 1;
}


.content p {
    margin: 0.5em 0;
}

.Maincontentext {
    max-width: 50%;
    font-size: 1.25rem;
}
.MaincontentextContact {
    text-align: center;
    padding-top: 2pc;
    font-size: 1rem;
}

/* ==========================
   WHITE SECTION
   ========================== */
.white-section {
    background: rgb(221, 221, 221);
    padding: 20px 30px;
    padding-top: 0px;
    color: #333;
}

.ourproducts {
    font-size: 1.5rem;
    font-weight: 600;
    color: #03406b;
    margin: 5px 0px 0px;
}

/* ==========================
   PRODUCT GRID
   ========================== */
.photo-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.photo-link {
    width: calc(100% / 7 - 15px);
    text-decoration: none;
    color: inherit;
}

.photo-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    height: 12pc;

    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-card img {
    height: 100%;
    object-fit: contain;
    transition: .3s;
}
.photo-card:hover img {
    transform: scale(0.93);
}

/* Hover label */
.photo-label {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px 0;
    background: rgba(0,0,0,0.65);
    color: white;

    text-align: center;
    display: flex;
    flex-direction: column; /* empile le texte */
    justify-content: flex-start; /* place le texte en haut */
    gap: 4px; /* espace entre nom et ligne tech */

    opacity: 0;
    transform: translateY(100%);
    transition: .3s;
}

.photo-card:hover .photo-label {
    opacity: 1;
    transform: translateY(0);
}

.product-name {
    font-size: 1.1em;
    font-weight: 600;
}

.tech-line {
    font-size: 0.85em;
    opacity: 0.9;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* espace entre l’icône et le texte */
}

.tech-line img {
    height: 16px;
}
/* ==========================
   PRODUCTS CAROUSEL
   ========================== */
.products-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;

}

.carousel-track {
  display: flex;
  gap: 15px;              /* doit matcher ton .photo-row gap */
  transition: transform .35s ease;
  will-change: transform;
}


/* ==========================
   BANDEAU PRODUITS INFINI
   ========================== */

.carousel-track {
  display: flex;
  gap: 15px;
  width: max-content;
  animation: scrollProducts 40s linear infinite;
}

.products-carousel:hover .carousel-track {
  animation-play-state: paused;
}

/* Animation infinie */
@keyframes scrollProducts {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
/* ==========================
   FADE SUR LES BORDS DU BANDEAU
   ========================== */

.carousel-viewport {
  position: relative;
  overflow: hidden;
}

/* Overlay fade gauche/droite */
.carousel-viewport::before,
.carousel-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;            /* largeur du fade */
  pointer-events: none;   /* ne bloque pas les clics sur les cartes */
  z-index: 2;
}

.carousel-viewport::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}

.carousel-viewport::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.92), rgba(255,255,255,0));
}

/* Fade plus fin sur mobile */
@media (max-width: 480px) {
  .carousel-viewport::before,
  .carousel-viewport::after {
    width: 40px;
  }
}


/* IMPORTANT : en mode carrousel on fixe le "width" des cartes */
.products-carousel .photo-link {
  flex: 0 0 200px;   /* largeur fixe par carte */
  width: 200px;
}

@media (max-width: 1024px) {
  .products-carousel .photo-link {
    flex-basis: calc((100% - 15px) / 2); /* 2 visibles */
  }
}

@media (max-width: 480px) {
  .products-carousel .photo-link {
    flex-basis: 100%; /* 1 visible */
  }
}

/* ==========================
   CONTACTS
   ========================== */

.map-container {
    width: 80%;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 2pc;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* Tooltip */ 
.tooltip { 
    position: relative;
    cursor: pointer;
    color: #F2F2F2;
} 

.tooltip::after { 
    content: attr(data-tooltip);
    position: absolute; bottom: 100%;
    left: 50%;
    font-size: small;
    transform: translateX(-50%);
    padding: 6px 12px; background: rgba(0,0,0,0.8);
    color: #f2f2f2;
    border-radius: 6px;
    opacity: 0;
    transition: .25s;
    width: max-content;
} 

.tooltip:hover::after { 
    opacity: 1;
}

/* ==========================
   DISTRIB
   ========================== */

#distributorsMap {
  width: 100%;
  height: calc(50vh - 0px); /* header + marges */
  overflow: hidden;
  margin: 0px 0px;
  border-radius: 20px;
}

.distrib .content {
    padding: 10px 10% 10px;
    color: #f2f2f2;
    flex: 1;
}

/* Leaflet marker hover — PharmaCraft */
.leaflet-marker-icon.pharmacraft-marker-wrapper {
  background: none;
  border: none;
}

/* Image réelle */
.pharmacraft-marker-img {
  width: 42px;
  height: 42px;
  transition: transform 0.25s ease, filter 0.25s ease;
  transform-origin: center bottom;
}

/* Hover */
.leaflet-marker-icon.pharmacraft-marker-wrapper:hover
.pharmacraft-marker-img {
  transform: scale(1.15);
  filter: drop-shadow(0 5px 1px rgba(0, 0, 0, 0.397));
}

/* ===== DISTRIBUTOR CARDS (carousel) ===== */

.distributor-card{
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 18px 18px 16px;
  width: 320px;                /* adapte selon ton carrousel */
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.05);

  display: flex;
  flex-direction: column;
  gap: 6px;
transition: 0.3s;
  flex: 0 0 auto;              /* important pour le carrousel */
}

.distributor-card:hover{
transition: 0.3s;
  background: rgba(240, 240, 240, 0.92);
  border-radius: 20px;
  padding: 18px 18px 16px;
  width: 320px;                /* adapte selon ton carrousel */
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  border: 1px solid rgba(0, 0, 0, 0.144);

  display: flex;
  flex-direction: column;
  gap: 6px;

  flex: 0 0 auto;              /* important pour le carrousel */
}

.dist-header{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 4px;
}

.dist-flag{
  width: 40px;
  height: auto;
  display:block;
  border-radius: 6px;
}

.dist-country{
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 0.95rem;
  color: #0A3C5F;
}

.dist-company{
  font-weight: 800;
  font-size: 1.1rem;
  color: #1B1E21;
  margin-top: 6px;
}

.dist-line{
  font-size: 0.95rem;
  color: #1B1E21;
  line-height: 1.25;
}

.dist-link{
  font-size: 0.95rem;
  color: #0A66C2;
  text-decoration: none;
  word-break: break-word;
}

.dist-link:hover{
  text-decoration: underline;
}

.dist-ico{
  display:inline-block;
  width: 22px;                 /* aligne les icônes */
}

.carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;

  background: rgba(255, 255, 255, 0);
  border: none;
  border-radius: 50%;

  width: 45px;
  height: 45px;

  font-size: 28px;
  color: #03406b;

  cursor: pointer;
  transition: 0.25s;
}

.carousel-arrow:hover {
  background: #ffffff00;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15);
}

.carousel-arrow.left {
  left: 10px;
}

.carousel-arrow.right {
  right: 10px;
}

/* ===== Carousel: manual mode (after arrow click) ===== */
.carousel-wrapper.manual .carousel-viewport {
  overflow-x: auto;          /* au lieu de hidden */
  scroll-behavior: smooth;
}

.carousel-wrapper.manual .carousel-track {
  animation: none !important; /* stoppe le bandeau auto */
  transform: none !important; /* évite conflit avec translateX */
}

/* ==========================
   FOOTER
   ========================== */
/* Footer */
.foot {
    background: #397C83;
    border-top: 1px solid rgba(255,255,255,0.25);
    text-align: center;
    color: #1B1517;
    padding-bottom: 0px;
}

/* Ligne 1 : Logo */
.foot .Logo {
    height: 1.8pc;
    transition: transform .3s;
    display: block;
    margin: 0 auto 0px auto;
}

/* Ligne 2 : Email + Tel sur la même ligne */
.Info {
    display: flex;
    flex-direction: row;     
    justify-content: center;
    gap: 20px;                
    margin-bottom: 1px;
}

.Info div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

/* Ligne 3 : Copyright */
.Copyright {
    font-size: 0.8rem;
}
.Mail  {
    height: 15px;
    font-size: 15px;
}
.Tel  {
    height: 15px;
    font-size: 15px;
}

.FLogo {
    height: 30px;
    padding-top: 5px;
}

/* ==========================
   RESPONSIVE
   ========================== */
/* Tablet */
@media (max-width: 1024px) {
    .photo-link { width: calc(33.33% - 12px); }
    .photo-card { height: 7pc; }
    .Maincontentext { max-width: 100%; }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar ul { gap: 15px; }
    .photo-link { width: calc(50% - 12px); }
}

/* Small mobile */
@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .photo-link { width: 100%; }
    .photo-card { height: 5.5pc; }
}


/* Tablet */
@media (max-width: 1024px) {
  .content { padding: 25px 18px 8px; }
  .Maincontentext { max-width: 100%; font-size: 1.1rem; }

  .navbar ul {
    gap: 14px;
    flex-wrap: wrap;          /* ✅ autorise retour à la ligne */
    justify-content: flex-end;
  }

  .navbar ul li a { font-size: 16px; padding: 6px; }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .navbar .Logo { height: 4.5rem; padding-top: 0; }

  .navbar ul {
    width: 100%;
    justify-content: center;  /* ✅ centré sur mobile */
    gap: 12px;
    padding: 0;
    margin: 0;
  }

  .lang-switch { margin-left: 0; }

.white-section { padding: 10px 6px; }
  .ourproducts { font-size: 1.25rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  .content { padding: 18px 12px 8px; }
  .Maincontentext { font-size: 1rem; }

  .navbar ul li a { font-size: 14px; padding: 6px 6px; }

  /* Carrousel cartes plus petites */
  .products-carousel .photo-link {
    flex: 0 0 170px;
    width: 170px;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  /* Footer en colonne */
  .Info {
    flex-direction: column;
    gap: 6px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar .Logo {
    height: 3.2rem;   /* ⬅️ réduit (au lieu de ~4.5rem) */
  }
}

/* Très petits écrans */
@media (max-width: 480px) {
  .navbar .Logo {
    height: 2.8rem;   /* encore un peu plus petit */
  }
}

/* ==========================
   PRODUITS CAROUSEL (RESPONSIVE)
========================== */

/* Dans le carrousel, on NE veut PAS les règles "grille" */
.products-carousel .photo-row {
  justify-content: flex-start; /* au lieu de space-between */
}

.products-carousel .photo-link {
  width: auto;                 /* 🔥 annule width: calc(100%/7...) */
  flex: 0 0 200px;             /* taille carte carrousel */
}

/* Tablet: 2 visibles */
@media (max-width: 1024px) {
  .products-carousel .photo-link {
    flex: 0 0 240px;           /* ou calc(...) si tu veux */
  }
}

/* Mobile: 1 visible (et pas de width résiduel) */
@media (max-width: 480px) {
  .products-carousel .photo-link {
    flex: 0 0 85vw;            /* une grande carte lisible */
    max-width: 120px;          /* évite trop large sur gros mobiles */
  }
}
