/* ==========================================================================
   Version mobile (consigne « mobile irréprochable » du 17/10/2026)
   Chargée en DERNIER sur chaque page (pages-source/finitions.py l'ajoute avant </head>) : elle passe donc
   devant les styles propres à chaque bloc. TOUTES les règles sont dans des media queries mobiles
   (≤ 767 px, et ≤ 479 / ≤ 374 px pour les petits écrans) : l'ordinateur et la tablette ne changent pas.
   Aucune couleur de bouton n'est changée ici, seulement des tailles, des largeurs et des marges.
   ========================================================================== */

/* la barre d'analyse n'existe pas au-dessus de 767 px */
.ll-barre-analyse {
  display: none;
}

/* ---------- 1. Vidéo du haut de l'accueil : téléphone, et téléphone en paysage (moins de 500 px de haut) ---------- */
@media screen and (max-width: 767px), screen and (max-width: 991px) and (max-height: 500px) {
  .section.hero .hero-section-wrap {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }

  .section.hero .hero-bg {
    justify-content: flex-start;
    background: #16324c url("../videos/5058453-uhd_3840_2160_25fps_poster.0000000.webp") center / cover no-repeat;
  }

  .section.hero .hero-bg-video {
    position: absolute;
    inset: 0;
    flex: none;
    width: 100%;
    height: 100%;
  }

  .section.hero .hero-bg-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* un léger voile bleu marine sur les 30 % du haut, sans ligne visible (le texte blanc reste lisible) */
  .section.hero .hero-bg-video-gradient-top {
    display: block;
    inset: 0 0 auto;
    height: 30%;
    background-image: linear-gradient(#16324ca6, #16324c59 45%, #16324c00);
  }

  .section.hero .hero-bg-video-gradient-bottom {
    display: none;
  }

}

@media screen and (max-width: 767px) {

  /* ---------- 3. Barre « Recevoir mon analyse gratuite → » (même bouton que sur /analyse/) ---------- */
  .ll-barre-analyse {
    display: block;
    position: fixed;
    right: .75rem;
    bottom: .75rem;
    bottom: calc(.75rem + env(safe-area-inset-bottom));
    left: .75rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
  }

  .ll-barre-analyse.est-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
  }

  .ll-barre-analyse .button {
    width: 100%;
    box-shadow: 0 18px 34px -14px #0b1f33b3;
  }

  .ll-barre-analyse .button-inner {
    justify-content: center;
    width: 100%;
  }

  /* la barre ne cache jamais le bas de la page */
  body:has(#ll-barre-analyse) .footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  /* ---------- 4. Jamais de mot coupé en deux ; titres équilibrés ---------- */
  h1, h2, h3, h4, h5, h6, p, li, a, span, div, dt, dd, label, button, strong, em, blockquote, figcaption {
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: manual;
    hyphens: manual;
  }

  /* une adresse e-mail peut se couper (sinon elle sort de l'écran) */
  a[href^="mailto:"] {
    overflow-wrap: anywhere;
  }

  h1, h2, h3 {
    text-wrap: balance;
  }

  /* cartes « Votre tranquillité d'esprit » : icône 56 px, texte 15 px, cartes de même hauteur */
  .capabilities-data-grid {
    grid-auto-rows: 1fr;
  }

  .capabilities-data {
    gap: .75rem;
    padding: 1rem .875rem;
  }

  .capabilities-data-icon,
  .capabilities-data-icon-wrap .w-embed {
    width: 3.5rem;
    height: 3.5rem;
  }

  /* l'icône est dans un bloc qui a sa taille écrite dans la page (92 px) : on la ramène à celle du cadre */
  .capabilities-data-icon-wrap .w-embed > div {
    width: 100% !important;
    height: 100% !important;
  }

  .capabilities-data-icon-wrap .w-embed svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .capabilities-data-title {
    height: auto;
    font-size: .9375rem;
    line-height: 1.3;
    overflow-wrap: normal;
    word-break: normal;
  }

  /* ---------- 5. Onglets d'offres : titre sur la première ligne, prix ou fréquence en dessous ---------- */
  .ll-tarif-offre-haut {
    flex-flow: column;
    align-items: flex-start;
    gap: .35rem;
  }

  .ll-tarif-offre-nom {
    font-size: 1.05rem;
  }

  .ll-tarif-offre-prix {
    white-space: normal;
  }

  /* ---------- 6. Boutons : une seule règle ---------- */
  /* bouton principal (analyse, appeler) : pleine largeur du contenu, 52 px de haut */
  /* (le bouton a un bord de 2 px et un fond clair : c'est sa hauteur à lui qu'on règle, l'intérieur le remplit) */
  a.button:is([href^="/analyse"], [href*="wa.me/call"]):not(.ll-nav-cta, .ll-nav-mobile-cta, .ll-res-onglet) {
    align-self: stretch;
    width: 100%;
    max-width: none;
    min-height: 3.25rem;
    height: auto;
  }

  a.button:is([href^="/analyse"], [href*="wa.me/call"]):not(.ll-nav-cta, .ll-nav-mobile-cta, .ll-res-onglet) .button-inner {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* bouton secondaire (« … en détail », « Découvrir », « Voir les cas clients »…) : même règle de largeur, 48 px */
  a.button:not([href^="/analyse"], [href*="wa.me/call"], .ll-nav-cta, .ll-nav-mobile-cta, :is(form *)),
  span.button.ll-bouton-carte {
    align-self: stretch;
    width: 100%;
    max-width: none;
    min-height: 3rem;
    height: auto;
  }

  a.button:not([href^="/analyse"], [href*="wa.me/call"], .ll-nav-cta, .ll-nav-mobile-cta, :is(form *)) .button-inner,
  span.button.ll-bouton-carte .button-inner {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* les deux boutons du haut de l'accueil : même style, espacement harmonisé */
  .section.hero .button-wrap {
    gap: .75rem;
  }

  /* ---------- 7. FAQ plus compacte (toutes les FAQ du site) ---------- */
  .faq-list {
    gap: .625rem;
  }

  .faq-item-inner {
    padding: 1.125rem 1rem;
  }

  .faq-item-question {
    margin-top: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
  }

  .faq-item-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .faq-item-icon-icon {
    width: 1.125rem;
    height: 1.125rem;
  }

  .faq-item-top {
    gap: .75rem;
    min-height: 2.75rem;
    cursor: pointer;
  }

  .faq-item-answer,
  .faq-item-answer-text {
    font-size: .9375rem;
    line-height: 1.55;
  }

  .faq-item-answer {
    padding-top: .75rem;
  }

  /* ---------- 8. Cartes empilées de l'accueil : icône à gauche du titre, chaque titre reste visible dans la pile ---------- */
  .ll-strat-carte {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: center;
    column-gap: .875rem;
    row-gap: .75rem;
    padding: 1.1rem 1rem 1.25rem;
    text-align: left;
  }

  .ll-strat-texte {
    display: contents;
  }

  .ll-strat-rond {
    grid-column: 1;
    grid-row: 1;
    width: 3.5rem;
    height: 3.5rem;   /* sans compter sur aspect-ratio (Safari) */
  }

  .ll-strat-rond-coeur svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .ll-strat-titre {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 1.25rem;
  }

  .ll-strat-desc,
  .ll-strat-carte .ll-strat-bouton {
    grid-column: 1 / -1;
    margin: 0;
  }

  .ll-strat-desc {
    font-size: .9375rem;
  }

  /* le haut de chaque carte se cale sous la barre de navigation (73 px) puis 76 px plus bas que la précédente */
  .ll-strat-carte,
  .ll-strat-carte:nth-child(1) { top: 5.25rem; }
  .ll-strat-carte:nth-child(2) { top: 10rem; }
  .ll-strat-carte:nth-child(3) { top: 14.75rem; }
  .ll-strat-carte:nth-child(4) { top: 19.5rem; }

  /* ---------- 9. Textes ---------- */
  /* badge de la vidéo de Tommy : le texte en entier, sur deux lignes si besoin */
  .ll-preuves-nom {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    border-radius: 1rem;
  }

  /* frises d'étapes : l'icône au-dessus du titre, le texte sur toute la largeur, en 15 px */
  .process-item {
    flex-flow: column;
    align-items: flex-start;
    gap: .75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .process-item-block {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
  }

  .process-item-block:has(.process-item-icon-frame) {
    order: 1;
  }

  .process-item-block:has(.process-item-content) {
    order: 2;
  }

  .process-item-content {
    max-width: none;
  }

  .process-item-icon-frame {
    width: 3rem;
    height: 3rem;
  }

  .process-item-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .process-item-desc {
    font-size: .9375rem;
  }

  /* chiffres des cas clients : la grille occupe toute la carte, en colonnes de même largeur (2 ou 3 cases) */
  .ll-res-chiffres {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }

  /* la partie orange des titres de cas clients peut passer à la ligne (elle sortait de la carte en 320 px) */
  .ll-res-titre span {
    white-space: normal;
  }

  /* bas du pied de page : les liens légaux passent sous le logo, centrés, sur toute la largeur */
  .footer-bottom-row-inner {
    flex-wrap: wrap;
    row-gap: .5rem;
  }

  .footer-bottom-row-text.footer-legal-links {
    display: flex;
    justify-content: center;
    order: 3;
    flex-basis: 100%;
    text-align: center;
  }

  /* cartes de l'équipe : même largeur que les autres cartes de la page */
  .team-layout > .team-main {
    align-self: stretch;
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .team-main .div-block-20 {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-card {
    width: 100%;
    max-width: none;
  }

  .team-card .team-card-main,
  .team-card .team-card-name-wrap {
    align-items: flex-start;
  }

  .team-card .team-card-name,
  .team-card .team-card-position,
  .team-card .ll-equipe-deplier-texte,
  .team-card .ll-equipe-suite {
    text-align: left;
  }

  .team-card .ll-equipe-deplier {
    align-self: flex-start;
  }

  /* alignements : titres de section et introductions centrés, contenu des cartes aligné à gauche */
  .team-card,
  .svc-erreur {
    align-items: stretch;
    text-align: left;
  }

  /* ---------- 10. Animations : 300 ms et 12 px au plus, aucune sur les paragraphes ni les boutons ---------- */
  /* animations d'origine Webflow (apparition floue au défilement, 13 blocs) : affichées directement */
  [data-w-id]:is(.heading-layout, .team-main, .process-main, .modal-cta, .faqs-cta, .faq-list, .about-top) {
    opacity: 1 !important;
    filter: none !important;
    -webkit-transform: none !important;
    transform: none !important;
  }

  /* lettres des boutons : visibles tout de suite */
  .button .gsap_split_letter {
    transform: none !important;
  }

  /* apparitions du site (.ll-apparait sur l'accueil, .svc-apparait sur les autres pages) */
  .ll-anim .ll-apparait,
  html.w-mod-js:not(.svc-secours) .svc-apparait:not(.svc-mots) {
    transform: translate3d(0, 12px, 0);
    filter: none;
    transition: opacity .3s ease, transform .3s ease;
  }

  .ll-anim .ll-apparait.est-la,
  html.w-mod-js:not(.svc-secours) .svc-apparait.est-la:not(.svc-mots) {
    transform: none;
  }

  /* un bloc qui contient un paragraphe ou un bouton ne bouge pas */
  .ll-anim .ll-apparait:is(p, .button, :has(p, .button)),
  html.w-mod-js:not(.svc-secours) .svc-apparait:not(.svc-mots):is(p, .button, :has(p, .button)) {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* les grands titres arrivent d'un coup (plus de mots qui montent un par un pendant 1 s) */
  html.w-mod-js .svc-mots .svc-w > span {
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- 6. Boutons sur une ligne et zones tactiles de 44 × 44 px : téléphone, et téléphone en paysage ---------- */
@media screen and (max-width: 767px), screen and (max-width: 991px) and (max-height: 500px) {
  /* tous les boutons : texte sur une ligne, centré, flèche collée au texte */
  .button:not(:is(form *)) .button-inner {
    justify-content: center;
    gap: .375rem;
    padding-left: .875rem;
    padding-right: .875rem;
  }

  .button:not(:is(form *)) .button-text {
    font-size: 1rem;
    white-space: nowrap;
  }

  .button:not(:is(form *)) .button-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* zones tactiles d'au moins 44 × 44 px (seule la taille change, pas l'apparence) */
  .ll-res-onglet,
  #team-section .ll-equipe-deplier,
  .svc-eligible-page,
  .ll-appel-contact,
  .ll-preuves-son,
  .footer-social-link {
    min-height: 2.75rem;
  }

  .ll-nav-logo,
  .svc-pb-lien,
  .ctx-info-value,
  .blogx-back,
  .blogx-toc a,
  .blogx-authorcard-sources a,
  .lg-sommaire a,
  .footer-legal-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  /* liens du pied de page : une ligne de 44 px chacun, 8 px d'écart */
  .ll-pied-colonne {
    gap: .5rem;
  }

  .ll-pied-colonne .footer-link {
    display: flex;
    align-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .footer-legal-links {
    flex-wrap: wrap;
    column-gap: 1rem;
    row-gap: 0;
  }

  /* petits liens au fil d'une carte : la zone tactile grandit, la mise en page ne bouge pas */
  .ll-hero-carte-duo a,
  .lg-ligne dd a {
    display: inline-block;
    padding-top: .75rem;
    padding-bottom: .75rem;
    margin-top: -.75rem;
    margin-bottom: -.75rem;
  }

  .svc-planb-lien,
  .an .an-retour {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .svc .svc-planb-metiers a,
  .blogx-table-wrap td a {
    display: inline-block;
    padding-top: .85rem;
    padding-bottom: .85rem;
    margin-top: -.85rem;
    margin-bottom: -.85rem;
  }

  /* date des articles : elle peut passer à la ligne (elle sortait de l'écran en 320 px) */
  .blogx-date {
    white-space: normal;
  }

  /* carte des auteurs du blog : une seule colonne qui ne dépasse plus de la carte */
  .blogx-authorcard {
    grid-template-columns: minmax(0, 1fr);
  }

  /* une adresse internet affichée en entier peut passer à la ligne (sinon elle sort de la carte) */
  .lg-carte a {
    overflow-wrap: anywhere;
  }

  .lg-carte a[href="https://www.netlify.com/support/"] {
    font-size: .875em;
  }

}

/* ---------- téléphone en paysage : cartes « Votre tranquillité d'esprit » plus compactes, texte entier ---------- */
@media screen and (min-width: 768px) and (max-width: 991px) and (max-height: 500px) {
  .capabilities-data {
    padding: 1rem .875rem;
  }

  .capabilities-data-title {
    height: auto;
    font-size: .9375rem;
    line-height: 1.3;
  }
}

/* ---------- téléphones : les 4 cartes « Votre tranquillité d'esprit » sur une colonne, icône à gauche ---------- */
@media screen and (max-width: 479px) {
  .capabilities-data-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
  }

  .capabilities-data {
    flex-flow: row;
    align-items: center;
    gap: 1rem;
    padding: .875rem 1.125rem;
    text-align: left;
  }

  .capabilities-data-icon-wrap {
    flex: none;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
  }

  .capabilities-data-title {
    flex: 1;
  }

  /* chiffres des articles du blog (« 2 ans / d'emprisonnement ») : une case par ligne, rien ne dépasse */
  .blogx-richtext .blogx-chiffres {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- petits écrans : le texte du bouton passe en 15 px pour tenir sur une ligne ---------- */
@media screen and (max-width: 374px) {
  /* trois chiffres côte à côte : un peu moins de marge pour que les mots longs tiennent */
  .ll-res-chiffres {
    grid-template-columns: minmax(0, 1fr);
  }

  .ll-res-chiffre {
    flex-flow: row;
    align-items: baseline;
    gap: .6rem;
  }

  .button:not(:is(form *)) .button-text {
    font-size: .9375rem;
  }
}

/* ---------- réduire les animations : rien ne bouge ---------- */
@media screen and (max-width: 767px) and (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .ll-anim .ll-apparait,
  html.w-mod-js:not(.svc-secours) .svc-apparait:not(.svc-mots) {
    opacity: 1;
    transform: none;
  }
}
