/* =========================================================
   HOME.CSS — (scopé #app) design soigné + inputs stylés
   ========================================================= */

/* --------- Tokens / Container --------- */
:root {
  --container-w: 1100px;       /* largeur contenu */
  --radius-lg: 16px;
  --radius-xl: 18px;
  --ring: 0 0 0 3px color-mix(in oklab, var(--primary) 28%, transparent);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.06);
  --shadow-md: 0 10px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 38px rgba(0,0,0,.12);
  --placeholder: color-mix(in oklab, var(--ink) 40%, transparent);
}

/* Limite à 1100px pour les blocs de la home */
.hero-content.container,
.hero-menu.container,
.section > .container,
.newsletter > .container {
  max-width: var(--container-w);
  margin-left: auto;
  margin-right: auto;
}

/* --------- Base forms (scopé pour ne pas toucher le header) --------- */
#app input[type="text"],
#app input[type="search"],
#app input[type="email"],
#app input[type="number"],
#app input[type="tel"],
#app select,
#app textarea {
  appearance: none;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.03);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
#app input::placeholder,
#app textarea::placeholder { color: var(--placeholder); }

#app input:focus,
#app select:focus,
#app textarea:focus { border-color: var(--primary-600); box-shadow: var(--ring); }

#app .btn {
  border: none;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
#app .btn:active { transform: scale(.98); }
#app .btn.primary { background: var(--primary); color: #fff; }
#app .btn.primary:hover { filter: brightness(1.04); box-shadow: var(--shadow-md); }
#app .btn.ghost {
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  border: 1px solid var(--border);
  color: var(--ink);
}
#app .btn.ghost:hover { box-shadow: var(--shadow-sm); }
#app .btn:focus-visible { box-shadow: var(--ring); }

