/* ============================================
   RESET CSS — AVDA
   Dernière mise à jour : Juillet 2026
   ============================================ */

/* --- Base Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- HTML & Body --- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: var(--font-primary);
  color: var(--text-dark);
  background-color: var(--bg-main);
  overflow-x: hidden;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: var(--fw-bold);
  color: var(--brand-primary);
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* --- Paragraphs --- */
p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-dark);
}

p:last-child {
  margin-bottom: 0;
}

/* --- Lists --- */
ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --- Links --- */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-accent);
}

/* --- Images --- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border-style: none;
  vertical-align: middle;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

/* --- Forms --- */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #D0D5D2;
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  color: var(--text-dark);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  font-size: 0.95rem;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(19, 68, 30, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: #9BA89F;
  opacity: 1;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: var(--fw-medium);
  font-size: 0.9rem;
  color: var(--text-dark);
}

fieldset {
  border: 1px solid #D0D5D2;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 0;
}

legend {
  padding: 0 0.5rem;
  font-weight: var(--fw-semibold);
  color: var(--brand-primary);
}

/* --- Blockquote --- */
blockquote {
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-left: 4px solid var(--brand-accent);
  background-color: var(--bg-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-dark);
}

blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-weight: var(--fw-semibold);
  color: var(--brand-primary);
}

/* --- Code --- */
code,
pre {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
}

code {
  padding: 0.2rem 0.5rem;
  font-size: 0.9em;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  padding: 0;
  background: none;
}

/* --- Horizontal Rule --- */
hr {
  border: none;
  height: 1px;
  background-color: #D0D5D2;
  margin: 2rem 0;
}

/* --- Selection --- */
::selection {
  background-color: var(--brand-primary);
  color: var(--bg-main);
}

::-moz-selection {
  background-color: var(--brand-primary);
  color: var(--bg-main);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--theme-agriculture);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print Styles --- */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  
  .navbar,
  .footer,
  .loader-wrapper,
  .btn-scroll-top {
    display: none !important;
  }
}