/* Page Contact 2026 : sections (hero, références, collections, brochure, art de faire, formulaire).
   Chargé après varela.css, seulement sur la page Contact 2026. Aucun CSS dans Elementor : les réglages natifs
   posent tailles, couleurs et marges ; ce fichier couvre ce qu'ils ne savent pas faire (voile en trois paliers,
   photo des cartes, ordre des items) et reprend la main sur les !important de varela.css (titres h1 à h3,
   boutons, tailles de texte).
   Version sobre : pas de mise en page propre à la tablette, les règles mobiles valent jusqu'à 1024 px ;
   cartes des collections identiques et sans zoom (slider jusqu'à 1024 px), ombre sous la couverture. Version complète : tag git
   contact-2026-riche (tools/contact_version.py).
   Classes : vd-contact-* posées sur les conteneurs et widgets. */

/* ---------- Titres : varela.css impose h1 44 px, h2 30 px, h3 22 px en !important ---------- */

body.vd-refonte .elementor-widget.vd-contact-h1 h1.elementor-heading-title {
  font-size: 60px !important; line-height: 1.08 !important; font-weight: 400 !important; letter-spacing: .08em !important; color: #fff !important;
}
body.vd-refonte .elementor-widget.vd-contact-h2--l h2.elementor-heading-title {
  font-size: 44px !important; line-height: 1.1 !important; letter-spacing: .12em !important;
}
body.vd-refonte .elementor-widget.vd-contact-h2--xl h2.elementor-heading-title {
  font-size: 72px !important; line-height: 1 !important; font-weight: 300 !important; letter-spacing: .06em !important;
}
body.vd-refonte .vd-contact-art .elementor-widget.vd-contact-h2--l h2.elementor-heading-title { color: #fff !important; }
body.vd-refonte .elementor-widget.vd-contact-nom h3.elementor-heading-title {
  font-size: 16px !important; line-height: 1.3 !important; font-weight: 500 !important; letter-spacing: .16em !important; color: #fff !important;
}
body.vd-refonte .elementor-widget.vd-contact-nom--opus h3.elementor-heading-title {
  font-size: 44px !important; line-height: 1 !important; font-weight: 400 !important;
}
body.vd-refonte .elementor-widget.vd-contact-item__titre h3.elementor-heading-title {
  font-size: 14px !important; line-height: 1.3 !important; font-weight: 500 !important; letter-spacing: .16em !important; color: #fff !important;
}

/* ---------- Boutons : angles droits, 55 px, flèche ; variantes blanc et contour ---------- */

body.vd-refonte .elementor-widget.vd-contact-bouton .elementor-button { min-height: 55px; padding: 0 30px !important; gap: 0; }
body.vd-refonte .elementor-widget.vd-contact-bouton .vd-fleche { display: inline-block; margin-left: 12px; font-size: 13px; }
body.vd-refonte .elementor-widget.vd-contact-bouton--blanc .elementor-button { background: #fff !important; border-color: #fff !important; color: #1a1a1a !important; }
body.vd-refonte .elementor-widget.vd-contact-bouton--blanc .elementor-button:hover { background: transparent !important; color: #fff !important; }
body.vd-refonte .elementor-widget.vd-contact-bouton--contour .elementor-button { background: transparent !important; border-color: #fff !important; color: #fff !important; }
body.vd-refonte .elementor-widget.vd-contact-bouton--contour .elementor-button:hover { background: #fff !important; color: #1a1a1a !important; }

/* ---------- Texte courant porté par un titre « p » ---------- */

body.vd-refonte .vd-contact-texte .elementor-heading-title { text-transform: none; }

/* ---------- 1. Hero : voile réglé dans Elementor (ordinateur : noir plein puis fondu vers la photo ; jusqu'à 1024 px : voile vertical) ---------- */

.vd-contact-hero.e-con::before {
  background-color: transparent;
  opacity: 1;
}
.vd-contact-hero.e-con { overflow: hidden; }
.vd-contact-hero > .elementor-widget, .vd-contact-hero > .e-con { position: relative; z-index: 1; }

/* ---------- 2. Références : cases de 218 x 112, filet en haut, logo centré ---------- */

.vd-contact-logos { align-items: stretch; }
.vd-contact-logo > .elementor-widget-image { max-width: 100%; }
.vd-contact-logo img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

/* ---------- 3. Collections ---------- */

/* Cartes : photo (widget Image) tendue sous le voile Elementor (::before), nom au-dessus. */
.vd-contact-carte { position: relative; isolation: isolate; overflow: hidden; }
.vd-contact-carte::before { z-index: 1; }
.vd-contact-carte > .vd-contact-carte__media { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; margin: 0; }
.vd-contact-carte__media .elementor-widget-container { height: 100%; }
.vd-contact-carte__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vd-contact-carte > .elementor-widget:not(.vd-contact-carte__media) { position: relative; z-index: 2; }

/* Jusqu'à 1024 px : slider horizontal des six cartes (maquette mobile d'Echo). Une carte par écran et la suivante
   qui dépasse ; deux et la suivante en tablette. La grille Elementor passe sur une seule rangée qui défile, collée
   aux bords de l'écran (la section a 24 px de marge). Pagination à six filets posée par contact.js. */
.vd-contact-pagination { display: none; }
@media (max-width: 1024px) {
  .vd-contact-grille.e-grid {
    position: relative;
    grid-template-columns: none !important; grid-template-rows: none !important;
    grid-auto-flow: column !important; grid-auto-columns: calc(100% - 56px);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    /* Elementor fixe la largeur du conteneur à 100 % : on l'élargit des deux marges de la section. */
    width: calc(100% + 48px) !important; max-width: none !important;
    margin: 0 -24px !important; padding: 0 24px; scroll-padding: 0 24px;
  }
  .vd-contact-grille.e-grid::-webkit-scrollbar { display: none; }
  .vd-contact-grille > .vd-contact-carte { scroll-snap-align: start; min-width: 0; }
  .vd-contact-grille.e-grid:focus-visible { outline: 1px solid var(--vd-noir); outline-offset: 4px; }

  .vd-contact-pagination { display: flex; gap: 8px; margin-top: -8px; }
  .vd-contact-pagination button {
    appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 32px; height: 24px; padding: 11px 0;
    margin: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer;
  }
  .vd-contact-pagination button::before {
    content: ""; display: block; height: 2px; background: var(--vd-filet); transition: background-color .3s;
  }
  .vd-contact-pagination button[aria-current="true"]::before { background: var(--vd-noir); }
  .vd-contact-pagination button:focus-visible { outline: 1px solid var(--vd-noir); outline-offset: 2px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .vd-contact-grille.e-grid { grid-auto-columns: calc(50% - 36px); }
}
@media (prefers-reduced-motion: reduce) {
  .vd-contact-pagination button::before { transition: none; }
}
/* ---------- 4. Brochure : ombre portée sous la couverture (valeurs de la version complète), plus légère jusqu'à 1024 px ---------- */

.vd-contact-couverture img { box-shadow: 0 24px 48px rgba(0, 0, 0, .28); }
@media (max-width: 1024px) {
  .vd-contact-couverture img { box-shadow: 0 16px 32px rgba(0, 0, 0, .28); }
}

/* ---------- 5. L'art de faire : photo en pleine hauteur, items en tête de filet sur mobile ---------- */

.vd-contact-art__photo { position: relative; overflow: hidden; }
.vd-contact-art__photo > .vd-contact-art__image { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.vd-contact-art__image .elementor-widget-container { height: 100%; }
.vd-contact-art__image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.vd-contact-item > .elementor-widget { min-width: 0; }
@media (max-width: 1024px) {
  .vd-contact-art__photo { min-height: 432px; }
  .vd-contact-art__image img { object-position: 50% 34%; }
  /* Mobile : filet en haut, puis « 01   Signature » sur une ligne, puis le texte. */
  .vd-contact-item.e-con { gap: 10px 16px; }
  .vd-contact-item__filet.e-con { order: -1; flex: 0 0 100%; margin-bottom: 6px; background: #736C6B !important; /* brun éclairci (30 % de blanc) */ }
  .vd-contact-item__texte { flex: 0 0 100%; }
  body.vd-refonte .vd-contact-item__numero .elementor-heading-title { color: #fff !important; font-size: 13px !important; letter-spacing: .14em !important; }
  body.vd-refonte .elementor-widget.vd-contact-item__titre h3.elementor-heading-title { font-size: 13px !important; letter-spacing: .14em !important; }
}

/* ---------- 6. Formulaire : ancre, grille texte et carte ---------- */

.vd-contact-formulaire { scroll-margin-top: 96px; }
@media (max-width: 1024px) { .vd-contact-formulaire { scroll-margin-top: 72px; } }
.vd-contact-formulaire__grille { align-items: start; }
.vd-contact-formulaire__carte { min-width: 0; }

/* ---------- Mobile et tablette (jusqu'à 1024) ---------- */

@media (max-width: 1024px) {
  body.vd-refonte .elementor-widget.vd-contact-h2 h2.elementor-heading-title { font-size: 24px !important; line-height: 1.12 !important; letter-spacing: .1em !important; }
  body.vd-refonte .elementor-widget.vd-contact-h1 h1.elementor-heading-title { font-size: 34px !important; line-height: 1.1 !important; letter-spacing: .06em !important; }
  body.vd-refonte .elementor-widget.vd-contact-h2--l h2.elementor-heading-title { font-size: 28px !important; line-height: 1.12 !important; letter-spacing: .1em !important; }
  body.vd-refonte .elementor-widget.vd-contact-h2--xl h2.elementor-heading-title { font-size: 44px !important; letter-spacing: .04em !important; }
  body.vd-refonte .elementor-widget.vd-contact-nom h3.elementor-heading-title { font-size: 14px !important; }
  body.vd-refonte .elementor-widget.vd-contact-nom--opus h3.elementor-heading-title { font-size: 34px !important; }
  body.vd-refonte .elementor-widget.vd-contact-bouton .elementor-button { min-height: 52px; width: 100%; padding: 0 12px !important; font-size: 11px !important; letter-spacing: .14em !important; white-space: nowrap; }
  body.vd-refonte .elementor-widget.vd-contact-bouton .vd-fleche { margin-left: 8px; font-size: 12px; }
}

/* Bureau : les conteneurs à largeur fixe ne rétrécissent pas dans leur rangée. */
@media (min-width: 1025px) {
  .vd-contact-art__photo.e-con { flex: 0 0 600px; }
  .vd-contact-brochure__visuel.e-con { flex: 0 0 640px; }
  .vd-contact-logos.e-con { flex: 0 0 872px; }
}
