@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f7f4;
  --surface: #ffffff;

  --fg: #14231a;
  --muted: #64746a;

  --green: #0f5a36;
  --green-dark: #093c24;
  --green-soft: #e6f0e8;

  --orange: #e8731a;

  --line: #e1e9e2;

  --display: "Bricolage Grotesque", sans-serif;
  --body: "Instrument Sans", sans-serif;

  --shadow: 0 10px 30px rgba(9, 60, 36, 0.07);
  --shadow-hover: 0 18px 40px rgba(9, 60, 36, 0.13);

  --radius: 16px;
  --transition: 0.35s ease;

  --nav-height: 85px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.titre-1 {
  font-family: var(--display);
}

.box-2 article .title-au {
  gap: 0px;
  line-height: 1;
}

.box-2 article .title-au > * {
  margin: 0;
  padding: 0;
  line-height: 1;
}

img {
  display: block;
  max-width: 100%;
}

.title-G {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  min-height: var(--nav-height);
  padding: 15px 7%;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(9, 60, 36, 0.97);
  backdrop-filter: blur(14px);

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.title-G h1 {
  color: var(--surface);
  font-size: 27px;
  font-weight: 700;
}

#retour {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--surface);
  text-decoration: none;

  font-size: 15px;
  font-weight: 600;

  padding: 10px 17px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;

  transition: var(--transition);
}

#retour:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--surface);
  transform: translateX(-4px);
}

main {
  width: min(1200px, 88%);
  margin: auto;
  padding: 65px 0 100px;
}

.box-1,
.box-2,
.box-3,
.box-4 {
  margin-bottom: 100px;
}

.box-1 h4,
.box-2 h4,
.box-3 h4,
.box-4 h4 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 30px;
}

.box-1 h4::after,
.box-2 h4::after,
.box-3 h4::after,
.box-4 h4::after {
  content: none;
}

.box-1 hr,
.box-2 hr {
  display: none;
}

.citation-1 {
  padding: 28px 35px;
  margin-bottom: 35px;

  background: var(--green-soft);
  border-radius: var(--radius);
}

.citation-1 p {
  color: var(--green-dark);

  font-family: var(--display);
  font-size: clamp(18px, 2.5vw, 23px);
  font-weight: 600;
  line-height: 1.6;
}

.story {
  max-width: 950px;
  margin: auto;
}

.story p {
  margin-bottom: 20px;

  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
  text-align: justify;
}

.story p:last-child {
  margin-bottom: 0;
}

.box-2 {
  display: flex;
  flex-direction: column;
}

.box-2 > h4,
.box-2 > .citation-1 {
  width: 100%;
}

.box-2 article {
  width: 100%;
  margin-bottom: 35px;
}

.photo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;

  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;

  box-shadow: var(--shadow);
}

.img {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding: 25px;
}

.img img {
  order: -1;

  width: 100%;
  height: 260px;

  object-fit: cover;
  border-radius: 13px;

  margin-bottom: 24px;

  transition: transform 0.5s ease;
}

.img .image-slider {
  order: -1;
  position: relative;
  width: 100%;
  height: 260px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 13px;
}

.image-slider img {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: inherit;
  object-fit: cover;
  transition: transform 0.5s ease;
  will-change: transform;
}

.image-slider img.sortie-gauche {
  transform: translateX(-105%);
}

.image-slider img.sortie-droite {
  transform: translateX(105%);
}

.image-slider img.entree-gauche {
  transform: translateX(105%);
  transition: none;
}

.image-slider img.entree-droite {
  transform: translateX(-105%);
  transition: none;
}

.titre-1 {
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
}

.info-spe {
  display: inline-block;

  color: var(--orange);

  font-size: 13px;
  font-weight: 700;

  padding: 6px 12px;
  border-radius: 20px;

  margin-bottom: 15px;
}

.t {
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
  line-height: 1.7;
}

.contener {
  display: flex;
  align-items: center;

  padding: 30px;
  background: var(--surface);
}

.defilant-container {
  width: 100%;
}

.defilant-text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  text-align: left;
}

.info-2 .img,
.info-4 .img {
  order: 2;
}

.info-2 .contener,
.info-4 .contener {
  order: 1;
}

.box-3 {
  padding-top: 10px;
}

