/* === GENERAL === */
body {
  font-family: 'Lato', sans-serif;
  margin: 0;
  padding: 0;
}
h1, h2, h3, h4, h5, h6 { font-weight: bold; }
img { max-width: 100%; height: auto; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* === NAVBAR === */
.navbar {
  background: #1E3A8A;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: bold;
  border-bottom: 1px solid #fff;
}
.navbar-nav { margin-left: auto; text-align: center; }
.nav-link { color: #fff !important; margin: 0 6px; }
.nav-link.active, .nav-link:hover {
  background: #fff;
  color: #1E3A8A !important;
  border-radius: .5rem;
}

/* === HEADINGS === */
.heading h2 {
  position: relative;
  display: inline-block;
  padding-top: 1rem;
  font-weight: 700;
}
.heading h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  border-radius: 2px;
}
#telechargement .heading h2::before { background-color: #000; }
#contact .heading h2::before { background-color: #fff; }
#presentation .heading h2::before { background-color: #988255; }

/* === SECTIONS === */
section {
  padding: 65px 20px 20px;
  box-sizing: border-box;
  scroll-margin-top: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* === HOME === */
:root {
  --nav-h: 80px;
  --logo-width: 350px;
  --title-size: 30px;
  --subtitle-size: 24px;
  --explain-size: 20px;
  --phone-size: 500px;
  --logo-width-md: 280px;
  --title-size-md: 24px;
  --subtitle-size-md: 20px;
  --explain-size-md: 16px;
  --phone-size-md: 400px;
  --logo-width-sm: 280px;
  --title-size-sm: 24px;
  --subtitle-size-sm: 20px;
  --explain-size-sm: 16px;
  --phone-size-sm: 280px;
}

#home {
  background: #f8efd3;
  padding: 0;
  overflow: hidden;
}
#home .container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 60px;
}
.home-logo {
  width: var(--logo-width);
  display: block;
  margin: 0 auto 10px;
}
.home-title {
  font-size: var(--title-size);
  font-weight: 700;
  color: #404040;
  text-transform: uppercase;
  margin: 10px 0 6px;
}
.home-subtitle {
  font-size: var(--subtitle-size);
  color: #333;
  font-style: italic;
  margin-top: 40px;
}
.home-explain {
  font-size: var(--explain-size);
  color: #333;
  margin-top: 40px;
}
.home-phone-left,
.home-phone-right { width: var(--phone-size); }

/* TABLETTE */
@media (max-width: 991px) {
  .home-logo { width: var(--logo-width-md); }
  .home-title { font-size: var(--title-size-md); }
  .home-subtitle { font-size: var(--subtitle-size-md); }
  .home-phone-left,
  .home-phone-right { width: var(--phone-size-md); }
}

/* MOBILE */
@media (max-width: 767px) {
  #home .container {
    flex-direction: column;
    align-items: center;
    gap: 50px;
  }
  .home-logo { width: var(--logo-width-sm); }
  .home-title { font-size: var(--title-size-sm); }
  .home-subtitle { font-size: var(--subtitle-size-sm); }
  .home-explain { font-size: var(--explain-size-sm); }
  .home-phone-left,
  .home-phone-right { width: var(--phone-size-sm); }
}

/********************************************************************

/* === PRÉSENTATION === */
.presentation-section {
  background-color: #FAF9F6;
  color: #333;
  padding: 80px 20px;
}

.presentation-title {
  font-family: 'Playfair Display', serif;
  color: #404040;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.presentation-text {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
}

/* === GALERIE === */
.presentation-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.photo-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-wrapper:hover img {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Légende en bas à droite */
.photo-label {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 7px;
  border-radius: 4px;
  pointer-events: none;
  font-family: 'Lato', sans-serif;
}

/* Sur petits écrans : une seule colonne d'image */
@media (max-width: 991px) {
  .presentation-gallery {
    grid-template-columns: 1fr;
  }
}



/********************************************************************

/* === TÉLÉCHARGEMENT === */
#telechargement {
  padding-bottom: 80px;
  text-align: center;
}

.app-warning {
  color: #b71c1c;
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
}

/* === BOUTONS DE TÉLÉCHARGEMENT UNIFIÉS === */
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 50px;
  padding: 12px 24px;
  width: 340px;               /* même largeur fixe pour tous */
  text-decoration: none;
  color: #fff;
  border: 2px solid transparent;
  transition: all 0.4s ease;  /* fondu fluide */
  height: 60px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.btn-download:hover {
  background-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* Couleurs spécifiques */
.btn-green {
  background-color: #3DDC84;
  border-color: #3DDC84;
}
.btn-lightblue {
  background-color: #6A8DFF;
  border-color: #6A8DFF;
}
.btn-purple {
  background-color: #6A2D8D;
  border-color: #6A2D8D;
}

/* Hover (inversion pour tous avec fondu doux) */
.btn-green:hover {
  color: #3DDC84;
  border-color: #3DDC84;
}
.btn-lightblue:hover {
  color: #6A8DFF;
  border-color: #6A8DFF;
}
.btn-purple:hover {
  color: #6A2D8D;
  border-color: #6A2D8D;
}

/* Icône Android */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 1,
    'wght' 500,
    'GRAD' 0,
    'opsz' 24;
  font-size: 1.5rem;
  vertical-align: middle;
}

