/* ════════════════════════════════════════════════════
   Coyote Informatique — catalogue public de configurations
   Mobile-first, cohérent avec homepage.css (thème clair)
   ════════════════════════════════════════════════════ */

.cfg-main {
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.cfg-header { margin-bottom: 22px; }
.cfg-title {
    font-size: 24px;
    font-weight: 700;
    color: #111318;
    margin: 0 0 6px;
}
.cfg-subtitle {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
}

.cfg-empty {
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: 48px 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* ── Grille de tuiles — mobile-first : 1 colonne, puis 2, puis 3 ── */
.cfg-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .cfg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .cfg-grid { grid-template-columns: repeat(3, 1fr); }
}

.cfg-tile {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}
.cfg-tile:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    border-color: rgba(0,0,0,.14);
}

.cfg-tile-photo {
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
}
.cfg-tile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cfg-photo-placeholder,
.cfg-detail-photo.cfg-photo-placeholder {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.cfg-tile-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cfg-tile-title {
    font-size: 15px;
    font-weight: 700;
    color: #111318;
    margin: 0;
    line-height: 1.3;
}
.cfg-tile-carac {
    font-size: 12.5px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}
.cfg-tile-price {
    font-size: 17px;
    font-weight: 700;
    color: #111318;
    margin: 6px 0 2px;
}
.cfg-tile-cta {
    font-size: 12.5px;
    font-weight: 600;
    color: #f97316;
}

/* ── Fiche détaillée ─────────────────────────────────── */
.cfg-detail {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}
/* CONFIGURATIONS-PHOTO-DESKTOP-WIDTH-5F — .cfg-detail est un enfant flex de body (homepage.css,
   display:flex/flex-direction:column) : sans width explicite, un enfant flex avec margin:auto se
   dimensionne sur son contenu au lieu de s'étirer jusqu'à max-width, quel que soit le viewport.
   width:100% force l'étirement réel jusqu'au max-width applicable (760px base, 1120px ≥1024px
   via le bloc 5E ci-dessous, inchangé). box-sizing:border-box (homepage.css) garde le padding
   inclus dans cette largeur. */
/* CONFIGURATIONS-PHOTO-DESKTOP-WIDTH-5E — le plafond 760px (MVP initial) limitait la grande
   photo à ~720×405px sur desktop alors que le mobile utilise déjà presque toute la largeur
   disponible sans jamais atteindre ce plafond. Élargissement desktop uniquement — mobile/tablette
   strictement inchangés. */
@media (min-width: 1024px) {
    .cfg-detail {
        max-width: 1120px;
    }
}
.cfg-back {
    display: inline-block;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 16px;
}
.cfg-back:hover { color: #111318; }

/* CONFIGURATIONS-PHOTO-PERF-5B — conteneur figé (position + aspect-ratio) : les deux calques
   (thumb placeholder, display) occupent exactement le même rectangle CSS quelles que soient
   leurs dimensions intrinsèques (width/height:100% + object-fit, jamais influencées par le
   fichier) — aucun CLS, aucun changement de taille perceptible lors du swap. */
.cfg-detail-photo {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.cfg-detail-photo img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cfg-main-placeholder { z-index: 1; }
.cfg-main-display {
    z-index: 2;
    opacity: 0;
    transition: opacity .12s ease-out;
}
.cfg-main-display.is-visible { opacity: 1; }

.cfg-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.cfg-gallery-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: #f3f4f6;
}
.cfg-gallery-thumb:hover,
.cfg-gallery-thumb:focus-visible,
.cfg-gallery-thumb.is-selected { border-color: #f97316; }
/* Feedback de clic sobre le temps du chargement du display (typiquement 50-200ms) — pas de
   spinner, pas d'overlay, pas de texte : une simple atténuation discrète et temporaire. */
.cfg-gallery-thumb.is-loading { opacity: .65; }
.cfg-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cfg-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #111318;
    margin: 0 0 6px;
}
.cfg-detail-meta {
    font-size: 12.5px;
    color: #9ca3af;
    margin: 0 0 16px;
}
.cfg-detail-price {
    font-size: 26px;
    font-weight: 700;
    color: #111318;
    margin: 0 0 20px;
}

.cfg-lignes {
    border-top: 1px solid rgba(0,0,0,.08);
    margin-bottom: 24px;
}
.cfg-ligne {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.cfg-ligne-info { flex: 1; min-width: 0; }
.cfg-ligne-desig { font-size: 13.5px; font-weight: 600; color: #111318; }
.cfg-ligne-desc  { font-size: 12px; color: #6b7280; margin-top: 2px; }
.cfg-ligne-qte   { font-size: 12.5px; color: #6b7280; white-space: nowrap; }

.cfg-cta-block {
    background: #fafafa;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.cfg-cta-text {
    font-size: 13.5px;
    color: #4b5563;
    margin: 0 0 14px;
}

.cfg-404 {
    max-width: 560px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
}
.cfg-404 h1 { font-size: 20px; color: #111318; }
.cfg-404 p  { font-size: 14px; color: #6b7280; }
