/* =====================================================
   PAGE D'ACCUEIL - De Pierre en Pierre — v3 PREMIUM
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap');

.dpep-home {
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --c-text: #1A1A1A;
    --c-text-soft: #6B6B6B;
    --c-text-muted: #9A9A9A;
    --c-accent: #1F4E79;
    --c-accent-dark: #163b5e;
    --c-primary: #2A8B7E;
    --c-primary-dark: #1F6B62;
    --c-bg-soft: #FAF8F5;
    --c-bg-warm: #F4F1EC;
    --c-border: #EAE5DC;

    font-family: var(--sans);
    color: var(--c-text);
    line-height: 1.65;
    font-weight: 400;
}

.dpep-home h1, .dpep-home h2, .dpep-home h3, .dpep-home h4 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--c-accent);
    line-height: 1.15;
}

.dpep-home p { font-family: var(--sans); }

/* Sections */
.dpep-section {
    padding: 120px 0;
}
.dpep-section--soft { background: var(--c-bg-soft); }
.dpep-section--warm { background: var(--c-bg-warm); }

.dpep-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Eyebrow (petite catégorie au-dessus des titres) */
.dpep-eyebrow {
    font-family: var(--sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--c-primary) !important;
    margin: 0 0 16px 0 !important;
    line-height: 1 !important;
}
.dpep-eyebrow--light {
    color: rgba(255,255,255,0.7) !important;
}

/* Headers de section */
.dpep-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 72px;
}
.dpep-section-header h2 {
    font-size: 48px !important;
    margin: 0 0 20px 0 !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    color: var(--c-accent) !important;
    letter-spacing: -0.015em;
}
.dpep-section-sub {
    font-size: 17px !important;
    color: var(--c-text-soft) !important;
    margin: 0 !important;
    font-weight: 300 !important;
    line-height: 1.55 !important;
}

/* =====================================================
   1. HERO — premium, plus immersif, avec slideshow
   ===================================================== */
.dpep-hero {
    position: relative;
    min-height: 780px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
    padding: 140px 24px 100px;
    background: #1a2332; /* fond foncé en cas de chargement lent */
}

/* Slideshow : chaque slide est une div en background-image */
.dpep-hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.dpep-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.dpep-hero-slide.is-active {
    opacity: 1;
}

/* Fallback sobre si aucun bien avec photo n'est trouvé : aucune image externe. */
.dpep-hero:not(:has(.dpep-hero-slideshow))::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #162333 0%, #24384d 100%);
    z-index: 0;
}

/* Voile sombre par-dessus toutes les images, pour la lisibilité du texte */
.dpep-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15,30,45,0.55) 0%, rgba(15,30,45,0.75) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Crédit photo en bas à droite : "Bien à la vente · Quimper" */
.dpep-hero-credit {
    position: absolute;
    bottom: 24px;
    right: 32px;
    z-index: 3;
    pointer-events: auto;
}
.dpep-hero-credit-item {
    display: none;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 14px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
}
.dpep-hero-credit-item.is-active {
    display: inline-block;
}
.dpep-hero-credit-item:hover {
    background: rgba(0,0,0,0.55);
    color: #fff;
}
@media (max-width: 700px) {
    .dpep-hero-credit { bottom: 12px; right: 12px; left: 12px; text-align: center; }
    .dpep-hero-credit-item { font-size: 10px; padding: 5px 10px; }
}

.dpep-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 920px;
    width: 100%;
    text-align: center;
    animation: dpep-fade-up 0.8s ease-out;
}

@keyframes dpep-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dpep-hero-eyebrow {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin: 0 0 24px 0;
    line-height: 1;
}

