@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --header-height: 3rem;
  
  --hue: 45;
  --sat: 98%;
  --first-color: hsl(var(--hue), var(--sat), 60%);
  --first-color-light: hsl(var(--hue), var(--sat), 85%);
  --first-color-lighten: hsl(var(--hue), var(--sat), 80%);
  --first-color-alt: hsl(var(--hue), var(--sat), 53%);
  --title-color: hsl(var(--hue), 4%, 15%);
  --text-color: hsl(var(--hue), 4%, 35%);
  --text-color-light: hsl(var(--hue), 4%, 65%);
  --body-color: hsl(var(--hue), 0%, 100%);
  --container-color: #FFF;
  --scroll-bar-color: hsl(var(--hue), 4%, 85%);
  --scroll-thumb-color: hsl(var(--hue), 4%, 75%);
  
  --body-font: 'Poppins', sans-serif;
  --biggest-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;
  
  --font-semi-bold: 600;
  --font-bold: 700;
  
  --mb-0-5: .5rem;
  --mb-0-75: .75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  
  --z-tooltip: 10;
  --z-fixed: 100;
}

@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 3rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}


*, ::before, ::after {
  box-sizing: border-box;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: .5s;
}

h1, h2, h3 {
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  line-height: 1.5;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}


.section {
  padding: 4.5rem 0 1rem;
}

.section__title, .section__title-center {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  text-align: center;
  margin-bottom: var(--mb-1);
}

.svg__color {
  fill: var(--first-color);
}

.svg__blob {
  fill: var(--first-color-light);
}

.svg__img {
  width: 300px;
  justify-self: center;
}


.container {
  max-width: 968px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.grid {
  display: grid;
  gap: 1.5rem;
}


.header {
  width: 100%;
  background-color: var(--body-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: .5s;
}


.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    background-color: var(--container-color);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 0;
    width: 50%;
    top: -100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    transition: .4s;
    border-radius: 2rem;
    z-index: var(--z-fixed);
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 1.5rem;
}

.nav__link, .nav__logo, .nav__toggle {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  max-width: 18%;
  padding-top: 0.8em;
}

.nav__toggle {
  font-size: 1.3rem;
  cursor: pointer;
}


.show-menu {
  top: calc(var(--header-height) + 1rem);
}


.active-link {
  position: relative;
}

.active-link::before {
  content: '';
  position: absolute;
  bottom: -.75rem;
  left: 45%;
  width: 5px;
  height: 5px;
  background-color: var(--title-color);
  border-radius: 50%;
}


.scroll-header {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}


.home__container {
  row-gap: 3rem;
}

.home__title {
  font-size: 28px;
  font-weight: var(--font-bold);
  margin-bottom: var(--mb-0-75);
}

.home__description {
  margin-bottom: var(--mb-2);
}


.button {
  display: inline-block;
  background-color: #004374;
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 3rem;
  font-weight: var(--font-semi-bold);
  transition: .3s;
}

.button:hover {
  background-color: #005288;
}

.button__header {
  display: none;
  color: #FFF;
}

.button-link {
  background: none;
  padding: 0;
  color: var(--title-color);
}

.button-link:hover {
  background-color: transparent;
}

.button-flex {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  padding: .75rem 1rem;
}

.button__icon {
  font-size: 1.5rem;
}


.about__container {
  gap: 2.5rem;
}

.about__data {
  text-align: center;
}


.security__container {
  gap: 2.5rem;
}

.security__data {
  text-align: center;
}


.services__container {
  padding-top: 1rem;
}

.services__data {
  display: grid;
  row-gap: 1rem;
  background-color: var(--container-color);
  box-shadow: 0px 2px 6px hsla(var(--hue), 100%, 15%, 0.15);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  text-align: center;
}

.services__img {
  width: 135px;
  justify-self: center;
  margin-bottom: var(--mb-0-5);
}


.app__container {
  gap: 2.5rem;
}

.app__data {
  text-align: center;
}

.app__description {
  margin-bottom: var(--mb-1-5);
}

.app__buttons {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  gap: .5rem;
}


.contact__container {
  padding-bottom: 3rem;
}

.contact__description {
  text-align: center;
}

.contact__content {
  row-gap: .75rem;
}

.contact__address {
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
}

.contact__information {
  font-weight: initial;
  color: var(--text-color);
}


.footer {
  background-color: #0f64a0;
  padding-bottom: 2rem;
}

.footer__container {
  row-gap: 2rem;
}

.footer__logo, .footer__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-75);
  color: #FFF;
  max-width: 60%;
}

.footer__logo img {
  transform: scale(1.35);         
  transform-origin: left center;  
}

.footer__logo {
  display: inline-flex;           
  align-items: center;
}

.footer__logo img {
  transform: scale(1.7);         
  transform-origin: left center;  
  padding-top: 0.3em;
}


