/* Téléphone uniquement — la version ordinateur n'est pas touchée */
#m-menu-btn, #m-menu-panel { display: none; }
@media (max-width: 760px) {
  /* Bouton Menu */
  nav > div > div { display: none !important; }
  nav > div { flex-wrap: nowrap !important; min-height: 40px; justify-content: space-between !important; }
  #m-menu-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid #e7accf; background: transparent; color: #e7accf; cursor: pointer; }
  #m-menu-btn .m-bars { display: flex; flex-direction: column; gap: 4px; width: 16px; }
  #m-menu-btn .m-bars i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; }
  #m-menu-close { position: absolute; top: 12px; right: 20px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid #e7accf; background: #e7accf; color: #1d1d1b; cursor: pointer; }
  #m-menu-panel { display: flex; position: fixed; inset: 0; z-index: 200; background: rgba(29,29,27,0.98); padding: 110px 24px 40px; opacity: 0; visibility: hidden; transition: opacity 320ms ease, visibility 320ms; }
  .m-open #m-menu-panel { opacity: 1; visibility: visible; }
  html.m-open { overflow: hidden; }
  #m-menu-panel .m-list { display: flex; flex-direction: column; width: 100%; }
  #m-menu-panel a { display: block; padding: 18px 0; border-bottom: 1px solid rgba(244,241,238,0.14); font-family: Coliner, Syne, sans-serif; font-weight: 600; font-size: 34px; letter-spacing: -0.03em; color: #f4f1ee; transform: translateY(14px); opacity: 0; transition: transform 460ms cubic-bezier(.2,.8,.2,1), opacity 460ms ease, color 200ms ease; }
  #m-menu-panel a:last-child { color: #e7accf; border-bottom: 0; }
  .m-open #m-menu-panel a { transform: none; opacity: 1; }
  .m-open #m-menu-panel a:nth-child(2) { transition-delay: 50ms; }
  .m-open #m-menu-panel a:nth-child(3) { transition-delay: 100ms; }
  .m-open #m-menu-panel a:nth-child(4) { transition-delay: 150ms; }

  /* Bouton Démarrer un projet : sans animation au toucher */
  header#top a[href="#projets"] { justify-content: center !important; min-height: 56px; padding: 10px 26px !important; box-sizing: border-box; }
  header#top a[href="#contact"] { min-height: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }


  /* Bandes roses + logos clients */
  #top + div[style*="background: rgb(231, 172, 207)"], header#top ~ div[style*="padding: 18px 0px"] { padding: 9px 0 !important; }
  header#top ~ div[style*="padding: 18px 0px"] [style*="width: max-content"] { font-size: 11px !important; }
  header#top ~ div[style*="padding: 18px 0px"] [style*="gap: 44px"] { gap: 24px !important; padding-right: 24px !important; }
  #clients > div { padding: 10px 0 12px 20px !important; gap: 8px !important; }
  #clients h2 { font-size: 18px !important; max-width: none !important; }
  #clients [style*="width: max-content"] { zoom: 0.5; }

  /* Pas de barre de défilement */
  html, body { scrollbar-width: none; -ms-overflow-style: none; }
  html { overflow-x: clip; }

  /* Sous-textes plus petits (titres inchangés) */
  p[style*="font-size: 14.5px"], p[style*="font-size: 15px"], p[style*="font-size: 15.5px"], p[style*="font-size: 16px"],
  span[style*="font-size: 14.5px"], span[style*="font-size: 14px"] { font-size: 13.5px !important; line-height: 1.6 !important; }

  /* Tableau écrans : pas de décalage au survol */
  #dynamique [style*="--spp-rule"] { padding-left: 0 !important; }
  #dynamique [style*="translateX(var(--spp-shift"] { transform: none !important; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

  /* Marges */
  section[style*="40px"], header[style*="40px"], footer[style*="40px"] { padding-left: 20px !important; padding-right: 20px !important; }
  section[style*="padding: 100px"], section[style*="padding: 104px"], section[style*="padding: 112px"] { padding-top: 64px !important; }
  section[style*="112px;"], section[style*=" 112px"] { padding-bottom: 64px; }
  header#top { padding-top: 72px !important; padding-bottom: 64px !important; }
  [style*="padding: 0px 40px"] { padding-left: 20px !important; padding-right: 20px !important; }
  section[style*="40px"] [style*="padding: 0px 40px"] { padding-left: 0 !important; padding-right: 0 !important; }
  [style*="margin-top: 104px"] { margin-top: 64px !important; }
  [style*="margin-top: 76px"] { margin-top: 48px !important; }
  [style*="margin-bottom: 44px"] { margin-bottom: 28px !important; }

  /* Header : logo en haut, liens sur une ligne en dessous */
  nav > div { padding: 12px 20px !important; gap: 10px !important; }
  nav img { height: 22px !important; }

  /* Hero */
  header#top h1 { font-size: 40px !important; }
  header#top [style*="max-width: 640px"] { gap: 28px !important; margin-top: 28px !important; }
  header#top [style*="flex-wrap: wrap"] { display: inline-grid !important; grid-template-columns: max-content; align-items: stretch; width: auto; gap: 12px !important; }
  header#top [style*="flex-wrap: wrap"] > a { justify-content: center; }

  /* Titres de section */
  h2 { font-size: 32px !important; line-height: 1.08 !important; }
  [style*="font-size: clamp(60px, 7vw, 120px)"] { font-size: 56px !important; }
  [style*="align-items: flex-end"][style*="gap: 32px"] { gap: 16px !important; }

  /* Grilles */
  [style*="grid-template-columns: repeat(3"] { grid-template-columns: minmax(0,1fr) !important; }
  [style*="minmax(0px, 0.85fr)"] { grid-template-columns: minmax(0,1fr) !important; gap: 32px !important; }
  [style*="position: sticky"][style*="top: 120px"] { position: static !important; }
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  [style*="gap: 48px"] { gap: 24px !important; }
  [style*="gap: 40px 56px"] { gap: 24px !important; }
  [style*="gap: 56px"] { gap: 28px !important; }

  /* Visuels : pleine largeur, sans chevauchement */
  [style*="flex-wrap: wrap"] > [style*="flex: none"][style*="width: min("],
  [style*="flex-wrap: wrap"] > [style*="flex: 0 0 auto"][style*="width: min("] { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; margin-top: 0 !important; }
  [style*="width: calc(100% + 56px)"] { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  [style*="max-width: 96%"], [style*="max-width: 82%"], [style*="max-width: 76%"], [style*="max-width: 64%"] { max-width: 100% !important; }
  [style*="margin-left: 26px"] { margin-left: 0 !important; }
  [style*="margin-top: -16%"], [style*="margin-left: -12%"], [style*="margin-right: -14%"] { margin: 0 !important; }
  [style*="rotate("] { max-width: 100%; }

  /* Bandeau clients */
  #clients { margin: 24px 0 32px !important; }
  #clients > div { flex-direction: column !important; align-items: flex-start !important; }
  #clients [style*="gap: 110px"] { gap: 56px !important; padding-right: 56px !important; }

  /* Bouton WhatsApp */
  a[href^="https://wa.me"] { width: 52px !important; height: 52px !important; right: 14px !important; bottom: 14px !important; }
  a[href^="https://wa.me"] svg { width: 26px; height: 26px; }

  /* Textes */
  h1, h2, h3 { overflow-wrap: anywhere; }
  p { font-size: 15px; }
  [style*="white-space: nowrap"] { white-space: normal !important; }
  a[style*="padding: 34px 30px"], a[style*="padding: 34px 6px"] { gap: 16px !important; padding-top: 24px !important; padding-bottom: 24px !important; }
  a[style*="padding: 34px 30px"] { padding-left: 20px !important; padding-right: 20px !important; }
  input, textarea { font-size: 16px !important; }

  /* Projet suivant / précédent / retour */
  a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"] { padding: 16px 14px 16px 18px !important; gap: 12px !important; border-radius: 14px !important; }
  a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"] span[style*="Coliner"] { font-size: 20px !important; }
  a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"] span[style*="IBM Plex Mono"] { font-size: 9.5px !important; }
  a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"] > span[style*="width: 52px"] { width: 38px !important; height: 38px !important; }
  a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"] svg { width: 16px; height: 16px; }
  section:has(> div > a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"]), section:has(> a[style*="grid-template-columns: minmax(0px, 1fr) auto"][style*="padding-top: 34px"]) { padding-top: 40px !important; padding-bottom: 48px !important; }

  /* Bas de page */
  section[style*="background: rgb(231, 172, 207)"][style*="padding: 52px 40px 44px"] { padding: 36px 20px 28px !important; }
  section[style*="padding: 52px 40px 44px"] > div[style*="grid-template-columns"] { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 28px 16px !important; }
  section[style*="padding: 52px 40px 44px"] > div > div:first-child { grid-column: 1 / -1; }
  section[style*="padding: 52px 40px 44px"] > div > div { align-items: flex-start !important; text-align: left !important; }
  section[style*="padding: 52px 40px 44px"] > div > div a, section[style*="padding: 52px 40px 44px"] > div > div > span:not(:first-child) { font-size: 15px !important; }
  section[style*="padding: 52px 40px 44px"] a[aria-label="Instagram"], section[style*="padding: 52px 40px 44px"] a[aria-label="LinkedIn"] { width: 42px !important; height: 42px !important; }
  section[style*="padding: 52px 40px 44px"] footer { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; margin-top: 28px !important; padding-top: 20px !important; font-size: 10px !important; }
  section[style*="padding: 52px 40px 44px"] footer > span { text-transform: none; letter-spacing: 0.02em; font-size: 12px; line-height: 1.5; }
  section[style*="padding: 52px 40px 44px"] footer > div { width: 100%; justify-content: space-between; }

  /* Hero : sous-texte */
  header#top p { font-size: 12.5px !important; line-height: 1.6 !important; }

  /* Parlons-en : logo en fond */
  #contact > img[src$="logo-s.png"] { width: 46vw !important; top: 12px !important; right: 0 !important; }

  /* Bas de page : Contact, Basés à, Suivre — phrase au-dessus du logo */
  section[style*="padding: 52px 40px 44px"] > div[style*="grid-template-columns"] { grid-template-columns: minmax(0,1fr) !important; gap: 22px !important; }
  section[style*="padding: 52px 40px 44px"] > div > div:nth-child(1) { order: 1; }
  section[style*="padding: 52px 40px 44px"] > div > div:nth-child(3) { order: 2; }
  section[style*="padding: 52px 40px 44px"] > div > div:nth-child(2) { order: 3; }
  section[style*="padding: 52px 40px 44px"] footer > span { order: 5; font-size: 10.5px !important; }

  /* Hero : dégradé noir plus étendu vers la droite */
  header#top > div[style*="linear-gradient(to right, rgba(29, 29, 27, 0.98"] { background: linear-gradient(to right, rgba(29,29,27,0.985) 0%, rgba(29,29,27,0.95) 50%, rgba(29,29,27,0.88) 72%, rgba(29,29,27,0.7) 88%, rgba(29,29,27,0.5) 100%) !important; }

  /* Tasty Crousty : fresque bleue */
  div:has(> img[src$="tc-hab-2.png"]) { width: 100% !important; max-width: none !important; }

  /* Numéro + titre : titre toujours sous le numéro */
  [style*="flex-wrap: wrap"][style*="align-items: flex-end"][style*="gap: 32px"] { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }

  /* Accueil : titre Réalisations sur une ligne */
  #projets > div:first-child { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
  #projets h2 { overflow-wrap: normal !important; white-space: nowrap !important; font-size: 34px !important; }

  /* Accueil : tableau écrans sans les points détaillés */
  #dynamique [style*="minmax(220px, 1fr)"] { display: none !important; }
  #dynamique [style*="minmax(280px, 1fr)"] { gap: 0 !important; padding-top: 28px !important; padding-bottom: 28px !important; }

  /* Page 404 */
  main[data-404] { min-height: calc(100vh - 64px) !important; padding: 72px 20px 80px !important; }
  main[data-404] > span[aria-hidden="true"] { font-size: 62vw !important; }
  main[data-404] h1 { font-size: 36px !important; }
  main[data-404] > div { flex-direction: column; align-items: stretch; width: 100%; gap: 12px !important; }
  main[data-404] > div > a { justify-content: center; }
}
