/* ========================================
   COMPONENTS — Boutons, cartes, badges, forms
   ======================================== */

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(10, 155, 142, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-text);
}

/* Property cards — style Airbnb */
.property-card {
    display: flex;
    flex-direction: column;
}

/* Carrousel d'images */
.property-card__carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 1 / 0.95;
}

.property-card__slide {
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    transition: transform 0.35s ease;
}

.property-card__slide--active {
    transform: translateX(0);
}

.property-card__slide--exit-left {
    transform: translateX(-100%);
}

.property-card__slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.property-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card__image--placeholder {
    background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-primary-light) 100%);
    width: 100%;
    height: 100%;
}

/* Flèches de navigation */
.property-card__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 2;
    color: var(--color-text);
}

.property-card__arrow:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
}

.property-card__arrow--left {
    left: 8px;
}

.property-card__arrow--right {
    right: 8px;
}

.property-card__carousel:hover .property-card__arrow {
    opacity: 1;
}

.property-card__arrow:disabled {
    opacity: 0 !important;
    cursor: default;
}

/* Dots de navigation */
.property-card__dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}

.property-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: background-color 0.2s, transform 0.2s;
}

.property-card__dot--active {
    background: var(--color-bg);
    transform: scale(1.2);
}

/* Infos sous l'image */
.property-card__info {
    display: block;
    padding: 12px 2px 0;
}

.property-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-card__location {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
}

.property-card__title {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-card__details {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: 2px;
}

.property-card__price {
    margin-top: 6px;
}

.property-card__amount {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.property-card__per {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--color-text-light);
}

/* Featured cards (home — destinations en vedette) */
.featured-card {
    position: relative;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.featured-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.featured-card__image--placeholder {
    background: var(--color-bg-light);
}

.featured-card:hover .featured-card__image {
    transform: scale(1.05);
}

.featured-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    color: white;
}

.featured-card__city {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.featured-card__price {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-top: 4px;
}

/* Step cards */
.step-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.3s;
}

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

.step-card__badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    margin-bottom: 20px;
}

.step-card__badge strong {
    font-weight: 700;
}

.step-card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card__text {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* Testimonial cards */
.testimonial-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: box-shadow 0.3s, transform 0.3s;
}

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

.testimonial-card__quote {
    font-size: 48px;
    line-height: 1;
    color: var(--color-primary);
    opacity: 0.5;
    margin-bottom: -8px;
    font-family: Georgia, serif;
}

.testimonial-card__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-card__name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.testimonial-card__city {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Feature cards (accueil) */
.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-light);
    transition: box-shadow 0.3s, transform 0.3s;
}

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

.feature-card__icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card__title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card__text {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* Advantage cards (propriétaires) */
.advantage-card {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: box-shadow 0.3s, transform 0.3s;
}

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

.advantage-card__title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 8px;
}

.advantage-card__text {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.badge-pending {
    background: var(--color-warning);
    color: #333;
}

.badge-confirmed {
    background: #17a2b8;
    color: white;
}

.badge-paid {
    background: var(--color-success);
    color: white;
}

.badge-cancelled {
    background: var(--color-danger);
    color: white;
}

/* Formulaires */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10, 155, 142, 0.1);
}

.form-textarea {
    resize: vertical;
}

/* Custom select (remplace les <select> natifs) */
.custom-select {
    position: relative;
    display: inline-block;
}

.custom-select--open {
    z-index: 50;
}

.custom-select--block {
    display: block;
    width: 100%;
}

.custom-select__trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 400;
    background: #fff;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select__trigger:focus,
.custom-select--open .custom-select__trigger {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(73, 229, 252, 0.15);
}

.custom-select__value {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select__chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s;
}

.custom-select--open .custom-select__chevron {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    list-style: none;
    margin: 0;
    display: none;
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
}

.custom-select--open .custom-select__menu {
    display: block;
}

.custom-select__option {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.custom-select__option:hover {
    background: var(--color-bg-light);
}

.custom-select__option--selected {
    font-weight: 600;
    color: var(--color-primary);
}

/* Variante compacte (filtres hero) */
.custom-select--compact .custom-select__trigger {
    padding: 10px 36px 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

/* Boutons variantes */
.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-block {
    width: 100%;
}

/* Contact info cards */
.contact-info__card {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.contact-info__card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-info__title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-info__text {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    margin-bottom: 12px;
}

/* Alertes */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: var(--font-size-sm);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    z-index: 1000;
    overflow: hidden;
    min-width: 280px;
}

.autocomplete-dropdown--visible {
    display: block;
    animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background-color 0.15s;
}

.autocomplete-item:hover,
.autocomplete-item--active {
    background-color: var(--color-bg-light);
}

.autocomplete-item svg {
    color: var(--color-text-light);
    flex-shrink: 0;
}

/* Calendrier dropdown */
.calendar-dropdown {
    display: none;
    position: absolute;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    z-index: 1000;
    padding: 20px;
    min-width: 580px;
}

.calendar-dropdown--visible {
    display: block;
    animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text);
    transition: background-color 0.2s;
}

.calendar-nav:hover {
    background-color: var(--color-bg-light);
}

.calendar-months {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.calendar-month__title {
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-light);
    padding: 4px 0 8px;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    font-size: var(--font-size-sm);
    border-radius: 50%;
    position: relative;
}

.calendar-day--empty {
    pointer-events: none;
}

.calendar-day--disabled {
    color: var(--color-border);
    pointer-events: none;
}

.calendar-day--active {
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.calendar-day--active:hover {
    background-color: var(--color-bg-light);
}

.calendar-day--start,
.calendar-day--end {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.calendar-day--in-range {
    background-color: var(--color-primary-light);
    border-radius: 0;
}

.calendar-day--start {
    border-radius: 50% 0 0 50%;
}

.calendar-day--end {
    border-radius: 0 50% 50% 0;
}

.calendar-day--start.calendar-day--end {
    border-radius: 50%;
}

.calendar-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.calendar-clear {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    text-decoration: underline;
    transition: color 0.2s;
}

.calendar-clear:hover {
    color: var(--color-primary);
}

/* Responsive calendrier */
@media (max-width: 768px) {
    .calendar-dropdown {
        min-width: auto;
        width: calc(100vw - 16px);
        padding: 16px;
    }

    .calendar-months {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .autocomplete-dropdown {
        min-width: auto;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
}

/* Step card number (propriétaires page) */
.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 16px;
}
