/* ==========================================================================
   site_style.css — Refactor v2 (mobile‑first, compatible Bootstrap)
   - Tokens centralisés (couleurs, rayons, ombres, largeurs)
   - Nettoyage des imbrications, corrections de sélecteurs, fusion des doublons
   - Breakpoints cohérents, priorités claires
   ========================================================================== */

/* 1) Design tokens */
:root {
  --color-red: #e03c3f;
  --color-white: #ffffff;
  --color-blue: #38378b;
  --color-mint: #06ffa8;
  --color-hero: #8ca9ff;
  --color-header: #f1f1f1;

  --radius: 22px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 6px 15px rgba(0, 0, 0, 0.15);

  --container: 1200px;
}

/* 2) Base & layout */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    "Montserrat",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1;
  background: var(--color-hero);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
/* Compat anciens sélecteurs 'main1' / 'main2' (existaient comme balises) */
.main1 {
  flex: 1;
  background: var(--color-hero);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.main2 {
  flex: 1;
  background: var(--color-white);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* HERO */
.hero {
  padding: 40px 0 56px;
  /*background: var(--color-hero);*/
}
.hero .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}
.hero-title {
  color: #fff;
  text-align: center;
  font-size: 48px;
  line-height: 1.16;
  font-weight: 800;
  margin: 10px 0 26px;
}
.container {
  width: min(var(--container), 100% - 36px);
  margin-inline: auto;
  padding-inline: 18px;
}
.pro-name {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
}

/* 3) Header & footer */
.site-header {
  background: var(--color-header);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 10px;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

footer {
  background: var(--color-header);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 22px 20px;
}
footer p {
  margin: 0;
  text-align: center;
  color: #222;
  font-size: 13px;
}

/* Barre style "carte" */
.searchbar {
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.search-icon {
  margin-left: 6px;
  opacity: 0.7;
}

.input-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0; /* IMPORTANT: évite débordements */
}

/* Champs “plats” (comme sur ta capture) */
.searchbar input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 10px 8px;
  color: #111;
}

.searchbar input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

/* séparateur */
.divider {
  width: 1px;
  height: 34px;
  background: rgba(0, 0, 0, 0.1);
}

/* Bouton intégré à droite */
.btn-find--inbar {
  margin: 0;
  border: none;
  background: var(--red);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
}

/* 4) Boutons (override Bootstrap) */
.btn-primary {
  background-color: var(--color-red) !important;
  border-color: var(--color-red) !important;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-primary a {
  color: #fff;
} /* corrige l'ancien '.btn-primary :a' */

/* 5) Sélecteur de langue & menu utilisateur */
.lang-switch {
  display: none;
  gap: 6px;
  background: #fff;
  padding: 4px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.lang-btn {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-blue);
  border-radius: 14px;
  transition: all 0.2s;
}
.lang-btn:hover {
  background: rgba(56, 55, 139, 0.08);
}
.lang-btn.active {
  background: var(--color-blue);
  color: #fff;
}

/* 6) Page Détails praticien */
.profile-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

/* grille bas de page (fusion + align fix) */
.bottom-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 0.8fr 1.6fr auto;
  align-items: flex-start;
}

.bottom-grid .text-end {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Rating (fusion doublons) */
.rating {
  position: relative;
  display: inline-block;
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1;
}
.rating .stars-base {
  color: #e3e5ea;
}
.rating .stars-fill {
  color: #ffc107;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
}
.avis-card .meta {
  font-size: 0.9rem;
  color: #667085;
}

/* 8) Champs communs + force MDP (fusion doublons) */
.field-wrapper {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
}
.strength-bar {
  display: flex;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}
.strength-fill {
  flex: 1;
  background: #e0e0e0;
  transition: background-color 0.3s;
}

/* 9) Listes & cartes (client) */
.card {
  min-width: 380px;
  border-radius: 15px;
}
.card h4 {
  margin-bottom: 15px;
}

.btn-agenda {
  background-color: #4285f4;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
}
.btn-agenda:hover {
  background-color: #2a69d1;
}
.card_sync {
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.praticien-card {
  display: flex;
  align-items: center;
  gap: 20px;
}
.card-img-top {
  max-width: 150px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
}
.card-body {
  flex: 1;
}

.favori_lien {
  cursor: pointer;
  color: #055a92;
  transition:
    color 0.3s,
    transform 0.2s;
}
.favori_lien:hover {
  color: #d21427;
}
.favori_lien.ajoute {
  color: #d21427;
  transform: scale(1.2);
}

.card-img-top_liste {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 15px;
}

/* 10) Suggestions adresse */
.input-wrapper {
  position: relative;
}
#suggestions {
  position: absolute;
  background: #f1f1f1;
  border: 1px solid #ccc;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1000;
}
#suggestions li {
  padding: 10px;
  cursor: pointer;
}
#suggestions li:hover {
  background: #f1f1f1;
}