.box-3 h4 {
  margin-bottom: 8px;
  line-height: 1.2;
}

.box-3 .side {
  display: inline-block;
  margin-bottom: 30px;
  padding: 8px 15px;

  color: var(--orange);

  border-radius: 30px;

  font-size: 14px;
  font-weight: 700;
}

.box-3 hr {
  height: 1px;
  border: none;
  background: var(--line);
  margin: 25px 0;
}

.box-3 .panel-1 {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: start;
  gap: 30px;

  padding: 15px 0;
}

.box-3 .date-1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 105px;
  padding: 15px;

  color: var(--green);

  border-radius: var(--radius);
  text-align: center;
}

.box-3 .jou-1 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.box-3 .date-1 .annee {
  margin: 3px 0 0;
  padding: 0;

  color: var(--orange);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.box-3 .panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.box-3 .panel .text-pj {
  padding: 16px 20px;

  color: var(--green-dark);
  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 12px;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;

  box-shadow: var(--shadow);
  transition: var(--transition);
}

.box-3 .panel .ext {
  margin-top: 5px;
  padding: 12px 16px;

  color: var(--muted);
  background: var(--green-soft);

  border-radius: 10px;

  font-size: 13px;
  line-height: 1.7;
}

.box-3 .box-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;

  margin-top: 55px;
}

.box-3 .box-side article {
  padding: 25px;

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);

  box-shadow: var(--shadow);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.box-3 .box-side article h5 {
  margin-bottom: 12px;

  color: var(--orange);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
}

.box-3 .box-side article p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.box-4 .articles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.box-4 .articles .bureau {
  display: flex;
  align-items: stretch;
  gap: 22px;

  padding: 22px;

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);

  box-shadow: var(--shadow);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.box-4 .articles .bureau:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.box-4 .articles .bureau img {
  width: 145px;
  min-width: 145px;
  height: 180px;

  object-fit: cover;
  object-position: center top;

  border-radius: 12px;
}

.box-4 .bureau .desc {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.box-4 .bureau .nom {
  color: var(--green-dark);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 7px;
}

.box-4 .bureau .poste {
  display: inline-block;
  align-self: flex-start;

  padding: 5px 12px;
  margin-bottom: 12px;

  color: var(--orange);

  border-radius: 20px;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.box-4 .bureau .detail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.box-5 {
  margin-top: 100px;
  padding-bottom: 20px;
}

.box-5 h4 {
  color: var(--green-dark);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin-bottom: 25px;
}

.box-5 > p {
  color: var(--muted);
  margin-bottom: 30px;
}

.box-5 .form {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 30px;
  align-items: stretch;
}

.box-5 form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.box-5 textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  transition:
    border var(--transition),
    box-shadow var(--transition);
}

.box-5 textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 90, 54, 0.08);
}

