/* Lot 3 : pages DAF (231 daf, 232 daf-ec, 233 daf-tp), archive et fiche des cas clients */

/* ---------- Hero des pages DAF : encart d'information resserré ---------- */
:is(.page-id-231, .page-id-232, .page-id-233) .dp-hero-info.e-con { gap: 10px !important; }
:is(.page-id-231, .page-id-232, .page-id-233) .dp-hero-info p { margin: 0; }
:is(.page-id-231, .page-id-232, .page-id-233) .dp-hero-info .elementor-widget-text-editor p { line-height: 1.5; }

/* daf-ec et daf-tp : hero de 560 px, bouton à 22 px du sous-titre */
@media (min-width: 1025px) {
  :is(.page-id-232, .page-id-233) .dp-hero-enjeu .dp-hero-gauche { padding-bottom: 92px !important; }
  :is(.page-id-232, .page-id-233) .dp-hero-enjeu .dp-hero-bouton { margin-top: 8px; }
}

/* Surtitre entre deux filets (« Notre valeur ajoutée tient à trois éléments ») : filets courts en mobile */
@media (max-width: 767px) {
  :is(.page-id-231, .page-id-232, .page-id-233) .e-con:has(> .elementor-widget-html.dp-remplit:first-child .dp-filet):has(> .elementor-widget-heading + .elementor-widget-html.dp-remplit:last-child) { --gap: 12px; gap: 12px; }
  :is(.page-id-231, .page-id-232, .page-id-233) .e-con:has(> .elementor-widget-html.dp-remplit:first-child .dp-filet):has(> .elementor-widget-heading + .elementor-widget-html.dp-remplit:last-child) > .dp-remplit { flex: 0 0 24px !important; width: 24px !important; }
  :is(.page-id-231, .page-id-232, .page-id-233) .e-con:has(> .elementor-widget-html.dp-remplit:first-child .dp-filet):has(> .elementor-widget-heading + .elementor-widget-html.dp-remplit:last-child) > .elementor-widget-heading { flex: 1 1 0; min-width: 0; }
  :is(.page-id-231, .page-id-232, .page-id-233) .e-con:has(> .elementor-widget-html.dp-remplit:first-child .dp-filet):has(> .elementor-widget-heading + .elementor-widget-html.dp-remplit:last-child) .elementor-heading-title { font-size: 1rem; letter-spacing: .06em; line-height: 1.4; text-wrap: balance; }
}

/* Points de pagination des rangées défilantes en mobile (ajoutés par inc/lot-3.php) */
.dp-points-defile { display: none; }
@media (max-width: 767px) { .dp-points-defile--mobile { display: flex; } }
@media (min-width: 768px) and (max-width: 1024px) { .dp-points-defile--tablette { display: flex; } }
@media (max-width: 1024px) {
  .dp-points-defile { justify-content: center; gap: 8px; margin-top: 4px; }
  .dp-points-defile button { width: 8px; height: 8px; min-height: 0; padding: 0 !important; border: 0 !important; border-radius: 50%; background: rgba(0, 55, 122, .2) !important; box-shadow: none !important; transition: background-color .2s ease, width .2s ease; }
  .dp-points-defile button[aria-current="true"] { width: 24px; border-radius: 4px; background: var(--dp-orange) !important; }
  .pb-sombre .dp-points-defile button:not([aria-current="true"]) { background: rgba(255, 255, 255, .3) !important; }
}

