/* Shared responsive layout for all PayPos pages. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.x {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
}

.in,
.x > * {
  min-width: 0;
}

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

img,
video {
  height: auto;
}

@media (max-width: 1024px) {
  .in {
    padding-left: clamp(20px, 4vw, 36px);
    padding-right: clamp(20px, 4vw, 36px);
  }

  .sec {
    padding-top: clamp(64px, 8vw, 80px);
    padding-bottom: clamp(64px, 8vw, 80px);
  }

  .hin {
    gap: clamp(24px, 4vw, 40px);
  }

  .hl h1,
  .hero h1 {
    font-size: clamp(38px, 5.2vw, 52px);
  }

  .h2,
  h2 {
    font-size: clamp(32px, 4.2vw, 42px);
  }

  .bar {
    gap: 8px;
  }

  .nl a {
    padding: 9px 10px;
    font-size: 13px;
  }

  .cta {
    padding-right: 18px;
    padding-left: 18px;
  }

  .ap-kg,
  .blg,
  .bg,
  .bento,
  .sg2,
  .sxg,
  .syg,
  .ps-g,
  .mp-g,
  .wyg,
  .lg-k,
  .cs,
  .g5t,
  .g3t,
  .g3b {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  .x > .hl {
    min-height: 0 !important;
  }

  .x > .hl > .in {
    padding-top: 148px;
    padding-bottom: 48px;
  }

  .hin {
    flex-direction: column;
    align-items: stretch;
    padding-top: 132px;
    padding-bottom: 60px;
  }

  .hin > *,
  .hl,
  .hr {
    min-width: 0;
    max-width: 100%;
  }

  .hl,
  .hr {
    flex-basis: auto;
    width: 100%;
  }

  .hr {
    min-height: clamp(260px, 68vw, 420px);
  }

  .pa-w,
  .stw,
  .hw,
  .st1-w,
  .st2-w,
  .dz-w,
  .lg-w,
  .sa {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pa-w,
  .stw,
  .hw,
  .st1-w,
  .st2-w,
  .dz-w,
  .lg-w {
    gap: 28px;
  }

  .sr {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
    gap: 12px;
  }

  .sr > :last-child {
    grid-column: 2 / -1;
  }

  .tbl {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .in {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  .sec {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .top {
    top: 0;
  }

  .top > .in {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .top .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand action"
      "navigation navigation";
    gap: 8px 12px;
    width: 100%;
    padding: 10px 16px !important;
    border-radius: 0 !important;
  }

  .top .brandpill {
    grid-area: brand;
    justify-self: start;
  }

  .top .brandpill img {
    max-width: min(38vw, 150px);
    height: auto;
    max-height: 38px;
  }

  .top .nl {
    display: flex !important;
    grid-area: navigation;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .top .nl a {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .top .cta {
    grid-area: action;
    min-height: 40px;
    padding-right: 14px;
    padding-left: 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero {
    min-height: 0 !important;
  }

  .hero .hin {
    padding-top: 148px;
    padding-bottom: 48px;
  }

  .x > .hl {
    min-height: 0 !important;
    padding-bottom: 40px;
  }

  .hl h1,
  .hero h1,
  .x > .hl h1 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .hl p,
  .lead {
    font-size: 16px;
    line-height: 1.6;
  }

  .h2,
  h2 {
    font-size: clamp(26px, 7.5vw, 34px);
    line-height: 1.12;
  }

  .band {
    padding: 28px 20px !important;
    border-radius: 24px;
  }

  .band > *,
  .hero .cta,
  .hero .ghostw {
    max-width: 100%;
  }

  .hero .cta,
  .hero .ghostw {
    min-height: 48px;
    padding-right: 18px;
    padding-left: 18px;
    font-size: 14px;
  }

  .ap-kg,
  .blg,
  .bg,
  .bento,
  .sg2,
  .sxg,
  .syg,
  .ps-g,
  .mp-g,
  .wyg,
  .lg-k,
  .cs,
  .g5t,
  .g3t,
  .g3b,
  .pa-w,
  .stw,
  .hw,
  .st1-w,
  .st2-w,
  .dz-w,
  .lg-w,
  .sa,
  .bn-top,
  .pf-g,
  .pc-g,
  .au-g,
  .tv-f,
  .pk-g,
  .st2-g,
  .hsl,
  .ph-q,
  .slg {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .ap-st,
  .mp-g {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sg2 > *,
  .sxg > *,
  .syg > * {
    grid-column: auto !important;
  }

  .tbl table {
    min-width: 560px;
  }

  .card,
  .tile,
  .step,
  .sy,
  .sx {
    min-width: 0;
  }

  .x > .foot {
    margin-top: 36px;
  }
}

@media (max-width: 380px) {
  .top .bar {
    gap: 6px 8px;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .top .nl a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .top .cta {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 11px;
  }
}

/* ------------------------------------------------------------------
   Accueil · ajustements tablette & mobile
   (les styles inline de index.html imposent des !important)
   ------------------------------------------------------------------ */
