* {
  margin: 0;
  padding: 0;
}

:root {
  --main-color: #FE0000;
  --second-color: #000000;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

@font-face {
  font-family: 'caviar';
  src: url('../font/caviar_dreams/CaviarDreams.ttf');
}

body {
  font-size: 1.5rem;
  font-family: "caviar", serif;
  color: #181818;
}

/* Section header and main slider */
#header-section {
  height: 100vh;
  background-color: var(--main-color);
  background-image: url('../img/header-bg.jpg');
  background-position: center center;
  background-size: cover;
  margin-bottom: 5%;
  display: grid;
}

#menu-logo {
  padding-right: 2%;
}

#menu-logo > img {
  width: 110px;
  height: auto;
  transition: transform 0.4s ease;
}

#menu-logo > img:hover {
  transform: scale(1.15) rotate(5deg);
  cursor: pointer;
}

#menu-items {
  padding: 2%;
  width: 100%;
  margin: 0 auto;
  position: fixed;
}

#menu-inner > ul {
  display: flex;
  align-items: center;
  gap: 0;
}

#menu-inner > ul > li {
  list-style-type: none;
}

#menu-inner > ul > li > a {
  text-decoration: none;
  color: var(--second-color);
}

.menu-items-labels {
  padding-left: 3%;
  font-weight: bold;
}

.menu-items-labels > a:hover {
   color: var(--main-color) !important;
   cursor: pointer;
   transition: .2s ease all;
}

#header-description {
  padding-top: 20vh;
  padding-left: 30vh;
  text-transform: uppercase;
}

#menu-items.scrolled {
  background-color: #fff;
  border-bottom: 5px solid var(--main-color);
}

/* Section about-us */
#about-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 10% auto 10% auto;
}

#about-section-right {
  width: 90%;
  margin: auto;
}

#about-section-right > div > h1 {
  padding-bottom: 5%;
}

#about-section-right > div > p {
  line-height: 2;
  font-size: 1.8rem;
}

#about-section-left-img {
  width: 70%;
  height: 50vh;
  margin: 0 auto;
  border-radius: 0 25px 0 0;
  background-image: url('../img/cam.jpg');
  background-size: cover;
  background-position: center;
}

#about-title {
  font-size: 4rem;
  background-color: var(--main-color);
  padding: .5%;
  color: #fff;
}

/* Section departments */
#departments-section {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 25px;
  background-color: #ececec;
  padding: 3% 0;
}

.departments-sections {
  width: 85%;
  margin: 0 auto;
}

#department-section-left,
#department-section-middle,
#department-section-right {
  display: grid;
  align-content: center;
  justify-items: center;
}

#dsl-logo,
#dsm-logo,
#dsr-logo {
  margin: 15% auto 5% auto;
  transition: transform 0.4s ease;
}

#dsl-logo:hover,
#dsm-logo:hover,
#dsr-logo:hover  {
  transform: scale(1.15) rotate(5deg);
  cursor: pointer;
}

#dsl-title,
#dsm-title,
#dsr-title {
  margin-bottom: 5%;
  font-size: 1.8rem;
}

#dsl-description,
#dsm-description,
#dsr-description {
  text-align: center;
  margin-bottom: 8%;
  line-height: 1.5;
  font-size: 1.7rem;
}

.visit-departments {
  background-color: var(--main-color);
  color: #fff;
  padding: 15px;
  border-radius: 0 25px 0 25px;
  border: none;
  font-size: 1.7rem;
  margin-bottom: 40%;
  letter-spacing: 3px;
}

.visit-departments:hover {
  background-color: black;
  color: #fff;
  cursor: pointer;
  transition: .3s ease all;
}

/* Section FAQ */
#faq-section {
  /* background-color: teal; */
  background: linear-gradient(135deg, var(--second-color), var(--second-color));
  /* margin-bottom: 5%; */
}

#faq-section > h1 {
  padding: 5% 0 1% 0;
  color: #fff;
}

#faq-section > h2 {
  padding: 0 0 2% 0;
  color: var(--main-color);
}

#faq-section > h1,
#faq-section > h2 {
  text-align: center;
}

.faq-container {
  width: 100%;
  max-width: 85%;
  margin: 2% auto 0 auto;
  padding-bottom: 7%;
}

