/* ============================================================
   Boutique Atlas Santé — feuille de style complémentaire
   (le reste du style provient de Tailwind CSS)
   ============================================================ */

/* Alpine : masquer les éléments avant initialisation */
[x-cloak] { display: none !important; }

/* Défilement fluide pour les ancres (hors préférence reduced-motion) */
html { scroll-behavior: smooth; }

/* Messages flash (succès / erreur / info) */
.flash {
    border-radius: 1rem;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.12);
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.flash-fermer  { cursor: pointer; font-size: 22px; line-height: 1; padding-left: 12px; color: inherit; opacity: 0.6; }
.flash-fermer:hover { opacity: 1; }

/* Apparition douce au défilement (.reveal ajouté par boutique.js).
   Le masquage initial n'est actif que si JavaScript est présent (html.js),
   sinon le contenu reste visible par défaut (accessibilité / JS désactivé). */
html.js .reveal, html.js .reveal-gauche, html.js .reveal-droite, html.js .reveal-zoom {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
html.js .reveal        { transform: translateY(26px); }
html.js .reveal-gauche { transform: translateX(-36px); }
html.js .reveal-droite { transform: translateX(36px); }
html.js .reveal-zoom   { transform: scale(0.94); }
html.js .reveal.visible, html.js .reveal-gauche.visible,
html.js .reveal-droite.visible, html.js .reveal-zoom.visible {
    opacity: 1;
    transform: none;
}

/* Bandeau de chiffres clés (compteurs animés via data-compteur) */
.stats-bande {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #10152d 0%, #1c2449 55%, #253061 100%);
    padding: 2.75rem 0;
}
.stats-bande-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
    row-gap: 2rem;
}
@media (min-width: 768px) {
    .stats-bande-inner { grid-template-columns: repeat(4, 1fr); }
}
.stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}
.stat-valeur {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    letter-spacing: 0.01em;
}
.stat-suffixe {
    color: #f6b9ba;
    margin-left: 0.1em;
}
.stat-libelle {
    margin-top: 0.6rem;
    max-width: 12rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(218, 225, 248, 0.85);
}
@media (max-width: 640px) {
    .stat-valeur { font-size: 2rem; }
    .stat-libelle { font-size: 0.62rem; letter-spacing: 0.1em; }
}

/* Boutons « brillance » : balayage lumineux au survol */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -140%;
    width: 55%;
    height: 100%;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.btn-shine:hover::after { left: 160%; }

/* Hero : lent zoom Ken Burns sur la photo active */
.hero-photo { transform: scale(1.14); }
.slider-hero-active .hero-photo,
.hero-slider .swiper-slide-active .hero-photo {
    animation: kenburns 8s ease-out both;
}
@keyframes kenburns {
    from { transform: scale(1.03); }
    to   { transform: scale(1.14); }
}

/* Hero : indicateur de défilement (souris animée) */
.hero-scroll {
    position: absolute;
    right: clamp(0.5rem, 4vw, 3rem);
    bottom: 1.25rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #2e3a83;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.25s ease;
}
.hero-scroll:hover { opacity: 1; }
.hero-scroll-souris {
    width: 22px;
    height: 34px;
    border: 2px solid currentColor;
    border-radius: 9999px;
    position: relative;
    display: block;
}
.hero-scroll-souris::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 9999px;
    background: currentColor;
    animation: molette 1.8s ease-in-out infinite;
}
@keyframes molette {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}
.hero-scroll-texte {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
@media (max-width: 640px) {
    .hero-scroll { display: none; }
}

/* Badge héros : halo discret pulsant */
.badge-scintille { animation: lueur 2.6s ease-in-out infinite; }
@keyframes lueur {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 42, 46, 0.4); }
    50%      { box-shadow: 0 0 0 12px rgba(217, 42, 46, 0); }
}

/* Icône citation : flottement très doux */
.temoignage-icone { animation: flottement 6s ease-in-out infinite; }

