/* resources/css/homepage-optimized.css */



/* ===== CARD OPTIMIZATIONS ===== */

.single-grid {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
    background: #fff;
    position: relative;
}

.single-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}


.cross-badge-index {
    top: 10px;
    right: 10px;
    background: rgba(255, 193, 7, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 50%;
}

.ville-badge-index {
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}



/* Property Features */
.card-sup-info {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 158, 255, 0.1);
    color: #009eff;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 2px;
    border: 1px solid rgba(0, 158, 255, 0.2);
}


/* ===== PRICE STYLING ===== */

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
    margin: 0;
}

.price span {
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



/* ===== PERFORMANCE UTILITIES ===== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .single-grid {
        border: 2px solid #000;
    }
    
    .card-sup-info {
        background: #000;
        color: #fff;
        border: 1px solid #fff;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .single-grid {
        background: #2d3748;
        color: #e2e8f0;
        border: 1px solid #4a5568;
    }
    
    .section-title h2 {
        color: #e2e8f0;
    }
    
    .categories-title {
        color: #e2e8f0;
    }
}

/* ===== LOADING STATES ===== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}



/* ===== AMÉLIORATIONS CARTES ANNONCES ===== */

/* Animation d'apparition progressive */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de brillance au survol */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Carte principale améliorée */
.items-grid .single-grid {
    box-shadow: 0 4px 15px rgba(0, 158, 255, 0.08) !important;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(0, 158, 255, 0.1);
}

/* Effet de levée au survol */
.items-grid .single-grid:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 158, 255, 0.25) !important;
    border-color: var(--couleurbase);
}

/* Container image avec effet overlay */
.items-grid .single-grid .image {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

/* Effet de brillance sur l'image */
.items-grid .single-grid .image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.7s;
}

.items-grid .single-grid:hover .image::after {
    animation: shine 0.7s;
}

/* Image avec effet zoom doux */
.items-grid .single-grid .image img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(0.95);
}

.items-grid .single-grid:hover .image img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.05);
}

/* Overlay gradient amélioré */


.items-grid .single-grid:hover .image .author::before {
    height: 120px;
}

/* Badges avec animations */
.items-grid .single-grid .image .author .sale,
.items-grid .single-grid .image .author .rent,
.items-grid .single-grid .image .author .delivery {
    display: inline-block;
    font-size: 11px;
    float: right;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: "Jost", sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.items-grid .single-grid:hover .image .author .sale,
.items-grid .single-grid:hover .image .author .rent,
.items-grid .single-grid:hover .image .author .delivery {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Badge nombre de photos stylisé */
.image .nombre-pic-badge-index {
    width: 40px;
    min-width: 45px;
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgb(255, 255, 255);
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.95), rgba(0, 0, 0, 0.95));
    backdrop-filter: blur(10px);
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.items-grid .single-grid:hover .image .nombre-pic-badge-index {
    transform: scale(1.05);
    background: linear-gradient(135deg, var(--couleurbase), var(--couleursecondaire));
}

/* Badge ville stylisé */
.image .ville-badge-index {
    width: auto;
    min-width: 75px;
    height: 28px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: rgb(255, 255, 255);
    background: linear-gradient(135deg, var(--couleurbase), #00b4d8);
    position: absolute;
    top: 8px;
    left: 8px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 158, 255, 0.4);
    transition: all 0.3s ease;
}

.items-grid .single-grid:hover .image .ville-badge-index {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 158, 255, 0.6);
}

/* Zone de contenu améliorée */
.items-grid .single-grid .content {
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    transition: background 0.3s ease;
}

.items-grid .single-grid:hover .content {
    background: #ffffff;
}

/* Titre avec effet hover */
.items-grid .single-grid .content .top-content .title a {
    color: #081828;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.items-grid .single-grid .content .top-content .title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--couleurbase), var(--couleursecondaire));
    transition: width 0.3s ease;
}

.items-grid .single-grid:hover .content .top-content .title a {
    color: var(--couleurbase);
}

.items-grid .single-grid:hover .content .top-content .title a::after {
    width: 100%;
}

/* Prix avec effet brillant */
.items-grid .single-grid .content .bottom-content .price {
    position: relative;
    overflow: hidden;
}

.items-grid .single-grid .content .bottom-content .price span {
    color: var(--couleurbase);
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
    transition: all 0.3s ease;
    background: linear-gradient(
        90deg,
        var(--couleurbase),
        var(--couleursecondaire),
        var(--couleurbase)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.items-grid .single-grid:hover .content .bottom-content .price span {
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

/* Bouton favoris amélioré */
.items-grid .single-grid .content .bottom-content .like {
    float: right;
    color: var(--couleurbase);
    font-size: 18px;
    height: 42px;
    width: 42px;
    line-height: 42px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #eee;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.items-grid .single-grid .content .bottom-content .like::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--couleurbase);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.items-grid .single-grid .content .bottom-content .like:hover {
    transform: scale(1.2) rotate(10deg);
    border-color: var(--couleurbase);
    box-shadow: 0 4px 15px rgba(0, 158, 255, 0.3);
}

.items-grid .single-grid .content .bottom-content .like:hover::before {
    width: 100%;
    height: 100%;
}

.items-grid .single-grid .content .bottom-content .like:hover i {
    color: #fff;
    position: relative;
    z-index: 1;
}

/* Badges d'information avec icônes */
.card-sup-info {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    font-weight: 600;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: rgb(255, 255, 255);
    background: linear-gradient(135deg, var(--couleurbase), #00b4d8);
    box-shadow: 0 2px 8px rgba(0, 158, 255, 0.3);
    transition: all 0.3s ease;
    margin: 2px;
}

.items-grid .single-grid:hover .card-sup-info {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 158, 255, 0.4);
}

/* Section Title améliorée */
.section-title-home {
    position: relative;
    padding: 0;
}

.section-title-home h2 {
    display: inline-block;
    position: relative;
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bouton "Voir plus" stylisé */
.view-more .btn {
    color: var(--couleurbase);
    border: 2px solid var(--couleurbase);
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.view-more .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--couleurbase), var(--couleursecondaire));
    transition: left 0.4s;
}

.view-more .btn:hover {
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 158, 255, 0.4);
}

.view-more .btn:hover::before {
    left: 0;
}

.view-more .btn a,
.view-more .btn i {
    position: relative;
    z-index: 1;
}

/* Animation de chargement pour les cartes */
@keyframes cardLoad {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.items-grid .single-grid:nth-child(1) { animation-delay: 0.1s; }
.items-grid .single-grid:nth-child(2) { animation-delay: 0.2s; }
.items-grid .single-grid:nth-child(3) { animation-delay: 0.3s; }
.items-grid .single-grid:nth-child(4) { animation-delay: 0.4s; }
.items-grid .single-grid:nth-child(5) { animation-delay: 0.5s; }
.items-grid .single-grid:nth-child(6) { animation-delay: 0.6s; }
.items-grid .single-grid:nth-child(7) { animation-delay: 0.7s; }
.items-grid .single-grid:nth-child(8) { animation-delay: 0.8s; }

/* Responsive amélioré */
@media only screen and (max-width: 767px) {
    .items-grid .single-grid {
        border-radius: 10px;
    }
    
    .items-grid .single-grid:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .items-grid .single-grid .image img {
        height: 180px;
    }
    
    .view-more .btn {
        padding: 6px 16px;
        font-size: 13px;
    }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .items-grid .single-grid .image img {
        height: 200px;
    }
}