.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 0;
  font-size: 1.5rem;
}

.faq-question {
  cursor: pointer;
  padding: 2.2rem;
  background-color: #fff;
  transition: background-color 0.3s;
  font-family: "cpt", sans-serif;
  font-size: 2rem;
}

.faq-question:hover,
.faq-item.active .faq-question {
  background-color: var(--main-color);
  color: #fff;
}

.faq-answer {
  display: none;
  padding: 1.8rem;
  background-color: #fff;
  font-size: 1.7rem;
  font-family: "cpi", sans-serif;
  font-style: italic;
  line-height: 1.5;
}

.faq-item.active .faq-answer {
  display: block;
}

.dropdown-arrow {
  float: right;
  font-size: 1.8rem;
  transition: transform 0.3s;
  color: var(--second-color);
}

.faq-item.active .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--second-color);
}

.link-faq-answer > a {
  text-decoration: none;
  color: blue;
  border-bottom: 1px solid blue;
  transition: all .3s ease;
}

.link-faq-answer > a:hover {
  color: var(--main-color);
  border-bottom: 1px solid var(--main-color);
}

/* Section Contact */
#contact-container {
  width: 85%;
  margin: 0 auto;
  padding: 5% 0;
}

#contact-container h2 {
  font-size: 2.4rem;
  font-weight: bold;
  margin-bottom: 40px;
  color: var(--main-color);
  border-bottom: 2px solid var(--main-color);
  width: 15%;
  padding-bottom: 2%;
}

#contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.contact-item h3 {
  font-size: 2.4rem;
  color: var(--main-color);
  margin-bottom: 10px;
}

.contact-item p {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.6;
}

/* Carte Google Maps */
#map-container {
  margin-top: 60px;
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

#map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

#social-media {
  margin-bottom: 5%;
  display: flex;
  justify-content: center;
  gap: 25px;
  scale: 1;
}

#social-media > a > img:hover {
  scale: 1.1;
  cursor: pointer;
  transition: .3s ease all;
}

/* Section Footer */
#footer-section {
  color: white;
  background-color: var(--second-color);
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 3%;
}

#footer-section > div > small {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.copyright-link > a {
  color: var(--main-color);
  text-decoration: none;
}

.copyright-link > a:hover {
  cursor: pointer;
  color: #fff;
  transition: .5s ease all;
}



/* ============================= */
/*        RESPONSIVENESS        */
/* ============================= */

/* TABLETTES (≤ 1024px) */
@media (max-width: 1024px) {

  html {
    font-size: 58%;
  }

  /* Menu */
  #menu-inner > ul {
    justify-content: space-between;
    gap: 20px;
  }

  .menu-items-labels {
    padding-left: 1.5%;
    font-size: 1.6rem;
  }

  /* Header */
  #header-description {
    padding-top: 25vh;
    padding-left: 10vh;
  }

  /* About */
  #about-section {
    grid-template-columns: 1fr;
    row-gap: 40px;
    text-align: center;
  }

  #about-section-left-img {
    width: 85%;
    height: 45vh;
  }

  /* Departments */
  #departments-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .departments-sections {
    width: 90%;
  }

  .visit-departments {
    margin-bottom: 20%;
  }

  /* FAQ */
  .faq-question {
    font-size: 1.8rem;
  }

  .faq-answer {
    font-size: 1.6rem;
  }

  /* Contact */
  #contact-container h2 {
    width: 35%;
  }
}

/* MOBILES (≤ 768px) */
@media (max-width: 1024px) {

  html {
    font-size: 55%;
  }

  /* Menu fixé en haut */
  #menu-items {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 3px solid var(--main-color);
  }

  #menu-inner > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #menu-logo > img {
    width: 90px;
  }

  .menu-items-labels {
    padding-left: 0;
    font-size: 1.8rem;
  }

  /* Header centré */
  #header-description {
    padding: 0;
    margin-top: 28vh;
    text-align: center;
  }

  #header-description h1 {
    font-size: 2.5rem;
    line-height: 1.3;
  }

  /* About */
  #about-section-left-img {
    height: 32vh;
  }

  #about-title {
    font-size: 2.5rem;
  }

  #dsl-logo, #dsm-logo, #dsr-logo {
    margin: 0 auto 5% auto;
    transition: transform 0.4s ease;
  }

  /* Departments : 1 par ligne */
  #departments-section {
    grid-template-columns: 1fr;
    row-gap: 40px;
    padding: 10% 0;
  }

  .visit-departments {
    margin-bottom: 18%;
  }

  /* FAQ */
  .faq-container {
    max-width: 95%;
  }

  .faq-question {
    font-size: 1.7rem;
    padding: 1.8rem;
  }

  .faq-answer {
    font-size: 1.5rem;
  }

  .dropdown-arrow {
    font-size: 1.6rem;
  }

  /* Contact */
  #contact-container h2 {
    width: 55%;
    font-size: 2.2rem;
  }

  #contact-grid {
    gap: 30px;
  }

  #map-container {
    height: 300px;
  }

  /* Social media */
  #social-media {
    gap: 18px;
  }
}

