/* ========================================
   ELEVAGE GLOBAL CSS - LOFS
   ======================================== */

/* === STYLES COMMUNS === */

/* Grilles */
.elevage-lof-grid {
    display: block;
}

/* Cartes principales */
.elevage-card {
    padding: 12px;
    border-radius: 20px;
    background: var(--e-global-color-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    overflow: visible;
}

.elevage-card + .elevage-card {
    margin-top: 14px;
}

.elevage-card-inner{
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Côtés gauche/droite des cartes */
.elevage-left {
    flex: 0 0 32%;
    border-radius: 20px;
    padding: 0 0 3% 3%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.elevage-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5%;
}

/* Images des cartes */
.elevage-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    border-radius: 20px;
    margin-top: -40px;
}

/* (Bouton 'chiots disponibles' retiré) */

/* === SLIDERS === */

.elevage-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
}

/* SLIDER LOFS - Slick avec dots */
.elevage-slider-track {
    padding: 8px 6px;
    width: 100%;
}

.elevage-slider-track .slick-slide{
    margin: 0 6px;
}

.elevage-slide{
    background: transparent;
    border-radius: 8px;
    padding: 6px;
    text-align: center;
}

/* Uniformiser la taille des items LOFS dans le slider */
.elevage-slider .elevage-slide {
    flex: 0 0 260px;
    width: 260px;
    box-sizing: border-box;
}

.elevage-slide-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.elevage-slide-image {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
}

/* Contenu des slides */
.elevage-slide a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.elevage-slide-content {
    position: relative;
    background: var(--e-global-color-a173cda);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.elevage-slide-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 0;
}

.elevage-slide-name{
    font-weight: 700;
    text-transform: uppercase;
}

.elevage-slide-ne {
    font-size: 0.9rem;
    color: #666;
}

/* Boutons de slider (LOFS uniquement) */
.elevage-slider-btn {
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--e-global-color-text);
    -webkit-appearance: none;
}

.elevage-slider-btn:hover {
    background: transparent;
    color: var(--e-global-color-secondary);
}

.elevage-slider-btn:focus,
.elevage-slider-btn:active {
    outline: none;
    box-shadow: none;
    color: var(--e-global-color-secondary);
}

/* === SLICK DOTS (pagination) === */
.slick-dots {
    display: none !important;
}

