/* UP2TECH - couche responsive commune
   Les composants sont pensés pour le tactile et les petits écrans,
   puis les layouts historiques reprennent la main sur desktop. */

html,
body,
#wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

button,
input,
textarea,
select {
  max-width: 100%;
}

@media (max-width: 767px) {
  :root {
    --up2-mobile-gutter: 16px;
    --up2-mobile-section: 64px;
  }

  html { scroll-padding-top: 88px; }
  body { font-size: 15px; }

  .container,
  .container-full,
  .container-fluid {
    width: 100%;
    max-width: 100%;
    padding-left: var(--up2-mobile-gutter);
    padding-right: var(--up2-mobile-gutter);
  }

  a,
  button,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color: transparent;
  }

  input,
  select,
  textarea { font-size: 16px; }

  button,
  [role="button"],
  .tf-btn,
  .tf-btn-2 {
    min-height: 44px;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    text-align: center;
  }

  button .icon,
  [role="button"] .icon,
  .tf-btn .icon,
  .tf-btn-2 .icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    line-height: 1;
  }

  .flat-spacing { padding-top: var(--up2-mobile-section); padding-bottom: var(--up2-mobile-section); }
  .flat-spacing.pt-0 { padding-top: 0; }
  .mb-80,.mb-70,.mb-60,.mb-48 { margin-bottom: 32px !important; }

  .heading-section { margin-bottom: 32px; }
  .heading-section.center { text-align: center; }
  .heading-section .heading-title,
  .heading-title {
    max-width: 100%;
    font-size: clamp(34px, 10.4vw, 46px);
    line-height: 1.04;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
  }
  .heading-section .heading-title br { display: none; }
  .heading-sub { max-width: 100%; }

  /* Navigation */
  .tf-header.header2 {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    padding: 0;
  }
  .tf-header.header2 .header-inner {
    width: 100%;
    min-height: 70px;
    margin: 0;
    padding: 10px 11px 10px 18px;
    border-radius: 22px;
    background: rgba(36,45,119,.78);
  }
  .up2-header-logo img { width: 140px; height: auto; }
  .tf-header .open-mb-menu {
    display: grid;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 50%;
    background: linear-gradient(145deg,#ff4d91,#e01e68);
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(255,46,126,.8), inset 0 1px 0 rgba(255,255,255,.3);
  }
  .tf-header .open-mb-menu .icon { width:20px; height:20px; font-size:20px; }
  .offcanvas-menu {
    background-color: rgba(12, 18, 62, .97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .offcanvas-menu .offcanvas-content {
    width: 100%;
    background-color: rgba(12, 18, 62, .94);
  }
  .offcanvas-menu .offcanvas-content .container { padding-inline: 18px; }
  .offcanvas-menu .canvas_head { min-height: 76px; }
  .offcanvas-menu .canvas_center { padding-block: 18px; }
  .offcanvas-menu .nav-ul-mb .mb-menu-link { font-size: clamp(31px, 10vw, 46px); line-height: 1.05; }
  .offcanvas-menu .nav-ul-mb .item { padding-block: 9px; }
  .offcanvas-menu .sub-nav-menu { padding: 8px 0 5px 14px; }
  .offcanvas-menu .sub-nav-link { display: block; padding: 9px 0; font-size: 15px; }
  .offcanvas-menu .up2-mobile-services {
    padding: 10px 0 4px;
  }
  .offcanvas-menu .up2-mobile-services__all {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255,255,255,.18);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
  }
  .offcanvas-menu .up2-mobile-services__group {
    border-bottom: 1px solid rgba(255,255,255,.16);
  }
  .offcanvas-menu .up2-mobile-services__group summary {
    display: grid;
    min-height: 56px;
    grid-template-columns: 26px minmax(0,1fr) 24px;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
  }
  .offcanvas-menu .up2-mobile-services__group summary::-webkit-details-marker { display: none; }
  .offcanvas-menu .up2-mobile-services__icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    color: #ff4d91;
  }
  .offcanvas-menu .up2-mobile-services__icon svg { width: 19px; height: 19px; }
  .offcanvas-menu .up2-mobile-services__chevron {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    font-size: 19px;
    line-height: 1;
    transition: transform .18s ease;
  }
  .offcanvas-menu .up2-mobile-services__group[open] .up2-mobile-services__chevron { transform: rotate(180deg); }
  .offcanvas-menu .up2-mobile-services__links {
    display: grid;
    padding: 0 12px 12px 48px;
  }
  .offcanvas-menu .up2-mobile-services__links a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,.11);
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
  }
  .offcanvas-menu .up2-mobile-services__links .up2-mobile-services__category {
    color: #ff7bac;
    font-weight: 700;
  }
  .offcanvas-menu .canvas_foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }
  .offcanvas-menu .up2-mobile-contact-link {
    display: flex;
    min-height: 58px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px;
    background: rgba(255,255,255,.07);
    color: #fff;
    text-decoration: none;
  }
  .offcanvas-menu .up2-mobile-contact-link span {
    color: rgba(255,255,255,.7);
    font-size: 12px;
    line-height: 1.2;
  }
  .offcanvas-menu .up2-mobile-contact-link strong {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
  }

  /* Hero accueil */
  #homeHero.section-hero { min-height: 720px !important; height: auto !important; border-radius: 0 0 28px 28px; }
  #homeHero.section-hero .content-wrap { padding: 136px 0 92px !important; }
  #homeHero .up2-slogan { display: block; font-size: clamp(40px, 12vw, 58px); line-height: .98; }
  #homeHero .up2-slogan br { display: none; }
  #homeHero .bot-btns { width: 100%; flex-direction: row; align-items: stretch; gap: 8px; }
  #homeHero .bot-btns a { width: auto; min-width: 0; min-height: 50px; padding-inline: 10px; justify-content: center; font-size: clamp(10px, 3.15vw, 12px); line-height: 1; white-space: nowrap; }
  #homeHero .bot-btns .up2-book { flex: 1.2 1 0; gap: 6px; }
  #homeHero .bot-btns .tf-btn-2 { flex: .8 1 0; }
  #homeHero .bot-btns .tf-btn__spark { width: 15px; height: 15px; flex: 0 0 15px; }
  #homeHero .up2-ai-search { width: 100%; margin-top: 34px; }
  #homeHero .up2-ai-search__title { font-size: clamp(17px, 4.8vw, 21px); line-height: 1.16; letter-spacing: -.25px; }
  #homeHero .up2-ai-search__title-line { white-space: nowrap; }
  #homeHero .up2-ai-search__bar { width: 100%; }
  #homeHero .up2-ai-search__form { min-width: 0; min-height: 66px; gap: 8px; padding: 6px 6px 6px 18px; }
  #homeHero .up2-ai-search__field { min-width: 0; height: 52px; }
  #homeHero .up2-ai-search__spark { display: none; }
  #homeHero .up2-ai-search__input,
  #homeHero .up2-ai-search__ghost { font-size: 13px; text-align: left; }
  #homeHero .up2-ai-search__ghost { justify-content: flex-start; }
  #homeHero .up2-ai-search__input { text-align: left; }
  #homeHero .up2-ai-search__btn { display:grid; flex: 0 0 52px; width:52px; min-width:52px; height:52px; min-height:52px; padding:0; place-items:center; }
  #homeHero .up2-ai-search__btn .icon { width:18px; height:18px; font-size:14px; }
  #homeHero .up2-ai-search__hint { width:100%; align-items: center; padding:10px 14px; font-size: 10px; line-height:1.25; text-align: center; }
  #homeHero .up2-ai-search__hint-dot { margin-top:0; }
  #homeHero .up2-ai-search__suggestions { right:0;left:0;max-height:260px;overflow-y:auto;border-radius:16px; }
  #homeHero .up2-ai-search__suggestion { min-height:54px;padding:9px 12px; }
  #homeHero .up2-ai-search__suggestion strong { font-size:14px; }
  #homeHero .up2-ai-search__suggestion small { font-size:11px; }
  #homeHero .up2-ai-search__suggestion i { display:none; }
  #homeHero .up2-ai-search__suggestion--request { min-height:66px; }
  #homeHero .up2-card[data-sm-hide],
  #homeHero .up2-picto-rain { display: none; }

  .up2-problems-link { margin: -29px 10px -29px; }
  .up2-problems-link__button { width: 100%; min-width: 0; min-height: 58px; padding: 0 10px 0 18px; gap: 10px; font-size: clamp(11px,3.2vw,13px); line-height:1; text-align:center; white-space:nowrap; }
  .up2-problems-link__button > span:first-child { flex:1; min-width:0; }
  .up2-problems-link__arrow { display:grid; flex:0 0 32px; width:32px; height:32px; place-items:center; line-height:1; }

  /* Motion */
  .up2-needs { margin: 8px 0; padding: 7px 0; border-radius: 0; }
  .up2-needs__motion { width: 100%; border-radius: 0; }
  .up2-needs__motion { aspect-ratio: 1 / 1; overflow: hidden; }
  .up2-needs__video {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
    transform: none;
    transform-origin: center;
  }

  /* CTA calendrier */
  .up2-rdv { margin: 8px 0; padding: 68px 14px; }
  .up2-rdv__inner { width: 100%; gap: 48px; }
  .up2-rdv__content { min-width: 0; }
  .up2-rdv h2 { font-size: clamp(32px, 10.5vw, 43px); line-height: .98; }
  .up2-rdv__line-inner { white-space: normal; }
  .up2-rdv__copy { font-size: 15px; }
  .up2-rdv__button { width: 100%; padding: 0 18px; gap: 10px; }
  .up2-rdv__calendar-stage { min-width: 0; }
  .up2-rdv__calendar-ghost { display: none; }
  .up2-rdv__calendar { width: 100%; }
  .up2-rdv__calendar-head { padding-left: 16px; }
  .up2-rdv__calendar h3 { max-width: 210px; font-size: 18px; line-height: 1.2; }
  .up2-rdv__month-grid button { min-width: 0; height: 38px; font-size: 11px; }
  .up2-rdv__slots { grid-template-columns: repeat(2, 1fr); }
  .up2-rdv__slot { min-width: 0; }

  /* Contenus et grilles */
  .section-about-us .row,
  .section-process .row,
  .section-benefits .row { row-gap: 24px; }
  .section-about-us .about-map { min-height: 330px; }
  .section-about-us .review-box,
  .section-about-us .box-quotes,
  .benefits-box,
  .process-card { border-radius: 20px; }
  .section-about-us .box-quotes.up2-brand-statement { min-height: 0; padding: 28px 24px; }
  .section-about-us .up2-brand-statement p { font-size: clamp(24px, 7.5vw, 30px); line-height: 1.22; }
  .toon-team { height: auto; min-height: 720px; }
  .toon-team__ghost { top: 15%; font-size: 28vw; }
  .toon-team__content { max-width: calc(100% - 32px); }

  .section-services .container { width: 100%; }
  .up2-svc { gap: 26px; }
  .up2-svc__intro .heading-title { font-size: 40px; white-space: normal; }
  .up2-svc__cta .tf-btn { width: 100%; justify-content: center; }
  .up2-svc__highlight { align-items: flex-start; margin-top: 20px; padding: 14px; }
  .up2-svc__card { padding: 20px 18px; }

  .up2-case__visit { opacity: 1; transform: none; }
  .up2-featured { margin-top: 30px; padding: 12px; border-radius: 22px; }
  .up2-featured__content { padding: 6px; }
  .up2-featured__stats { grid-template-columns: 1fr; gap: 8px; }
  .up2-featured__stats .up2-case__stat { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; text-align: left; }
  .up2-featured__stats .up2-case__lb { max-width: 55%; margin-top: 0; text-align: right; }
  .up2-featured__actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .up2-featured__actions .up2-case__cta { width: 100%; }
  .up2-featured__link { justify-content: center; min-height: 44px; }

  .process-heading { height: auto !important; }
  .group-btn-slider { display: none; }
  .up2-proc-deck { min-width: 0; }
  .benefits-progress-inner { padding: 20px 16px; }

  /* Pages Rankly secondaires */
  .section-hero.v1 { min-height: 430px; height: auto; }
  .section-hero.v1 .content-wrap { padding: 132px 0 70px; }
  .section-hero.v1 .content-wrap .title,
  .section-hero.v1 .content-wrap .title1 { font-size: clamp(39px, 11vw, 54px); line-height: 1; }
  .section-hero.v1 .content-wrap .text { max-width: 100%; font-size: 15px; }
  .section-contact { padding-inline: 0; }
  .section-contact .contact-image { position: relative; width: 100%; height: 230px; margin-bottom: 34px; }
  .section-contact .contact-image img { width: 100%; height: 100%; object-fit: cover; }
  .section-contact .col-left,
  .section-contact .form-contact { padding: 0; }
  .form-contact { padding: 24px 16px !important; border-radius: 20px; }
  .form-contact input,
  .form-contact textarea,
  .form-contact select { width: 100%; min-height: 52px; }
  .section-content .row { row-gap: 24px; }
  .section-content table { display: block; width: 100%; overflow-x: auto; }

  /* Footer */
  footer.up2-footer { padding-top: 68px; }
  footer.up2-footer .footer-content { padding-inline: 0; }
  footer.up2-footer .footer-content .title { font-size: 27px; }
  footer.up2-footer .tf-social-1 { align-items: stretch; flex-direction: column; gap: 10px; }
  footer.up2-footer .tf-social-1 > a { width: 100%; justify-content: space-between; overflow-wrap: anywhere; }
  footer.up2-footer .footer-bottom { align-items: center; flex-direction: column; gap: 20px; text-align: center; }
  footer.up2-footer .footer-links { justify-content: center; flex-wrap: wrap; gap: 12px 18px !important; }
  footer.up2-footer .action-go-top { justify-content: center !important; }

  /* Les animations hover ne doivent pas déplacer les cartes au toucher. */
  @media (hover: none) {
    .features-item:hover,
    .process-card:hover,
    .featured-works-item:hover,
    .benefits-box:hover,
    .team-item:hover,
    .up2-svc__card:hover { transform: none; }
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .container { max-width: calc(100% - 40px); }
  .flat-spacing { padding-top: 88px; padding-bottom: 88px; }
  .heading-title { font-size: clamp(44px, 7vw, 62px); }
  .up2-rdv__inner { padding-inline: 24px; }
  .section-services .container { width: 100%; }
}