.dpep-home .dpep-hero h1 {
    font-family: var(--serif) !important;
    color: #fff !important;
    font-size: 68px !important;
    line-height: 1.08 !important;
    margin: 0 0 28px 0 !important;
    font-weight: 400 !important;
    letter-spacing: -0.02em !important;
    text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.dpep-hero-subtitle {
    font-size: 19px !important;
    color: rgba(255,255,255,0.92) !important;
    margin: 0 auto 56px auto !important;
    max-width: 680px;
    font-weight: 300 !important;
    line-height: 1.55 !important;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* MOTEUR DE RECHERCHE PREMIUM */
.dpep-home .dpep-search {
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px !important;
    padding: 10px !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3) !important;
    display: grid !important;
    grid-template-columns: 1.4fr 1.4fr 1.1fr 1fr auto !important;
    gap: 0 !important;
    align-items: stretch;
    text-align: left;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto !important;
    border: 1px solid rgba(255,255,255,0.5);
}

.dpep-home .dpep-search-field {
    display: flex !important;
    flex-direction: column;
    padding: 12px 18px !important;
    border-right: 1px solid var(--c-border) !important;
    background: transparent !important;
    margin: 0 !important;
    min-width: 0;
    transition: background 0.2s;
}
.dpep-home .dpep-search-field:hover {
    background: var(--c-bg-soft) !important;
}
.dpep-home .dpep-search-field:last-of-type { border-right: none !important; }

.dpep-home .dpep-search-field label {
    font-family: var(--sans) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: var(--c-text-muted) !important;
    margin-bottom: 6px !important;
    display: block !important;
    line-height: 1 !important;
}

.dpep-home .dpep-search-field select,
.dpep-home .dpep-search-field input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: var(--sans) !important;
    font-size: 15px !important;
    color: var(--c-text) !important;
    padding: 4px 0 !important;
    background: transparent !important;
    background-image: none !important;
    cursor: pointer !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.5 !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    text-transform: none !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
}

.dpep-home .dpep-search-submit {
    background: var(--c-accent) !important;
    color: #fff !important;
    border: none !important;
    padding: 0 28px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.2s !important;
    font-family: var(--sans) !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: 64px !important;
    line-height: 1 !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.dpep-home .dpep-search-submit:hover {
    background: var(--c-accent-dark) !important;
}

.dpep-hero-secondary {
    margin-top: 32px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-family: var(--sans);
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.02em;
}
.dpep-hero-secondary a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding-bottom: 2px;
    font-weight: 500;
    margin-left: 6px;
    transition: border-color 0.2s;
}
.dpep-hero-secondary a:hover {
    border-bottom-color: #fff;
}

/* Tablette : 4 champs en 2x2 + bouton pleine largeur (entre desktop et mobile) */
@media (max-width: 1100px) and (min-width: 901px) {
    .dpep-home .dpep-search {
        grid-template-columns: 1fr 1fr !important;
        max-width: 720px;
    }
    .dpep-home .dpep-search-field {
        padding: 12px 18px !important;
    }
    .dpep-home .dpep-search-field:nth-child(2),
    .dpep-home .dpep-search-field:nth-child(4) {
        border-right: none !important;
    }
    .dpep-home .dpep-search-field:nth-child(2),
    .dpep-home .dpep-search-field:nth-child(3) {
        border-bottom: 1px solid var(--c-border) !important;
    }
    .dpep-home .dpep-search-field:nth-child(4) {
        border-bottom: 1px solid var(--c-border) !important;
    }
    .dpep-home .dpep-search-field:nth-child(5),
    .dpep-home .dpep-search-submit {
        grid-column: 1 / -1;
        margin-top: 6px !important;
        width: 100%;
    }
}

