/*
 * Base du thème Terrassebois Premium — sous-ensemble de Bootstrap 5.3 (reboot, grille, utilitaires,
 * navbar, accordéon, formulaires) limité aux classes présentes dans le thème et les contenus.
 * L'habillage premium est dans style.css.
 */

:root {
  --bs-border-width: 1px;
  --bs-border-color: #dee2e6;
  --bs-border-radius: .375rem;
  --bs-body-color: #212529;
  --bs-gutter-x: 1.5rem;
}

/* ---------- Reboot ---------- */
*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { :root { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
hr { margin: 1rem 0; color: inherit; border: 0; border-top: 1px solid; opacity: .25; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
h6 { font-size: 1rem; }
p { margin-top: 0; margin-bottom: 1rem; }
address { margin-bottom: 1rem; font-style: normal; line-height: inherit; }
ol, ul { padding-left: 2rem; }
ol, ul, dl { margin-top: 0; margin-bottom: 1rem; }
ol ol, ul ul, ol ul, ul ol { margin-bottom: 0; }
dt { font-weight: 700; }
dd { margin-bottom: .5rem; margin-left: 0; }
blockquote, figure { margin: 0 0 1rem; }
b, strong { font-weight: bolder; }
small { font-size: .875em; }
a { color: #0d6efd; text-decoration: underline; }
a:hover { color: #0a58ca; }
img, svg { vertical-align: middle; }
table { caption-side: bottom; border-collapse: collapse; }
th { text-align: inherit; text-align: -webkit-match-parent; }
label { display: inline-block; }
button { border-radius: 0; }
button:focus:not(:focus-visible) { outline: 0; }
input, button, select, optgroup, textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
button, select { text-transform: none; }
select { word-wrap: normal; }
button, [type=button], [type=reset], [type=submit] { -webkit-appearance: button; }
button:not(:disabled), [type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled) { cursor: pointer; }
textarea { resize: vertical; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
iframe { border: 0; }
[hidden] { display: none !important; }

/* ---------- Grille ---------- */
.container, .container-fluid {
  width: 100%;
  padding-right: calc(var(--bs-gutter-x) * .5);
  padding-left: calc(var(--bs-gutter-x) * .5);
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--bs-gutter-x) * -.5);
  margin-left: calc(var(--bs-gutter-x) * -.5);
}
.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * .5);
  padding-left: calc(var(--bs-gutter-x) * .5);
}
.col { flex: 1 0 0%; }
.col-12 { flex: 0 0 auto; width: 100%; }
@media (min-width: 576px) {
  .col-sm { flex: 1 0 0%; }
}
@media (min-width: 768px) {
  .col-md-3  { flex: 0 0 auto; width: 25%; }
  .col-md-4  { flex: 0 0 auto; width: 33.33333333%; }
  .col-md-8  { flex: 0 0 auto; width: 66.66666667%; }
  .col-md-9  { flex: 0 0 auto; width: 75%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* ---------- Utilitaires ---------- */
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.img-fluid { max-width: 100%; height: auto; }
.rounded { border-radius: var(--bs-border-radius) !important; }
.fixed-bottom { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1030; }
.sticky-top { position: sticky; top: 0; z-index: 1020; }
.me-auto { margin-right: auto !important; }
.my-1 { margin-top: .25rem !important; margin-bottom: .25rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.lead { font-size: 1.25rem; font-weight: 300; }
.display-4 { font-size: calc(1.475rem + 2.7vw); font-weight: 300; line-height: 1.2; }
@media (min-width: 576px) { .d-sm-block { display: block !important; } }
@media (min-width: 768px) { .d-md-none { display: none !important; } }
@media (min-width: 992px) { .mb-lg-0 { margin-bottom: 0 !important; } }
@media (min-width: 1200px) { .display-4 { font-size: 3.5rem; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: var(--bs-border-width) solid transparent;
  border-radius: var(--bs-border-radius);
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.btn-primary { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.btn-primary:hover { color: #fff; background-color: #0b5ed7; border-color: #0a58ca; }

/* ---------- Formulaires (Contact Form 7) ---------- */
.form-label { margin-bottom: .5rem; }
.form-control {
  display: block;
  width: 100%;
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  appearance: none;
  background-color: #fff;
  background-clip: padding-box;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-control:focus {
  color: var(--bs-body-color);
  background-color: #fff;
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
.form-control::placeholder { color: #6c757d; opacity: 1; }
textarea.form-control { min-height: calc(1.5em + .75rem + 2px); }
select.form-control { appearance: auto; }

/* ---------- Carte & liste ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  border: var(--bs-border-width) solid rgba(0, 0, 0, .175);
  border-radius: var(--bs-border-radius);
}
.card-body { flex: 1 1 auto; padding: 1rem; }
.card-title { margin-bottom: .5rem; }
.card-text:last-child { margin-bottom: 0; }

.list-group { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; border-radius: var(--bs-border-radius); }
.list-group-item {
  position: relative;
  display: block;
  padding: .5rem 1rem;
  color: var(--bs-body-color);
  background-color: #fff;
  border: var(--bs-border-width) solid var(--bs-border-color);
}
.list-group-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.list-group-item:last-child { border-bottom-right-radius: inherit; border-bottom-left-radius: inherit; }
.list-group-item + .list-group-item { border-top-width: 0; }

/* ---------- Repli (accordéon, menu mobile) ---------- */
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height .35s ease; }
@media (prefers-reduced-motion: reduce) { .collapsing { transition: none; } }

/* ---------- Barre de navigation ---------- */
.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
}
.navbar > .container, .navbar > .container-fluid {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand {
  padding-top: .3125rem;
  padding-bottom: .3125rem;
  margin-right: 1rem;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}
.navbar-nav {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}
.nav-link {
  display: block;
  padding: .5rem 0;
  color: rgba(0, 0, 0, .65);
  text-decoration: none;
  transition: color .15s ease-in-out;
}
.navbar-collapse { flex-basis: 100%; flex-grow: 1; align-items: center; }
.navbar-toggler {
  padding: .25rem .75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(0, 0, 0, .65);
  background-color: transparent;
  border: var(--bs-border-width) solid rgba(0, 0, 0, .15);
  border-radius: var(--bs-border-radius);
  transition: box-shadow .15s ease-in-out;
}
.navbar-toggler:focus { outline: 0; box-shadow: 0 0 0 .25rem; }
.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") center / 100% no-repeat;
}
.dropdown-menu {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 10rem;
  padding: .5rem 0;
  margin: 0;
  text-align: left;
  list-style: none;
  background-color: #fff;
  border: var(--bs-border-width) solid rgba(0, 0, 0, .175);
  border-radius: var(--bs-border-radius);
}
.dropdown-menu.show { display: block; }
.navbar-nav .dropdown-menu { position: static; }
.dropdown-toggle { white-space: nowrap; }
.dropdown-toggle::after {
  display: inline-block;
  margin-left: .255em;
  vertical-align: .255em;
  content: "";
  border-top: .3em solid;
  border-right: .3em solid transparent;
  border-left: .3em solid transparent;
}
@media (min-width: 992px) {
  .navbar-expand-lg { flex-wrap: nowrap; justify-content: flex-start; }
  .navbar-expand-lg .navbar-nav { flex-direction: row; }
  .navbar-expand-lg .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
  .navbar-expand-lg .navbar-nav .dropdown-menu { position: absolute; }
  .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
  .navbar-expand-lg .navbar-toggler { display: none; }
}

/* ---------- Accordéon (FAQ) ---------- */
.accordion-item {
  color: var(--bs-body-color);
  background-color: var(--bs-accordion-bg, #fff);
  border: var(--bs-accordion-border-width, 1px) solid var(--bs-border-color);
}
.accordion-item:first-of-type { border-top-left-radius: var(--bs-border-radius); border-top-right-radius: var(--bs-border-radius); }
.accordion-item:not(:first-of-type) { border-top: 0; }
.accordion-item:last-of-type { border-bottom-right-radius: var(--bs-border-radius); border-bottom-left-radius: var(--bs-border-radius); }
.accordion-header { margin-bottom: 0; }
.accordion-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--bs-accordion-btn-padding-y, 1rem) 1.25rem;
  font-size: 1rem;
  color: var(--bs-body-color);
  text-align: left;
  background-color: var(--bs-accordion-bg, #fff);
  border: 0;
  border-radius: 0;
  overflow-anchor: none;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.accordion-button::after {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  content: "";
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e") center / 1.25rem no-repeat;
  transition: transform .2s ease-in-out;
}
.accordion-button:not(.collapsed) {
  color: #052c65;
  background-color: #cfe2ff;
  box-shadow: inset 0 calc(-1 * var(--bs-border-width)) 0 var(--bs-border-color);
}
.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23052c65' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}
.accordion-button:hover { z-index: 2; }
.accordion-button:focus { z-index: 3; outline: 0; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
.accordion-body { padding: 1rem 1.25rem; }
@media (prefers-reduced-motion: reduce) { .accordion-button, .accordion-button::after { transition: none; } }

/* ---------- Compléments utilisés par les contenus ---------- */
.row { --bs-gutter-y: 0; margin-top: calc(-1 * var(--bs-gutter-y)); }
.row > * { margin-top: var(--bs-gutter-y); }
.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
@media (min-width: 768px) {
  .col-md-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.33333333%; }
}
@media (min-width: 992px) {
  .col-lg-2  { flex: 0 0 auto; width: 16.66666667%; }
  .col-lg-4  { flex: 0 0 auto; width: 33.33333333%; }
  .col-lg-6  { flex: 0 0 auto; width: 50%; }
  .col-lg-8  { flex: 0 0 auto; width: 66.66666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
  .offset-lg-2 { margin-left: 16.66666667%; }
}

.d-block { display: block !important; }
.d-inline-flex { display: inline-flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-center { justify-content: center !important; }
.gap-3 { gap: 1rem !important; }
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }
.mx-auto { margin-right: auto !important; margin-left: auto !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-5 { margin-bottom: 3rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
.p-2 { padding: .5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.border-0 { border: 0 !important; }
.rounded-circle { border-radius: 50% !important; }
.fw-bold { font-weight: 700 !important; }
.small, small { font-size: .875em; }
.h5 { font-size: 1.25rem; }
.list-unstyled, .list-inline { padding-left: 0; list-style: none; }
.list-inline-item { display: inline-block; }
.list-inline-item:not(:last-child) { margin-right: .5rem; }

.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important; }
.shadow    { box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important; }

.bg-white  { background-color: #fff !important; }
.bg-light  { background-color: #f8f9fa !important; }
.bg-primary { background-color: #0d6efd !important; }
.bg-danger { background-color: #dc3545 !important; }
.text-white { color: #fff !important; }
.text-muted { color: #6c757d !important; }
.text-primary { color: #0d6efd !important; }
.text-success { color: #198754 !important; }

.badge { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: var(--bs-border-radius); }
.alert { position: relative; padding: 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: var(--bs-border-radius); }
.alert-info { color: #055160; background-color: #cff4fc; border-color: #9eeaf9; }
.alert-secondary { color: #2b2f32; background-color: #e2e3e5; border-color: #c4c8cb; }

.btn-lg { padding: .5rem 1rem; font-size: 1.25rem; border-radius: .5rem; }
.btn-light { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; }
.btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; }
.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; }
.btn-outline-primary:hover { color: #fff; background-color: #0d6efd; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; }
.btn-outline-secondary:hover { color: #fff; background-color: #6c757d; }

.card-img-top { width: 100%; border-top-left-radius: calc(var(--bs-border-radius) - 1px); border-top-right-radius: calc(var(--bs-border-radius) - 1px); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
