/* ============================================================
   Chalet Tarifs — Front CSS
   Aesthetic : chalet montagne — bois chaud, vert sapin, crème
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
.ct-front {
    --ct-bois:        #7c4a1e;
    --ct-bois-light:  #c4875b;
    --ct-sapin:       #2d5a27;
    --ct-sapin-light: #4a8843;
    --ct-creme:       #faf6ef;
    --ct-creme-dark:  #f0e8d8;
    --ct-neige:       #ffffff;
    --ct-texte:       #2c1a0e;
    --ct-texte-doux:  #6b4c35;
    --ct-reserve:     #8b1a1a;
    --ct-reserve-bg:  #fff0f0;
    --ct-dispo:       #1a5c2a;
    --ct-dispo-bg:    #f0faf2;
    --ct-radius:      12px;
    --ct-shadow:      0 4px 24px rgba(44,26,14,.10);

    font-family: 'Source Sans 3', system-ui, sans-serif;
    color: var(--ct-texte);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Toolbar ────────────────────────────────────────────────── */
.ct-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.ct-search-wrap {
    position: relative;
    flex: 1 1 260px;
}

.ct-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ct-texte-doux);
    pointer-events: none;
}

.ct-filter {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid var(--ct-creme-dark);
    border-radius: 50px;
    font-family: inherit;
    font-size: 15px;
    background: var(--ct-neige);
    color: var(--ct-texte);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.ct-filter:focus {
    outline: none;
    border-color: var(--ct-bois-light);
    box-shadow: 0 0 0 3px rgba(124,74,30,.12);
}

.ct-filter::placeholder {
    color: #b0967e;
}

.ct-results-count {
    font-size: 13px;
    color: var(--ct-texte-doux);
    white-space: nowrap;
    margin: 0;
}

/* ── Grille ─────────────────────────────────────────────────── */
.ct-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Carte semaine ──────────────────────────────────────────── */
.ct-card {
    background: var(--ct-neige);
    border: 1px solid var(--ct-creme-dark);
    border-radius: var(--ct-radius);
    overflow: hidden;
    box-shadow: var(--ct-shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

.ct-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(44,26,14,.15);
}

.ct-card__header {
    background: linear-gradient(135deg, var(--ct-bois) 0%, var(--ct-bois-light) 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ct-card__icon {
    font-size: 20px;
    line-height: 1;
}

.ct-card__date {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--ct-neige);
    letter-spacing: .01em;
    line-height: 1.3;
}

.ct-card__body {
    padding: 18px 20px;
    flex: 1;
    background: var(--ct-creme);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ct-card__divider {
    height: 1px;
    background: var(--ct-creme-dark);
    margin: 12px 0;
}

/* ── Chalet row ─────────────────────────────────────────────── */
.ct-chalet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    gap: 12px;
}

.ct-chalet--dispo {
    background: var(--ct-dispo-bg);
    border: 1px solid #b6e0be;
}

.ct-chalet--reserve {
    background: var(--ct-reserve-bg);
    border: 1px solid #f5b8b8;
}

.ct-chalet__label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ct-chalet__num {
    font-size: 13px;
    font-weight: 600;
    color: var(--ct-texte-doux);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Badges */
.ct-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ct-badge--reserve {
    background: var(--ct-reserve);
    color: #fff;
}

/* Prix */
.ct-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ct-sapin);
    white-space: nowrap;
}

.ct-chalet--reserve .ct-price,
.ct-chalet--reserve .ct-badge {
    /* already styled */
}

/* ── No results ─────────────────────────────────────────────── */
.ct-no-results {
    text-align: center;
    padding: 40px;
    color: var(--ct-texte-doux);
    font-style: italic;
}

/* ── Animation d'entrée ──────────────────────────────────────── */
@keyframes ct-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ct-card {
    animation: ct-fade-in .35s ease both;
}

.ct-card:nth-child(1) { animation-delay: .05s; }
.ct-card:nth-child(2) { animation-delay: .10s; }
.ct-card:nth-child(3) { animation-delay: .15s; }
.ct-card:nth-child(4) { animation-delay: .20s; }
.ct-card:nth-child(5) { animation-delay: .25s; }
.ct-card:nth-child(6) { animation-delay: .30s; }
.ct-card:nth-child(n+7) { animation-delay: .35s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ct-grid {
        grid-template-columns: 1fr;
    }

    .ct-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ct-price {
        font-size: 19px;
    }
}
