/* ==========================
   FONT
========================== */
@font-face {
    font-family: "NewStandardBold";
    src: url("image/NewStandardBold.woff2") format("truetype");
    font-weight: 700;
    font-style: normal;
  }
  
  /* ==========================
     GLOBAL
  ========================== */
  * { box-sizing: border-box; }
  
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #faf3e5;
    color: #000;
  }
  
  /* Smooth scroll */
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }
  
  h1, h2, h3, nav a {
    font-family: "NewStandardBold", Arial, Helvetica, sans-serif;
    margin: 0;
  }
  
  /* ==========================
     KEYFRAMES
  ========================== */
  @keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -40px); }
  }
  
  /* ==========================
     LOADER
  ========================== */
  #loader {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #19421c;
    z-index: 9999;
    overflow: hidden;
  }
  
  #count {
    font-size: 64px;
    color: #000;
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease, opacity 0.5s ease;
  }
  
  /* Loader BG + Header BG (mêmes blobs animés) */
  .loader-bg,
  .container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }
  
  .loader-bg { z-index: 1; } /* au-dessus du fond loader */
  
  .loader-bg div,
  .container div {
    position: absolute;
    filter: blur(120px);
    animation: float 14s infinite ease-in-out;
  }
  
  /* Couleurs / positions (identiques loader & header) */
  .loader-bg div:nth-child(1),
  .container div:nth-child(1) {
    width: 150%;
    height: 150%;
    left: -20%;
    top: -20%;
    background-color: #659269;
  }
  
  .loader-bg div:nth-child(2),
  .container div:nth-child(2) {
    width: 70%;
    height: 80%;
    background-color: #023c40;
    top: 80%;
    right: -15%;
    animation-delay: 2s;
  }
  
  .loader-bg div:nth-child(3),
  .container div:nth-child(3) {
    width: 75%;
    height: 55%;
    background-color: #faf3e5;
    top: -40%;
    right: -5%;
    animation-delay: 1s;
  }
  
  .loader-bg div:nth-child(4),
  .container div:nth-child(4) {
    width: 80%;
    height: 65%;
    background-color: #faf3e5;
    top: -30%;
    right: -45%;
    animation-delay: 3s;
  }
  
  .loader-bg div:nth-child(5),
  .container div:nth-child(5) {
    width: 65%;
    height: 70%;
    background-color: #8d86c9;
    bottom: -50%;
    left: -30%;
    animation-delay: 1s;
  }
  
  /* ==========================
     HEADER
  ========================== */
  header {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  
  .logo {
    position: absolute;
    top: 40px;
    left: 40px;
    max-width: 170px;
    z-index: 2;
    opacity: 0; /* fade-in after loader */
  }
  
  .header-text {
    position: relative;
    z-index: 2;
    color: #000;
    opacity: 0; /* fade-in after loader */
  }
  
  .header-text h1 {
    white-space: nowrap;
    font-size: clamp(28px, 6vw, 48px);
  }
  
  .header-text p {
    margin-top: 10px;
    font-family: "NewStandardBold";
    font-size: clamp(11px, 1vw, 15px);
  }
  
  /* Titres (site) */
  #titreprincipal {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 800;
    line-height: 1.1;
  }
  
  #titresecondaire {
    font-size: clamp(25px, 2.5vw, 40px);
    font-weight: 500;
    margin-top: 8px;
    opacity: 0.8;
  }
  
  /* ==========================
     SECTION À PROPOS
  ========================== */
  #apropos {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
  }
  
  #apropos h2 {
    white-space: nowrap;
    font-size: clamp(22px, 5vw, 36px);
  }
  
  #apropos p {
    max-width: 800px;
    margin: 25px auto 0;
    line-height: 1.6;
    font-size: clamp(14px, 2.1vw, 16px);
  }
  
  /* ==========================
     SECTION SERVICES
  ========================== */
  #services {
    text-align: center;
    margin-bottom: 100px;
    scroll-margin-top: 40px;
  }
  
  #services h2 {
    white-space: nowrap;
    font-size: clamp(22px, 5vw, 42px);
    margin-bottom: 80px;
  }
  
  /* Sous-texte sous "Mes services" */
  .services-subtext {
    margin-top: -40px;
    margin-bottom: 60px;
    font-size: clamp(14px, 2.2vw, 18px);
    opacity: 0; /* fade-in gère l’opacité */
  }
  
  .services-zigzag {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    gap: 60px;
  }
  
  /* Chaque ligne service */
  .service {
    width: 100%;
    position: relative;
    font-family: "NewStandardBold", Arial, Helvetica, sans-serif;
    font-size: clamp(14px, 2.6vw, 28px);
    white-space: nowrap;
  }
  
  .service.left { align-self: flex-start; }
  .service.right { align-self: flex-end; }
  
  /* ==========================
     SERVICES AVEC CHECKBOX
  ========================== */
  .service-item {
    display: block;
    width: 100%;
    position: relative;
    padding-right: 80px;
    cursor: pointer;
  }
  
  .service-text {
    display: inline-block;
    max-width: calc(100% - 80px);
    text-overflow: ellipsis;
    vertical-align: middle;
  }
  
  .service.right .service-text { text-align: right; }
  
  /* Cache la checkbox native */
  .service-item input { display: none; }
  
  /* Checkbox custom */
  .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #023c40;
    border-radius: 4px;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
  }
  
  .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    opacity: 0;
  }
  
  .service-item input:checked + .checkmark {
    background-color: #023c40;
    border-color: #023c40;
  }
  
  .service-item input:checked + .checkmark::after { opacity: 1; }
  
  /* ==========================
     SOUS-TITRES SERVICES
  ========================== */
  .service-subtitle {
    width: 100%;
    text-align: left;
    font-family: "NewStandardBold", Arial, Helvetica, sans-serif;
    font-size: clamp(16px, 3vw, 22px);
    margin: 20px 0 10px;
    color: #000;
  }
  
  .service-subtitle::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background-color: #000;
    margin-top: 1px;
  }
  
  /* ==========================
     FORMULAIRE (IDENTITÉ + TEL + ENVOI + SPACER)
  ========================== */
  .send-btn {
    padding: 14px 26px;
    border: none;
    border-radius: 10px;
    background-color: #659269;
    color: #faf3e5;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  
  .send-btn:hover { transform: scale(1.03); }
  
  .send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }
  
  /* Conteneur global du bloc */
  .send-row {
    max-width: 900px;
    margin: 70px auto 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  
  /* Ligne 1 : Prénom / Nom / Entreprise */
  .identity-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 12px;
  }
  
  /* Inputs (mutualisés) */
  .identity-row input,
  .phone-field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  .phone-field { margin: 0; }
  
  /* Ligne 2 : téléphone | bouton | spacer */
  .send-row-2 {
    display: grid;
    grid-template-columns: 240px auto 240px;
    align-items: center;
    justify-content: center;
    column-gap: 16px;
  }
  
  .send-row-2 .phone-field { justify-self: end; }
  .send-row-2 .send-btn { justify-self: center; }
  .send-spacer { width: 240px; }
  
  /* ==========================
     CONTACT
  ========================== */
  .contact {
    padding: 100px 50px;
    text-align: center;
  }
  
  .contact p {
    line-height: 1.8;
    font-size: clamp(14px, 2.1vw, 16px);
  }
  
  p.fade-in a {
    color: inherit;
    text-decoration: none;
  }
  
  p.fade-in a:hover {
    text-decoration: underline;
  }
  
  /* ==========================
     FOOTER ANIMÉ
  ========================== */
  footer {
    position: relative;
    overflow: hidden;
    background-color: #659269;
    padding: 55px;
    margin-top: 40px;
    text-align: center;
  }
  
  .footer-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }
  
  .footer-bg div {
    position: absolute;
    filter: blur(100px);
    animation: float 16s infinite ease-in-out;
    opacity: 0.8;
  }
  
  .footer-bg div:nth-child(1) {
    width: 120%;
    height: 120%;
    background-color: #659269;
    top: -30%;
    left: -30%;
  }
  
  .footer-bg div:nth-child(2) {
    width: 70%;
    height: 70%;
    background-color: #8d86c9;
    bottom: -40%;
    right: -40%;
    animation-delay: 2s;
  }
  
  .footer-bg div:nth-child(3) {
    width: 60%;
    height: 60%;
    background-color: #faf3e5;
    top: -20%;
    right: -30%;
    animation-delay: 4s;
  }
  
  footer p {
    position: relative;
    z-index: 1;
    top: -10px;
    margin: 0;
    color: #000;
    font-size: clamp(12px, 2vw, 14px);
  }
  
  /* ==========================
     FADE / SLIDE IN
  ========================== */
  .fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
  }
  
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  @media (prefers-reduced-motion: reduce) {
    .fade-in {
      transition: none;
      transform: none;
    }
  }
  
  /* ==========================
     NAV BAR FLOTTANTE
  ========================== */
  .sidebar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    opacity: 0;
    z-index: 1000;
    transition: transform 0.5s ease, opacity 0.5s ease;
  }
  
  .sidebar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  
  .sidebar ul {
    display: flex;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    flex-wrap: nowrap;
  }
  
  .sidebar a {
    color: #000;
    text-decoration: none;
    font-size: clamp(0.8rem, 2.2vw, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    transition: transform 0.3s ease, color 0.3s ease;
  }
  
  .sidebar a:hover {
    color: #ff6347;
    transform: scale(1.1);
  }
  
  /* ==========================
     RESPONSIVE
  ========================== */
  @media (min-width: 1024px) {
    .services-zigzag { transform: translateX(45px); }
  }
  
  @media (max-width: 1000px) {
    /* (si tu ajoutes un transform sur le tel, mets-le ici) */
  }
  
  @media (max-width: 768px) {
    header {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding-top: 40px;
      padding-bottom: 100px;
    }
  
    .logo {
      position: relative;
      top: 0;
      left: 0;
      transform: none;
      margin: 0 auto 50px auto;
      display: block;
      max-width: 200px;
    }
  
    .header-text { text-align: center; }
    .services-zigzag { padding: 0 40px; }
    .sidebar ul { gap: 15px; }
  
    /* Mobile: retour à la ligne pour éviter les titres tronqués */
    .service { white-space: normal; }
    .service-text {
      white-space: normal;
      max-width: 100%;
      text-overflow: clip;
    }
  }
  
  @media (max-width: 700px) {
    .identity-row { grid-template-columns: 1fr; }
  
    .send-row-2 {
      grid-template-columns: 1fr;
      row-gap: 14px;
    }
  
    .send-spacer { display: none; }
  
    .send-row-2 .phone-field { justify-self: center; }
    .send-row-2 .phone-field input { width: min(320px, 100%); }
    .send-row-2 .send-btn { justify-self: center; }
  }
  
  @media (max-width: 480px) {
    .services-zigzag { padding: 0 20px; }
    .sidebar ul { gap: 10px; }
    .checkmark { right: 30px; }
  }
  
  /* Largeur commune pour tous les champs */
:root {
    --field-width: 240px;
  }
  
  /* Ligne identité : champs de même largeur que téléphone */
  .identity-row {
    justify-content: center;
  }
  
  .identity-row input {
    width: var(--field-width);
  }
  
  /* Téléphone : même largeur */
  .send-row-2 .phone-field input {
    width: var(--field-width);
  }

  @media (max-width: 700px) {
    .identity-row {
        grid-template-columns: 1fr;
        justify-items: center;
      }
    
      .identity-row input,
      .send-row-2 .phone-field input {
        width: min(320px, 100%);
      }
  }
  @media (min-width: 701px) {
    .identity-row {
        display: grid;
        grid-template-columns: repeat(3, var(--field-width));
        justify-content: center;
        justify-items: center;
        gap: 12px;
        width: 100%;
      }
      .identity-row input {
        width: var(--field-width);
      }
    
      /* Ligne 2 : Téléphone / Bouton / Spacer */
      .send-row-2 .phone-field input {
        width: var(--field-width);
      }
  }
  
  /* Disabled visible à coup sûr */
#sendServices:disabled {
    opacity: 0.45 !important;
    filter: grayscale(1) !important;
    cursor: not-allowed !important;
    transform: none !important;
  }
  
  #sendServices:disabled:hover {
    transform: none !important;
  }
  
  #sendServices:disabled {
    background-color: #9aa39b !important;
  }
  