/* Bouton « retour en haut » (pied de page, fixes sur toutes les pages) */
.retour-haut {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 9999px;
    background: #2e3a83;
    color: #ffffff;
    box-shadow: 0 10px 25px -8px rgba(46, 58, 131, 0.65);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}
.retour-haut:hover { background: #1c2449; }
.retour-haut.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Respect des préférences : réduire les animations */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-gauche, .reveal-droite, .reveal-zoom {
        opacity: 1 !important;
        transform: none !important;
        transition: none;
    }
    .hero-photo, .decor-rond, .marquees, .badge-scintille,
    .temoignage-icone, .hero-scroll-souris::before,
    .bandeau-motif .decor-orbe-1, .bandeau-motif .decor-orbe-2 {
        animation: none !important;
    }
    html { scroll-behavior: auto; }
}

/* Bandeau marques : défilement continu infini, capsules avec séparations */
.marquees-section {
    background: #ffffff;
    border-top: 1px solid #eef0f6;
    border-bottom: 1px solid #eef0f6;
}
.marquees-inner {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 2.25rem 1rem 2.5rem;
}
@media (min-width: 640px) {
    .marquees-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .marquees-inner { padding-left: 2rem; padding-right: 2rem; }
}

/* Titre central avec lignes décoratives */
.marquees-titre {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.marquees-titre-texte {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #2e3a83;
    white-space: nowrap;
}
.marquees-titre-ligne {
    flex: 1;
    max-width: 4.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(46, 58, 131, 0.35));
}
.marquees-titre-miroir { transform: scaleX(-1); }
@media (min-width: 640px) {
    .marquees-titre-ligne { max-width: 7rem; }
}

