:root {
    --primary-color: #0056b3;
    --secondary-color: #f8f9fa;
    --tertiary-color: #004aad;
    --text-color: #333;
  }
  
  body {
    font-family: tahoma, Heading Now 71-78, Arial;
    /* line-height: 1.6; */
    color: var(--text-color);
    margin: 0;
    padding: 0;
  }
  
  main {
    padding: 2rem;
    font-family: tahoma;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  button,
  .cta {
    background-color: var(--primary-color);
    font-family: tahoma;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem 0;
    transition: 0.3s;
  }

  button:hover {
   
    background-color: rgb(191, 220, 249);
    color: #004aad;
  }



/** Section hero-section **/

  #hero-section {
    max-width: 1200px;
    height: auto;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
  }
  
  #hero-text {
    flex: 1;
    padding-right: 2rem;
  }

  #hero-text h2 {
    color: var(--primary-color);
    font-size: 32px;
  }
/* 
  #hero-text p {
    color: white;
  } */

  #hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }


/** Section etude-technique **/

#etude-technique {
    max-width: 1400px;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 75px;
}

#title {
    text-align: center;
}

#title h2 {
    color: var(--primary-color);
    font-size: 32px;
}

#boxes {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.box {
    text-align: center;
    max-width: 250px;
    margin: 0.5rem;
}

.box h4 {
  font-weight: 600;
  color: var(--tertiary-color);
}

/** Section after-boxes**/

#after-boxes {
  margin-bottom: 75px;
  /* max-width: 1200px; */
  margin: auto;
}

/** Section tarif**/

#tarif {
    background-color: #e0e0e0;
    max-width: 800px;
    margin: auto;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    margin-bottom: 75px;
}

#tarif div {
    max-width: 650px;
    text-align: center;
    padding-bottom: 0.5rem;
}

#tarif div h2 {
  color: var(--primary-color);
  font-size: 32px;
}

/*faq*/
.faq-container {
  max-width: 1200px;
  justify-content: center;
  width: 100%;
  background: #fff;
  padding: 40px;
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}


h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.faq-grid {
    display: grid;
    gap: 24px;
    /* Ensure grid items maintain consistent height */
    align-items: start;
}

/* 2x2 Grid on Desktop (above 768px) */
@media (min-width: 768px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
    }
}

/* Single column on mobile (below 768px) */
@media (max-width: 767px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Use min-height to ensure consistent base height, but allow growth */
    min-height: 60px;
    max-height: none; /* Allow the FAQ to grow without limit */
    display: flex;
    flex-direction: column;
    /* Ensure the FAQ item doesn’t shrink or stretch unnaturally */
    flex: 0 0 auto;
}

.faq:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.accordion {
    width: 100%;
    text-align: left;
    background: #fff;
    border: none;
    padding: 18px 15px 18px 40px;
    font-size: 1.1rem;
    cursor: pointer;
    outline: none;
    color: #2c3e50;
    font-weight: 500;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
    flex-shrink: 0; /* Prevent the button from shrinking */
}

.accordion:focus {
    outline: 2px solid #2c3e50;
    outline-offset: -2px;
}

.accordion:hover, .accordion:focus {
    background: #f5f5f5;
    color: #1a2530;
}

.accordion::before {
    content: "+";
    position: absolute;
    left: 15px;
    font-size: 1.5rem;
    color: #2c3e50;
    transition: transform 0.3s ease, color 0.3s ease;
}

.accordion.active::before {
    content: "−";
    transform: rotate(0deg);
}

.panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.3s ease;
    background: #f5f5f5;
    padding: 0 15px;
    /* Ensure the panel expands within its own FAQ without affecting siblings */
    flex-grow: 1;
}

.panel p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    padding: 15px 0;
    transition: opacity 0.3s ease;
}

.panel a {
    color: #2c3e50;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.panel a:hover {
    color: #1a2530;
}

/* Accessibility */
.accordion[aria-expanded="true"] {
    background: #f0f0f0;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .faq-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .faq-container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .faq {
        min-height: 50px; /* Adjust minimum height for mobile */
    }

    .accordion {
        font-size: 1rem;
        padding: 16px 15px 16px 35px;
    }

    .accordion::before {
        font-size: 1.3rem;
        left: 12px;
    }
}

@media (max-width: 480px) {
    .faq-container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .faq {
        min-height: 45px; /* Further adjust for smaller screens */
    }

    .accordion {
        padding: 14px 15px 14px 30px;
    }
}

/** Section after-faq **/
  
#after-faq {
  margin-bottom: 75px;
  /* max-width: 1200px; */
  margin: auto;
}

@media (max-width: 1024px) {
  main {
    padding: 1.5rem;
  }

  #hero-section {
    width: 90%;
    flex-direction: column;
    padding: 1.5rem;
  }

  #hero-text {
    padding-right: 0;
    margin-bottom: 1.5rem;
  }

  #hero-text h2 {
    font-size: 28px;
  }

  #hero-image {
    width: 75%;
  }

  #boxes {
    flex-wrap: wrap;
  }

  .box {
    width: calc(33.33% - 1rem);
  }

  #after-boxes {
    width: 90%;
  }

  #tarif {
    width: 90%;
  }

  #tarif div {
    width: 90%;
  }

  #faq {
    width: 90%;
  }
}

@media (max-width: 768px) {
  body {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  main {
    padding: 1rem;
  }

  #hero-section {
    width: 90%;
    padding: 1rem;
  }

  #hero-text h2 {
    font-size: 24px;
  }

  #title h2 {
    font-size: 24px;
  }

  .box {
    width: 100%;
    margin: 0.5rem 0;
  }

  #tarif {
    width: 100%;
  }

  #tarif div {
    width: 100%;
    padding: 1rem;
  }

  #tarif div h2 {
    font-size: 28px;
  }

  #faq {
    width: 100%;
  }

  #faq h2 {
    font-size: 28px;
  }
}
  
  