/* Pills */
.pill {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.pill:hover { box-shadow: var(--shadow-sm); }
.pill.active { background: var(--primary); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .pill:not(.active){ color: var(--muted); }

/* --------- Reveal animation --------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.reveal.show { opacity: 1; transform: none; }

/* --------- HERO --------- */
.hero {
  position: relative; border-radius: 0; margin: 0; overflow: hidden;
  height: clamp(240px, 46vh, 460px);
  background: #130a23 url('https://images.unsplash.com/photo-1512428559087-560fa5ceab42?q=80&w=1400&auto=format&fit=crop') center/cover no-repeat;
}
.hero::before {
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(19,10,35,.35) 0%, rgba(19,10,35,.55) 55%, rgba(19,10,35,.85) 100%);
}
:root[data-theme="dark"] .hero::before {
  background: linear-gradient(180deg, rgba(5,6,9,.20) 0%, rgba(5,6,9,.55) 55%, rgba(5,6,9,.80) 100%);
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: grid; align-content: center; justify-items: start; gap: 10px;
  color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35);
  padding: 24px var(--page-pad);
}
.hero h1 { margin: 0; font-size: clamp(20px, 3.6vw, 32px); line-height: 1.2; }
.hero p { margin: 0; color: #e9d5ff; }
.cta { display: flex; gap: 10px; margin-top: 10px; }

.hero-menu-wrap { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; }
.hero-menu {
  margin: 0 auto; padding: 8px; display: flex; gap: 8px; overflow: auto;
  background: color-mix(in oklab, #ffffff 16%, transparent);
  border: 1px solid color-mix(in oklab, #ffffff 45%, transparent);
  backdrop-filter: blur(8px); border-radius: 999px;
}
.hero-menu .tab {
  color: #fff; padding: 8px 14px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.hero-menu .tab.active { background: #ffffffdd; color: #111; border-color: #fff; }
.hero-menu .tab:hover  { background: #ffffffcc; color: #111; border-color: #fff; }

/* --------- Sections / Headers --------- */
.section { margin: 22px 0; }
.section > .container { padding: 0 var(--page-pad); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title { margin: 0; font-size: 18px; position: relative; padding-left: 10px; letter-spacing: .2px; }
.section-title::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 4px; height: 1.2em; border-radius: 3px; background: var(--primary);
}

/* --------- Searchbar (ta page l’utilise : #concerts) --------- */
.searchbar {
  display: flex; gap: 10px; align-items: center; flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,.03);
}
.searchbar input[type="search"] {
  background: transparent; border: none; outline: none; color: var(--ink); padding: 8px 10px; flex: 1;
}
.searchbar .btn { border-radius: 999px; padding: 8px 12px; }

/* --------- Slider --------- */
.slider { position: relative; }
.slider-track {
  display: flex; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--gap) 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.slider-track::-webkit-scrollbar { display: none; width: 0; height: 0; }

.slide { flex: 0 0 var(--card-w); width: var(--card-w); scroll-snap-align: start; display: flex; }
@media (max-width:760px){ .slide{ flex-basis: 70vw; width: 70vw } }
@media (max-width:420px){ .slide{ flex-basis: 90vw; width: 90vw } }

.sbtn{
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-md);
  backdrop-filter: saturate(1.1) blur(4px);
  transition: transform .15s ease, opacity .15s ease;
  opacity: .95;
}
.sbtn:hover{ transform: translateY(-50%) scale(1.05); }
.sbtn svg{ width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2; fill: none; }
.sbtn.prev{ left: 4px; }
.sbtn.next{ right: 4px; }

/* --------- Cards --------- */
.card{
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; height: 100%; width: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.thumb{ position: relative; aspect-ratio: 16/10; overflow: hidden; }
.thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .thumb img{ transform: scale(1.05); }

.badge{
  position: absolute; top: 8px; left: 8px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 11px;
  padding: 6px 10px; border-radius: 999px;
}
.fav{
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: pointer; color: #9aa2b2;
  transition: color .15s ease, transform .15s ease;
}
.fav:hover{ color: #ef4444; transform: translateY(-1px); }

.card-body{ padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.title{
  margin: 0; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.meta{ display: flex; gap: 8px; color: var(--muted); font-size: 12.5px; align-items: center; }
.dot{ width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .35; }
.actions{ display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price{ font-weight: 800; color: var(--primary); letter-spacing: .2px; }
.rate{ color: #f59e0b; }

/* liens de carte (overlay clic) */
.card a.card-link{
  position: absolute; inset: 0; border-radius: inherit; z-index: 1; text-decoration: none;
}

/* --------- Newsletter --------- */
.newsletter{
  background:
    linear-gradient(135deg,
      color-mix(in oklab, var(--primary) 40%, #0000) 0%,
      color-mix(in oklab, var(--primary) 20%, #0000) 55%,
      color-mix(in oklab, var(--primary) 12%, #0000) 100%);
  color:#fff; border-radius: 0; position: relative; overflow: hidden; margin-top: 40px;
}
.newsletter::before{
  content:""; position:absolute; top:0; left:0; bottom:0; width:6px;
  background:linear-gradient(180deg, #ffffffa0, #ffffff00);
  mix-blend-mode:overlay; opacity:.55;
}
.newsletter::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(3px 3px at 15% 25%, rgba(255,255,255,.16) 0, rgba(255,255,255,0) 60%),
    radial-gradient(2px 2px at 70% 70%, rgba(255,255,255,.14) 0, rgba(255,255,255,0) 60%),
    radial-gradient(2px 2px at 45% 55%, rgba(255,255,255,.12) 0, rgba(255,255,255,0) 60%);
  animation: nlFloat 9s ease-in-out infinite alternate;
  opacity:.35;
}
@keyframes nlFloat{ 0%{ transform:translateY(0) } 100%{ transform:translateY(10px) } }

:root[data-theme="dark"] .newsletter{
  background:
    linear-gradient(135deg,
      color-mix(in oklab, var(--primary) 28%, #0000) 0%,
      color-mix(in oklab, var(--primary) 18%, #0000) 60%,
      color-mix(in oklab, var(--primary) 10%, #0000) 100%);
}
:root[data-theme="dark"] .newsletter::after{ opacity:.45; }

.newsletter > .container{
  padding: 24px var(--page-pad);
  display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center;
  background: color-mix(in oklab, var(--surface) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--border) 90%, transparent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
:root[data-theme="dark"] .newsletter > .container{
  background: color-mix(in oklab, var(--surface) 18%, transparent);
  border-color: #1f2532;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.nl-head h3{ margin: 0 0 6px; }
.nl-head p{ margin: 0; color: #f6eafe; }
.nl-form{ display: flex; gap: 10px; flex-wrap: wrap; }
.nl-form input{
  flex: 1; min-width: 220px;
}
.nl-form .btn{
  background: #111; color: #fff; border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
:root[data-theme="dark"] .nl-form .btn{ background: #0f1219; }

/* --------- Z-index / stacking (le contenu sous le header) --------- */
#app { position: relative; z-index: 1; isolation: isolate; }
.section, .reveal { position: relative; z-index: 1; }

/* --------- Responsive micro-ajustements --------- */
@media (max-width:900px){
  .section-title{ font-size: 16px; }
}
@media (max-width:560px){
  .hero-menu{ border-radius: 16px; }
}
@media (prefers-reduced-motion:reduce){
  .reveal{ opacity:1; transform:none }
  .btn, .card, .thumb img{ transition: none }
}

/* Révélation douce (non intrusif) */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .4s ease, transform .5s ease;
}
.reveal.show{
  opacity:1;
  transform:none;
}
@media (prefers-reduced-motion: reduce){
  .reveal{ transition:none; }
}