.elevage-slider .slick-dots {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.elevage-slider .slick-dots li {
    display: inline-block;
    margin: 0;
}


/* Slick peut générer soit un <button> stylé soit un <button>:before pseudo-élément.
   On neutralise le style par défaut et on applique le design sur les deux cas. */
.elevage-slider .slick-dots button{
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Si Slick utilise le pseudo-élément */
.elevage-slider .slick-dots li button:before{
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--e-global-color-text);
    transition: background 200ms ease, transform 200ms ease;
}

/* Si Slick applique le style directement sur le button (sans :before),
   on cible aussi le bouton lui-même via pseudo-element fallback */
.elevage-slider .slick-dots button > span {
    display: none; /* cacher le contenu si présent */
}

.elevage-slider .slick-dots .slick-active li button:before,
.elevage-slider .slick-dots .slick-active button {
    background: var(--e-global-color-a173cda) !important;
}

.elevage-slider .slick-dots .slick-active li button:before {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.elevage-slider .slick-dots button:focus:before,
.elevage-slider .slick-dots button:focus {
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .elevage-slider .slick-dots button {
        width: 12px;
        height: 12px;
    }
}

/* === TEXTE DES CARTES === */

.race {
    margin-bottom: 4px;
}

.lignee {
    margin-bottom: 8px;
}

.race, .name, .lignee {
    color: var(--e-global-color-text);
    font-weight: 700;
}

.description {
    margin-top: 8px;
    color: var(--e-global-color-text);
}

/* === SUPPRESSION DES EFFETS HOVER/FOCUS === */

.elevage-card:hover,
.elevage-card:focus,
.elevage-card:focus-visible,
.elevage-slide:hover,
.elevage-slide:focus,
.elevage-slide:focus-visible,
.elevage-slide-content:hover,
.elevage-slide-content:focus,
.elevage-slide-content:focus-visible{
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    transition: none !important;
}

.elevage-slide a:hover,
.elevage-slide a:focus{
    text-decoration: none;
    outline: none;
}

/* === RESPONSIVE === */

/* Mobile (max 768px) */
@media screen and (max-width: 768px) {
    .elevage-card-inner{
        flex-direction: column;
    }
    
    .elevage-left {
        flex-basis: 100%;
    }
    
    .chiot-dispo {
        position: static;
        transform: none;
        bottom: auto;
        margin-top: 10px;
    }
    
    /* Slider mobile LOFS - Laisser Slick gérer le layout */
    .elevage-slider-track {
        padding: 0 !important;
    }
    
    .elevage-slider-track .slick-slide {
        margin: 0 !important;
    }
    
    .elevage-slide {
        padding: 0;
    }

    /* Items LOFS en mobile prennent la largeur disponible */
    .elevage-slider .elevage-slide {
        flex: 0 0 calc(100% - 20px);
        width: calc(100% - 20px);
        margin: 0 10px;
    }
    
    /* Ajustement des images sur mobile */
    img.elevage-slide-image {
        width: 100%;
        height: 320px;
        max-height: 320px;
        object-fit: cover;
        
    }

    .elevage-image img{
        margin-top: 0 !important;
    }
    
    /* Content des slides mobile */
    .elevage-slide-content{
        margin: -28px 10px 0 10px;
    }
}

/* Tablettes (1024px - 1200px) */
@media(min-width: 1024px) and (max-width: 1200px) {
    .elevage-card-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .elevage-left {
        flex-basis: 100%;
        width: 100%;
        padding: 0 0 3% 0;
        margin-bottom: 12px;
    }
    
    .elevage-right {
        margin-top: -50px;
        flex: 1;
        padding: 4%;
    }
    
    img.elevage-image {
        width: 42%;
        height: auto;
        max-height: 420px;
        object-fit: cover;
        margin-top: 0;
        border-radius: 12px;
    }
    
    .chiot-dispo{
        position: relative;
        left: auto;
        transform: none;
        bottom: auto;
        margin-top: 10px;
    }
    
    .elevage-slide {
        min-width: 140px;
    }
}
.elevage-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .elevage-popup-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
    }
    .elevage-popup-content {
        position: relative;
        width: 90%;
        max-width: 600px;
        max-height: 90vh;
        background: var(--e-global-color-a173cda);
        border-radius: 8px;
        padding: 30px;
        overflow-y: auto;
        z-index: 10000;
    }
    .elevage-popup-close {
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
        color: #333;
        line-height: 1;
        padding: 0;
        width: 30px;
        height: 30px;
    }
    .elevage-popup-close:hover {
        color: #000;
    }
    .elevage-popup-body h2 {
        margin-top: 0;
        margin-bottom: 20px;
    }
    .elevage-popup-body p {
        margin: 10px 0;
    }
    .elevage-slide-button {
        cursor: pointer;
        margin-top: 10px;
        background-color: #02010100;
        font-size: 1rem;
        font-weight: 600;
        text-transform: uppercase;
        fill: var(--e-global-color-text);
        color: var(--e-global-color-text);
        border-style: solid;
        border-width: 1px 1px 1px 1px;
        border-color: var(--e-global-color-text);
        border-radius: 10px 10px 10px 10px;
        padding: 10px 20px;
        transition: all 0.3s ease;
    }
    .elevage-slide-button:hover {
        background-color: var(--e-global-color-text);
        color: var(--e-global-color-a173cda);
    }
    .popup-slider-container {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto 20px;
    }
    .popup-slider-wrapper {
        overflow: hidden;
        width: 100%;
    }
    .popup-slider-track {
        display: flex;
        transition: transform 0.3s ease;
    }
    .popup-slider-slide {
        min-width: 100%;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .popup-slider-slide img {
        max-width: 100%;
        max-height: 300px;
        width: auto;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    .popup-slider-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.8);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        color: #333;
        transition: background 0.3s ease, color 0.3s ease;
    }
    .popup-slider-btn:hover {
        background: var(--e-global-color-a173cda);
        color: var(--e-global-color-text);
    }
    .popup-slider-btn.prev {
        left: 10px;
        color: var(--e-global-color-text)
    }
    .popup-slider-btn.next {
        right: 10px;
        color: var(--e-global-color-text)
    }
    .popup-slider-counter {
        text-align: center;
        margin-top: 10px;
        font-size: 14px;
        color: #666;
    }