* {
  margin: 0;
  padding: 0;
}

:root {
  --main-color: #E8AA2A;
  --second-color: #000;
  --third-color: #fff;
}

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(--second-color);
  background-image: url('../img/header-bg.jpg');
  background-position: center center;
  background-size: cover;
  margin-bottom: 5%;
  display: grid;
}

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

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

#menu-items {
  width: 100%;
  margin: 0 auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding: 15px 20px;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

#menu-items > div > ul {
  display: flex;
  align-items: center;
  gap: 50px;
}

#menu-items > div > ul > li {
  list-style-type: none;
  padding-right: 0 20px;
}

#menu-items > div > ul > li > a {
  color: var(--third-color);
  color: var(--second-color);
  text-decoration: none;
  padding-right: 0 20px;
}

.menu-items-labels > a {
  font-weight: bold;
  scale: 1;
  transition: .3s ease all;
}

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

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

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

#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-subtitle {
  color: var(--main-color);
}

#about-section-left-img {
  width: 70%;
  height: 100%;
  margin: 0 auto;
}

video {
  border-radius: 0 25px 0 25px;
}

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

/* Section departments */
#bgc-departments-section {
  background-color: var(--main-color);
  color: var(--third-color);
}

#departments-section {
  width: 87%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7% 0;
}

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

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

#dsl-title,
#dsr-title {
  margin: 2% 0 5% 0;
  font-size: 1.8rem;
  color: var(--third-color);
}

#dsl-description,
#dsr-description {
  text-align: center;
  line-height: 1.5;
  font-size: 1.7rem;
  color: var(--second-color);
}

.work-with-us {
  text-align: center;
  padding-bottom: 8%;
  font-size: 1.8rem;
}

.work-with-us > span > a {
  text-decoration: none;
  background-color: var(--main-color);
  color: var(--third-color);
  padding: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  border-radius: 0 25px 0 25px;
}

.work-with-us > span > a:hover {
  background-color: var(--second-color);
  color: var(--third-color);
  transition: .2s ease all;
}

.work-with-us-black > span > a {
  background-color: var(--second-color);
  color: var(--third-color);
}

.work-with-us-black > span > a:hover {
  background-color: var(--third-color);
  color: var(--main-color);
}

/* Section Menusierie & Metallerie */
.m-section-presentation,
.mm-section-presentation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  width: 80%;
  margin: 5% auto;
}

.mm-section-presentation {
  grid-template-columns: repeat(2, 1fr);
  margin: 5% auto;
}

.mm-section-presentation-right,
.mm-section-presentation-right > h1,
.mm-section-presentation-right > div {
  text-align: right;
}

.mm-section-presentation-right > div {
  padding-top: 10%;
}

.m-section-presentation-left > h1,
.mm-section-presentation-right > h1 {
  padding: 5% 0;
  font-size: 4rem;
  color: var(--main-color);
}

.m-section-presentation-left > p,
.mm-section-presentation-right > p {
  font-size: 1.7rem;
  line-height: 2;
}

.m-section-presentation-left > div {
  padding-top: 10%;
  text-align: left;
}

.m-section-presentation-right,
.mm-section-presentation-left {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  justify-items: center;
  align-items: center;
}

.m-section-presentation-right > video {
  border-radius: 0 25px 0 25px;
}

/* Details Bâtiments Connectés */
.details-securite-electronique {
  width: 90%;
  margin: 0 auto;
  display: grid;
  align-items: center;
  grid-template-columns: repeat(4, 1fr);
  padding: 3% 0 5% 0;
  gap: 25px;
  color: var(--third-color);
  text-align: center;
}

.details-securite-electronique-bg {
  background-color: var(--second-color);
  color: var(--third-color);
}

.details-securite-electronique-bg > h1 {
  text-align: center;
  padding-top: 4%;
  letter-spacing: 1px;
  color: var(--main-color);
}

.details-securite-electronique-items > h2 {
  border-radius: 0 25px 0 25px;
  border: 5px solid var(--main-color);
  transition: .3s all ease;
}

.details-securite-electronique-items > h2:hover {
  background-color: var(--main-color);
}

.title-details {
  color: var(--third-color);
  padding: 5% 0;
  letter-spacing: 1px;
}

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

#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: var(--second-color);
}

.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: var(--third-color);
  border-bottom: 1px solid var(--third-color);
  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: var(--third-color);
  transition: .5s ease all;
}


/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* --- Tablette large (max 1024px) --- */
@media screen and (max-width: 1024px) {

  /* Menu */
  #menu-items {
    justify-content: space-between;
    padding: 12px 30px;
    box-sizing: border-box;
  }

  #menu-items > div > ul {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  /* Header */
  #header-section {
    margin-bottom: 8%;
    background-position: right center;
  }

  /* Sections présentation */
  .m-section-presentation,
  .mm-section-presentation {
    width: 90%;
    gap: 30px;
  }

  .m-section-presentation-left > h1,
  .mm-section-presentation-right > h1 {
    font-size: 3rem;
  }

  /* Departments */
  #departments-section {
    gap: 20px;
  }

  /* Valeurs */
  .details-securite-electronique {
    grid-template-columns: repeat(2, 1fr);
  }

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

  #contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}


