/*
 * Custom styles for Communication Animale
 * Mystical premium design with grain, sparkles, and glassmorphism
 */

/* Dégradé global : du haut vers le bas de la page, les couleurs évoluent au fil du scroll */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  /* Gradient vertical = hauteur du contenu : en scrollant, les couleurs changent */
  background: linear-gradient(
    to bottom,
    #C1CFAB 0%,
    #D9E4CE 8%,
    #F5EBE8 18%,
    #FBF8F7 28%,
    #9FBBB5 40%,
    #C4D9D4 52%,
    #F5EBE8 65%,
    #E8D8D3 78%,
    #D9E4CE 88%,
    #C1CFAB 100%
  );
  background-attachment: scroll;
  color: #1a1a1a;
  font-family: "Lora", Georgia, serif;
}

/* Navbar : extension dans la safe area (notch / Dynamic Island iPhone) */
.safe-area-nav {
  padding-top: env(safe-area-inset-top, 0);
}

/* Texte « medium » en noir */
.text-text-medium {
  color: #000000 !important;
}

.text-text-dark {
  color: #000000 !important;
}

/* Footer : fond distinct du dégradé global */
footer.footer {
  background-color: #9FBBB5;
}

/* Curseur pointer (main) sur tous les éléments cliquables */
a[href],
button,
[type="button"],
[type="submit"],
[type="reset"],
[role="button"],
[tabindex="0"]:not([tabindex="-1"]) {
  cursor: pointer;
}
/* FAQ : masquage des items qui ne matchent pas la recherche */
.faq-item-hidden {
  display: none !important;
}

/* ===== CookieConsent v3 – style cohérent avec le site (vert / bleu-vert / rose) ===== */
#cc-main {
  --cc-font-family: "Lora", Georgia, serif;
  --cc-modal-bg: #fbf9f6;
  --cc-modal-border-radius: 12px;
  --cc-btn-border-radius: 8px;
  /* Texte bien lisible : tons sombres sur fond clair */
  --cc-primary-color: #1a1a1a;
  --cc-secondary-color: #2d3a35;
  --cc-text: #1a1a1a;
  --cc-btn-primary-bg: #5F7A73;
  --cc-btn-primary-border-color: #5F7A73;
  --cc-btn-primary-hover-bg: #4a625c;
  --cc-btn-primary-text: #fbf9f6;
  --cc-btn-secondary-bg: #9FBBB5;
  --cc-btn-secondary-border-color: #9FBBB5;
  --cc-btn-secondary-hover-bg: #7FA39A;
  --cc-btn-secondary-text: #1a1a1a;
  --cc-toggle-on-bg: #5F7A73;
  --cc-toggle-off-bg: #C4D9D4;
  --cc-separator-border-color: #E8D8D3;
  --cc-z-index: 2147483647;
}

/* ===== Secours pour le viewport desktop (768px) si les classes Tailwind md: ne s’appliquent pas ===== */
@media (min-width: 768px) {
  .footer-frise-web {
    display: block !important;
  }
  .footer-frise-web-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
  }
  /* Footer : marges et padding desktop */
  footer.footer .max-w-6xl {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  /* Navbar : liens desktop visibles (div avec hidden + md:flex), bouton hamburger caché (md:hidden) */
  nav [class*="md:flex"] {
    display: flex !important;
  }
  nav [class*="md:hidden"]:not([data-mobile-menu-target]) {
    display: none !important;
  }
  /* Grille footer en 4 colonnes */
  footer.footer .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  footer.footer .grid .col-span-2 {
    grid-column: span 2 / span 2;
  }
  /* Copyright et liens sur une ligne */
  footer.footer .flex-col {
    flex-direction: row;
  }
  footer.footer .text-center {
    text-align: left;
  }
}

/* Sections sans fond propre : le dégradé global reste visible */
.section-gradient-1,
.section-gradient-2,
.section-gradient-3,
.section-gradient-4,
.section-gradient-5,
.section-gradient-6 {
  background: transparent;
}

/* Ombres douces pour les sections */
.section-shadow {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
}

/* Wrapper témoignages */
.testimonial-splide-wrapper {
  position: relative;
}

/* Splide : padding pour flèches à l'extérieur des cartes */
.testimonial-splide {
  position: relative;
  padding-left: 3.5rem;
  padding-right: 3.5rem;
}

