/*
 * Reservit Booking Widgets for Elementor — Front CSS
 * SÉCURITÉ : pas de contenu dynamique dans le CSS, uniquement des classes
 */

/* ── Reset & Base ── */
.rev-booking-widget *,
.rev-rooms-widget *,
.rev-ota-widget * {
    box-sizing: border-box;
}

/* ══════════════════════════════════════
   WIDGET 1 — FORMULAIRE DE RÉSERVATION
══════════════════════════════════════ */

.rev-booking-widget {
    overflow: hidden;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.rev-booking-header {
    background: #1a1a2e;
    padding: 28px 32px 24px;
}

.rev-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.rev-hotel-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rev-accent-bar {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    background: #c8860a;
    flex-shrink: 0;
}

.rev-hotel-subtitle {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.35);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.rev-hotel-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rev-badge {
    background: #c8860a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 4px;
    white-space: nowrap;
}

.rev-phone-link {
    font-size: 14px;
    font-weight: 600;
    color: #c8860a;
    text-decoration: none;
    transition: opacity .2s;
}

.rev-phone-link:hover { opacity: .8; }

/* Formulaire */
.rev-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.rev-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rev-field-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    display: block;
}

.rev-input {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    border-radius: 6px;
    width: 100%;
    color-scheme: dark;
    transition: border-color .2s, background .2s;
}

.rev-input:focus {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.12);
}

.rev-input option {
    background: #1a1a2e;
    color: #fff;
}