/* Défilement */
.marquees-bloc {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquees {
    display: flex;
    align-items: center;
    width: max-content;
    animation: defile-marques 32s linear infinite;
}
.marquees-bloc:hover .marquees { animation-play-state: paused; }
@keyframes defile-marques {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Capsule d'une marque : initiale + nom, séparée des voisines */
.marquees-item {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0 2.2rem;
    border-right: 1px solid rgba(46, 58, 131, 0.14);
    transition: opacity 0.2s ease;
}
.marquees-item:hover { opacity: 0.85; }
.marquees-initiale {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: none;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #2e3a83, #10152d);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 6px 14px -6px rgba(16, 21, 45, 0.35);
    transition: transform 0.2s ease;
}
.marquees-item:hover .marquees-initiale {
    background: linear-gradient(135deg, #3f4f9f, #1c2449);
    transform: translateY(-1px);
}
.marquees-nom {
    font-weight: 800;
    font-size: 1.05rem;
    color: #1f2937;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.marquees-item:hover .marquees-nom { color: #2e3a83; }
@media (max-width: 640px) {
    .marquees-item { padding: 0 1.4rem; gap: 0.55rem; }
    .marquees-initiale { width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; font-size: 0.85rem; }
    .marquees-nom { font-size: 0.95rem; }
}

/* Slider héros : recolorer pagination + flèches */
.hero-slider .swiper-pagination-bullet { background: #2e3a83; opacity: 0.25; }
.hero-slider .swiper-pagination-bullet-active { opacity: 1; width: 22px; border-radius: 4px; background: #2e3a83; }
.hero-slider .swiper-button-prev, .hero-slider .swiper-button-next {
    color: #2e3a83; width: 44px; height: 44px; background: rgba(46, 58, 131, 0.12);
    border: 1px solid rgba(46, 58, 131, 0.25); border-radius: 9999px;
}
.hero-slider .swiper-button-prev::after, .hero-slider .swiper-button-next::after { font-size: 16px; font-weight: 700; }
@media (max-width: 640px) {
    .hero-slider .swiper-button-prev, .hero-slider .swiper-button-next { display: none; }
}

/* Animation d'entrée du texte du slider */
.hero-slide-texte h2 { animation: montee 0.8s ease both; }
.hero-slide-texte p { animation: montee 0.8s ease 0.15s both; }
.hero-slide-texte .hero-actions { animation: montee 0.8s ease 0.3s both; }
@keyframes montee {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* Cartes univers : effet de survol doux */
.carte-univers { transition: transform 0.35s ease, box-shadow 0.35s ease; }
.carte-univers:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(46, 58, 131, 0.45); }
.carte-univers .carte-icon { transition: transform 0.35s ease; }
.carte-univers:hover .carte-icon { transform: scale(1.12); }

/* Petites cartes d'engagement */
.atout-carte { transition: transform 0.3s ease, border-color 0.3s ease; }
.atout-carte:hover { transform: translateY(-4px); border-color: #f6b9ba; }

/* Masque masqué par défaut pour les décors décoratifs */
.decor-rond { animation: flottement 7s ease-in-out infinite; }
@keyframes flottement {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ---------- Sliders de produits (accueil, fiche) ---------- */
.produits-slider .swiper-pagination { position: static; margin-top: 2rem; }
.produits-slider .swiper-pagination-bullet { background: #2e3a83; opacity: 0.25; }
.produits-slider .swiper-pagination-bullet-active { opacity: 1; width: 22px; border-radius: 4px; }

/* ---------- Brochures de produits ---------- */

/* Bouton « Ajouter au panier » sur les cartes : cercle au repos,
   pilule rouge dépliée au survol de la carte. */
.btn-ajouter-panier {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    max-width: 36px;
    height: 36px;
    padding: 0 9px;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 9999px;
    background: #eef1fa;
    color: #2e3a83;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: max-width 0.35s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.btn-ajouter-panier-texte {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, width 0.35s ease;
    letter-spacing: 0.01em;
}
.carte-produit:hover .btn-ajouter-panier,
.btn-ajouter-panier:focus-visible {
    max-width: 210px;
    background: #d92a2e;
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(217, 42, 46, 0.7);
}
.carte-produit:hover .btn-ajouter-panier .btn-ajouter-panier-texte,
.btn-ajouter-panier:focus-visible .btn-ajouter-panier-texte {
    opacity: 1;
    width: auto;
}

/* Flèches Précédent / Suivant */
.btn-slider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #2e3a83;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}
.btn-slider:hover { background: #2e3a83; border-color: #2e3a83; color: #fff; }
.btn-slider[disabled] { opacity: 0.35; pointer-events: none; }

/* ---------- Bandeaux de page décoratifs (motifs discrets) ---------- */
.bandeau-motif {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #10152d 0%, #1c2449 55%, #253061 100%);
}
.bandeau-motif .motif-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.075;
}
.bandeau-motif .decor-orbe-1 {
    position: absolute;
    top: -50px;
    right: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 9999px;
    filter: blur(28px);
    pointer-events: none;
    animation: flottement 8s ease-in-out infinite;
}
.bandeau-motif .decor-orbe-2 {
    position: absolute;
    bottom: -60px;
    left: 20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(112, 128, 206, 0.22) 0%, rgba(112, 128, 206, 0) 70%);
    border-radius: 9999px;
    filter: blur(40px);
    pointer-events: none;
    animation: flottement 10s ease-in-out infinite;
    animation-delay: -3s;
}
/* Barre de menu en cours de défilement : légère transparence + ombre douce */
.entete-scrolle {
    background-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px -18px rgba(16, 21, 45, 0.28);
}
/* ---------- Animations accueil & survol produits ---------- */
/* Survol produit : fine bordure rouge + ombre rougeâtre discrète */
.carte-produit {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.carte-produit:hover {
    border-color: #d92a2e;
    box-shadow: 0 18px 34px -14px rgba(217, 42, 46, 0.28);
}

/* Reflet lumineux qui balaye l'image au survol */
.carte-produit .aspect-square { position: relative; }
.carte-produit .aspect-square::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(117deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 70%);
    background-size: 250% 100%;
    background-position: 140% 0;
    opacity: 0;
    transition: opacity 0.35s ease, background-position 0.7s ease;
}
.carte-produit:hover .aspect-square::after {
    opacity: 1;
    background-position: -40% 0;
}

/* Entrée en cascade des cartes produits quand le bloc arrive à l'écran */
html.js .produits-bloc:not(.anime) .carte-produit { opacity: 0; }
html.js .produits-bloc.anime .carte-produit { animation: monteeCarte 0.7s ease backwards; }
html.js .produits-bloc.anime .swiper-slide:nth-child(2)  .carte-produit { animation-delay: 0.08s; }
html.js .produits-bloc.anime .swiper-slide:nth-child(3)  .carte-produit { animation-delay: 0.16s; }
html.js .produits-bloc.anime .swiper-slide:nth-child(4)  .carte-produit { animation-delay: 0.24s; }
html.js .produits-bloc.anime .swiper-slide:nth-child(5)  .carte-produit { animation-delay: 0.32s; }
html.js .produits-bloc.anime .swiper-slide:nth-child(6)  .carte-produit { animation-delay: 0.40s; }
html.js .produits-bloc.anime .swiper-slide:nth-child(n+7) .carte-produit { animation-delay: 0.48s; }
@keyframes monteeCarte {
    from { opacity: 0; transform: translateY(26px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

/* Illustration du héros : flottement très doux avec légère inclinaison */
.hero-illu { animation: flottementIllu 6s ease-in-out infinite; }
@keyframes flottementIllu {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-14px) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
    html.js .produits-bloc .carte-produit { opacity: 1 !important; animation: none !important; transition: none !important; }
    .hero-illu { animation: none !important; }
    .carte-produit .aspect-square::after { display: none; }
    .bandeau-cta-anime { animation: none !important; }
    .panel-topicrem::after { display: none; }
    html.js .reveal.visible .etoile { animation: none !important; }
    .hero-slide-texte { transform: none !important; }
}

/* ---------- Dynamique accueil : parallaxe héro ----------
   La variable --par (px) est posée en JS sur la section héro ;
   seul le texte du slide actif glisse (la photo garde son Ken Burns). */
.hero-parallax .swiper-slide-active .hero-slide-texte {
    transform: translateY(calc(var(--par, 0) * 1px));
    will-change: transform;
}

/* ---------- Dynamique accueil : progression de l'autoplay du héro ---------- */
.hero-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    height: 3px;
    background: rgba(46, 58, 131, 0.12);
    overflow: hidden;
}
.hero-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #d92a2e, #f05555);
}

/* ---------- Dynamique accueil : CTA final au dégradé vivant ---------- */
.bandeau-cta-anime {
    background-size: 220% 220%;
    animation: ctaFluide 14s ease-in-out infinite alternate;
}
@keyframes ctaFluide {
    from { background-position: 0% 20%; }
    to   { background-position: 100% 80%; }
}

/* ---------- Dynamique accueil : reflet sur le panneau Topicrem ---------- */
.panel-topicrem { position: relative; }
.panel-topicrem::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
    background-size: 250% 100%;
    background-position: 130% 0;
    opacity: 0;
    transition: opacity 0.35s ease, background-position 0.9s ease;
}
.panel-topicrem:hover::after {
    opacity: 1;
    background-position: -50% 0;
}

/* ---------- Dynamique accueil : CTA héro, flèche qui s'élance ---------- */
.hero-actions a svg {
    transition: transform 0.25s ease;
}
.hero-actions a:hover svg {
    transform: translateX(5px);
}

/* ---------- Dynamique accueil : étoiles du témoignage ---------- */
html.js .reveal.visible .etoile { animation: popEtoile 0.55s ease backwards; }
html.js .reveal.visible .etoile:nth-child(2) { animation-delay: 0.12s; }
html.js .reveal.visible .etoile:nth-child(3) { animation-delay: 0.24s; }
html.js .reveal.visible .etoile:nth-child(4) { animation-delay: 0.36s; }
html.js .reveal.visible .etoile:nth-child(5) { animation-delay: 0.48s; }
@keyframes popEtoile {
    from { opacity: 0; transform: scale(0.3) rotate(-30deg); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Dynamique accueil : progression du défilement ---------- */
.barre-defilement {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: 3px;
    background: transparent;
    pointer-events: none;
}
.barre-defilement span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2e3a83, #d92a2e);
}