.top .bar {
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  /* Hero */
  .x > .hl h1 {
    font-size: clamp(44px, 7vw, 64px) !important;
  }

  .x > .hl > .in {
    padding-bottom: 72px !important;
  }

  /* Références : mosaïque alignée sur la grille du site */
  .rq-w {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding-right: clamp(20px, 4vw, 36px);
    padding-left: clamp(20px, 4vw, 36px);
    box-sizing: border-box;
  }

  .rq-stat {
    max-width: 100%;
  }

  /* Footer : 2 colonnes équilibrées */
  .x > .foot > .in {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  /* Header : logo + RDV sur la 1re ligne, menu défilant dessous */
  .top .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand action"
      "navigation navigation";
    gap: 8px 12px;
    width: 100%;
    min-height: 0;
    padding: 10px clamp(16px, 4vw, 36px) !important;
  }

  .top .brandpill {
    grid-area: brand;
    justify-self: start;
  }

  .top .cta {
    grid-area: action;
    white-space: nowrap;
  }

  .top .nl {
    display: flex !important;
    grid-area: navigation;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .top .nl::-webkit-scrollbar {
    display: none;
  }

  .top .nl a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  /* Voile du hero plus couvrant : le texte passe sur toute la largeur */
  .x > .hl > div[aria-hidden="true"] {
    background: linear-gradient(
      180deg,
      rgba(245, 249, 253, 0.93),
      rgba(245, 249, 253, 0.82) 60%,
      rgba(234, 243, 251, 0.95)
    ) !important;
  }

  /* Bloc témoignage + « Un projet ? » */
  .cta-band {
    padding: 44px 28px !important;
    border-radius: 26px !important;
    gap: 28px !important;
  }

  .cta-band > div {
    flex: 1 1 100% !important;
  }

  .cta-band p:first-of-type {
    font-size: 16px !important;
  }

  .cta-band h3 {
    font-size: 26px !important;
  }

  .cta-band .cta,
  .cta-band .wa {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  .x > .hl h1 {
    font-size: clamp(32px, 9.6vw, 42px) !important;
    line-height: 1.08 !important;
    overflow-wrap: normal;
    hyphens: manual;
  }

  .x > .hl p {
    font-size: 16px !important;
  }

  .x > .hl > .in {
    padding-bottom: 48px !important;
  }

  /* Menu : fondu à droite pour signaler qu'il défile */
  .top .nl {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }

  .rq-w {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding-right: 16px;
    padding-left: 16px;
  }

  .rq-i {
    height: 72px !important;
    padding: 8px !important;
    border-radius: 16px !important;
  }

  .rq-stat b {
    font-size: 32px;
  }

  .x > .foot > .in {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .cta-band {
    padding: 36px 20px !important;
  }
}

/* Accueil · « Notre valeur ajoutée » : 2×2 sur tablette (évite une carte orpheline) */
@media (min-width: 641px) and (max-width: 1024px) {
  .va-g {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Accueil · menu en liste déroulante sur mobile */
.nav-sel {
  display: none;
}

@media (max-width: 640px) {
  .top .bar:has(.nav-sel) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand select action";
    align-items: center;
    gap: 8px;
  }

  .top .bar .nav-sel + .nl {
    display: none !important;
  }

  .top .nav-sel {
    display: block;
    grid-area: select;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    max-width: 150px;
    height: 36px;
    padding: 0 28px 0 12px;
    border: 1px solid #cfe2f3;
    border-radius: 999px;
    background: #fff
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230a1f3c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat right 12px center;
    color: #0a1f3c;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
  }

  .top .brandpill {
    padding: 4px 6px;
  }

  .top .brandpill img {
    max-height: 30px;
  }

  /* Bouton RDV plus compact */
  .top .bar .cta {
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    gap: 6px;
    box-shadow: 0 6px 16px rgba(53, 145, 214, 0.3);
  }
}

/* ------------------------------------------------------------------
   Solutions · tablette & mobile
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  /* Catalogue : 1 grande carte + 2×2 (corrige la colonne fantôme du span) */
  .cs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .cs > .cs-c {
    grid-column: auto !important;
    height: 300px !important;
  }

  .cs > .cs-c.cs-big {
    grid-column: 1 / -1 !important;
    height: 340px !important;
  }

  /* Texte lisible sur les photos claires */
  .cs-c::after {
    background: linear-gradient(
      180deg,
      rgba(6, 20, 40, 0.1) 10%,
      rgba(6, 20, 40, 0.92) 100%
    ) !important;
  }
}

@media (max-width: 900px) {
  /* Barre du haut : le bandeau suit la hauteur réelle du header */
  .hero.sm {
    height: auto !important;
    min-height: 0 !important;
  }

  .hero.sm .top {
    position: relative;
  }
}

@media (max-width: 640px) {
  .cs > .cs-c,
  .cs > .cs-c.cs-big {
    grid-column: 1 / -1 !important;
    height: 280px !important;
  }

  .cs-b {
    padding: 18px 20px 20px;
  }

  .cs-b h3 {
    font-size: 21px;
  }

  .cs-b p {
    font-size: 14px;
  }

  .cs-t {
    left: 16px;
    top: 16px;
  }

  #liste {
    padding-top: 48px;
  }

  /* Bandeau « Quelle solution pour votre projet ? » */
  .band h2 {
    font-size: 24px !important;
  }

  .band p {
    font-size: 15px !important;
  }

  .band .cta,
  .band .wa {
    flex: 1 1 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .x > section:has(> .in > .band) {
    padding-bottom: 56px !important;
  }
}

/* ------------------------------------------------------------------
   Secteurs · tablette & mobile
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  /* Photo du haut moins haute, badge « 11 secteurs » lisible */
  .hin > .hr {
    min-height: 0 !important;
  }

  .hin > .hr > .photo {
    aspect-ratio: 16 / 9 !important;
  }

  .hin > .hr > .glass {
    left: 14px !important;
    bottom: 14px !important;
    background: rgba(10, 31, 60, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .itile {
    height: 160px !important;
  }
}

@media (max-width: 640px) {
  .hin > .hr > .photo {
    aspect-ratio: 4 / 3 !important;
  }

  .hin > .hr > .glass {
    padding: 10px 14px !important;
  }

  .hin > .hr > .glass > div:first-child {
    font-size: 22px !important;
  }

  /* Cartes secteur compactes : icône à gauche, texte à droite */
  #liste .sc {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 6px;
    align-items: start;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e3edf7;
    box-shadow: 0 8px 24px rgba(10, 31, 60, 0.05);
  }

  #liste .sc .itile {
    grid-row: 1 / span 3;
    width: 64px;
    height: 64px !important;
    border: 0 !important;
    border-radius: 18px;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
  }

  #liste .sc .itile .ibox {
    width: 60px;
    height: 60px;
    border-radius: 18px !important;
  }

  #liste .sc .itile .ibox svg {
    width: 34px;
    height: 34px;
  }

  #liste .sc h3 {
    font-size: 17px;
    line-height: 1.3;
  }

  #liste .sc p {
    font-size: 13.5px;
  }

  #liste .sc > span {
    font-size: 13px !important;
  }

  #liste .in > div {
    gap: 12px !important;
  }
}

