/* ============================================================
   Catalogue — thème Vercel : noir pur, Inter, minimaliste
   ============================================================ */

/* ── BASE ──────────────────────────────────────────────────── */
.catalogue-page {
    background: #000;
    color: #ededed;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

/* Header : flex layout (configurateur.css non chargé sur cette page) */
.catalogue-page .config-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    min-width: 0;
    box-sizing: border-box;
}

.catalogue-page .config-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex-shrink: 1;
    text-decoration: none;
}

.catalogue-page .config-header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.catalogue-page .config-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.catalogue-page main {
    padding-top: 96px;
}

.catalogue-page .cc-card[id] {
    scroll-margin-top: 104px;
}

/* ── HERO ─────────────────────────────────────────────────── */
.cc-hero {
    background:
        linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.6) 65%, #000 100%),
        url('images/catalogue-bg.jpg') center center / cover no-repeat;
    min-height: 40vh;
    padding: 110px 1.5rem 60px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-hero::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.06), transparent 70%);
    pointer-events: none;
}
.cc-hero-inner {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cc-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.4rem;
}

.cc-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.85rem;
    letter-spacing: -0.03em;
}

.cc-hero-sub {
    font-size: 0.95rem;
    color: rgba(255,255,255,.4);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

/* ── SECTION ──────────────────────────────────────────────── */
.cc-section {
    background: #000;
    padding: 3rem 0 5rem;
    min-height: calc(100vh - 320px);
}
.cc-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── GRILLE 4 CARTES ──────────────────────────────────────── */
.cc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    overflow: hidden;
}

/* Homologuées prend toute la ligne sur desktop */
@media (min-width: 681px) {
    .cc-card--expanded {
        grid-column: 1 / -1;
    }
    .cc-card--expanded .cc-preview {
        height: 160px;
    }
    .cc-card--expanded .cc-preview--auto svg {
        max-width: 420px;
        width: 70%;
    }
    .cc-format-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .cc-format-item {
        padding: 0.9rem 1.1rem;
    }
}

/* ── CARTE ────────────────────────────────────────────────── */
.cc-card {
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    transition: background .18s ease;
    position: relative;
}
.cc-card:hover {
    background: #111;
}

/* ── PREVIEW ──────────────────────────────────────────────── */
.cc-preview {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0d0d0d;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Auto — SVG plaque */
.cc-preview--auto svg {
    width: 82%;
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,.8));
    position: relative;
    z-index: 1;
}

/* USA */
.cc-preview--usa {
    background: #050810;
}
.cc-usa-plate {
    position: relative;
    width: 230px;
    height: 115px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.7);
    z-index: 1;
    border: 1px solid rgba(255,255,255,.1);
}
.cc-usa-plate img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.cc-usa-plate span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.9);
    letter-spacing: 0.06em;
    background: rgba(0,0,0,.3);
}
.cc-usa-flags {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    font-size: 1.5rem;
    z-index: 2;
}

/* Perso & Déco — photo réelle */
.cc-preview--photo {
    padding: 0;
    background: #000;
}
.cc-preview-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .4s ease;
    opacity: .9;
}
.cc-card:hover .cc-preview-photo {
    transform: scale(1.03);
    opacity: 1;
}

/* ── CARD BODY ────────────────────────────────────────────── */
.cc-card-body {
    padding: 1.25rem 1.4rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.45rem;
}

.cc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cc-tag {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,.35);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 0.22rem 0.6rem;
    background: rgba(255,255,255,.04);
}

.cc-badge {
    font-size: 0.7rem;
    color: rgba(255,255,255,.25);
    font-weight: 500;
}

.cc-card-body h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.cc-card-body p {
    font-size: 0.82rem;
    color: rgba(255,255,255,.38);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

/* ── FOOTER CARTE ─────────────────────────────────────────── */
.cc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.05);
    margin-top: 0.25rem;
}

.cc-card-footer strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.cc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 1.1rem;
    background: #fff;
    color: #000;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, transform .1s;
    letter-spacing: -0.01em;
}
.cc-btn:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}

/* ── FORMAT GRID (sous-choix homologuée) ─────────────────── */
.cc-format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.85rem;
}

.cc-format-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    background: #080808;
    text-decoration: none;
    transition: background .15s;
}
.cc-format-item:hover {
    background: #181818;
}

.cc-format-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    min-width: 72px;
    letter-spacing: -0.01em;
}

.cc-format-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,.28);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-format-price {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,.5);
    white-space: nowrap;
}

.cc-format-arrow {
    color: rgba(255,255,255,.18);
    flex-shrink: 0;
    transition: color .15s, transform .15s;
}
.cc-format-item:hover .cc-format-arrow {
    color: rgba(255,255,255,.65);
    transform: translateX(2px);
}

/* card with expanded format grid */
.cc-card--expanded .cc-card-body {
    gap: 0.4rem;
}

/* ── FOOTER PAGE ──────────────────────────────────────────── */
.cc-footer {
    background: #000;
    border-top: 1px solid rgba(255,255,255,.05);
    padding: 1.5rem;
    text-align: center;
}
.cc-footer p {
    font-size: 0.72rem;
    color: rgba(255,255,255,.18);
    font-family: 'Inter', sans-serif;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .catalogue-page .config-header {
        padding: 0.5rem 1rem;
        min-height: 86px;
    }

    .catalogue-page main {
        padding-top: 86px;
    }

    .catalogue-page .config-logo .brand-logo-img {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .catalogue-page .config-logo span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: min(140px, 38vw);
        font-size: 0.9rem;
    }

    .catalogue-page .config-header-nav.active {
        left: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 680px) {
    .cc-container {
        padding: 0 1rem;
    }

    .cc-grid {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .cc-card--expanded {
        grid-column: auto;
    }

    .cc-preview {
        height: 170px;
    }

    .cc-preview--auto svg {
        max-width: min(320px, 92vw);
    }

    .cc-usa-plate {
        width: min(230px, 88vw);
        height: auto;
        aspect-ratio: 2 / 1;
    }

    .cc-hero {
        min-height: 28vh;
        padding: 88px 1rem 40px;
    }

    .cc-hero h1 {
        font-size: 1.85rem;
    }

    .cc-section {
        padding: 2rem 0 3.5rem;
        min-height: 0;
    }

    .cc-card-body {
        padding: 1.1rem 1rem 1.15rem;
    }

    /* Grille formats : une colonne, lignes lisibles au doigt */
    .cc-format-grid {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }

    .cc-format-item {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 0.5rem;
        row-gap: 0.15rem;
        padding: 0.85rem 1rem;
    }

    .cc-format-label {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        white-space: normal;
    }

    .cc-format-sub {
        grid-column: 1;
        grid-row: 2;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.72rem;
    }

    .cc-format-price {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
        text-align: right;
    }

    .cc-format-arrow {
        display: none;
    }

    .cc-card-footer {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .cc-btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .catalogue-page .config-logo span {
        display: none;
    }

    .cc-card-body h2 {
        font-size: 1.05rem;
    }

    .cc-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
}
