/* ==========================================================================
   RESET & BASE
   ========================================================================== */
   /* Ajouter au début (après le reset) */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Pousser le footer en bas */
main, 
section:not(.footer) {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: clamp(4rem, 8vw, 7rem);   /* espace naturel au-dessus */
}

/* Éviter que le contenu disparaisse sous le menu fixe */
section {
  padding-top: clamp(80px, 12vh, 120px);
}

/* Optionnel : si tu as un dernier élément qui colle trop */
#contact {
  margin-bottom: 2rem;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Raleway", Arial, sans-serif;
  color: #111;
  overflow-x: hidden;
  animation: slideUp 1.2s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   MENU
   ========================================================================== */
.top-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  padding: 0 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: background 0.3s ease;
}

.menu-left img {
  height: 70px;
}

.menu-right {
  display: flex;
  gap: 40px;
  align-items: center;
}

.menu-right a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 300;
  color: #000000;
}

.burger {
  display: none;
}

/* ==========================================================================
   SECTIONS GÉNÉRALES
   ========================================================================== */
section {
  min-height: 100vh;
}

/* ==========================================================================
   HOME
   ========================================================================== */
#home .ligne {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -50px;
  position: relative;
  padding: 0 8%;
  gap: 5%;
  flex-wrap: nowrap;
  overflow: hidden;
  background-color: #fcfcff;
}

.home-text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
  width: 100%;
  padding-left: 5%;
  padding-top: 1%;
  max-width: 50%;
}

