/* Libratis : adaptations de la maquette au balisage des blocs WordPress.
   Les feuilles fonts, tokens, bundle et site sont celles de la maquette, sans modification.
   Ici, uniquement ce qui change parce qu'un élément de la maquette est devenu un bloc. */

/* Paragraphes qui remplacent un élément en ligne ou une définition : ils ne prennent pas la mesure du texte courant. */
.site p.skip, .site p.brand, .cta-row > p, .need p, .pub p, .cas__rows p, .site p.lb-badge { max-width: none; text-wrap: wrap; }

/* Lien d'évitement : le bloc est un paragraphe qui contient le lien */
.skip:focus-within { transform: none; outline: 3px solid var(--focus); outline-offset: 3px; }
.site .skip a { color: var(--ink-inverse); }
.site .skip a:focus-visible { outline: none; }

/* Marque : bloc Titre du site */
.site .brand a { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; text-decoration: none; }

/* Boutons : le bloc Bouton enveloppe le lien. Les styles du lien sont dans boutons.css. */
.site .wpb .wp-block-button__link { box-sizing: border-box; word-break: normal; }
.site .hd__cta .wpb .wp-block-button__link { font-size: 1rem; }
/* Le bloc Boutons est un conteneur flex de WordPress : on rétablit son masquage sur petit écran. */
.site .hd__cta { display: none; }
.band > .wp-block-buttons { justify-self: start; }
.menu .wp-block-buttons { margin-top: 1.75rem; }
.menu .wp-block-button, .site .menu .wpb .wp-block-button__link { width: 100%; }
@container pg (min-width: 64rem) { .band > .wp-block-buttons { justify-self: end; } .site .hd__cta { display: inline-flex; } }

/* Lien secondaire à côté du bouton : paragraphe qui contient le lien */
.cta-row > p { display: flex; }
.site .act-hero .link-ink a { color: var(--ink); }

