/* ==========================================================================
   SOCLE — remise à zéro, grille et utilitaires
   --------------------------------------------------------------------------
   Ce fichier remplace Bootstrap. Il reprend exactement les classes utilisées
   par le site (container, row, col-*, g-*, d-*, mb-*, form-*, w-100…), donc
   le HTML n'a pas changé — mais il pèse ~8 Ko au lieu de 232 Ko.

   Bootstrap embarquait des centaines de composants dont le site n'utilisait
   rien (carrousels, accordéons, tableaux, badges, thèmes…) : c'était le plus
   gros frein au chargement des pages.

   Points de rupture (identiques à Bootstrap 5) :
      sm 576px · md 768px · lg 992px · xl 1200px · xxl 1400px
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Remise à zéro
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body { margin: 0; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; }
p, ul, ol, dl, figure, blockquote { margin: 0 0 1rem; }
ul, ol { padding-left: 1.5rem; }
dd { margin-left: 0; }
hr { border: 0; border-top: 1px solid currentColor; opacity: .15; margin: 1.5rem 0; }
b, strong { font-weight: 700; }
small { font-size: .875em; }

img, svg, video, iframe { vertical-align: middle; }
img, svg { max-width: 100%; }

button, input, optgroup, select, textarea {
  margin: 0;
  font: inherit;
  color: inherit;
}
button, [type="button"], [type="submit"] {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-appearance: button;
  appearance: button;
}
textarea { resize: vertical; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   2. Conteneur
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 12px;
}
@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; } }

/* --------------------------------------------------------------------------
   3. Grille 12 colonnes
   -------------------------------------------------------------------------- */
.row {
  --gx: 1.5rem;
  --gy: 0rem;
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--gy));
  margin-right: calc(-.5 * var(--gx));
  margin-left: calc(-.5 * var(--gx));
}
.row > * {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--gx) * .5);
  padding-left: calc(var(--gx) * .5);
  margin-top: var(--gy);
}

/* Gouttières */
.g-0  { --gx: 0;      --gy: 0; }
.g-1  { --gx: .25rem; --gy: .25rem; }
.g-2  { --gx: .5rem;  --gy: .5rem; }
.g-3  { --gx: 1rem;   --gy: 1rem; }
.g-4  { --gx: 1.5rem; --gy: 1.5rem; }
.g-5  { --gx: 3rem;   --gy: 3rem; }
.gx-0 { --gx: 0; }      .gy-0 { --gy: 0; }
.gx-1 { --gx: .25rem; } .gy-1 { --gy: .25rem; }
.gx-2 { --gx: .5rem; }  .gy-2 { --gy: .5rem; }
.gx-3 { --gx: 1rem; }   .gy-3 { --gy: 1rem; }
.gx-4 { --gx: 1.5rem; } .gy-4 { --gy: 1.5rem; }
.gx-5 { --gx: 3rem; }   .gy-5 { --gy: 3rem; }

.col      { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1  { width: 8.33333333%; }
.col-2  { width: 16.66666667%; }
.col-3  { width: 25%; }
.col-4  { width: 33.33333333%; }
.col-5  { width: 41.66666667%; }
.col-6  { width: 50%; }
.col-7  { width: 58.33333333%; }
.col-8  { width: 66.66666667%; }
.col-9  { width: 75%; }
.col-10 { width: 83.33333333%; }
.col-11 { width: 91.66666667%; }
.col-12 { width: 100%; }

@media (min-width: 576px) {
  .col-sm      { flex: 1 0 0%; width: auto; }
  .col-sm-auto { flex: 0 0 auto; width: auto; }
  .col-sm-1  { width: 8.33333333%; }
  .col-sm-2  { width: 16.66666667%; }
  .col-sm-3  { width: 25%; }
  .col-sm-4  { width: 33.33333333%; }
  .col-sm-5  { width: 41.66666667%; }
  .col-sm-6  { width: 50%; }
  .col-sm-7  { width: 58.33333333%; }
  .col-sm-8  { width: 66.66666667%; }
  .col-sm-9  { width: 75%; }
  .col-sm-10 { width: 83.33333333%; }
  .col-sm-11 { width: 91.66666667%; }
  .col-sm-12 { width: 100%; }
}
@media (min-width: 768px) {
  .col-md      { flex: 1 0 0%; width: auto; }
  .col-md-auto { flex: 0 0 auto; width: auto; }
  .col-md-1  { width: 8.33333333%; }
  .col-md-2  { width: 16.66666667%; }
  .col-md-3  { width: 25%; }
  .col-md-4  { width: 33.33333333%; }
  .col-md-5  { width: 41.66666667%; }
  .col-md-6  { width: 50%; }
  .col-md-7  { width: 58.33333333%; }
  .col-md-8  { width: 66.66666667%; }
  .col-md-9  { width: 75%; }
  .col-md-10 { width: 83.33333333%; }
  .col-md-11 { width: 91.66666667%; }
  .col-md-12 { width: 100%; }
}
@media (min-width: 992px) {
  .col-lg      { flex: 1 0 0%; width: auto; }
  .col-lg-auto { flex: 0 0 auto; width: auto; }
  .col-lg-1  { width: 8.33333333%; }
  .col-lg-2  { width: 16.66666667%; }
  .col-lg-3  { width: 25%; }
  .col-lg-4  { width: 33.33333333%; }
  .col-lg-5  { width: 41.66666667%; }
  .col-lg-6  { width: 50%; }
  .col-lg-7  { width: 58.33333333%; }
  .col-lg-8  { width: 66.66666667%; }
  .col-lg-9  { width: 75%; }
  .col-lg-10 { width: 83.33333333%; }
  .col-lg-11 { width: 91.66666667%; }
  .col-lg-12 { width: 100%; }
}
@media (min-width: 1200px) {
  .col-xl      { flex: 1 0 0%; width: auto; }
  .col-xl-auto { flex: 0 0 auto; width: auto; }
  .col-xl-1  { width: 8.33333333%; }
  .col-xl-2  { width: 16.66666667%; }
  .col-xl-3  { width: 25%; }
  .col-xl-4  { width: 33.33333333%; }
  .col-xl-5  { width: 41.66666667%; }
  .col-xl-6  { width: 50%; }
  .col-xl-7  { width: 58.33333333%; }
  .col-xl-8  { width: 66.66666667%; }
  .col-xl-9  { width: 75%; }
  .col-xl-10 { width: 83.33333333%; }
  .col-xl-11 { width: 91.66666667%; }
  .col-xl-12 { width: 100%; }
}

/* --------------------------------------------------------------------------
   4. Utilitaires
   -------------------------------------------------------------------------- */
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }
.d-grid         { display: grid !important; }

