/**
 * CSS Reset & Normalization - BookConnect
 * Reset CSS moderne inspiré de modern-normalize avec ajouts BookConnect
 */

/* ===== RESET DE BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== ÉLÉMENTS DE BASE ===== */
main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  line-height: inherit;
}

p, li, figcaption, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  list-style: none;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

/* ===== LIENS ===== */
a {
  color: inherit;
  text-decoration: none;
}

a:focus {
  outline: 2px solid var(--color-focus, #3498DB);
  outline-offset: 2px;
}

/* ===== FORMULAIRES ===== */
button, input, optgroup, select, textarea {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

button, [type="button"], [type="reset"], [type="submit"] {
  cursor: pointer;
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

fieldset {
  padding: 0.35em 0.75em 0.625em;
  border: 1px solid currentColor;
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

progress {
  vertical-align: baseline;
}

textarea {
  overflow: auto;
  resize: vertical;
}

[type="checkbox"], [type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/* ===== MÉDIA ===== */
audio, canvas, embed, iframe, img, object, svg, video {
  height: auto;
  max-width: 100%;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

svg:not(:root) {
  overflow: hidden;
}

/* ===== TYPOGRAPHIE ===== */
b, strong {
  font-weight: bolder;
}

code, kbd, samp {
  font-family: var(--font-family-mono, monospace);
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* ===== TABLEAUX ===== */
table {
  text-indent: 0;
  border-color: inherit;
}

caption {
  text-align: left;
}

td, th {
  vertical-align: top;
  padding: 0;
}

th {
  text-align: left;
  font-weight: bold;
}

/* ===== SÉLECTION ===== */
::selection {
  background-color: var(--color-secondary, #3498DB);
  color: white;
}

::-moz-selection {
  background-color: var(--color-secondary, #3498DB);
  color: white;
}

/* ===== SCROLLBAR (Webkit uniquement) ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ===== FLEXBOX COMPATIBILITY ===== */
.flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.flex-column {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.flex-row {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.flex-wrap {
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.flex-nowrap {
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
}

.justify-content-center {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.justify-content-start {
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
}

.justify-content-end {
  -webkit-box-pack: end;
  -ms-flex-pack: end;
  justify-content: flex-end;
}

.justify-content-between {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.align-items-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.align-items-start {
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
}

.align-items-end {
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
}

/* ===== ANIMATIONS & TRANSITIONS ===== */
.transition {
  -webkit-transition: all var(--transition-normal, 0.3s) ease;
  -o-transition: all var(--transition-normal, 0.3s) ease;
  transition: all var(--transition-normal, 0.3s) ease;
}

/* ===== NAVIGATEURS SPÉCIFIQUES ===== */

/* Firefox */
@-moz-document url-prefix() {
  select {
    text-indent: 0.01px;
    text-overflow: '';
    padding-right: 25px;
  }
}

/* Internet Explorer */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .flex {
    display: flex;
  }

  img {
    max-width: 100%;
  }
}

/* Safari */
@media not all and (min-resolution: .001dpcm) {
  @supports (-webkit-appearance: none) {
    .safari-fix {
      -webkit-appearance: none;
      appearance: none;
      margin: 0;
    }
  }
}

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

.sr-only:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: inherit !important;
  margin: inherit !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: inherit !important;
}
