/* Réalisé par Dylan Borcard */
/* Version du 12.03.2026 */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url("../Images/hand.png") 16 16, auto;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #1a0000;
    min-width: 320px;
}

/* --- BANNIÈRE --- */
.bannière {
    height: auto;
    min-height: 40px;
    background: #000000;
    color: rgba(170, 160, 160, 0.57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(11px, 2vw, 18px);
    padding: 8px 12px;
    text-align: center;
    line-height: 1.3;
}

/* --- BARRE DE NAVIGATION --- */
.barre-nav {
    height: 55px;
    background: #c5c5c5;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: clamp(6px, 3vw, 100px);
}

.boutons-nav {
    display: flex;
    flex-shrink: 0;
    gap: 3px;
}

.bouton-nav,
.btn-home-reload {
    width: 36px;
    height: 36px;
    background: #a0a0a0;
    border: 1px solid #787878;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #555;
    text-decoration: none;
}

.btn-home-reload {
    background: #efeeee;
}

.address-bar {
    flex: 1;
    min-width: 0;
    height: 40px;
    background: #ffffff;
    border: 3px solid #999;
    border-radius: 4px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    font-size: clamp(11px, 1.8vw, 18px);
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: #e8e8e8;
    border: 1px solid #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #555;
}

/* --- HEADER IMAGE (même que Legendary) --- */
header {
    background-image: url("../Images/redcar.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: clamp(100px, 18vw, 280px);
    width: 100%;
}

/* --- PANNEAU PRINCIPAL --- */
.detail-panel {
    background: linear-gradient(to bottom, #2a0000, #1a0000);
    margin: clamp(10px, 3vw, 30px) clamp(10px, 5vw, 60px);
    padding: clamp(15px, 3vw, 30px);
    border: 1px solid #4a0000;
}

/* --- LIGNE TITRE + PRIX --- */
.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(15px, 3vw, 25px);
    flex-wrap: wrap;
    gap: 10px;
}

.detail-title-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    width: clamp(36px, 5vw, 52px);
    height: clamp(36px, 5vw, 52px);
    background: #888;
    color: #fff;
    font-size: clamp(18px, 3vw, 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.car-title {
    font-size: clamp(22px, 4vw, 38px);
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 1px;
}

.car-price-tag {
    font-size: clamp(20px, 3.5vw, 34px);
    color: #ffffff;
    font-weight: bold;
}

/* --- CORPS PRINCIPAL --- */
.detail-body {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: clamp(15px, 3vw, 30px);
    align-items: start;
}

/* --- COLONNE GAUCHE --- */
.detail-left {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 2.5vw, 22px);
}

.car-description {
    color: #dddddd;
    font-size: clamp(12px, 1.5vw, 14px);
    line-height: 1.6;
}

/* --- Couleurs --- */
.colors-label {
    color: #ffffff;
    font-size: clamp(11px, 1.4vw, 13px);
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 12px;
    line-height: 1.4;
}

.colors-grid {
    display: grid;
    grid-template-columns: repeat(4, clamp(30px, 5vw, 48px));
    gap: clamp(8px, 1.5vw, 14px);
}

.color-dot {
    width: clamp(30px, 5vw, 48px);
    height: clamp(30px, 5vw, 48px);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.color-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* --- Stats --- */
.stats-title {
    color: #ffffff;
    font-size: clamp(13px, 1.8vw, 16px);
    font-weight: bold;
    margin-bottom: 12px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.stat-label {
    color: #dddddd;
    font-size: clamp(11px, 1.4vw, 13px);
    width: clamp(80px, 12vw, 110px);
    flex-shrink: 0;
}

.stat-bar {
    flex: 1;
    height: 10px;
    background: #4a0000;
    border-radius: 2px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: repeating-linear-gradient(90deg,
            #cc3333 0px,
            #cc3333 8px,
            transparent 8px,
            transparent 11px);
    border-radius: 2px;
}

/* --- Bouton ORDER --- */
.order-btn {
    width: 100%;
    padding: clamp(12px, 2vw, 16px);
    background: #950000;
    color: #ffffff;
    border: none;
    font-size: clamp(14px, 2vw, 17px);
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 48px;
}

.order-btn:hover {
    background: #cc0000;
}

/* --- COLONNE DROITE (photos) --- */
.detail-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photo-main {
    width: 100%;
    background: #111;
    overflow: hidden;
}

.photo-main img {
    width: 100%;
    height: clamp(160px, 25vw, 320px);
    object-fit: cover;
    display: block;
}

.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.photo-small {
    background: #111;
    overflow: hidden;
}

.photo-small img {
    width: 100%;
    height: clamp(80px, 12vw, 160px);
    object-fit: cover;
    display: block;
    filter: brightness(0.85);
}

/* --- RESPONSIVE --- */

@media screen and (max-width: 768px) {
    .detail-body {
        grid-template-columns: 1fr;
    }

    /* Sur mobile, photos en premier pour voir la voiture directement */
    .detail-right {
        order: -1;
    }
}

@media screen and (max-width: 520px) {
    .detail-panel {
        margin: 8px;
        padding: 15px 12px;
    }

    /* Masquer le bouton "À propos" sur petits écrans */
    .boutons-nav .bouton-nav:nth-child(2) {
        display: none;
    }

    .bannière {
        font-size: 10px;
    }
}

@media screen and (max-width: 360px) {
    .detail-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .colors-grid {
        grid-template-columns: repeat(4, 36px);
        gap: 8px;
    }
}