/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ===================================================================
   ebikeshopvionnaz.ch — Child theme styles
   Conventions: low-specificity, mobile-first, no !important.
   =================================================================== */

/* --- 1. Reading comfort & font smoothing ----------------------------- */
html {
  -webkit-text-size-adjust: 100%; /* Prevent iOS auto-zoom on landscape */
  scroll-behavior: smooth;
  scroll-padding-top: 80px;       /* Anchors don't disappear under sticky header */
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

p,
li {
  line-height: 1.65;
}

/* --- 2. Typography refinements --------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  text-wrap: balance;             /* Modern: prevents lonely orphan words in headings */
}

/* Slight letter-spacing on uppercase/small text — feels more polished */
.uppercase,
[class*="uppercase"] {
  letter-spacing: 0.04em;
}

/* Better default for long-form text */
.entry-content p,
.elementor-widget-text-editor p {
  margin-bottom: 1em;
}

/* --- 3. Accessible focus states -------------------------------------- */
/* Sober but visible focus ring on keyboard navigation only (not mouse).
   Uses the modern :focus-visible pseudo-class. */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #2563eb;     /* Accessible blue, override per brand if needed */
  outline-offset: 3px;
}

/* Remove the default browser outline only when :focus-visible is supported,
   so we never leave keyboard users without a focus indicator. */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- 4. Smooth interactive states ------------------------------------ */
a,
button,
.button,
[role="button"] {
  transition: color 180ms ease, background-color 180ms ease,
              border-color 180ms ease, opacity 180ms ease,
              transform 180ms ease;
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --- 5. Selection color ---------------------------------------------- */
::selection {
  background-color: #2563eb;
  color: #ffffff;
}

/* --- 6. Image defaults ----------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
}

/* --- 7. Form fields baseline ----------------------------------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
  font: inherit;                  /* Inherit parent font, not browser default */
}

/* --- 8. Skip to main content (a11y) --------------------------------- */
/* Visible only when focused via keyboard */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* --- 9. Layout offset: per-page fixes for sidebar overlap ----------- */
/*
 * Some pages (with the fixed sidebar header) have their main content
 * overlapping the sidebar widgets because the Elementor sections don't
 * have their own left padding configured.
 *
 * Targeted by body.page-id-* — add more IDs as needed.
 * The proper long-term fix is to edit each page in Elementor and add
 * left padding to the first section, but this child-theme CSS is a
 * quick patch.
 */
@media (min-width: 1024px) {
  /* Atelier */
  body.page-id-354 > .elementor[data-elementor-type="wp-page"] {
    padding-left: 16%;
  }
}
