/* === 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; }

/* Style général des titres */
.heading h2 {
  position: relative;
  display: inline-block;
  padding-top: 1rem;
  font-weight: 700;
}

/* Trait décoratif commun */
.heading h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;        /* longueur du trait */
  height: 3px;        /* épaisseur */
  border-radius: 2px; /* arrondi des extrémités */
}

/* Trait noir pour la section Téléchargement */
#telechargement .heading h2::before {
  background-color: #000;
}

/* Trait blanc pour la section Contact */
#contact .heading h2::before {
  background-color: #fff;
}

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

/* === SECTION HOME === */
:root {
  --nav-h: 80px;

  /* Ajustement spécifique du téléphone droit sur mobile */
  --mobile-tel-right-shift: 80px;  /* valeur positive = descend */

  /* Espacements globaux */
  --home-offset-top: 0px;
  --home-shift: 0px;
  --home-shift-md: -20px;
  --home-shift-sm: 40px;

  /* Décalage du logo uniquement */
  --logo-shift: -50px;

  /* Tailles desktop */
  --logo-width: 350px;
  --title-size: 30px;
  --subtitle-size: 24px;
  --explain-size:20px;
  --phone-size: 500px;

  /* Tailles tablette */
  --logo-width-md: 280px;
  --title-size-md: 24px;
  --subtitle-size-md: 20px;
  --explain-size-md:16px;
  --phone-size-md: 400px;

  /* Tailles mobile */
  --logo-width-sm: 280px;
  --title-size-sm: 24px;
  --subtitle-size-sm: 20px;
  --explain-size-sm:16px;
  --phone-size-sm: 280px;

  /* Espacements mobile/tablette ajustables */
  --mobile-first-top: 40px; /* tel_hand sous navbar */
  --mobile-gap: 50px;       /* espace entre blocs */
  --tablet-first-top: 60px;
  --tablet-gap: 50px;
}

#home {
  background: #f8efd3;
  padding: 0;
  overflow: hidden;
}

/* Conteneur 3 colonnes */
#home .container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: var(--home-offset-top);
  padding-bottom: 60px;
}

.home-col { flex: 1 1 300px; text-align: center; }

/* Téléphones */
.home-phone-left,
.home-phone-right {
  width: var(--phone-size);
  height: auto;
}

/* Bloc central */
.home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transform: translateY(var(--home-shift));
  will-change: transform;
}

/* Fallback automatique */
#home .row > div.text-center:nth-of-type(1) {
  transform: translateY(var(--home-shift));
  will-change: transform;
}

/* Logo */
.home-logo {
  width: var(--logo-width);
  height: auto;
  display: block;
  margin: 0 auto 10px;
  margin-top: var(--logo-shift);
}

/* Textes */
.home-title {
  font-family: 'Lato', sans-serif;
  font-size: var(--title-size);
  font-weight: 700;
  color: #404040;
  text-transform: uppercase;
  margin: 10px 0 6px;
  line-height: 1.2;
  text-align: center;
}
.home-subtitle {
  font-family: 'Lato', sans-serif;
  font-size: var(--subtitle-size);
  color: #333;
  font-style: italic;
  line-height: 1.3;
  margin: 0;
  text-align: center;
  margin-top: 40px;
}
.home-explain {
  font-family: 'Lato', sans-serif;
  font-size: var(--explain-size);
  color: #333;
  font-style: normal;
  line-height: 1.3;
  margin: 0;
  text-align: center;
  margin-top: 40px;
}

/* === TABLETTE (<=991px) === */
@media (max-width: 991px) {
  #home .container {
    padding-top: var(--tablet-first-top);
    gap: var(--tablet-gap);
  }

  .home-center {
    transform: translateY(var(--home-shift-md));
  }
  #home .row > div.text-center:nth-of-type(1) {
    transform: translateY(var(--home-shift-md));
  }

  .home-logo {
    width: var(--logo-width-md);
    margin-top: calc(var(--logo-shift) / 2);
  }
  .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 (<=767px) === */
@media (max-width: 767px) {
  #home {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #home .container {
    flex-direction: column;
    align-items: center;
    padding-top: var(--mobile-first-top) !important;
    gap: var(--mobile-gap) !important;
  }

  .home-phone-left { order: 1; }
  .home-center {
    order: 2;
    transform: none !important;
    margin-top: 0 !important;
  }
  .home-phone-right { order: 3; }

  .home-logo {
    width: var(--logo-width-sm);
    margin-top: 0;
  }
  .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); }
}

