/**
 * Arb'Auvergne — Page Réalisations
 * @package Arbauvergne
 */

/* ============================================
   HERO RÉALISATIONS
   ============================================ */
.hero--realisations {
    background-image: url('../images/hero.webp');
	min-height: 320px;
}

/* ============================================
   BADGES TYPE
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge--green {
    background: var(--green-mid);
    color: var(--white);
}

.badge--dark {
    background: var(--green-dark);
    color: var(--white);
}

.badge--olive {
    background: #5a7a2a;
    color: var(--white);
}

/* ============================================
   FILTRES
   ============================================ */
.real-filters-section {
    padding: 32px 0 0;
    background: var(--white);
}

.real-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.real-filter {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.real-filter:hover {
    border-color: var(--green-mid);
    color: var(--green-mid);
}

.real-filter--active {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
}

/* ============================================
   SECTION + GRILLE
   ============================================ */
.real-section {
    padding: 48px 0 72px;
    background: var(--white);
}

.real-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================
   CARTE RÉALISATION
   ============================================ */
.real-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}

.real-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* Visuel (zone image) */
.real-card__visual {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
}

.real-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.real-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

/* Corps de la carte */
.real-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.real-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.real-card__lieu {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.83rem;
    color: var(--gray-500);
}

.real-card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
    margin: 0;
}

.real-card__excerpt {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.55;
    margin: 0;
}

/* ============================================
   SLIDER AVANT / APRÈS
   ============================================ */
.compare {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
}

.compare__before,
.compare__after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Le clip de l'image "après" */
.compare__after-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: 50%; /* mis à jour par JS */
}

.compare__after-clip .compare__after {
    position: absolute;
    inset: 0;
    width: auto; /* sera calculé via JS ou fixé via CSS */
    min-width: 100%;
}

/* Ligne de séparation */
.compare__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* mis à jour par JS */
    width: 2px;
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

/* Bouton circulaire */
.compare__handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    color: var(--gray-700);
}

/* Labels Avant / Après */
.compare__label {
    position: absolute;
    top: 10px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--green-dark);
    color: var(--white);
    pointer-events: none;
    z-index: 11;
    letter-spacing: 0.04em;
}

.compare__label--avant { left: 10px; }
.compare__label--apres { right: 10px; }

/* ============================================
   ÉTATS VIDES
   ============================================ */
.real-empty {
    text-align: center;
    color: var(--gray-400);
    font-size: 1rem;
    padding: 40px 0;
}

.real-empty-state {
    text-align: center;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--gray-400);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .real-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .real-grid {
        grid-template-columns: 1fr;
    }

    .real-section {
        padding: 32px 0 48px;
    }

    .real-filters-section {
        padding: 24px 0 0;
    }
}
