/* =============================================================================
   SUNSET RENT BOAT — Frontend Styles
   Plugin Version: 1.0.0
   ============================================================================= */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --srb-accent:       #F47B50;
    --srb-accent-dark:  #d96437;
    --srb-text-dark:    #1a1a2e;
    --srb-text-mid:     #555;
    --srb-text-light:   #888;
    --srb-bg-card:      #ffffff;
    --srb-bg-tag:       #f0f4f8;
    --srb-shadow-sm:    0 2px 12px rgba(0, 0, 0, .08);
    --srb-shadow-md:    0 8px 32px rgba(0, 0, 0, .14);
    --srb-radius-card:  12px;
    --srb-radius-btn:   30px;
    --srb-transition:   0.2s ease;
}

/* =============================================================================
   GRILLE DE CARTES
   ============================================================================= */

.srb-boats-grid {
    display: grid;
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Colonnes responsives selon classe CSS */
.srb-cols-1 { grid-template-columns: 1fr; }
.srb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.srb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.srb-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .srb-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .srb-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .srb-cols-2,
    .srb-cols-3,
    .srb-cols-4 { grid-template-columns: 1fr; }
}

/* =============================================================================
   CAROUSEL MOBILE
   ============================================================================= */

@media (max-width: 600px) {

    .srb-carousel-wrapper {
        position: relative;
        overflow: hidden;
    }

    /* Transforme la grille en piste de défilement horizontal */
    .srb-boats-grid {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding: 0 20px 4px;
        scrollbar-width: none;
        /* Annule la mise en page grille */
        grid-template-columns: unset !important;
    }

    .srb-boats-grid::-webkit-scrollbar {
        display: none;
    }

    /* Chaque carte occupe toute la largeur et se cale */
    .srb-boat-card {
        scroll-snap-align: start;
        flex: 0 0 calc(100% - 40px);
        width: calc(100% - 40px);
        max-width: none;
    }

    /* Dots de pagination */
    .srb-carousel-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 14px 0 4px;
    }

    .srb-carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #d1d5db;
        transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
        cursor: pointer;
        border: none;
        padding: 0;
        flex-shrink: 0;
        appearance: none;
    }

    .srb-carousel-dot.srb-dot-active {
        background: var(--srb-accent);
        transform: scale(1.25);
    }
}

@media (min-width: 601px) {
    .srb-carousel-dots {
        display: none;
    }
}

.srb-no-boats {
    text-align: center;
    color: var(--srb-text-mid);
    padding: 40px 20px;
    font-size: 15px;
}

/* =============================================================================
   CARTE INDIVIDUELLE
   ============================================================================= */

.srb-boat-card {
    background: var(--srb-bg-card);
    border-radius: var(--srb-radius-card);
    overflow: visible;
    position: relative;
    box-shadow: var(--srb-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform var(--srb-transition), box-shadow var(--srb-transition);
}

.srb-boat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--srb-shadow-md);
}

/* ── Image ── */
.srb-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e0e7ef;
    border-radius: var(--srb-radius-card) var(--srb-radius-card) 0 0;
}

.srb-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.srb-boat-card:hover .srb-card-image-wrapper img {
    transform: scale(1.04);
}

.srb-card-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ef 0%, #c8d6e8 100%);
}

/* ── Badge prix ── */
.srb-price-badge {
    position: absolute;
    top: 14px;
    right: 0;
    background: var(--srb-accent);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 2px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(244, 123, 80, .40);
    pointer-events: none;
    z-index: 2;
}

/* ── Corps ── */
.srb-card-body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--srb-bg-card);
    border-radius: 0 0 var(--srb-radius-card) var(--srb-radius-card);
}

.srb-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--srb-text-dark);
    margin: 0 0 8px;
    line-height: 1.25;
}

.srb-card-description {
    font-size: 13.5px;
    color: var(--srb-text-mid);
    line-height: 1.55;
    margin: 0 0 14px;
    flex: 1;
}