/* 11) Partie avec scroll pour detail praticien pour scroller videos */
.profile-grid.profile-top {
  /* hauteur comprise entre 420px et 780px, ~70% de la hauteur viewport */
  height: clamp(420px, 70vh, 780px);
  align-items: stretch; /* important pour que les colonnes prennent 100% de la hauteur */
}

/* Permettre l’overflow interne (déjà presque bon chez toi) */
.profile-grid > * {
  min-height: 0;
  min-width: 0;
}
.profile-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.15fr 1fr 0.9fr;
}

.profile-grid .panel {
  display: flex;
  flex-direction: column;
  min-height: 0; /* crucial */
  height: 90%; /* ← donner une hauteur de référence */
}

/* La grande photo remplit la hauteur disponible */
.big-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.big-photo {
  height: 90%;
  max-width: 350px;
  border-radius: 22px;
  overflow: hidden;
  background: #f1f1f1;
}

/* contenu scrollable dans la colonne infos */
.info-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto; /* scroll si ça dépasse */
  padding-right: 4px; /* petit espace pour la scrollbar */
}

/* liste de vidéos scrollable (le <h5> reste fixe) */
.vlist {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto; /* scroll si beaucoup de vignettes */
}

/* Optionnel : taille des vignettes vidéo */
.vlist .vitem {
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 21 / 9; /* 21:9 compact et propre */
  margin-bottom: 12px;
}

.vlist .vitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #38378b; /* bleu foncé */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

a,
a:link,
a:visited {
  text-decoration: none;
}

/* Personnalisation des boutons*/

/* Même hauteur / alignement que les autres boutons */
.btn-table {
  vertical-align: middle; /* alignement dans la cellule */
  margin: 0; /* pas de marge parasite */
}

/* Bord gris par défaut */
.btn-outline-secondary {
  border: 1px solid #6c757d;
  color: #6c757d;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Fond gris au survol */
.btn-outline-secondary:hover {
  background-color: #6c757d !important;
  color: #fff; /* texte blanc pour contraste */
}

/* Variante outline mais avec gris à la place du bleu */
.btn-outline-primary.custom-gray {
  border-color: #6c757d; /* gris */
  color: #6c757d; /* texte gris */
  box-shadow: none !important;
}

.btn-outline-primary.custom-gray:hover {
  background-color: #6c757d; /* fond gris au survol */
  color: #fff; /* texte blanc */
  border-color: #6c757d; /* garder la bordure grise */
}

/*.swal2-actions .swal2-confirm.swal2-styled {
    box-shadow: 0 0 0 0.5px #6c757d;
    border: none;
    color: #6c757d;
    background-color: transparent;
    border-radius: 999px;
}
.swal2-actions .swal2-confirm.swal2-styled:hover {
   background-color: #6c757d;
  color: #fff;  
}
.swal2-actions {
  margin-bottom: 12px; 
}*/

/* Dans la colonne actions du tableau */
#table_rdv td {
  vertical-align: middle; /* centre verticalement la cellule */
  text-align: center; /* optionnel : centre horizontalement */
}

/* Normaliser le <form> pour qu'il se comporte comme un bouton */
#table_rdv td form {
  display: inline-block; /* au lieu de block */
  margin: 0; /* supprime la marge par défaut */
}

/* Harmoniser <a> et <button> visuellement */
#table_rdv td a.btn,
#table_rdv td button.btn {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2; /* même hauteur de ligne */
  padding: 4px 10px; /* compacité identique */
  border-radius: 999px;
  box-shadow: none; /* même arrondi si tu l’utilises */
}

/* Styles de tes variantes (si tu utilises ces classes) */
.btn-table {
  border: 1px solid #6c757d;
  color: #6c757d;
  background: transparent;
}
.btn-table:hover {
  background: #6c757d;
  color: #fff;
}

.btn-table_del {
  border: 1px solid #dc3545;
  color: #dc3545;
  background: transparent;
}
.btn-table_del:hover {
  background: #dc3545;
  color: #fff;
}

/* === Global button polish (après Bootstrap) === */
:root {
  /*Ajuste ici la rondeur et l’ombre */
  --btn-radius: 999px; /*passe à 999px pour style "pill" */
  --btn-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  --btn-shadow-hover: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.btn:not(.btn-link) {
  border-radius: var(--btn-radius);
  box-shadow: var(--btn-shadow);
}

@media (prefers-reduced-motion: no-preference) {
  .btn:not(.btn-link) {
    transition:
      box-shadow 0.2s ease,
      transform 0.08s ease,
      background-color 0.2s ease,
      border-color 0.2s ease;
  }
}

.btn:hover:not(.btn-link),
.btn:focus-visible:not(.btn-link) {
  box-shadow: var(--btn-shadow-hover);
  transform: translateY(0);
}

.btn:active:not(.btn-link) {
  transform: translateY(0);
  box-shadow: 0 8px px rgba(0, 0, 0, 0.18);
}

.btn:disabled,
.btn.disabled {
  box-shadow: none;
  opacity: 0.65;
}

/*Exceptions / utilitaires */
.btn.btn-link {
  box-shadow: none;
  border-radius: 0;
} /* les liens ne prennent pas d’ombre*/
.btn--no-shadow {
  box-shadow: none !important;
} /*opt-out par bouton si besoin */

/*********************PAGE PRISE RENDEZ-VOUS**************************/

.rdv-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 28px;
}

