/* Site de la Clinique Vétérinaire Zenimo - reprise du template « zenimo » (Template Creator CK + Page Builder CK). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 10px; }
body { margin: 0; background: #24445c; color: #000; font: 16px/1.5 "Times New Roman", Times, serif; }
img { max-width: 100%; height: auto; border: 0; }

/* ---------- En-tête : logo + menu ---------- */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1110px; margin: 0 auto; padding: 5px 15px; }
.logo img { display: block; width: 90px; height: auto; }
.bouton-menu { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 32px; }
.menu a { color: #fff; text-decoration: none; font-size: 18px; }
.menu a:hover, .menu a.actif { text-decoration: underline; }

/* ---------- Sections (un bloc = une section) ---------- */
.section { padding: 50px 0; }
.section[id] { scroll-margin-top: 0; }
.fond-blanc { background: #fff; color: #000; }
.fond-bleu { background: #24445c; color: #fff; }
.fond-brun { background: #85530f; color: #fff; }
.section-interieur { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
/* Titres des sections : toujours centrés, avec un trait dessous */
.titre-section { margin: 0 0 30px; font: 400 50px/1.2 Tahoma, Verdana, sans-serif; text-align: center; }
.titre-section::after { content: ""; display: block; width: 300px; max-width: 60%; margin: 18px auto 0; border-top: 1px solid currentColor; opacity: .8; }
.fond-bleu .titre-section::after, .fond-brun .titre-section::after { border-color: #000; opacity: 1; }
.section-galerie { padding: 30px 0 35px; }
.section-galerie .titre-section::after { display: none; }

/* Contenu des blocs */
.bloc-contenu { text-align: center; }
.bloc-contenu::after { content: ""; display: table; clear: both; }
.bloc-contenu p { margin: 0 0 12px; }
.bloc-contenu h2 { margin: 20px 0 12px; font: 400 30px/1.2 "Times New Roman", serif; text-align: center; }
.bloc-contenu h3 { margin: 12px 0 8px; font: 400 24px/1.25 "Times New Roman", serif; text-align: center; }
.bloc-contenu h4 { margin: 10px 0 6px; font: 400 20px/1.25 "Times New Roman", serif; text-align: center; }
.bloc-contenu a { color: inherit; text-decoration: underline; }
.bloc-contenu a:hover { text-decoration: none; }
.bloc-contenu ul { text-align: left; }

/* Colonnes (cartes, icônes) */
.colonnes { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 30px 25px; align-items: start; margin: 20px 0; }
.colonnes-2 { --n: 2; } .colonnes-3 { --n: 3; } .colonnes-4 { --n: 4; }
.carte { min-width: 0; }
.icone { margin: 0 0 10px !important; line-height: 0; }
.icone img { height: 64px; width: auto; }
.petite-icone img { height: 48px; }
.carte-centre { align-self: center; }

/* Équipe : portraits aux coins arrondis */
.equipe { --n: 4; }
/* les portraits ont déjà leurs coins arrondis et leur ombre */
.membre .portrait img { width: 200px; }
.membre .fonction { margin: 14px 0 0; font-size: 18px; }
.membre h3 { margin: 4px 0 6px; }
.membre p { font-size: 15px; }

/* Services : panneau qui se retourne (effet « Flip bottom » de l'ancien site) : la photo au recto, le texte au verso.
   Les deux faces occupent la même case de grille : la case prend la hauteur de la plus grande (le texte entre toujours en entier). */
.services { --n: 3; gap: 25px; align-items: stretch; }
.service { display: grid; perspective: 1000px; }
.service:has(.service-texte) { cursor: pointer; }
.service > .service-image, .service > .service-texte {
  grid-area: 1 / 1; min-height: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .8s;
}
.service .service-image { margin: 0 !important; line-height: 0; transform: rotateX(0deg); }
.service .service-image img { width: 100%; height: 100%; min-height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.service .service-texte {
  display: flex; flex-direction: column; justify-content: center; padding: 18px 20px; background: #333; color: #fff; transform: rotateX(180deg);
}
.service:has(.service-texte):hover .service-image, .service.retourne .service-image { transform: rotateX(-180deg); }
.service:hover .service-texte, .service.retourne .service-texte { transform: rotateX(0deg); }
.service .service-texte h3 { margin: 0 0 12px; font: 300 26px/1.1 Verdana, sans-serif; }
.service .service-texte p { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.6; letter-spacing: .2px; }
/* écrans tactiles : on retourne en touchant (voir site.js), pas au survol */
@media (hover: none) {
  .service:has(.service-texte):hover .service-image { transform: rotateX(0deg); }
  .service:hover .service-texte { transform: rotateX(180deg); }
  .service.retourne .service-image { transform: rotateX(-180deg); }
  .service.retourne .service-texte { transform: rotateX(0deg); }
}
@media (prefers-reduced-motion: reduce) { .service > * { transition-duration: .01s; } }

/* Carte Google Maps */
.bloc-contenu iframe { display: block; width: 100%; max-width: 480px; height: 300px; margin: 0 auto; border: 0; }

/* Carrousel de photos (bloc « galerie ») */
.carrousel { position: relative; }
.piste { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.piste::-webkit-scrollbar { display: none; }
.piste .photo { flex: 0 0 calc((100% - 30px) / 4); scroll-snap-align: start; line-height: 0; }
.piste .photo img { width: 100%; aspect-ratio: 343 / 227; object-fit: cover; }
.fleches { position: absolute; right: 0; bottom: 0; display: flex; background: rgba(220, 220, 220, .55); }
.fleches button { width: 55px; height: 50px; border: 0; background: none; color: #222; font-size: 34px; line-height: 1; cursor: pointer; }
.fleches button:hover { background: rgba(255, 255, 255, .5); }

/* Pagination */
.pagination { text-align: center; padding: 20px 0; background: #fff; }
.pagination a, .pagination strong { display: inline-block; padding: 3px 9px; margin: 0 2px; border-radius: 4px; }
.pagination a { background: #24445c; color: #fff; text-decoration: none; }

/* Pied de page */
.pied { background: #24445c; color: #fff; text-align: center; padding: 12px 15px; font-size: 11px; font-weight: 700; }
.pied p { margin: 0; }
.pied a { color: #fff; }

/* Agrandissement des photos */
.visionneuse { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; flex-direction: column; }
.visionneuse img { max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); }
.visionneuse .legende-v { color: #eee; }
.visionneuse button { position: absolute; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 30px; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; }
.visionneuse .fermer { top: 15px; right: 15px; } .visionneuse .prec { left: 15px; } .visionneuse .suiv { right: 15px; }

/* Bouton « revenir en haut » (rond blanc cerclé de noir, comme l'ancien site) */
.remonter {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 50px; height: 50px; border-radius: 50%;
  background: #fff; border: 1px solid #000; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.remonter::before { content: ""; position: absolute; left: 18px; top: 20px; width: 12px; height: 12px; border-left: 3px solid #000; border-top: 3px solid #000; transform: rotate(45deg); }
.remonter.visible { opacity: 1; visibility: visible; }

/* ---------- Tablettes et téléphones ---------- */
@media (max-width: 900px) {
  .titre-section { font-size: 38px; }
  .colonnes, .equipe, .services { --n: 2; }
  .piste .photo { flex-basis: calc((100% - 10px) / 2); }
}
@media (max-width: 600px) {
  .entete { flex-wrap: wrap; }
  .logo img { width: 70px; }
  .bouton-menu {
    display: block; padding: 6px 16px; border: 1px solid #fff; border-radius: 4px; background: transparent; color: #fff;
    font: 16px "Times New Roman", serif; cursor: pointer;
  }
  .menu { display: none; width: 100%; }
  .menu.ouvert { display: block; }
  .menu ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; }
  .menu a { display: block; padding: 8px 4px; border-top: 1px solid rgba(255, 255, 255, .2); }
  .section { padding: 35px 0; }
  .titre-section { font-size: 30px; margin-bottom: 20px; }
  .colonnes, .services { --n: 1; }
  .equipe { --n: 2; gap: 25px 12px; }
  .membre .portrait img { width: 150px; }
  .piste .photo { flex-basis: 85%; }
  .remonter { right: 12px; bottom: 16px; }
}