/* --- Tablette (min 481px et max 768px) --- */
@media screen and (max-width: 768px) {

  html {
    font-size: 70%;
  }

  /* Menu burger */
  #menu-items {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 20px;
    box-sizing: border-box;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--third-color);
    border-bottom: 5px solid var(--main-color);
  }

  #menu-items > div > ul {
    display: none;
  }

  #menu-items > div > ul.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--third-color);
    border-bottom: 5px solid var(--main-color);
    padding: 20px 0;
    gap: 0;
    z-index: 999;
  }

  #menu-items > div > ul.open > li {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }

  #menu-items > div > ul.open > li:last-child {
    border-bottom: none;
  }

  /* Bouton burger (ajouté via JS ou pseudo-élément) */
  #menu-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
  }

  #menu-burger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--second-color);
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  /* Vidéos : adaptées en mobile uniquement */
  video {
    max-width: 100%;
    height: auto;
  }

  /* Header */
  #header-section {
    height: 60vh;
    margin-bottom: 10%;
    background-position: right center;
  }

  /* Présentation principale : colonne */
  .m-section-presentation {
    grid-template-columns: 1fr;
    width: 90%;
    margin: 8% auto;
    gap: 30px;
  }

  .m-section-presentation-right {
    grid-template-columns: 1fr;
  }

  .m-section-presentation-left > h1 {
    font-size: 2.8rem;
  }

  .m-section-presentation-left > p {
    font-size: 1.6rem;
  }

  .m-section-presentation-left > div {
    padding-top: 5%;
  }

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

  .departments-sections {
    width: 80%;
  }

  /* About : colonne */
  #about-section {
    grid-template-columns: 1fr;
    margin: 10% auto;
    width: 90%;
  }

  #about-section-left-img {
    width: 100%;
    margin-bottom: 5%;
  }

  #about-section-right {
    width: 100%;
  }

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

  /* Valeurs : 1 colonne */
  .details-securite-electronique {
    grid-template-columns: 1fr;
    width: 80%;
    gap: 20px;
    padding: 5% 0 8% 0;
  }

  /* Présentation secondaire : colonne inversée */
  .mm-section-presentation {
    grid-template-columns: 1fr;
    width: 90%;
    margin: 8% auto;
    gap: 30px;
  }

  .mm-section-presentation-left {
    grid-template-columns: 1fr;
    order: 1;
  }

  .mm-section-presentation-right {
    order: 2;
    text-align: left !important;
  }

  .mm-section-presentation-right > h1,
  .mm-section-presentation-right > div {
    text-align: left !important;
  }

  .mm-section-presentation-right > h1 {
    font-size: 2.8rem;
  }

  .mm-section-presentation-right > p {
    font-size: 1.6rem;
  }

  .mm-section-presentation-right > div {
    padding-top: 5%;
  }

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

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

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

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

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

  #map-container {
    height: 300px;
  }

  /* Footer */
  #footer-section > div > small {
    font-size: 1.3rem;
    text-align: center;
    display: block;
    line-height: 2;
  }
}


/* --- Mobile (max 480px) --- */
@media screen and (max-width: 480px) {

  html {
    font-size: 70%;
  }

  /* Menu */
  #menu-items {
    padding: 10px 15px;
  }

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

  /* Header */
  #header-section {
    height: 50vh;
    margin-bottom: 15%;
    background-position: right center;
  }

  /* Titre principal */
  #about-title {
    font-size: 3rem;
  }

  /* Présentation principale */
  .m-section-presentation {
    width: 92%;
    margin: 12% auto;
  }

  .m-section-presentation-left > h1 {
    font-size: 2.4rem;
  }

  .m-section-presentation-left > p,
  .mm-section-presentation-right > p {
    font-size: 1.5rem;
    line-height: 1.8;
  }

  /* Bouton CTA */
  .work-with-us > span > a {
    padding: 15px 20px;
    letter-spacing: 1px;
    font-size: 1.4rem;
    display: inline-block;
  }

  /* Departments */
  .departments-sections {
    width: 90%;
  }

  #dsl-title h1,
  #dsr-title h1 {
    font-size: 1.6rem;
  }

  #dsl-description p,
  #dsr-description p {
    font-size: 1.5rem;
  }

  /* About */
  #about-section {
    width: 92%;
    margin: 12% auto;
  }

  #about-section-right > div > h1 {
    font-size: 2.2rem;
    padding-bottom: 4%;
  }

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

  /* Valeurs */
  .details-securite-electronique {
    width: 88%;
    font-size: 1.3rem;
  }

  .details-securite-electronique-bg > h1 {
    font-size: 2rem;
    padding: 8% 5% 3%;
    letter-spacing: 0;
  }

  /* Présentation secondaire */
  .mm-section-presentation {
    width: 92%;
    margin: 12% auto;
  }

  .mm-section-presentation-right > h1 {
    font-size: 2.4rem;
    padding: 8% 0 4%;
  }

  /* FAQ */
  #faq-section > h1 {
    font-size: 2.4rem;
    padding: 8% 5% 2%;
  }

  #faq-section > h2 {
    font-size: 1.6rem;
    padding: 0 5% 4%;
  }

  .faq-container {
    max-width: 92%;
  }

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

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

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

  #contact-container h2 {
    font-size: 2rem;
    width: 50%;
    margin-bottom: 25px;
  }

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

  .contact-item p {
    font-size: 1.6rem;
  }

  #map-container {
    height: 250px;
    margin-top: 30px;
  }

  #social-media {
    gap: 20px;
    margin-bottom: 8%;
  }

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

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


/* --- Très petits mobiles (max 360px) --- */
@media screen and (max-width: 360px) {

  html {
    font-size: 70%;
  }

  .m-section-presentation-left > h1,
  .mm-section-presentation-right > h1 {
    font-size: 2.2rem;
  }

  .work-with-us > span > a {
    padding: 12px 15px;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
  }

  #contact-container h2 {
    width: 60%;
  }
}