/* Le site existe en clair et en sombre (sombre.css + sombre.js) : on le declare au navigateur, qui n'a rien a inverser lui-meme */
:root { color-scheme: light dark; }

/* SIMA Motos : habillage animé du site (apparitions au défilement, survols, héros Divi). Respecte « réduire les animations ». */
:root { --hyo-bleu: #004B7A; --hyo-ease: cubic-bezier(.2, .7, .2, 1); }

/* Apparition au défilement */
.hyo-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s var(--hyo-ease); will-change: opacity, transform; }
.hyo-reveal.is-visible { opacity: 1; transform: none; }

/* Trait bleu animé sous les titres de section */
.et_pb_text_inner > h2:first-child::after, .hyo-h2::after {
  content: ""; display: block; width: 56px; height: 3px; background: var(--hyo-bleu); margin-top: 12px;
  transform: scaleX(0); transform-origin: left center; transition: transform .7s var(--hyo-ease) .25s;
}
.is-visible .et_pb_text_inner > h2:first-child::after, .is-visible.hyo-h2::after, .is-visible .hyo-h2::after { transform: scaleX(1); }
.hyo-centre .hyo-h2::after { margin-left: auto; margin-right: auto; transform-origin: center; }

/* Héros : fondu + léger zoom, texte qui monte */
@keyframes hyo-hero-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes hyo-monte { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.et_pb_fullwidth_header { animation: hyo-hero-in 1.4s var(--hyo-ease) both; }
.et_pb_fullwidth_header .header-content > * { animation: hyo-monte .9s var(--hyo-ease) both; }
.et_pb_fullwidth_header .header-content > *:nth-child(1) { animation-delay: .35s; }
.et_pb_fullwidth_header .header-content > *:nth-child(2) { animation-delay: .5s; }
.et_pb_fullwidth_header .header-content > *:nth-child(3) { animation-delay: .65s; }
.et_pb_fullwidth_header .header-content > *:nth-child(4) { animation-delay: .8s; }
/* Bord biseauté en bas des héros et en haut de l'appel à l'action */
.et_pb_section.et_pb_fullwidth_section:first-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 3vw)); }
.hyo-cta { clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%); padding-top: calc(56px + 3vw); }

/* Cartes et images : survol */
.hyo-carte { transition: transform .45s var(--hyo-ease), box-shadow .45s ease; border-radius: 10px; overflow: hidden; }
.hyo-carte:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }
.hyo-carte-lien { overflow: hidden; display: block; }
.hyo-carte-photo { transition: transform .8s var(--hyo-ease); }
.hyo-carte:hover .hyo-carte-photo { transform: scale(1.05); }
.et_pb_image { overflow: hidden; }
.et_pb_image img, .hyo-galerie-photo, .et_pb_blog_grid .et_pb_post .entry-featured-image-url img { transition: transform .8s var(--hyo-ease); }
.et_pb_image:hover img, .hyo-galerie-photo:hover, .et_pb_blog_grid .et_pb_post:hover .entry-featured-image-url img { transform: scale(1.04); }
.et_pb_blog_grid .et_pb_post { transition: transform .45s var(--hyo-ease), box-shadow .45s ease; border-radius: 6px; overflow: hidden; }
.et_pb_blog_grid .et_pb_post:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }

/* Boutons */
.et_pb_button, .hyo-btn, .et_pb_button_module_wrapper .et_pb_button { transition: transform .3s var(--hyo-ease), box-shadow .3s ease, background-color .3s ease, color .3s ease !important; }
.et_pb_button:hover, .hyo-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 75, 122, .25); }

/* Menu : soulignement qui glisse (en ::before : Divi utilise ::after pour la fleche des sous-menus) */
#top-menu > li > a { position: relative; }
#top-menu > li > a::before { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--hyo-bleu); transform: scaleX(0); transform-origin: right center; transition: transform .35s var(--hyo-ease); }
#top-menu > li:hover > a::before, #top-menu > li.current-menu-item > a::before, #top-menu > li.current-menu-ancestor > a::before { transform: scaleX(1); transform-origin: left center; }
#top-menu > li.menu-item-has-children > a::before { right: 20px; }
#top-menu > li.menu-cta > a::before { display: none; }

/* Gros chiffres : petit zoom à l'apparition */
.hyo-chiffre-anime { display: inline-block; }

/* Onglets de la fiche : glissement du panneau */
.hyo-onglet-panneau.est-actif { animation: hyo-monte .5s var(--hyo-ease) both; }

/* Liens dans les textes : bleu Hyosung (le bleu clair de Divi, #2ea3f2, manque de contraste sur fond clair) */
#main-content p a:not([class]), #main-content li a:not([class]), #main-content td a:not([class]), #main-content .post-meta a, #main-content .posted_in a, #main-content .nav-single a { color: var(--hyo-bleu); }
#top-menu li.current-menu-item > a, #top-menu li.current-menu-ancestor > a { color: var(--hyo-bleu); }

