/* ==========================================================================
   Base neutre — reset, accessibilité, formulaire (commun aux deux styles)
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
main:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* --- Accessibilité --------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 1000;
  padding: .75rem 1.25rem;
  background: #fff;
  color: #111;
  font-weight: 600;
  border-radius: 999px;
  transform: translateY(-200%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--focus, #2563eb);
  outline-offset: 3px;
}

/* --- Formulaire (structure commune) -------------------------------- */
.form__grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .form__grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: .5rem; }
.field__input {
  width: 100%;
  min-height: 3rem;
  padding: .75rem 1rem;
  border-radius: 0;
  appearance: none;
}
.field__textarea { min-height: 9rem; resize: vertical; }
.field__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.75rem;
}
.field__hint { font-size: .875rem; }
.field__error { font-size: .875rem; font-weight: 500; }
.field--check {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .75rem;
}
.field--check label { flex: 1; font-size: .9375rem; line-height: 1.5; min-width: 0; }
.field--check .field__error { flex-basis: 100%; }
.field__checkbox {
  width: 1.25rem; height: 1.25rem;
  margin: .15rem 0 0;
  flex: none;
}
.form__hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form__submit { margin-top: 1.75rem; }

.alert { padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.alert ul { margin-top: .75rem; display: grid; gap: .35rem; }
.alert a { text-decoration: underline; }
.alert:focus { outline-offset: 4px; }

/* --- Vidéo ----------------------------------------------------------- */
.video-toggle__play { display: none; }
.video-toggle[aria-pressed="true"] .video-toggle__play { display: block; }
.video-toggle[aria-pressed="true"] .video-toggle__pause { display: none; }

/* --- Sélecteur de style (aperçu interne) ----------------------------- */
.theme-switch {
  position: fixed;
  left: 1rem; bottom: 1rem;
  z-index: 90;
  display: inline-flex;
  flex-direction: column;
  gap: .1rem;
  padding: .6rem 1rem;
  font: 500 .8125rem/1.2 system-ui, sans-serif;
  text-decoration: none;
  color: #fff;
  background: rgba(17, 17, 17, .88);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.theme-switch__label { font-size: .6875rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.theme-switch:hover { background: #000; }

/* --- Mouvement réduit : toute animation coupée ---------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-speed] { transform: none !important; }
}

@media print {
  .site-header, .mobile-menu, .theme-switch, .video-toggle, .hero__media video { display: none !important; }
}