/* PETITS MOBILES (≤ 480px) */
@media (max-width: 480px) {

  html {
    font-size: 50%;
  }

  #menu-logo > img {
    width: 75px;
  }

  #header-description h1 {
    font-size: 2.6rem;
  }

  #about-section-left-img {
    height: 28vh;
  }

  #departments-section {
    row-gap: 30px;
  }

  .faq-question {
    font-size: 1.6rem;
  }

  .faq-answer {
    font-size: 1.4rem;
  }

  #contact-container h2 {
    width: 70%;
    text-align: center;
  }

  #footer-section > div > small {
    font-size: 1.2.5rem;
  }
}


/* HAMBURGER */
#hamburger {
  display: none;
  width: 35px;
  height: 25px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 1100;
}

#hamburger span {
  height: 4px;
  width: 100%;
  background: var(--second-color);
  border-radius: 5px;
  transition: 0.3s;
}

/* Animation en croix */
#hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

#hamburger.active span:nth-child(2) {
  opacity: 0;
}

#hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* MENU MOBILE */
@media (max-width: 1024px) {
  #header-section {
    background-position: center left;
    height: 40vh;
  }

  #header-description {
    display: none;
  }
  
  #hamburger {
    display: flex;
  }

  /* Cacher le menu au chargement */
  #menu-inner {
    position: fixed;
    top: 65px;
    left: 0;
    width: 100%;
    background: #fff;
    transform: translateY(-120%);
    padding: 20px;
    z-index: 1099;
    transition: transform .35s ease;
  }

  #menu-inner.open {
    transform: translateY(0);
  }

  /* Menu vertical */
  #menu-inner ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .menu-items-labels {
    font-size: 2rem;
    padding-left: 0;
  }

  #menu-logo {
    padding-bottom: 10px;
  }

  /* About */
  #about-title {
    font-size: 4.5rem;
  }

  #about-section-right > div > h1 {
    font-size: 3.5rem;
  }

  #about-section-right > div > p {
    font-size: 2.2rem;
  }

  #about-section-left {
    order: 2; /* après right */
  }

  #about-section-right {
    order: 1; /* avant left */
  }

  /* Departments */
  #dsl-description,
  #dsm-description,
  #dsr-description {
    font-size: 2.2rem;
    line-height: 3rem;
  }

  .visit-departments {
    font-size: 2.2rem;
  }

  /* FAQ */
  #faq-section > h1 {
    font-size: 4.5rem;
  }

  #faq-section > h2 {
    font-size: 2.5rem;
  }

  .faq-question,
  .faq-answer {
    font-size: 2.2rem;
  }

  /* Contacts */
  #contact-container {
    width: 95%;
    padding: 8% 0;
    text-align: center;
  }

  #contact-container > h2 {
    font-size: 2.5rem;
    width: 50%;
    text-align: center;
    margin: 0 auto 30px auto;
  }

  #contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-item > h3 {
    font-size: 2.5rem;
  }

  .contact-item > p {
    font-size: 2rem;
    line-height: 1.5;
  }

  #map-container {
    height: 250px;
  }

  #social-media {
    flex-direction: row;
    gap: 15px;
  }

  #social-media > a > img {
    width: 25px;
    height: auto;
  }


  /* Footer */
  #footer-section {
    padding: 5%;
    text-align: center;
  }

  #footer-section > div > small {
    font-size: 2rem;
    line-height: 1.4;
  }

  .copyright-link > a {
    font-size: 2rem;
  }
}