.rev-btn-search {
    background: #c8860a;
    color: #fff;
    border: none;
    height: 44px;
    padding: 0 28px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px;
    transition: background .2s, opacity .2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rev-btn-search:hover:not(:disabled) { background: #e09a1a; }
.rev-btn-search:disabled { opacity: .6; cursor: wait; }

.rev-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rev-spin .7s linear infinite;
    flex-shrink: 0;
}

/* Barre statut */
.rev-status-bar {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 10px 0 0;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rev-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    display: inline-block;
}

.rev-status-dot.loading { background: #fbbf24; animation: rev-pulse 1s infinite; }
.rev-status-dot.error   { background: #f87171; }

.rev-status-text {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.rev-status-text strong { color: #fff; }

/* ══════════════════════════════════════
   WIDGET 2 — GRILLE DE CHAMBRES
══════════════════════════════════════ */

.rev-rooms-widget {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

/* Filtres */
.rev-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.rev-filter-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
    margin-right: 4px;
}

.rev-filter-btn {
    background: #fff;
    border: 1.5px solid #e0dbd2;
    color: #666;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 20px;
    transition: all .15s;
}

.rev-filter-btn.active,
.rev-filter-btn:hover {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

/* Grille */
.rev-rooms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Skeleton */
.rev-room-skeleton {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.rev-skeleton-img {
    height: 220px;
    background: linear-gradient(90deg, #ede9e2 25%, #e4e0d8 50%, #ede9e2 75%);
    background-size: 200% 100%;
    animation: rev-shimmer 1.5s infinite;
}

.rev-skeleton-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rev-skeleton-line {
    height: 10px;
    background: #ede9e2;
    border-radius: 6px;
}

.rev-skeleton-block {
    height: 70px;
    background: #f0ece4;
    border-radius: 8px;
    margin-top: 4px;
}

/* Carte chambre */
.rev-room-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}

.rev-room-card:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.13);
    transform: translateY(-3px);
}

/* Image */
.rev-room-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
    background: #e8e4de;
}

.rev-room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}

.rev-room-image:hover img { transform: scale(1.05); }

.rev-formule-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.rev-formule-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 3px;
}

.rev-price-float {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(26,26,46,.88);
    backdrop-filter: blur(8px);
    padding: 8px 14px;
    border-radius: 8px;
    text-align: right;
}

.rev-price-float-label {
    font-size: 9px;
    color: rgba(255,255,255,.45);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1px;
}

.rev-price-float-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.rev-price-float-per {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,.5);
}

/* Thumbnails */
.rev-room-thumbs {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    gap: 4px;
}

.rev-thumb {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    outline: 2px solid rgba(255,255,255,.25);
    transition: outline .15s;
}

.rev-thumb.active { outline: 2px solid #fff; }

/* Contenu card */
.rev-room-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rev-room-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
    letter-spacing: -.2px;
    line-height: 1.3;
}

.rev-room-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rev-room-meta-item {
    font-size: 10px;
    color: #999;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.rev-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c8860a;
    display: inline-block;
}

/* Équipements */
.rev-equips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.rev-equip-tag {
    font-size: 10px;
    color: #555;
    background: #f5f2ed;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Comparateur OTA intégré */
.rev-comparator {
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1px solid #ede9e2;
    overflow: hidden;
    flex-shrink: 0;
}

.rev-comparator-header {
    background: #f8f5f0;
    padding: 8px 12px;
    border-bottom: 1px solid #ede9e2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rev-comparator-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
}

.rev-comparator-eco {
    font-size: 10px;
    font-weight: 700;
    color: #2d5a27;
}

.rev-ota-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.rev-ota-col {
    padding: 10px 8px;
    border-right: 1px solid #ede9e2;
    position: relative;
}

.rev-ota-col:last-child { border-right: none; }

.rev-ota-col.direct {
    background: #f0f7ef;
}

.rev-ota-col-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #2d5a27;
}

.rev-ota-col-name {
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
    color: #2d5a27;
}

.rev-ota-col:not(.direct) .rev-ota-col-name { color: #555; }

.rev-ota-col-price {
    font-size: 20px;
    font-weight: 700;
    color: #2d5a27;
    text-align: center;
    line-height: 1;
    margin-bottom: 3px;
}

.rev-ota-col:not(.direct) .rev-ota-col-price { color: #333; }

.rev-ota-col-sub {
    font-size: 8px;
    color: #5a8f54;
    text-align: center;
    font-weight: 500;
}

.rev-ota-delta {
    font-size: 8px;
    color: #e53e3e;
    text-align: center;
    font-weight: 600;
}

.rev-comparator-savings {
    background: #1a1a2e;
    padding: 7px 14px;
    text-align: center;
}

.rev-comparator-savings span {
    font-size: 11px;
    color: rgba(255,255,255,.9);
    font-weight: 500;
}

.rev-comparator-savings strong { color: #c8860a; }

/* Footer card */
.rev-room-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0ede8;
}

.rev-room-total-label {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 2px;
}

.rev-room-total-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.rev-btn-book {
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s;
    border: none;
    cursor: pointer;
}

.rev-btn-book:hover { background: #c8860a; }

/* Message aucune dispo */
.rev-no-dispo {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    grid-column: 1 / -1;
}

.rev-no-dispo-icon { font-size: 48px; margin-bottom: 16px; }
.rev-no-dispo-title { font-size: 18px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.rev-no-dispo-text { font-size: 13px; color: #888; margin-bottom: 24px; line-height: 1.6; }
.rev-no-dispo-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.rev-btn-call {
    background: #c8860a;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rev-btn-mail {
    background: transparent;
    border: 2px solid #1a1a2e;
    color: #1a1a2e;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ══════════════════════════════════════
   WIDGET 3 — COMPARATEUR OTA STANDALONE
══════════════════════════════════════ */

.rev-ota-widget {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    background: #fff;
    padding: 28px 32px;
    border-radius: 12px;
}

.rev-ota-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.rev-ota-subtitle {
    font-size: 12px;
    color: #888;
    margin-bottom: 24px;
    line-height: 1.6;
}

.rev-ota-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.rev-ota-card {
    padding: 16px 12px;
    border-radius: 10px;
    border: 1px solid #ede9e2;
    position: relative;
    text-align: center;
    background: #fff;
    transition: transform .15s;
}

.rev-ota-card:hover { transform: translateY(-2px); }

.rev-ota-card.direct {
    background: #f0f7ef;
    border: 2px solid #2d5a27;
}

.rev-best-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #c8860a;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.rev-ota-source {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2d5a27;
}

.rev-ota-card:not(.direct) .rev-ota-source { color: #555; }

.rev-ota-price {
    font-size: 28px;
    font-weight: 700;
    color: #2d5a27;
    line-height: 1;
    margin-bottom: 3px;
}

.rev-ota-card:not(.direct) .rev-ota-price { color: #333; }

.rev-ota-per-night {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 8px;
}

.rev-ota-advantage {
    font-size: 9px;
    color: #5a8f54;
    font-weight: 500;
}

.rev-ota-savings {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 20px;
}

.rev-savings-text {
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}

/* Avantages */
.rev-ota-advantages {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rev-ota-advantage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #444;
}

.rev-check {
    width: 20px;
    height: 20px;
    background: #f0f7ef;
    border: 1px solid #2d5a27;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #2d5a27;
    font-weight: 700;
    flex-shrink: 0;
}

.rev-ota-cta {
    display: block;
    text-align: center;
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background .2s;
}

.rev-ota-cta:hover { background: #c8860a; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

@media (max-width: 768px) {
    .rev-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .rev-form-grid .rev-field-btn {
        grid-column: 1 / -1;
    }
    .rev-btn-search { width: 100%; justify-content: center; }

    .rev-rooms-grid {
        grid-template-columns: 1fr !important;
    }

    .rev-ota-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rev-ota-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .rev-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .rev-booking-header { padding: 20px 16px; }
    .rev-ota-widget { padding: 20px 16px; }
    .rev-ota-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */

@keyframes rev-spin {
    to { transform: rotate(360deg); }
}

@keyframes rev-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

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

@keyframes rev-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rev-room-card { animation: rev-fadeIn .3s ease both; }
