/* Styles spécifiques Delhorbe Auto Diffusion (complément du template Carvoyage) */

/* Badge "Nouveau" sur les cartes véhicules */
.badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #E30613;
    color: #0C0C0D;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 6px;
    z-index: 2;
}

/* Bouton favori (cartes et page détails) */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #E30613;
    background: transparent;
    color: #E30613;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: #E30613;
    color: #0C0C0D;
    transform: scale(1.08);
}

.favorite-btn.is-favorited {
    background: #E30613;
    color: #0C0C0D;
}

.favorite-btn.is-favorited i {
    animation: heartBeat 0.3s ease;
}

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

/* Cartes véhicules : hauteur homogène, image pleine largeur */
.blog-1 {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-1 .blog-img {
    flex-shrink: 0;
}

/* app.css met les <a> en inline-block : le lien doit occuper toute la largeur
   pour que l'image puisse remplir la carte */
.blog-1 .blog-img a {
    display: block;
    width: 100%;
}

.blog-1 .blog-img img {
    width: 100% !important;
    height: 240px;
    object-fit: cover;
    display: block;
}

.blog-1 .blog-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-1 .blog-content > div:last-child {
    margin-top: auto;
}

/* Titre de carte sur une seule ligne avec … */
.vehicle-card-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.vehicle-card-price {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Selects du hero : texte blanc sur fond sombre, options noires sur fond blanc */
select.form-control-1 {
    color: #FAFAFA !important;
    background-color: transparent;
}

select.form-control-1 option,
select.form-select option {
    color: #0C0C0D;
    background: #ffffff;
}

/* Cartes marques : photo du véhicule + nom en overlay */
.brand-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    height: 200px;
    background: #0C0C0D;
}

.brand-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.brand-card:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.brand-card .brand-name {
    position: absolute;
    left: 16px;
    bottom: 16px;
    background: #ffffff;
    color: #0C0C0D;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 8px;
    z-index: 2;
}

/* Galerie fiche détails : slider principal (image entière visible) */
.car-slider .gallery-img {
    width: 100%;
    height: 560px;
    object-fit: contain;
    background: #0C0C0D;
    border-radius: 12px;
}

/* Aperçus des images à venir (colonne droite, comme le template) */
.gallery-side-img {
    width: 100%;
    height: 268px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.gallery-side-img-solo {
    height: 560px;
}

@media (max-width: 991px) {
    .car-slider .gallery-img {
        height: 340px;
    }

    .gallery-side-img,
    .gallery-side-img-solo {
        height: 200px;
    }
}

/* Description : lisible et aérée */
.vehicle-description {
    line-height: 1.8;
    color: #3a3a3c;
}

/* Encadré du formulaire de demande */
.demande-card {
    background: #F7F7F8;
    border: 1px solid #EAEAEC;
    border-radius: 16px;
    padding: 40px 32px;
}

.demande-card .form-control {
    background: #ffffff;
    border: 1px solid #EAEAEC;
    border-radius: 8px;
    padding: 14px 16px;
}

.demande-card .form-control:focus {
    border-color: #E30613;
    box-shadow: none;
}

/* Cartes d'option d'achat (radio) */
.option-card input {
    display: none;
}

.option-card .option-body {
    display: block;
    background: #ffffff;
    border: 2px solid #EAEAEC;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-card input:checked + .option-body {
    border-color: #E30613;
    box-shadow: 0 4px 14px rgba(250, 182, 55, 0.25);
}

.option-card .option-amount {
    color: #E30613;
    font-weight: 700;
    font-size: 18px;
}

/* Messages flash */
.alert-flash {
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 24px;
}

/* Wizard d'inscription (3 étapes OTP) */
.step-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #EAEAEC;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #EAEAEC;
    color: #0C0C0D;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: #E30613;
}

.step.completed .step-circle {
    background: #28a745;
    color: #fff;
}

.step-label {
    font-size: 14px;
    color: #6c757d;
}

.step.active .step-label {
    color: #0C0C0D;
    font-weight: 600;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Champs du code OTP */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 1px solid #EAEAEC;
    border-radius: 8px;
}

.otp-input:focus {
    outline: none;
    border-color: #E30613;
}

.resend-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Bouton WhatsApp flottant (pendant du bouton "remonter en haut") */
.whatsapp-float {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #ffffff;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    animation: whatsappPulse 2.5s infinite;
    transition: transform 0.2s ease, background 0.2s ease;
}

.whatsapp-float:hover {
    background: #1EBE5B;
    color: #ffffff;
    transform: scale(1.06);
}

.whatsapp-float i {
    font-size: 24px;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(37, 211, 102, 0.55);
    }
    70% {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 0 16px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Sur mobile : icône seule, en rond */
@media (max-width: 767px) {
    .whatsapp-float {
        padding: 0;
        width: 56px;
        height: 56px;
        justify-content: center;
        border-radius: 50%;
        left: 16px;
        bottom: 16px;
    }

    .whatsapp-float .whatsapp-label {
        display: none;
    }

    .whatsapp-float i {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float {
        animation: none;
    }
}

/* Bouton "Voir plus" animé (pulsation pour attirer l'œil) */
.btn-pulse {
    animation: btnPulse 2s infinite;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-pulse i {
    animation: arrowSlide 1.2s ease-in-out infinite;
}

@keyframes btnPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(250, 182, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(250, 182, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(250, 182, 55, 0);
    }
}

@keyframes arrowSlide {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-pulse,
    .btn-pulse i {
        animation: none;
    }
}

/* Compteur de vues sur la fiche détails */
.views-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F7F7F8;
    border: 1px solid #EAEAEC;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    color: #3a3a3c;
}

.views-badge i {
    color: #E30613;
}

/* Espace avis clients */
.review-card {
    background: #fff;
    border: 1px solid #EAEAEC;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.our-client-sec .review-card h6,
.our-client-sec .review-card .review-text {
    color: #0C0C0D;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.review-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E30613;
    color: #0C0C0D;
    font-weight: 700;
    font-size: 20px;
}

.review-stars {
    font-size: 14px;
}

.review-star-off {
    color: #EAEAEC;
}

.review-text {
    flex-grow: 1;
    margin-bottom: 12px;
}

.review-date {
    color: #6c757d;
}

/* Notation étoiles dans le modal (ordre inversé pour le hover CSS) */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 6px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 26px;
    color: #EAEAEC;
    transition: color 0.15s ease;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #E30613;
}