/* ── Spec tags ── */
.srb-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    align-items: center;
}

.srb-spec-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--srb-bg-tag);
    color: #444;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.4;
}

.srb-spec-tag .srb-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    stroke: #666;
}

.srb-spec-more {
    background: #e2e8f0;
    color: #64748b;
    font-weight: 600;
}

/* ── Bouton carte ── */
.srb-card-btn {
    display: block;
    width: 100%;
    background: var(--srb-accent);
    color: #fff;
    text-align: center;
    padding: 12px 20px;
    border-radius: var(--srb-radius-btn);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background var(--srb-transition), transform var(--srb-transition);
    letter-spacing: 0.2px;
    margin-top: auto;
    font-family: inherit;
    line-height: 1;
}

.srb-card-btn:hover {
    background: var(--srb-accent-dark);
    transform: translateY(-1px);
}

.srb-card-btn:focus-visible {
    outline: 3px solid var(--srb-accent);
    outline-offset: 2px;
}

/* =============================================================================
   OVERLAY & DRAWER
   ============================================================================= */

body.srb-body-modal-open {
    overflow: hidden;
}

.srb-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 999999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.srb-modal-overlay.srb-open {
    display: block;
    animation: srbFadeIn .22s ease;
}

@keyframes srbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Drawer (panneau latéral droit) ── */
.srb-modal {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 460px;
    max-width: 100vw;
    background: #fff;
    box-shadow: -6px 0 40px rgba(0, 0, 0, .20);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    animation: srbSlideInRight .32s cubic-bezier(.22, 1, .36, 1);
    border-radius: 0;
    z-index: 1000000;
}

@keyframes srbSlideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* Scrollbar custom dans le drawer */
.srb-modal::-webkit-scrollbar { width: 4px; }
.srb-modal::-webkit-scrollbar-track { background: #f8fafc; }
.srb-modal::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* ── Bouton fermer ── */
.srb-modal-close {
    background-color: #ffffff00 !important;
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 14px -40px auto;
    width: 34px;
    height: 34px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    flex-shrink: 0;
}

.srb-modal-close img {
    width: 18px !important;
    height: 18px !important;
    stroke: #475569;
    max-width: none !important;
}

.srb-modal-close:hover {
    background: #e2e8f0;
}

.srb-modal-close:focus-visible {
    outline: 3px solid var(--srb-accent);
    outline-offset: 2px;
}

/* ── En-tête ── */
.srb-modal-header {
    padding: 20px 28px 0 28px;
    clear: both;
}

.srb-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--srb-accent);
    margin: 0 0 4px;
    line-height: 1.2;
}

.srb-modal-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--srb-accent);
    margin: 0 0 16px;
}

/* ── Galerie ── */
.srb-modal-gallery {
    padding: 12px 28px 0;
}

.srb-gallery-main {
    border-radius: 10px;
    overflow: hidden;
    height: 280px;
    background: #e0e7ef;
}

.srb-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}

.srb-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.srb-gallery-thumbs img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: .65;
    transition: opacity var(--srb-transition), transform var(--srb-transition);
    flex-shrink: 0;
    border: 2px solid transparent;
}

.srb-gallery-thumbs img:hover,
.srb-gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--srb-accent);
}

.srb-gallery-thumbs img:focus-visible {
    outline: 2px solid var(--srb-accent);
    outline-offset: 2px;
}

/* ── Corps de la modal ── */
.srb-modal-body {
    padding: 20px 28px 32px;
}

.srb-modal-description {
    font-size: 14.5px;
    color: var(--srb-text-mid);
    line-height: 1.65;
    margin-bottom: 20px;
}

.srb-modal-description p:last-child {
    margin-bottom: 0;
}

/* ── Titre de section ── */
.srb-section-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--srb-text-dark);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}

/* ── Grille de specs ── */
.srb-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.srb-spec-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
}