/* Par défaut : QR code caché (mobile + tablette) */
.qr-desktop {
  display: none;
}

/* À partir du desktop (lg et +) : on affiche le QR code */
@media (min-width: 992px) {
  .qr-desktop {
    display: block;
  }
}

/* === GALERIE TÉLÉCHARGEMENT === */
.telechargement-gallery {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;        /* une ligne sur écran large */
  gap: 10px;                /* espacement horizontal/vertical */
  overflow-x: auto;         /* scroll horizontal si nécessaire */
  padding: 10px 0;
}

.telechargement-gallery div {
  flex: 0 0 auto;           /* chaque tuile garde sa taille */
}

.telechargement-gallery img {
  width: 200px;             /* ajuste (ex: 280/250) */
  height: auto;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.telechargement-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- MOBILE : 2 images par ligne, toutes visibles --- */
@media (max-width: 576px) {
  .telechargement-gallery {
    flex-wrap: wrap;        /* passe sur 2 lignes */
    overflow-x: visible;    /* plus de scroll horizontal */
  }
  .telechargement-gallery div {
    flex: 0 0 calc(50% - 5px); /* 2 colonnes avec gap total de 10px */
  }
  .telechargement-gallery img {
    width: 100%;            /* image prend la largeur de sa tuile */
  }
}

/* Caché sur mobile/tablette - visible sur PC */
.qr-desktop {
  display: none;
}

@media (min-width: 992px) { /* PC */
  .qr-desktop {
    display: block !important;
  }
  .btn-mobile {
    display: none !important;
  }
}

/********************************************************************

/* === CONTACT === */
#contact { background: #1E3A8A; color: #fff; }
#contact .heading h2 { color: #fff; text-align: center; }

#contact-form { font-size: 18px; color: #fff; }
input.form-control, textarea.form-control {
  font-size: 16px;
}
.comments {
  font-style: italic;
  font-size: 16px;
  color: #fff;
  min-height: 22px;
}
#contact-form input[type=submit] {
  margin: 30px auto 0;
  display: block;
}

/* Encadrement rouge visible autour du reCAPTCHA non coché */
#recaptcha-container.recaptcha-invalid {
  border: 3px solid #dc3545;
  border-radius: 6px;
  padding: 6px;
  display: inline-block;
  transition: border-color 0.3s ease;
}

/* === BOUTON ENVOYER === */
#contact-form .button1 {
  background-color: #1E3A8A;
  color: #fff;
  border: 2px solid #fff;
  font-weight: bold;
  text-transform: uppercase;
  padding: 12px 36px;
  border-radius: 6px;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  display: inline-block;
}
#contact-form .button1:hover {
  background-color: #fff;
  color: #1E3A8A;
  border-color: #1E3A8A;
  transform: scale(1.05);
}
#contact-form .button1.btn {
  display: block;
  margin: 30px auto 0;
}
#contact .required-note {
  color: yellow;
  font-size: 15px !important;
  opacity: 0.85;
}

.form-control::placeholder {
  color: #acacac !important;
  font-style: italic;
  opacity: 1;
}

/* === FOOTER === */
footer {
  background: #333;
  padding: 20px 0 40px;
  text-align: center;
}
footer span { color: #d82c2e; font-size: 25px; line-height: 35px; }
footer span:hover { font-size: 27px; }
footer h5 { color: #fff; font-weight: normal; }

/* === NAVBAR OFFSET === */
section { scroll-margin-top: calc(var(--nav-h) + 10px); }

/* === FIREFOX FIX === */
@-moz-document url-prefix() {
  html { text-size-adjust: 100% !important; }
  .home-title, .home-subtitle, .home-logo {
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
  }
}

/* === ANIMATION TÉLÉPHONE === */
.scene {
  position: relative;
  width: var(--phone-size);
  max-width: 100%;
  margin: 0 auto;
  transition: width 0.3s ease;
}
.phone { position: relative; z-index: 2; }
.phone img { width: 100%; height: auto; display: block; }
.screen {
  position: absolute;
  overflow: hidden;
  z-index: 1;
}
.slider {
  display: flex;
  transition: transform 1s ease-in-out;
  will-change: transform;
}
.slider img { display: block; object-fit: cover; }

/* === RESPONSIVE FIXES === */
@media (max-width: 767px) {
  .scene.home-phone-left,
  .scene.home-phone-right {
    width: var(--phone-size-sm);
  }

  /* même largeur de boutons sur mobile */
  .btn-download {
    width: 100%;
    max-width: 340px;
  }
}

body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}