/* Mobile hero */
@media (max-width: 900px) {
    .dpep-hero { min-height: 600px; padding: 100px 20px 60px; }
    .dpep-home .dpep-hero h1 { font-size: 36px !important; }
    .dpep-hero-subtitle { font-size: 16px !important; margin-bottom: 32px !important; }
    .dpep-home .dpep-search {
        grid-template-columns: 1fr !important;
        padding: 8px !important;
    }
    .dpep-home .dpep-search-field {
        border-right: none !important;
        border-bottom: 1px solid var(--c-border) !important;
        padding: 14px 18px !important;
    }
    .dpep-home .dpep-search-field:last-of-type {
        border-bottom: none !important;
    }
    .dpep-home .dpep-search-submit {
        padding: 18px !important;
        margin-top: 6px !important;
        width: 100%;
    }
    .dpep-section { padding: 70px 0; }
    .dpep-section-header { margin-bottom: 48px; }
    .dpep-section-header h2 { font-size: 32px !important; }
    .dpep-section-sub { font-size: 15px !important; }
}

/* =====================================================
   2. À LA UNE — annonces
   ===================================================== */
.dpep-listings-row {
    margin: 0 -12px;
}
.dpep-listings-row [class*="col-"] {
    padding: 0 12px;
}
.dpep-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-text-soft);
    font-size: 15px;
}

/* On laisse Houzez gérer le style des cartes item-v1, mais on s'assure
   qu'elles tiennent dans le grid */
.dpep-listings-row .item-listing-wrap {
    height: 100%;
}

/* CTA row */
.dpep-cta-row {
    text-align: center;
    margin-top: 56px;
}

/* Boutons */
.dpep-btn {
    display: inline-block;
    padding: 16px 38px;
    background: var(--c-accent);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 2px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.25s ease;
    font-family: var(--sans);
    border: 1.5px solid var(--c-accent);
    cursor: pointer;
    line-height: 1;
}
.dpep-btn:hover {
    background: var(--c-accent-dark);
    border-color: var(--c-accent-dark);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(31,78,121,0.2);
}
.dpep-btn--ghost {
    background: transparent;
    color: var(--c-accent) !important;
}
.dpep-btn--ghost:hover {
    background: var(--c-accent);
    color: #fff !important;
}

/* =====================================================
   3. APPROCHE — section avec lignes décoratives
   ===================================================== */
.dpep-approach {
    background: var(--c-bg-warm);
}
.dpep-approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 64px;
    margin-top: 32px;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}
.dpep-approach-item {
    text-align: center;
    position: relative;
    padding: 0 20px;
}
.dpep-approach-num {
    font-family: var(--serif);
    font-size: 56px;
    color: var(--c-primary);
    line-height: 1;
    margin-bottom: 24px;
    font-weight: 300;
    letter-spacing: -0.02em;
}
.dpep-approach-item h3 {
    font-size: 26px !important;
    margin: 0 0 16px 0 !important;
    color: var(--c-accent) !important;
    font-family: var(--serif) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}
