:root {
    --color-primary: #e74c3c;
    --color-border: #e0e0e0;
    --color-bg-card: #ffffff;
}

.configurateur-raquette {
    width: 100%;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.config-label {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

/* --- GRILLE ET CARTES DES PACKS --- */
.pack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pack-card {
    position: relative;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-bg-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.pack-card input[type="radio"] { position: absolute; opacity: 0; }
.pack-card:hover { border-color: #bbb; }

.pack-card:has(input:checked) {
    border-color: var(--color-primary);
    background-color: #fff9f9;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
}

.pack-card:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--color-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.pack-title { display: block; font-weight: 700; font-size: 13px; }
.pack-desc { font-size: 11px; color: #777; margin-bottom: 10px; line-height: 1.3; flex-grow: 1; }
.pack-info { display: flex; flex-direction: column; height: 100%; flex-grow: 1; }
.pack-price { font-weight: 700; color: var(--color-primary); font-size: 15px; margin-top: auto; }

.pack-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: bold;
}

/* --- SÉLECTEURS ET RÉGLAGES --- */
.selectors-row { display: flex; gap: 10px; align-items: flex-end; }
.select-group:first-child { flex: 2; }
.select-group:last-child { flex: 1; }
.select-group label { display: block; font-size: 11px; margin-bottom: 5px; color: #666; }

.select-group select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 10px 32px 10px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    transition: border-color 0.2s;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.select-group select:focus { border-color: var(--color-primary); outline: none; }

/* --- ANIMATIONS DE DÉPLIAGE --- */
.hidden-options, .hidden-surgrip {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}

.show-options, .show-surgrip {
    max-height: 2000px;
    opacity: 1;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    overflow: visible !important;
}

/* --- LOGOS POCHOIR --- */
.logo-grid {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.logo-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; width: 75px; }
.logo-item input { display: none; }

.logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #eee;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.logo-img { width: 60px; height: auto; filter: grayscale(1); opacity: 0.7; pointer-events: none; }

.logo-item input:checked + .logo-circle {
    border-color: var(--color-primary);
    background-color: #fff9f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.logo-item input:checked + .logo-circle .logo-img { filter: grayscale(0); opacity: 1; }
.logo-item input:checked ~ .logo-name { color: var(--color-primary); }
.logo-name { font-size: 11px; font-weight: 700; color: #777; text-align: center; text-transform: uppercase; }

/* --- PASTILLES DE COULEURS --- */
.swatches-row, .cordage-swatches-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0 5px 0;
}

.swatch, .cordage-swatch-item { cursor: pointer; }
.swatch input, .cordage-swatch-item input {
    display: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.color-dot, .cordage-dot-render {
    display: block;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #eee;
    box-sizing: border-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: border-color 0.2s ease-in-out;
}

.swatch input:checked + .color-dot,
.cordage-swatch-item input:checked + .cordage-dot-render {
    border: 2px solid var(--color-primary) !important;
    transform: none !important;
}

#coultext { font-weight: 700; color: var(--color-primary); }

/* --- ALERTE CORDAGE FONCÉ --- */
.dark-cordage-warning {
    display: none;
    background-color: #fff8e6;
    border: 1px solid #f5c26b;
    border-left: 4px solid #e67e22;
    color: #7d4e00;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 15px auto -10px auto;
    text-align: left;
    align-items: center;
    gap: 8px;
}

.dark-cordage-warning.visible { display: flex; }

/* --- OPTIONS DE POSE --- */
.pose-options {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.check-item { display: flex; align-items: center; cursor: pointer; font-size: 14px; color: #444; gap: 10px; }
.check-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--color-primary); }
.check-description { font-weight: 500; }

@media (max-width: 950px) {
    .pack-grid { grid-template-columns: 1fr; }
}