/* Lignes de situation : la carte est un groupe, le lien porte sur le nom de l'activité et couvre la carte */
.need { position: relative; }
.site .need__name a { color: inherit; text-decoration: none; }
.site .need__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.site .need__name a:focus-visible { outline: none; }
.need:has(.need__name a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.need::before { content: ""; grid-area: shape; width: 3rem; height: 3rem; background: var(--surface-raised); }
.need--web::before { border-radius: 50%; }
.need--automation::before { border-radius: 50% 50% 8% 8% / 50% 50% 8% 8%; }
.need--ai::before { border-radius: 999px; }
.need--audit::before { border-radius: 26%; }
.need::after { content: ""; grid-area: arrow; width: 1.5rem; height: 1.5rem; background: var(--ink); -webkit-mask: var(--icone-fleche) center / contain no-repeat; mask: var(--icone-fleche) center / contain no-repeat; transition: transform 0.22s var(--ease-out); }
.need:hover::after { transform: translateX(4px); }
.need__text::before { content: ""; position: absolute; left: 1.125rem; top: 50%; width: 3rem; height: 3rem; transform: translateY(-50%); background: var(--ink); -webkit-mask: var(--icone) center / 52% 52% no-repeat; mask: var(--icone) center / 52% 52% no-repeat; pointer-events: none; }
.need--web, .act-hero--web { --icone: var(--icone-web); }
.need--automation, .act-hero--automation { --icone: var(--icone-automation); }
.need--ai, .act-hero--ai { --icone: var(--icone-ai); }
.need--audit, .act-hero { --icone: var(--icone-audit); }
.act-hero--web { --icone: var(--icone-web); }
.act-hero--automation { --icone: var(--icone-automation); }
.act-hero--ai { --icone: var(--icone-ai); }
@container pg (min-width: 64rem) {
  .need::before, .need__text::before { width: 3.5rem; height: 3.5rem; }
  .need__text::before { left: 1.75rem; }
  .top .need__text::before { left: 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .needs .need::before { animation: lb-settle 0.6s var(--ease-out) both; }
  .needs > .need:nth-child(1) { animation-delay: 0.15s; } .needs > .need:nth-child(2) { animation-delay: 0.24s; } .needs > .need:nth-child(3) { animation-delay: 0.33s; } .needs > .need:nth-child(4) { animation-delay: 0.42s; }
  .needs > .need:nth-child(1)::before { animation-delay: 0.45s; } .needs > .need:nth-child(2)::before { animation-delay: 0.54s; } .needs > .need:nth-child(3)::before { animation-delay: 0.63s; } .needs > .need:nth-child(4)::before { animation-delay: 0.72s; }
  .act-hero.a-forme::before { animation: lb-settle 0.8s var(--ease-out) both; animation-delay: 0.2s; }
}

/* En-tête d'activité : la forme et son icône sont dessinées par la section */
.act-hero.a-forme::before { content: ""; display: block; width: 4rem; height: 4rem; margin-bottom: 1.5rem; border-radius: 26%; background: var(--surface-raised); }
.act-hero--web.a-forme::before { border-radius: 50%; }
.act-hero--automation.a-forme::before { border-radius: 50% 50% 8% 8% / 50% 50% 8% 8%; }
.act-hero--ai.a-forme::before { border-radius: 999px; }
.act-hero.a-forme::after { content: ""; position: absolute; left: 1.5rem; top: 2rem; width: 4rem; height: 4rem; background: var(--ink); -webkit-mask: var(--icone) center / 52% 52% no-repeat; mask: var(--icone) center / 52% 52% no-repeat; pointer-events: none; }
@container pg (min-width: 64rem) {
  .act-hero.a-forme::before, .act-hero.a-forme::after { position: absolute; left: auto; top: auto; right: 4rem; bottom: 4rem; width: 11rem; height: 11rem; margin: 0; }
}

/* Définitions devenues titre et paragraphe */
.pub h3 { font: 600 1.25rem/1.3 var(--font-display); text-wrap: wrap; }
.pub p { margin-top: 0.375rem; max-width: 42ch; }
.cas h4 { margin: 0; font: 600 1rem/1.5 var(--font-display); color: var(--ink); text-wrap: wrap; }
.cas__rows p { margin: 0.125rem 0 0; max-width: 42ch; }

/* Champ piège du formulaire : hors écran, hors tabulation */
.lb-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Page de confirmation : pas de bouton principal, y compris dans le panneau mobile */
.libratis-confirmation .menu .wpb--primary .wp-block-button__link { background: var(--surface-raised); border-color: var(--line-strong); color: var(--ink); }
.libratis-confirmation .menu .wpb--primary .wp-block-button__link:hover { background: var(--surface-sunken); border-color: var(--ink-muted); color: var(--ink); }

/* Contraste renforcé et couleurs forcées : mêmes garanties que la maquette */
@media (forced-colors: active) {
  .need::before, .act-hero.a-forme::before { forced-color-adjust: none; background: CanvasText; }
  .need__text::before, .act-hero.a-forme::after { forced-color-adjust: none; background: Canvas; }
  .need::after { forced-color-adjust: none; background: CanvasText; }
}

/* Option Contact Form 7 : mêmes champs que le formulaire maison */
.wpcf7-form-control-wrap { display: block; }
.wpcf7-spinner { display: none; }
.wpcf7-not-valid-tip { display: block; margin-top: 0.375rem; color: var(--danger-fg); font-size: 1rem; line-height: 1.5; font-weight: 600; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 1.25rem 1.5rem; border: 2px solid var(--danger-fg); border-radius: var(--radius-lg); background: var(--surface-raised); }

/* Enveloppes ajoutées par WordPress : elles ne doivent rien changer à la mise en page */
.site .wp-block-post-content { display: block; }
.projet-grid.wp-block-post-template { max-width: none; }