.dpep-approach-item p {
    font-size: 15px !important;
    color: var(--c-text-soft) !important;
    margin: 0 !important;
    line-height: 1.7 !important;
    font-weight: 300 !important;
}
@media (max-width: 900px) {
    .dpep-approach-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* =====================================================
   4. RÉGIONS — vignettes premium
   ===================================================== */
.dpep-regions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.dpep-region-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none !important;
    display: block;
    transition: transform 0.4s ease;
}
.dpep-region-card:hover { transform: translateY(-6px); }
.dpep-region-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    display: block;
}
.dpep-region-card:hover img { transform: scale(1.08); }
.dpep-region-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%);
    transition: opacity 0.3s;
}
.dpep-region-card-label {
    position: absolute;
    bottom: 28px;
    left: 28px;
    color: #fff;
    z-index: 2;
}
.dpep-region-card-label span {
    font-family: var(--sans);
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: block;
    margin-bottom: 6px;
}
.dpep-region-card-label h3 {
    font-family: var(--serif) !important;
    font-size: 26px !important;
    color: #fff !important;
    margin: 0 !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em;
}
@media (max-width: 900px) {
    .dpep-regions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   5. TYPOLOGIES — vignettes premium
   ===================================================== */
.dpep-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.dpep-type-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none !important;
    display: block;
    transition: transform 0.4s ease;
}
.dpep-type-card:hover { transform: translateY(-6px); }
.dpep-type-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    display: block;
}
.dpep-type-card:hover img { transform: scale(1.08); }
.dpep-type-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.8) 100%);
}
.dpep-type-card-label {
    position: absolute;
    bottom: 28px;
    left: 28px;
    right: 28px;
    color: #fff;
    z-index: 2;
}
.dpep-type-card-eyebrow {
    font-family: var(--sans);
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: block;
    margin-bottom: 8px;
}
.dpep-type-card-label h3 {
    font-family: var(--serif) !important;
    font-size: 28px !important;
    color: #fff !important;
    margin: 0 !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
@media (max-width: 900px) {
    .dpep-types-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   6. MAGAZINE
   ===================================================== */
.dpep-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.dpep-article-card {
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.3s;
    display: block;
}
.dpep-article-card:hover { transform: translateY(-4px); }
.dpep-article-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 24px;
}
.dpep-article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
    display: block;
}
.dpep-article-card:hover .dpep-article-card-image img { transform: scale(1.06); }
.dpep-article-meta {
    font-family: var(--sans);
    font-size: 11px !important;
    color: var(--c-text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px !important;
    font-weight: 500;
}
.dpep-article-card h3 {
    font-family: var(--serif) !important;
    font-size: 24px !important;
    margin: 0 0 14px 0 !important;
    line-height: 1.25 !important;
    color: var(--c-accent) !important;
    font-weight: 400 !important;
}
.dpep-article-excerpt {
    font-size: 15px !important;
    color: var(--c-text-soft) !important;
    line-height: 1.65 !important;
    margin: 0 0 16px 0 !important;
    font-family: var(--sans) !important;
    font-weight: 300 !important;
}
.dpep-article-link {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--c-primary);
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: gap 0.2s;
}
.dpep-article-card:hover .dpep-article-link {
    color: var(--c-primary-dark);
}
@media (max-width: 900px) {
    .dpep-articles-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* =====================================================
   7. CTA VENDEUR / AGENT
   ===================================================== */
.dpep-cta-band {
    background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
    color: #fff;
    padding: 110px 0;
    position: relative;
    overflow: hidden;
}
.dpep-cta-band::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.dpep-cta-band::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -150px;
    width: 500px; height: 500px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.dpep-cta-band .dpep-container {
    position: relative;
    z-index: 1;
}
.dpep-cta-band-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1080px;
    margin: 0 auto;
}
.dpep-cta-band-item h3 {
    font-family: var(--serif) !important;
    color: #fff !important;
    font-size: 36px !important;
    margin: 0 0 16px 0 !important;
    font-weight: 400 !important;
    line-height: 1.15 !important;
}
.dpep-cta-band-item p {
    color: rgba(255,255,255,0.85) !important;
    font-size: 16px !important;
    margin: 0 0 28px 0 !important;
    line-height: 1.6 !important;
    font-family: var(--sans) !important;
    font-weight: 300 !important;
}
.dpep-cta-band-item .dpep-btn {
    background: rgba(255,255,255,0.08) !important;
    border: 1.5px solid rgba(255,255,255,0.4) !important;
    color: #fff !important;
}
.dpep-cta-band-item .dpep-btn:hover {
    background: #fff !important;
    color: var(--c-accent) !important;
    border-color: #fff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
@media (max-width: 900px) {
    .dpep-cta-band-grid { grid-template-columns: 1fr; gap: 56px; }
    .dpep-cta-band { padding: 70px 0; }
    .dpep-cta-band-item h3 { font-size: 28px !important; }
}

/* =====================================================
   AJUSTEMENTS GLOBAUX
   ===================================================== */
.dpep-home .container { padding: 0; max-width: none; }
.main-menu .menu-item a:before { display: none !important; }

/* Suppression du soulignement sur tous les liens des cartes */
.dpep-region-card,
.dpep-type-card,
.dpep-article-card {
    color: inherit;
}