/* Héros : le zoom d'entrée (1,04) ne doit pas créer de barre de défilement horizontale */
.et_pb_section.et_pb_fullwidth_section:first-child { overflow-x: clip; }

/* Héros sur téléphone : titre plus petit, boutons l'un sous l'autre */
@media (max-width: 600px) {
  .et_pb_fullwidth_header .header-content h1, .et_pb_fullwidth_header .header-content .et_pb_module_header { font-size: 32px !important; line-height: 1.15 !important; }
  .et_pb_fullwidth_header .header-content .et_pb_button { display: block; text-align: center; margin: 10px 0 0 !important; font-size: 16px !important; letter-spacing: .5px !important; padding: 12px 16px !important; }
  .et_pb_fullwidth_header .header-content .et_pb_module_header { margin-bottom: 12px !important; }
}

/* Formulaires (essai, contact, recherche de revendeur) : 16 px minimum, sinon l'iPhone zoome tout seul quand on touche un champ (contrôle du 05/11/2026) */
.fluentform .ff-el-form-control, .fluentform select, .fluentform textarea, #wpsl-wrap input, #wpsl-wrap select, #wpsl-search-input { font-size: 16px !important; }

/* Liste des revendeurs sur téléphone : pas de deuxième zone qui défile dans la page, la liste prend sa hauteur */
@media (max-width: 767px) {
  /* 129 revendeurs dépliés = une page de 48 000 px (contrôle du 10/11/2026) : liste bornée à 70 % de l'écran, qui rend la main à la page en bout de course */
  #wpsl-wrap #wpsl-stores { height: auto !important; max-height: 70vh !important; overflow-y: auto !important; overscroll-behavior: auto; }
  #wpsl-stores .wpsl-directions, #wpsl-stores .wpsl-store-details a { display: inline-block; padding: 10px 0; }
  #footer-widgets a, #footer-bottom a, .bottom-nav a { display: inline-block; padding: 8px 0; }
}

/* Case de consentement des formulaires : 22 px et toute la phrase cliquable (13 px avant, trop petite au doigt, contrôle du 12/11/2026) */
.fluentform .ff-el-form-check-label { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.fluentform input.ff-el-form-check-input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 2px 0 0 !important; accent-color: var(--hyo-bleu); cursor: pointer; }

/* Pages courtes (mentions légales) : le pied de page reste en bas de l'écran, sans bande vide dessous (contrôle du 12/11/2026) */
#page-container { display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; }
#et-main-area { flex: 1 0 auto; display: flex; flex-direction: column; }
#main-content { flex: 1 0 auto; }

/* Menu mobile : sous-menus repliés, un bouton + / − à droite pour les ouvrir (site.js) ; les trois traits deviennent une croix
   quand le menu est ouvert (16 lignes dépliées, 742 px de haut, contrôle du 12/11/2026) */
@media (max-width: 980px) {
  .et_mobile_menu li.menu-item-has-children { position: relative; }
  /* #page-container : il faut passer devant la règle de Divi « #main-header .et_mobile_menu li ul { display: block !important } » */
  #page-container .et_mobile_menu li.menu-item-has-children > .sub-menu { display: none !important; }
  #page-container .et_mobile_menu li.menu-item-has-children.hyo-ouvert > .sub-menu { display: block !important; }
  .et_mobile_menu li.menu-item-has-children > a { padding-right: 56px !important; }
  .hyo-sm-bouton { position: absolute; top: 0; right: 0; width: 52px; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--hyo-bleu); font-size: 24px; line-height: 44px; cursor: pointer; }
  .hyo-sm-bouton::before { content: "+"; }
  .hyo-ouvert > .hyo-sm-bouton::before { content: "\2212"; }
  .mobile_nav.opened .mobile_menu_bar:before { content: "\4d"; }
}

/* Accessibilité : pas d'animation si l'utilisateur les a désactivées */
@media (prefers-reduced-motion: reduce) {
  .hyo-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .et_pb_fullwidth_header, .et_pb_fullwidth_header .header-content > *, .hyo-onglet-panneau.est-actif { animation: none !important; }
  .et_pb_text_inner > h2:first-child::after, .hyo-h2::after, #top-menu > li > a::before { transform: none !important; transition: none !important; }
}

/* Carte des revendeurs : 6 revendeurs dans la liste tant qu'aucune recherche n'est faite (classe posée par site.js, 1.6.14, 18/11/2026) */
#wpsl-wrap:not(.hyo-rev-recherche) #wpsl-stores li:nth-child(n+7) { display: none !important; }