/* === TELECHARGEMENT === */
#telechargement {
  padding-bottom: 80px;
}

/* Bouton générique stylé */
.custom-btn {
  display: inline-flex;              /* permet le centrage vertical/horizontal */
  align-items: center;               /* centre verticalement */
  justify-content: center;           /* centre horizontalement */
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  width: 330px;
  height: 65px;
  color: #fff;
  background: #1E3A8A;
  text-align: center;
  line-height: 1;                    /* supprime le décalage vertical */
  padding: 0;                        /* aucune influence sur la hauteur */
  box-sizing: border-box;
  vertical-align: middle;            /* s’aligne proprement entre eux */
}

/* Boutons par couleur */
.btn-blue {
  background-color: #1E3A8A;
  border-color: #fff;
}
.btn-lightblue {
  background-color: #6A8DFF;
  border-color: #fff;
}
.btn-purple {
  background-color: #6A2D8D;
  border-color: #fff;
}

/* Effet au survol — inversion des couleurs */
.custom-btn:hover {
  color: #1E3A8A;
  background-color: #fff;
  border-color: #1E3A8A;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Variante au survol selon couleur du bouton */
.btn-lightblue:hover {
  color: #6A8DFF;
  border-color: #6A8DFF;
}
.btn-purple:hover {
  color: #6A2D8D;
  border-color: #6A2D8D;
}

/* Avertissement rouge */
.app-warning {
  color: #b71c1c;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
}

/* === TELECHARGEMENT — centrage parfait du texte dans les boutons === */
.custom-btn {
  display: grid !important;       /* plus fiable que flex pour ce cas */
  place-items: center !important; /* centre H & V */
  height: 65px;                   /* ta hauteur fixe */
  padding: 0 !important;
  text-align: center;
  box-sizing: border-box;
}

/* Évite que la ligne “gonfle” la hauteur perçue */
.custom-btn,
.custom-btn * {
  line-height: 1 !important;
  margin: 0 !important;
}

/* Si tu gardes un span/strong à l’intérieur */
.custom-btn .btn-text {
  display: inline-block;
  font-weight: 700;               /* optionnel */
}


/* === CONTACT === */
#contact { 
  background: #1E3A8A; 
}

#contact .heading h2 { 
  color: #fff; 
  text-align: center;
}

#contact-form { 
  font-size: 18px; 
  color: #fff; 
}
input.form-control { 
  height: 48px; 
  font-size: 16px; 
}
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; 
}

.thank-you { 
  text-align: center; 
  margin-top: 15px; 
  font-weight: bold; 
  font-size: 20px; 
}

/* === BOUTON ENVOYER (section contact) === */
#contact-form .button1 {
  background-color: #1E3A8A;    /* fond bleu */
  color: #fff;                  /* texte blanc */
  border: 2px solid #fff;       /* bordure blanche */
  font-weight: bold;
  text-transform: uppercase;
  padding: 12px 36px;
  border-radius: 6px;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  display: inline-block;
}

/* Effet au survol : inversion des couleurs */
#contact-form .button1:hover {
  background-color: #fff;       /* fond blanc */
  color: #1E3A8A;               /* texte bleu */
  border-color: #1E3A8A;        /* bordure bleue */
  transform: scale(1.05);       /* léger zoom */
}

/* Optionnel : centrer le bouton */
#contact-form .button1.btn {
  display: block;
  margin: 30px auto 0;
}

/* === FOOTER === */
footer { background: #333; padding: 20px 0 40px; }
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 NORMALISATION === */
@-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;
  }
}

@media (max-width: 767px) {
  .home-phone-right {
    margin-top: var(--mobile-tel-right-shift) !important;
  }
}

/* === CORRECTION VISIBILITÉ BOUTON 1 === */
@media (min-width: 992px) {
  .d-lg-none {
    display: none !important; /* force la disparition sur desktop */
  }
}

/* === 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;
  transform: translate3d(0, 0, 0);
}

.slider img {
  display: block;
  object-fit: cover;
}

#contact .required-note {
  color: yellow;
  font-size: 15px !important;
  opacity: 0.85;
}

/* === FIX: largeur du téléphone animé sur mobile === */
@media (max-width: 767px) {
  .scene.home-phone-left,
  .scene.home-phone-right {
    width: var(--phone-size-sm); /* 300px si tu as bien mis la variable à 300 */
  }
}