/* Flèches : position et style cohérent */
.testimonial-splide .splide__arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  pointer-events: none;
  z-index: 10;
}
.testimonial-splide .splide__arrow {
  pointer-events: auto;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(95, 122, 115, 0.4);
  color: #1a1a1a;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  margin: 0;
}
.testimonial-splide .splide__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}
/* Flèche gauche = pointe vers la gauche (inverser l’icône par défaut) */
.testimonial-splide .splide__arrow--prev svg {
  transform: scaleX(-1);
}
.testimonial-splide .splide__arrow:hover:not(:disabled) {
  background: rgba(193, 207, 171, 0.35);
  border-color: rgba(95, 122, 115, 0.6);
}
.testimonial-splide .splide__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.testimonial-splide .splide__arrow--prev {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
}
.testimonial-splide .splide__arrow--next {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
}
@media (max-width: 767px) {
  .testimonial-splide {
    padding-left: 0;
    padding-right: 0;
  }
  .testimonial-splide .splide__arrows {
    display: none;
  }
}

/* Dots sous la liste de cartes - forcer affichage (Splide core peut les cacher) */
.testimonial-splide .splide__pagination {
  position: static !important;
  margin-top: 1.5rem;
  padding: 0;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
}
.testimonial-splide .splide__pagination li {
  list-style: none;
  margin: 0;
}
.testimonial-splide .splide__pagination__page {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border-radius: 9999px;
  background: rgba(95, 122, 115, 0.45);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.testimonial-splide .splide__pagination__page:hover {
  background: rgba(95, 122, 115, 0.7);
}
.testimonial-splide .splide__pagination__page.is-active {
  background: var(--color-bleu-vert-darker, #5F7A73);
  transform: scale(1.3);
}

/* Témoignage : limité à 10 lignes avec "Voir plus" */
.testimonial-card-text {
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: none;
}
.testimonial-expanded .testimonial-card-text {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

/* Grain overlay for film look */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.08;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* Typography */
.font-serif {
  font-family: 'Lora', Georgia, serif;
}

.font-sans {
  font-family: 'Lora', Georgia, serif;
}

/* Sparkle animation for hero */
@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(193, 207, 171, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  animation: sparkle 3s infinite;
}

.sparkle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 40%; left: 80%; animation-delay: 0.5s; }
.sparkle:nth-child(3) { top: 60%; left: 30%; animation-delay: 1s; }
.sparkle:nth-child(4) { top: 80%; left: 70%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { top: 30%; left: 50%; animation-delay: 2s; }
.sparkle:nth-child(6) { top: 70%; left: 20%; animation-delay: 2.5s; }

/* Pulse animation for badge */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(193, 207, 171, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(193, 207, 171, 0.5);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(193, 207, 171, 0.4);
  /* Ensure padding is not overridden */
  box-sizing: border-box;
}

/* Fix for padding-inline compatibility - ensure padding works with glass */
.glass[class*="px-3"] {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

.glass[class*="px-4"] {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.glass[class*="py-2"] {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

@media (min-width: 48rem) {
  .glass[class*="md:px-4"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Glow button */
.btn-glow {
  position: relative;
  transition: all 0.3s ease;
}

/* Si le bouton n'a pas déjà de bordure, en ajouter une par défaut */
.btn-glow:not([class*="border"]) {
  border: 2px solid rgba(95, 122, 115, 0.4) !important;
}

/* Si le bouton n'a pas déjà d'ombre, en ajouter une par défaut */
.btn-glow:not([class*="shadow"]) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.btn-glow:hover {
  box-shadow: 0 0 25px rgba(193, 207, 171, 0.4), 0 0 50px rgba(159, 187, 181, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-2px);
}

/* Aurora gradient */
.aurora-gradient {
  background: linear-gradient(135deg, #C1CFAB 0%, #9FBBB5 25%, #F5EBE8 50%, #C1CFAB 75%, #9FBBB5 100%);
  background-size: 400% 400%;
  animation: aurora 15s ease infinite;
}

@keyframes aurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Halo effect */
.halo {
  position: relative;
}

.halo::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(193, 207, 171, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

/* Smooth transitions */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Vignettes rondes : largeur = hauteur pour un cercle parfait */
.vignette-circle {
  width: min(14rem, 32vw);
  height: min(14rem, 32vw);
  display: block;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .vignette-circle {
    width: min(14rem, 24vw);
    height: min(14rem, 24vw);
  }
}

/* Logo dans la navbar - touche les bords haut et bas */
nav {
  overflow: visible !important;
}

nav > div > div > a:first-child {
  margin-top: -24px !important;
  margin-bottom: -24px !important;
  height: 100px !important;
  display: flex !important;
  align-items: center !important;
  position: relative;
  z-index: 10;
}

nav a img {
  height: 100px !important;
  width: 100px !important;
  max-width: 100px !important;
  max-height: 100px !important;
  object-fit: contain !important;
  display: block !important;
}