.gauche {
  font-size: 6.5rem;
  padding-top: 30%;
  font-weight: 1000;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: transparent;
  background: linear-gradient(90deg, #2b2b55, #4d2e69, #22033b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 400% 200%;
  animation: gradientFlow 12s ease infinite;
  text-align: left;
  white-space: nowrap;
  z-index: 2;
}

.home-subtitle {
  margin-top: 2.5rem;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.252em;
  color: #494949;
  line-height: 1.25;
  max-width: 90%;
  opacity: 0.9;
  text-align: left;
}

.home-cta {
  display: inline-block;
  margin-top: 3rem;
  padding: 1.5rem 3rem;
  background: linear-gradient(90deg, #ffffff, #faf8f8, #ffffff);
  color: #828282;
  font-size: 1.6rem;
  font-weight: 900;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 1px 8px 15px rgba(99, 102, 241, 0.4);
}

.home-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

model-viewer {
  width: 1100px;
  height: 1000px;
  max-width: 90vw;
  max-height: 95vh;
  padding-top: 10vh;
  transition: opacity 0.4s ease;
  z-index: 1;
}

/* ==========================================================================
   SERVICES GRID
   ========================================================================== */
.services-grid {
  display: flex;
  width: 100%;
  height: 100vh;
  max-height: 1080px;
  background: #fdfcf7;
  overflow: hidden;
  padding-left: 5%;
}

.service-card {
  flex: 1;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transform: skewX(-12deg);
  box-shadow: 0 5px 30px rgba(99, 102, 241, 0.4);
  transition: all 0.4s ease;
  background: #fafafa;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.service-card:hover {
  transform: skewX(-12deg) scale(1.08) translateY(-15px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.service-card img,
.service-card h3,
.service-card p,
.service-card span {
  transform: skewX(12deg);
  text-align: center;
}

.service-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.service-card h3 {
  font-size: 2rem;
  font-weight: 200;
  margin: 20px 0 10px;
}

.service-card p {
  font-size: 1.15rem;
  margin: 0 10%;
  line-height: 2;
  color: #444;
}

.service-card span {
  font-weight: bold;
  color: #b9b9b9;
  border-bottom: 2px solid #f0f0f0;
}

/* ==========================================================================
   SERVICES FEATURES
   ========================================================================== */
.services-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 2%;
}

.feature-card {
  background: linear-gradient(0deg, #ffffff, #f1f1f1, #f8f9fa);
  border-radius: 12px;
  padding: 10px 10px;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.8rem;
  font-weight: 900;
  margin: 10px;
  color: #3b3939;
  text-align: center;
}

.feature-subtitle {
  font-size: 2.5rem;
  font-weight: 800;
  color: #494949;
  margin-bottom: 20px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 1rem;
  line-height: 1.642;
  color: #444;
  margin: 20px;
}

.feature-use {
  font-size: 1.05rem;
  color: #0066cc;
  font-weight: 500;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

/* ==========================================================================
   TITRES DE SECTION
   ========================================================================== */
.services-title,
.portfolio-title,
.contact-title {
  font-size: 5rem;
  font-weight: 900;
  text-align: center;
  padding: 100px 20px 20px;
  color: transparent;
  background: linear-gradient(90deg, #ebebff, #8091f5, #c78afa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 400% 200%;
  animation: gradientFlow 20s ease infinite;
  white-space: nowrap;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
#contact {
  background: #353535;
  color: white;
  text-align: center;
  padding: 100px 20px;
  margin-bottom: 0px;
}

#contact form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#contact input,
#contact textarea {
  padding: 14px;
  background: #222;
  color: white;
  border: none;
}

#contact button {
  padding: 14px;
  background: white;
  color: #111;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #0a0a16;
  color: #ccc;
  padding: 100px 60px 40px;
  font-size: 1rem;
}

.footer-container {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 80px;
}

.footer-logo {
  height: 120px;
  margin-bottom: 1.5rem;
}

.footer-desc {
  max-width: 420px;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #aaa;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 20px;
  margin: 20px 0 30px;
}

.footer-socials img {
  width: 32px;
  height: 32px;
  transition: transform 0.25s ease;
}

.footer-socials a:hover img {
  transform: scale(1.15);
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.9rem;
}

.footer-col a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-newsletter h4 {
  color: #ffffff;
  margin-bottom: 1.2rem;
}

.footer-newsletter form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-newsletter input[type="email"] {
  padding: 14px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  background: #1a1a2e;
  color: white;
}

.footer-newsletter button {
  padding: 14px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-newsletter button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.footer-bottom {
  text-align: center;
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid #222;
  font-size: 0.95rem;
  color: #777;
}

/* ====================== MAIN PREVIEW 2D/3D ====================== */
.main-preview-wrapper {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 500px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0,0,0,0.15);
  background: #111;
}

.main-preview-2d,
.main-preview-3d {
  position: absolute;
  inset: 0;
  transition: opacity 0.45s ease;
  opacity: 0;
}

.main-preview-2d.active,
.main-preview-3d.active {
  opacity: 1;
}

.main-preview-2d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.45s ease;
}

.main-preview-3d model-viewer {
  width: 100%;
  height: 100%;
}

/* Toggle */
.main-preview-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 50px;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.toggle-label { user-select: none; }

.toggle-switch {
  position: relative;
  width: 42px;
  height: 22px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #555;
  transition: .3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(90deg, #667eea, #764ba2);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* =========================================================
   RESPONSIVE PROGRESSIVE
   Desktop large → Laptop → Tablet → Mobile
   ========================================================= */


/* =========================
   LARGE DESKTOP (1600px)
   ========================= */
@media (max-width:1600px){

.top-menu{
padding:0 120px;
}

.gauche{
font-size:5.5rem;
}

model-viewer{
width:900px;
height:820px;
}

.footer-container{
gap:60px;
}
.services-features{
grid-template-columns:repeat(4,1fr);
max-width: 1200px;

}
.feature-card p {
  font-size: 0.8rem;
  line-height: 1.62;
  color: #444;
  margin: 20px;
}
.services-grid{

  max-height: 600px;


}
.service-card p {
    font-size: 0.8rem;
    margin: 0 10%;
    line-height: 1.52;
  
}



}


/* =========================
   LAPTOP (1330px)
   ========================= */
@media (max-width:1330px){

.top-menu{
padding:0 80px;
}

.menu-right{
gap:28px;
}

.gauche{
font-size:4.8rem;
padding-top:20%;
}

.home-subtitle{
font-size: 1rem;
}

.home-cta{
font-size:1.3rem;
padding:1.2rem 2.5rem;
}

model-viewer{
width:720px;
height:650px;
}

.services-features{
grid-template-columns:repeat(4,1fr);
max-width: 1400px;

}

.footer-container{
grid-template-columns:1.5fr 1fr 1fr;
gap:50px;
}

}


/* =========================
   TABLET (1024px et moins)
   ========================= */
@media (max-width: 1024px) {

  /* MENU */
  .top-menu {
    padding: 0 40px;
  }

  .menu-right {
    display: none;
  }

  .burger {
    display: block;
  }

  /* HOME */
  #home .ligne {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 100px;
    padding-bottom: 40px;
    gap: 2.5rem;
  }

  .home-text-wrapper {
    max-width: 100%;
    align-items: center;
    padding-left: 0;
  }

  .gauche {
    font-size: 4.2rem;
    padding-top: 10px;
    white-space: normal;
    text-align: center;
  }

  .home-subtitle {
    font-size: 1.35rem;
    max-width: 90%;
    text-align: center;
  }

  model-viewer {
    width: 90vw;
    height: 80vh;
    max-height: 620px;
  }

  /* PORTFOLIO - SERVICES GRID → TOUTES LES CARTES en 2 colonnes */
  .services-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);     /* ← FORCÉ 2 colonnes */
    gap: 28px;
    height: auto !important;
    min-height: unset;
    max-height: none !important;
    padding: 40px 6% 60px;
    overflow: visible !important;              /* ← plus de coupure */
  }

  .service-card {
    /* Suppression skew + ajustements propres */
    transform: none;
    padding: 28px 18px;
    width: 100%;
    margin: 0;
    min-height: 380px;                         /* évite les hauteurs inégales */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .service-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 14px 38px rgba(0,0,0,0.14);
  }

  .service-card img,
  .service-card h3,
  .service-card p,
  .service-card span {
    transform: none;
  }

  /* SERVICES FEATURES → 2 colonnes */
  .services-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    padding: 40px 5%;
  }


  

  /* TITRES */
  .services-title,
  .portfolio-title,
  .contact-title {
    font-size: 3.5rem;
    white-space: normal;
    padding: 60px 20px 40px;
  }

  /* FOOTER */
  .footer {
    padding: 80px 40px 60px;
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

/* =========================
   MOBILE LARGE (768px et moins)
   ========================= */
@media (max-width: 768px) {

  .gauche {
    font-size: 3.2rem;
  }

  .home-subtitle {
    font-size: 1.2rem;
  }

  .home-cta {
    font-size: 1.1rem;
    padding: 1rem 2rem;
  }

  model-viewer {
    height: 420px;
  }

  .services-features {
    grid-template-columns: 1fr;
  }

  .services-title,
  .portfolio-title,
  .contact-title {
    font-size: 2.8rem;
  }

  /* FOOTER – centrage complet */
  .footer-container {
    grid-template-columns: 1fr;              /* une seule colonne */
    text-align: center;                      /* centre tout le texte */
    justify-items: center;                   /* centre les blocs dans la grille */
    gap: 3rem;                               /* bel espacement vertical */
  }

  .footer-logo {
    height: 90px;
    margin: 0 auto 1.5rem;                   /* centre le logo */
  }

  .footer-desc {
    max-width: 90%;
    margin: 0 auto 2rem;                     /* centre le paragraphe */
  }

  .footer-socials {
    justify-content: center;                 /* icônes sociales centrées */
    margin: 1.5rem auto;
  }

  .footer-col {
    text-align: center;                      /* titres et listes centrés */
  }

  .footer-col h4 {
    margin-bottom: 1rem;
  }

  .footer-col ul {
    padding: 0;
    margin: 0 auto;
    display: inline-block;                   /* pour que la liste soit centrée */
  }

  .footer-newsletter {
    max-width: 320px;
    margin: 0 auto;                          /* formulaire newsletter centré */
  }

  .footer-bottom {
    text-align: center;
    margin-top: 3rem;
  }
}

/* =========================================
   SMALL MOBILE (480px et moins)
   ========================================= */
@media (max-width: 480px) {

  /* MENU - plus compact */
  .top-menu {
    height: 56px;
    padding: 0 16px;
  }

  .menu-left img {
    height: 44px;
  }

  .burger {
    width: 28px;
    height: 20px;
  }

  .burger span {
    height: 2.5px;
  }

  /* HOME - réduction espaces + tailles texte */
  #home .ligne {
    padding-top: 70px;              /* réduit l'espace sous le header fixe */
    padding-bottom: 30px;
    gap: 1.8rem;
  }

  .gauche {
    font-size: 2.4rem;              /* titre principal plus petit mais lisible */
    line-height: 1.05;
    padding-top: 8%;                /* réduit le padding interne */
  }

  .home-subtitle {
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 92%;
  }

  .home-cta {
    font-size: 0.95rem;
    padding: 0.8rem 1.8rem;
    margin-top: 1.5rem;
  }

  /* Model-viewer très compact */
  model-viewer {
    width: 94vw;
    height: 38vh;                   /* hauteur raisonnable sur petit écran */
    min-height: 260px;
    max-height: 320px;
  }

  /* TITRES DE SECTION - plus petits */
  .services-title,
  .portfolio-title,
  .contact-title {
    font-size: 2.1rem;
    padding: 50px 16px 30px;
  }

  /* PORTFOLIO - 1 colonne + compact */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 30px 5% 50px;
  }

  .service-card {
    min-height: 340px;
    padding: 24px 16px;
  }

  .service-card h3 {
    font-size: 1.55rem;
  }

  .service-card p {
    font-size: 0.92rem;
    margin: 0 6%;
  }

  /* SERVICES FEATURES */
  .services-features {
    padding: 30px 5% 50px;
    gap: 1.8rem;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .feature-card h3 {
    font-size: 1.45rem;
  }

  .feature-subtitle {
    font-size: 1.8rem;
  }

  .feature-card p {
    font-size: 0.92rem;
    margin: 0 4%;
  }

  /* CONTACT - formulaire compact */
  #contact {
    padding: 70px 16px 50px;
  }

  #contact form {
    max-width: 100%;
    padding: 0 10px;
  }

  #contact input,
  #contact textarea,
  #contact button {
    font-size: 0.95rem;
    padding: 12px;
  }

  /* FOOTER - très compact + centré */
  .footer {
    padding: 50px 16px 40px;
  }

  .footer-logo {
    height: 70px;
  }

  .footer-desc {
    font-size: 0.92rem;
    max-width: 100%;
  }

  .footer-col h4 {
    font-size: 1.15rem;
  }

  .footer-newsletter {
    max-width: 100%;
  }

  .footer-bottom {
    font-size: 0.85rem;
    margin-top: 2rem;
  }
}

/* Burger de base (caché par défaut sur grand écran) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  cursor: pointer;
  z-index: 10000;
}

.burger span {
  width: 100%;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Quand le menu est ouvert → croix */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Burger de base (caché par défaut sur grand écran) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  cursor: pointer;
  z-index: 10000;
}

.burger span {
  width: 100%;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Quand le menu est ouvert → croix */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* =========================================
   BURGER MENU MOBILE
   ========================================= */

/* Menu mobile caché */
@media (max-width:1024px){

.menu-right{
position:fixed;
top:70px;
right:0;
width:100%;
height:calc(100vh - 70px);
background:#ffffff;

display:flex;
flex-direction:column;
align-items:center;
justify-content:center;

gap:40px;

transform:translateY(-120%);
transition:transform 0.4s ease;

box-shadow:0 20px 40px rgba(0,0,0,0.15);
}

/* Menu ouvert */
.menu-right.active{
transform:translateY(0);
}

/* Liens menu */
.menu-right a{
font-size:1.4rem;
font-weight:500;
}

/* Burger visible */
.burger{
display:flex;
}

}