@media (min-width: 576px)  { .d-sm-none { display: none !important; } .d-sm-block { display: block !important; } .d-sm-flex { display: flex !important; } }
@media (min-width: 768px)  { .d-md-none { display: none !important; } .d-md-block { display: block !important; } .d-md-flex { display: flex !important; } }
@media (min-width: 992px)  { .d-lg-none { display: none !important; } .d-lg-block { display: block !important; } .d-lg-flex { display: flex !important; } .d-lg-inline-flex { display: inline-flex !important; } }
@media (min-width: 1200px) { .d-xl-none { display: none !important; } .d-xl-block { display: block !important; } .d-xl-flex { display: flex !important; } .d-xl-inline-flex { display: inline-flex !important; } }

.flex-wrap        { flex-wrap: wrap !important; }
.flex-column      { flex-direction: column !important; }
.align-items-start   { align-items: flex-start !important; }
.align-items-center  { align-items: center !important; }
.align-items-end     { align-items: flex-end !important; }
.justify-content-start   { justify-content: flex-start !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end     { justify-content: flex-end !important; }
@media (min-width: 992px) { .justify-content-lg-end { justify-content: flex-end !important; } }

.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

.text-start  { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end    { text-align: right !important; }
@media (min-width: 992px) { .text-lg-end { text-align: right !important; } .text-lg-start { text-align: left !important; } }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.mx-auto { margin-inline: auto !important; }
.list-unstyled { padding-left: 0; list-style: none; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Marges et espacements (échelle Bootstrap : 1=.25rem … 5=3rem) */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }    .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: .25rem !important; } .mb-1 { margin-bottom: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }  .mb-2 { margin-bottom: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }   .mb-3 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; } .mb-4 { margin-bottom: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }   .mb-5 { margin-bottom: 3rem !important; }
.ms-1 { margin-left: .25rem !important; } .me-1 { margin-right: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }  .me-2 { margin-right: .5rem !important; }
.ms-3 { margin-left: 1rem !important; }   .me-3 { margin-right: 1rem !important; }
.ms-auto { margin-left: auto !important; }

.p-0 { padding: 0 !important; }
.pt-0 { padding-top: 0 !important; }    .pb-0 { padding-bottom: 0 !important; }
.pt-3 { padding-top: 1rem !important; } .pb-3 { padding-bottom: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; } .pb-4 { padding-bottom: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; } .pb-5 { padding-bottom: 3rem !important; }

@media (min-width: 992px) {
  .mb-lg-0 { margin-bottom: 0 !important; }
  .ps-lg-4 { padding-left: 1.5rem !important; }
  .ps-lg-5 { padding-left: 3rem !important; }
}

/* --------------------------------------------------------------------------
   5. Formulaires
   -------------------------------------------------------------------------- */
.form-label {
  display: inline-block;
  margin-bottom: .4rem;
}
.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: .8rem 1rem;
  line-height: 1.5;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: .375rem;
  appearance: none;
}
.form-select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235f6660' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 11px;
}
.form-control:focus,
.form-select:focus { outline: 0; }

.form-check {
  display: block;
  min-height: 1.5rem;
  padding-left: 1.9em;
  position: relative;
}
.form-check-input {
  position: absolute;
  left: 0;
  top: .28em;
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  vertical-align: top;
  background-color: #fff;
  border: 1px solid #b6bbb4;
  border-radius: .25em;
  appearance: none;
  cursor: pointer;
}
.form-check-input:checked {
  background-color: #86c117;
  border-color: #86c117;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230d0d0d' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}
.form-check-label { cursor: pointer; }

/* Erreurs de saisie : affichées seulement après une tentative d'envoi */
.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: .35rem;
  font-size: .85rem;
  color: #b02a2a;
}
.form-control.is-invalid,
.form-select.is-invalid,
.form-check-input.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.was-validated .form-check-input:invalid { border-color: #b02a2a; }

.is-invalid ~ .invalid-feedback,
.was-validated :invalid ~ .invalid-feedback { display: block; }