/* Héros empilés (mobile) : la base flex ne doit pas devenir une hauteur */
@media (max-width: 760px) {
  .hin > .hl,
  .hin > .hr {
    flex: 0 0 auto !important;
  }
}

/* Header mobile : place pour « Recrutement » / « Rendez-vous » dans la liste */
@media (max-width: 640px) {
  .top .bar:has(.nav-sel) {
    gap: 6px;
  }

  .top .bar:has(.nav-sel) .brandpill img {
    max-height: 26px;
  }

  .top .nav-sel {
    max-width: none;
    padding: 0 26px 0 10px;
    font-size: 12.5px;
    background-position: right 10px center;
    text-overflow: ellipsis;
  }

  .top .bar .cta {
    padding: 0 10px !important;
    font-size: 11.5px !important;
  }
}

/* Badges vitrés posés sur les photos des héros : fond sombre lisible */
@media (max-width: 1024px) {
  .hin > .hr > .glass {
    background: rgba(10, 31, 60, 0.72) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

/* Héros des pages internes : la navbar est dans le flux sous 900px,
   inutile de réserver sa hauteur au-dessus du texte */
@media (max-width: 900px) {
  .hero.sm .hin {
    padding-top: 40px !important;
  }
}

@media (max-width: 640px) {
  .hero.sm .hin {
    padding-top: 28px !important;
  }
}