/* ---------- Fiche cas client : hero ---------- */
@media (min-width: 1025px) {
  .dp-hero-cas.e-con { --padding-right: 20px; }
  .dp-hero-cas .dp-cas-infos-widget { position: absolute !important; top: 140px; right: 0; z-index: 1; width: auto; margin: 0 !important; }
  .dp-hero-cas .dp-cas-infos { align-items: stretch; }
  .dp-hero-cas .dp-cas-info { box-sizing: border-box; width: 149px; min-width: 0; min-height: 56px; justify-content: center; gap: 6px; padding: 9px 8px 9px 18px; }
  .dp-hero-cas .dp-cas-info strong { font-size: 1rem; line-height: 1.25; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .dp-hero-cas .dp-cas-infos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .dp-hero-cas .dp-cas-infos-widget { width: 100%; }
}
@media (max-width: 767px) {
  .dp-hero-cas .dp-cas-infos-widget { width: 100%; }
  .dp-hero-cas .dp-cas-infos { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
  .dp-hero-cas .dp-cas-info { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 12px 16px; }
  .dp-hero-cas .dp-cas-info strong { font-size: 1rem; text-align: right; }
}
@media (min-width: 1025px) { .dp-citation-besoin { max-width: 560px; } }

/* ---------- Passe 2 ---------- */
/* Témoignage : padding 40 64 40 40 sur daf et daf-ec (64 sur daf-tp, comme la maquette) */
@media (min-width: 1025px) {
  :is(.page-id-231, .page-id-232) .dp-grille-temoignage .e-loop-item > .e-con { --padding-top: 40px; --padding-bottom: 40px; }
}

/* Bandeau de citations défilantes : vraiment bord à bord, fondu sur les bords même sans animation */
:is(.page-id-231, .page-id-232, .page-id-233) .dp-citations-h-widget { width: 100vw !important; max-width: 100vw !important; margin-left: calc(50% - 50vw) !important; }
@media (prefers-reduced-motion: reduce) {
  :is(.page-id-231, .page-id-232, .page-id-233) .dp-citations-h {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  }
}

/* Tablette : bandeaux à bouton empilés, rien de coupé */
@media (min-width: 768px) and (max-width: 1024px) {
  :is(.page-id-231, .page-id-232, .page-id-233) .dp-bandeau-bleu.e-con { flex-direction: column !important; align-items: flex-start !important; }
  :is(.page-id-231, .page-id-232, .page-id-233) .dp-flexible .e-con { flex-wrap: wrap !important; }
  .page-id-231 .dp-carte-mission.e-con { --padding-left: 24px; --padding-right: 24px; }
  .page-id-231 .dp-carte-mission :is(a, .elementor-button-text) { max-width: 100%; white-space: normal !important; text-align: left; }
  .page-id-231 .dp-carte-mission .elementor-widget-button { max-width: 100%; }
}

/* Mobile : surtitres longs sur deux lignes équilibrées */
@media (max-width: 767px) {
  :is(.page-id-231, .page-id-232, .page-id-233, .single-cas_client) .pb-surtitre .elementor-heading-title { letter-spacing: .06em; line-height: 1.3; text-wrap: balance; }
}

/* ---------- Passe 2 : archive et fiche des cas clients ---------- */
/* Fonction lisible sur les photos claires */
:is(.page-id-235, .single-cas_client) .dp-carte-cas-media p { text-shadow: 0 0 8px rgba(0, 0, 0, .6); }
/* Bouton lecture réduit et remonté quand la carte rétrécit (nom sur 2 lignes) */
@media (max-width: 1024px) {
  :is(.page-id-235, .single-cas_client) .dp-carte-cas .dp-play--72 { width: 56px; height: 56px; }
  :is(.page-id-235, .single-cas_client) .dp-carte-cas .dp-play-widget { top: 34%; }
}
@media (max-width: 767px) {
  .single-cas_client .dp-play--96 { width: 56px; height: 56px; }
}
/* Filtres de l'archive en tablette : 3 + 3 en paysage, défilement avec fondu en portrait */
@media (min-width: 900px) and (max-width: 1024px) {
  .page-id-235 .pb-filtres .e-filter { max-width: 720px; margin-inline: auto; }
}
@media (min-width: 768px) and (max-width: 899px) {
  .page-id-235 .pb-filtres .e-filter {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-right: 40px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent 100%);
  }
  .page-id-235 .pb-filtres .e-filter::-webkit-scrollbar { display: none; }
}
/* « Pourquoi Directeur Particulier ? » en tablette : cartes chiffres sur toute la largeur du texte */
@media (min-width: 768px) and (max-width: 1024px) {
  .page-id-235 .dp-stat-bleue.e-con { --width: auto; flex: 1 1 0 !important; width: auto !important; }
}
/* Fiche : survol de la barre de retranscription, signature sur une ligne */
.dp-transcription summary { transition: background-color .2s ease; border-radius: 16px; }
.dp-transcription summary:hover { background: #F4F8F8; }
.dp-transcription summary:hover .dp-transcription-rond { transform: scale(1.08); }
.dp-transcription[open] summary:hover .dp-transcription-rond { transform: rotate(180deg) scale(1.08); }
.single-cas_client .dp-signature-cas { letter-spacing: .05em; text-wrap: balance; }
@media (max-width: 767px) {
  :is(.page-id-235, .single-cas_client) .dp-carte-cas .dp-play-widget { top: 30%; }
}

/* ---------- Passe 3 ---------- */
@media (max-width: 1024px) {
  :is(.page-id-231, .page-id-232, .page-id-233) .dp-faq-widget { width: 100% !important; max-width: 100%; }
  :is(.page-id-231, .page-id-232, .page-id-233) .dp-notions-cote { order: -1; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  :is(.page-id-231, .page-id-232, .page-id-233) .pb-scroll-tablette.e-con { align-items: stretch !important; }
}

/* Archive : en-tête de la grille en mobile */
@media (max-width: 767px) {
  .dp-section-archive .elementor-heading-title em { white-space: nowrap; }
  .dp-section-archive .e-con > .elementor-widget-text-editor { margin-top: 8px; }
}
/* Fiche : air sous le carrousel avant le bloc contact, encarts alignés, citations comme la maquette */
.single-cas_client .dp-carrousel-autres { margin-bottom: 40px !important; }
.single-cas_client .dp-encart-bouton { margin-top: auto; }
.single-cas_client .dp-resultats-texte blockquote p:first-child::before { content: "«\00a0"; }
.single-cas_client .dp-resultats-texte blockquote p:last-child::after { content: "\00a0»"; }
@media (min-width: 1025px) {
  .single-cas_client :is(.dp-citation-filet-widget, .dp-resultats-texte blockquote) { padding: 12px 0 12px 32px; }
}
@media (max-width: 1024px) {
  .single-cas_client .dp-resultats-texte h3 { font-size: 1.375rem; line-height: 1.3; margin: 32px 0 16px; }
}