.srb-spec-item-label {
    font-size: 10.5px;
    color: var(--srb-text-light);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.srb-spec-item-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--srb-accent);
}

/* ── Tags de confort ── */
.srb-comfort-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.srb-comfort-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #F47B50;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 12px;
}

/* ── Icônes de confort (card + modal) ── */
.srb-comfort-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
}

.srb-comfort-icon svg {
    display: block;
    fill: none;
}

/* Icône dans les spec-tags de la carte */
.srb-spec-tag .srb-comfort-icon svg {
    width: 12px;
    height: 12px;
    stroke: #666;
}

/* Icône dans les comfort-tags de la modal */
.srb-comfort-tag .srb-comfort-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--srb-accent);
}

/* ── Zone de navigation ── */
.srb-modal-zone {
    font-size: 14px;
    color: var(--srb-text-mid);
    line-height: 1.6;
    margin: 0 0 8px;
}

/* ── Inclus / Non inclus ── */
.srb-includes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 8px;
}

.srb-includes-col h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--srb-text-dark);
    margin: 0 0 8px;
}

.srb-includes-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.srb-includes-col ul li {
    font-size: 13px;
    color: var(--srb-text-mid);
    padding: 4px 0;
    line-height: 1.4;
}

.srb-inclus ul li::before {
    content: "✓ ";
    color: #059669;
    font-weight: 700;
}

.srb-non-inclus ul li::before {
    content: "✗ ";
    color: #dc2626;
    font-weight: 700;
}

/* ── CTA Boutons ── */
.srb-modal-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.srb-cta-btn {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: var(--srb-radius-btn);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
    transition: background var(--srb-transition), transform var(--srb-transition), opacity var(--srb-transition);
    font-family: inherit;
    line-height: 1;
}

.srb-cta-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.srb-cta-btn:hover {
    transform: translateY(-1px);
    opacity: .92;
    text-decoration: none !important;
}

.srb-cta-btn:focus-visible {
    outline: 3px solid var(--srb-accent);
    outline-offset: 2px;
}

.srb-cta-primary {
    background: var(--srb-accent);
    color: #fff !important;
}

.srb-cta-whatsapp {
    background: #25D366;
    color: #fff !important;
}

.srb-cta-whatsapp:hover {
    background: #20bd5a;
}

.srb-cta-phone {
    background: #FF8559;
    color: #fff !important;
    min-width: 120px;
}

.srb-cta-phone:hover {
    background: #ff632a;
}

/* ── Tarifs ── */
.srb-tarifs-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}

.srb-tarif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.srb-tarif-row:last-child {
    border-bottom: none;
}

.srb-tarif-label {
    font-size: 14px;
    color: var(--srb-accent);
    line-height: 1.3;
}

.srb-tarif-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--srb-text-dark);
    white-space: nowrap;
    margin-left: 12px;
}

.srb-tarifs-note {
    font-size: 12px;
    color: var(--srb-text-light);
    font-style: italic;
    margin: 8px 0 0;
    line-height: 1.5;
}

/* =============================================================================
   RESPONSIVE — DRAWER
   ============================================================================= */

@media (max-width: 600px) {
    /* Sur mobile : drawer du bas */
    .srb-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 92vh;
        border-radius: 20px 20px 0 0;
        animation: srbSlideUpMobile .3s cubic-bezier(.22, 1, .36, 1);
    }

    @keyframes srbSlideUpMobile {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .srb-modal-header,
    .srb-modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .srb-modal-gallery {
        padding-left: 20px;
        padding-right: 20px;
    }

    .srb-includes-grid {
        grid-template-columns: 1fr;
    }

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

    .srb-modal-cta {
        flex-direction: column;
    }

    .srb-cta-btn {
        flex: none;
        width: 100%;
    }

    .srb-gallery-main {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .srb-specs-grid {
        grid-template-columns: 1fr;
    }
}