.footer__description, .footer__link {
  font-size: var(--small-font-size);
  color: #FFF;
}

.footer__links {
  display: grid;
  row-gap: .5rem;
}

.footer__link {
  color: #FFF;
}

.footer__social {
  display: flex;
  column-gap: 1.5rem;
  margin: 1em;
}

.footer__social-link {
  font-size: 1.25rem;
  color: #FFF;
}

.footer__copy {
  margin-top: 6rem;
  text-align: center;
  font-size: var(--smaller-font-size);
  color: #FFF;
}


::-webkit-scrollbar {
  width: .6rem;
  border-radius: .5rem;
  background-color: var(--scroll-bar-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb-color);
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-color-light);
}



@media screen and (max-width: 360px) {
  .svg__img {
    width: 100%;
  }
  .section {
    padding: 3.5rem 0 1rem;
  }
  .services__img {
    width: 100px;
  }
  .app__buttons {
    grid-template-columns: max-content;
  }
}


@media screen and (min-width: 576px) {
  .svg__img {
    width: 100%;
  }
  .section__title-center {
    text-align: initial;
  }
  .home__container,
  .about__container,
  .security__container,
  .services__container,
  .app__container,
  .contact__container,
  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .home__img {
    order: 1;
  }
  .home__container,
  .about__container,
  .security__container,
  .app__container,
  .contact__container {
    align-items: center;
  }
  .about__data,
  .security__data,
  .app__data,
  .contact__description {
    text-align: initial;
  }
  .about__img,
  .app__img {
    order: -1;
  }
}

@media screen and (min-width: 767px) {
  body {
    margin: 0;
  }
  .section {
    padding: 6rem 0 2rem;
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__list {
    flex-direction: row;
    column-gap: 2.5rem;
  }
  .nav__toggle {
    display: none;
  }
  .change-theme {
    position: initial;
  }
  .home__container {
    padding: 6rem 0 2rem;
  }
  .app__buttons {
    justify-content: initial;
  }
}


@media screen and (min-width: 968px) {
  .button__header {
    display: block;
    background-color: #004374;
  }
  .svg__img {
    width: 470px;
  }
  .about__container,
  .security__container,
  .app__container,
  .contact__container {
    column-gap: 6rem;
  }
  .services__container {
    grid-template-columns: repeat(3, 1fr);
  }
  .contact__container {
    grid-template-columns: 3fr 1.5fr 1.25fr;
  }
  .footer__container {
    grid-template-columns: repeat(5, 1fr);
  }
  .footer__social {
    align-items: flex-start;
  }
  .footer__social-link {
    font-size: 1.45rem;
  }
}

@media screen and (min-width: 1024px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  .home__img {
    width: 540px;
  }
  .home__description {
    padding-right: 5rem;
  }
  .footer__container {
    column-gap: 3rem;
  }
  .scrollup {
    right: 2rem;
  }
}

@media (max-width: 576px){
  .nav__logo img {
    max-width: 140%;
  }
}

@media (max-width: 576px){
  .footer__logo img {
    max-width: 40%;
  }
}

@media (max-width: 576px){
  svg, .svg__img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
}

@media (max-width: 576px){
  .app__container.grid{
    grid-template-columns: 1fr;   /* une seule colonne */
    gap: 1.5rem;                  /* espace entre les blocs */
  }

  .app__buttons{
    display: flex;
    flex-direction: column;       /* boutons empilés */
    gap: 1rem;                    /* espace vertical */
  }

  .app__img{
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 576px){
  .button-flex{
    display: flex;
    align-items: center;        /* centre verticalement */
    justify-content: center;    /* centre horizontalement */
    gap: 0.5rem;                /* espace entre icône et texte */
    text-align: center;         /* texte centré */
    width: 100%;                /* bouton pleine largeur */
  }
}

/* Overlay */
.modal {
  display: flex;            /* use flex for centering */
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* Modal box */
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-30px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .modal-content {
    font-size: 14px;
    padding: 15px;
  }
}

/* Drag & drop area */
.drop-area {
  border: 2px dashed #007bff;
  border-radius: 6px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  background: #f9f9f9;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.drop-area:hover {
  background: #eef6ff;
  border-color: #0056b3;
}

.file-list {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f1f1;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 14px;
}

.file-list button {
  background: red;
  color: white;
  border: none;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.file-list button:hover {
  background: darkred;
}


form {
  max-width: 700px;
  margin: 20px auto;
}

form label {
  display: block;
  font-weight: normal;
  margin-bottom: 6px;
  margin-top: 18px;
  color: #333;
}

form input, form select, form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 10px;
  transition: border 0.2s ease;
}

form input:focus, form select:focus, form textarea:focus {
  border-color: #007bff;
  outline: none;
}

.form-actions {
  text-align: center;
  margin-top: 20px;
}