/* Titres */
.rdv-title {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 800;
  color: #6c757d;
}
.rdv-subtitle {
  margin: 0 0 22px;
  text-align: center;
  font-weight: 800;
  color: #000;
  font-size: 22px;
}

/* Pagination (boutons discrets “pill”) */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 18px;
}
.pagination a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #38378b;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.06s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.pagination a:hover {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
  background: #f8f9ff;
}

/* Grille des jours (responsive) */
.grid-container {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
/******************Gestion des Slots affichage par 3 par ligne***************************/
@media (min-width: 1200px) {
  .grid-container {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
/* Colonne “jour” (carte) */
.day-column {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* En-tête jour */
.day-column h4 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: #38378b;
  border-radius: 14px;
  padding: 8px 10px;
  letter-spacing: 0.2px;
}

/* Slot (heure) */
.slot {
  background: #f1f1f1;
  border: 1px solid #e6e9ff;
  border-radius: 14px;
  padding: 10px 12px;
  text-align: center;
  font-weight: 600;
  color: #38378b;
  line-height: 1.25;
  box-shadow: inset 0 0 0 1px rgba(56, 55, 139, 0.05);
}

/* Bouton “Réserver” (pill) */
.slot .reserver-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: #e03c3f;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.06s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.slot .reserver-btn:hover {
  transform: translateY(0);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  background: #cc3538; /* léger foncé */
}
.slot .reserver-btn:active {
  transform: translateY(0);
}

/* États “désactivé” si besoin (au cas où) */
.slot.is-disabled {
  opacity: 0.55;
  filter: grayscale(20%);
}
.slot.is-disabled .reserver-btn {
  background: #d4d7e5;
  color: #fff;
  box-shadow: none;
  pointer-events: none;
}

/* Message “aucun créneau” */
.rdv-empty {
  color: rgb(33, 37, 41);
  text-align: center;
  font-weight: 400;
  font-size: 16px;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* SweetAlert – harmonisation rapide avec tes boutons pills gris (optionnel) */
.swal2-actions .swal2-confirm.swal2-styled {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #e03c3f;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}
.swal2-actions .swal2-confirm.swal2-styled:hover {
  filter: brightness(1.05);
}
.swal2-actions .swal2-cancel.swal2-styled {
  border-radius: 999px;
  background: #fff;
  color: #38378b;
  border: 1px solid #e0e3eb;
}

/* Mobile: aération + swipe confortable si trop de colonnes */
@media (max-width: 640px) {
  .rdv-card {
    padding: 18px;
  }
  .grid-container {
    grid-auto-flow: row;
    grid-template-columns: 1fr; /* empile les jours */
  }
  /* Variante swipe (si tu préfères conserver les colonnes) :
     dé-commente ce bloc et entoure .grid-container d’un wrapper .rdv-scroll
  .rdv-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .grid-container{ grid-auto-flow: column; grid-auto-columns: 88%; }
  */
}

/**********************Paginantion pour le site ****************************/
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
}
.pager a {
  text-decoration: none;
  font-weight: 700;
}

.pager-arrow {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e0e3eb;
  background: #fff;
  color: #38378b;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transition:
    background 0.2s,
    transform 0.1s,
    opacity 0.2s;
}
.pager-arrow:hover {
  background: #f8f9ff;
  transform: translateY(-1px);
}
.pager-arrow.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pager-page {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #e0e3eb;
  background: #fff;
  color: #38378b;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transition:
    background 0.2s,
    transform 0.1s,
    color 0.2s,
    border-color 0.2s;
}
.pager-page:hover {
  background: #f8f9ff;
  transform: translateY(-1px);
}
.pager-page.is-active {
  background: #e03c3f;
  color: #fff;
  border-color: #e03c3f;
  transform: none;
}
/* =========================================
   Header FIXE seulement en mobile + PWA
   ========================================= */

/* Desktop par défaut */
.site-header {
  position: static;
}

/* Mobile navigateur */
@media (max-width: 899px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1030;
    background: #fff;
  }

  body {
    padding-top: 64px; /* hauteur header mobile */
  }
}

/* PWA (même si largeur > 899px) */
@media (display-mode: standalone) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1030;
    background: #fff;
  }

  body {
    padding-top: calc(64px + env(safe-area-inset-top));
  }
}