.box-5 #envoyerBtn {
  align-self: flex-start;
  padding: 13px 25px;
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.box-5 #envoyerBtn:hover {
  background: var(--green-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.box-5 .plus {
  padding: 25px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.box-5 .plus > p {
  margin-bottom: 15px;
  color: var(--green);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}

.box-5 .cont p {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 15px;
}

.box-5 .cont p:nth-child(1),
.box-5 .cont p:nth-child(4) {
  margin-top: 15px;
  color: var(--green);
  font-weight: 700;
}

.box-5 .social {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 30px;
}

.box-5 .social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.box-5 .social-link i {
  font-size: 20px;
  transition: var(--transition);
}

.box-5 .facebook:hover {
  color: #1877f2;
}

.box-5 .linkedin:hover {
  color: #0a66c2;
}

.box-5 .social-link:hover i {
  transform: translateY(-3px);
}

.reveal {
  opacity: 0;
  transform: translateY(35px);

  transition:
    opacity 0.7s ease,
    transform 0.7s ease;

  transition-delay: var(--delay, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (max-width: 900px) {
  main {
    width: 90%;
    padding-top: 45px;
  }

  .title-G {
    padding: 15px 5%;
  }

  .photo {
    grid-template-columns: 1fr;
  }

  .info-2 .img,
  .info-4 .img,
  .info-2 .contener,
  .info-4 .contener {
    order: initial;
  }

  .img img {
    height: 300px;
  }

  .img .image-slider {
    height: 300px;
  }
  .encadre {
    border: 2px solid #333;   /* épaisseur | style | couleur */
    padding: 10px;            /* espace entre le texte et la bordure */
    border-radius: 8px;       /* coins arrondis (optionnel) */
}

  .image-slider img {
    height: 100%;
  }

  .contener {
    padding: 25px;
  }

  .box-3 .panel-1 {
    grid-template-columns: 125px 1fr;
    gap: 20px;
  }

  .box-3 .box-side {
    gap: 16px;
  }

  .box-3 .box-side article {
    padding: 20px;
  }

  .box-4 .articles {
    grid-template-columns: 1fr;
  }

  .box-4 .articles .bureau img {
    width: 160px;
    min-width: 160px;
    height: 190px;
  }
}

/* ÉCRAN DE CHARGEMENT */

.loader {
  position: fixed;
  inset: 0;
  z-index: 5000;

  display: flex;
  justify-content: center;
  align-items: center;

  background: var(--green-dark);

  opacity: 1;
  visibility: visible;

  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.loading {
  overflow: hidden;
}

.loader-content {
  width: min(380px, 85%);
  text-align: center;
  color: white;
}

.loader-content img {
  width: 125px;
  height: auto;
  margin: 0 auto 25px;
  object-fit: contain;
}

.loader-content h2 {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 2px;
}

.loader-content p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Barre de progression */

.progress-container {
  width: 100%;
  height: 7px;
  margin-top: 35px;

  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;

  background: var(--orange);
  border-radius: 20px;

  transition: width 0.25s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;

  margin-top: 12px;

  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

#progressText {
  color: var(--orange);
  font-size: 16px;
  font-weight: 800;
}

@media screen and (max-width: 600px) {
  .title-G {
    min-height: 70px;
    padding: 12px 5%;
  }

  .title-G h1 {
    font-size: 20px;
  }

  #retour {
    padding: 8px 12px;
    font-size: 13px;
  }

  main {
    width: 92%;
    padding-top: 35px;
    padding-bottom: 60px;
  }

  .box-1,
  .box-2,
  .box-3,
  .box-4,
  .box-5 {
    margin-bottom: 65px;
  }

  .box-1 h4,
  .box-2 h4,
  .box-3 h4,
  .box-4 h4 {
    font-size: 29px;
  }

  .citation-1 {
    padding: 22px;
    margin-bottom: 25px;
  }

  .citation-1 p {
    font-size: 18px;
  }

  .story p {
    font-size: 15px;
    text-align: left;
  }

  .box-2 article {
    margin-bottom: 25px;
  }

  .img {
    padding: 17px;
  }

  .img img {
    height: 220px;
    margin-bottom: 18px;
  }

  .img .image-slider {
    height: 220px;
    margin-bottom: 18px;
  }

  .titre-1 {
    font-size: 21px;
  }

  .info-spe {
    font-size: 12px;
  }

  .t {
    font-size: 14px;
  }

  .contener {
    padding: 18px;
  }

  .defilant-text {
    font-size: 14px;
    line-height: 1.8;
  }

  .box-3 .side {
    font-size: 12px;
  }

  .box-3 .panel-1 {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .box-3 .date-1 {
    min-height: auto;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .box-3 .date-1 .annee {
    font-size: 25px;
  }

  .box-3 .jou-1 {
    font-size: 16px;
  }

  .box-3 .panel .text-pj {
    padding: 14px;
    font-size: 14px;
  }

  .box-3 .box-side {
    grid-template-columns: 1fr;
    margin-top: 35px;
  }

  .box-3 .box-side article {
    padding: 20px;
  }

  .box-4 .articles {
    gap: 18px;
  }

  .box-4 .articles .bureau {
    flex-direction: column;
    gap: 16px;
    padding: 17px;
  }

  .box-4 .articles .bureau img {
    width: 100%;
    min-width: 0;
    height: 250px;
    object-position: center 25%;
  }

  .box-4 .bureau .nom {
    font-size: 18px;
  }

  .box-4 .bureau .detail {
    font-size: 13px;
  }

  .box-5 .form {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .box-5 .social {
    flex-wrap: wrap;
    gap: 18px;
  }

  .box-5 #envoyerBtn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
