
/* Structure générale SAV */

.sav-section {
    padding: 110px 20px 80px;
    background: #f5f6f8;
}

.sav-conteneur {
    max-width: 1200px;
    margin: 0 auto;
}

/* Calculateur SAV en pleine largeur */

#ancrecalcul {
    width: calc(100vw - 60px);
    max-width: 1800px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.sav-titre {
    display: block;
    width: 100%;
    margin: 0 0 45px;
    text-align: center;
    color: #990066;
    font-size: 32px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: none;
}

.sav-titre::before,
.sav-titre::after {
    content: none;
}

/* Responsive */

@media (max-width: 768px) {
    .sav-section {
        padding: 95px 16px 55px;
    }

    .sav-titre {
        margin-bottom: 30px;
        font-size: 28px;
    }
}


/* Recherche numéro de série */

.sav-recherche {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    max-width: 850px;
    margin: 0 auto 45px;
}

.sav-recherche-label {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.sav-recherche-input {
    width: 260px;
    height: 46px;
    padding: 0 15px;
    border: 1px solid #d8d8dc;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 15px;
    outline: none;
}

.sav-recherche-input:focus {
    border-color: #990066;
}

.sav-recherche-bouton {
    min-height: 46px;
    padding: 0 28px;
    border: none;
    border-radius: 8px;
    background: #990066;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sav-recherche-bouton:hover {
    background: #7d0053;
}

/* Responsive recherche */

@media (max-width: 768px) {
    .sav-recherche {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 30px;
    }

    .sav-recherche-input {
        width: 100%;
    }

    .sav-recherche-bouton {
        width: 100%;
    }
}


/* Documents SAV */

.sav-documents {
    display: grid;
    gap: 12px;
    max-width: 850px;
    margin: 25px auto 50px;
}

.sav-document {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e8e8eb;
    border-radius: 10px;
    color: #292929;
    text-decoration: none;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.sav-document:hover {
    border-color: #990066;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .06);
    transform: none;
}

.sav-document-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: #f9eaf4;
    border-radius: 8px;
    color: #990066;
    font-size: 20px;
}

.sav-document-nom {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
}

.sav-document-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #990066;
    font-size: 13px;
    font-weight: 600;
}

/* Offre pièces de rechange mise en avant */

.sav-document-offre {
    border: 2px solid #990066;
    background: #fff;
}

.sav-document-offre .sav-document-nom {
    color: #990066;
    font-size: 16px;
    font-weight: 700;
}

.sav-document-action-offre {
    padding: 11px 16px;
    background: #990066;
    border-radius: 7px;
    color: #fff;
}

.sav-document-offre:hover {
    box-shadow: 0 6px 22px rgba(153, 0, 102, .12);
}

.sav-document-bouton {
    font-family: inherit;
}

/* Responsive */

@media (max-width: 480px) {
    .sav-document {
        gap: 12px;
        padding: 16px;
    }

    .sav-document-nom {
        font-size: 14px;
    }

    .sav-document-action-offre {
        padding: 10px 12px;
    }
}




/* Conteneur calcul SAV */

.card-sav {
    background: #fff;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid #e8e8eb;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .04);
}

/* Défilement horizontal du tableau */

.sav-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tableau */

.table-sav {
    width: 100%;
    min-width: 1250px;
    border-collapse: separate;
    border-spacing: 0;
}

.table-sav th {
    background: #990066;
    color: #fff;
    padding: 14px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
    border-top: none;
    border-bottom: 3px solid #666;
}


.table-sav td {
    text-align: center;
    border-top: 1px solid #eee;
}

/* Champs */
.table-sav td input,
.table-sav td select {
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.8em;
    outline: none;
    box-sizing: border-box;
}

/* Suppression des flèches des input number */
.table-sav input[type="number"]::-webkit-outer-spin-button,
.table-sav input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.table-sav input[type="number"] {
    -moz-appearance: textfield;
}

/* Bloc froid : fluide + entrée + sortie */
.table-sav th:nth-child(4),
.table-sav th:nth-child(5),
.table-sav th:nth-child(6) {
    border-bottom-color: #3b82f6;
}

.table-sav td:nth-child(4),
.table-sav td:nth-child(5),
.table-sav td:nth-child(6) {
    background: #f0f6ff;
}

.table-sav td:nth-child(4) select,
.table-sav td:nth-child(5) input,
.table-sav td:nth-child(6) input {
    color: #0040ff;
}

/* Bloc chaud : fluide + entrée + sortie */
.table-sav th:nth-child(7),
.table-sav th:nth-child(8),
.table-sav th:nth-child(9) {
    border-bottom-color: #ef4444;
}

.table-sav td:nth-child(7),
.table-sav td:nth-child(8),
.table-sav td:nth-child(9) {
    background: #fff3f3;
}

.table-sav td:nth-child(7) select,
.table-sav td:nth-child(8) input,
.table-sav td:nth-child(9) input {
    color: #ff0000;
}

/* Autres colonnes */
.table-sav td:nth-child(1),
.table-sav td:nth-child(2),
.table-sav td:nth-child(3),
.table-sav td:nth-child(10),
.table-sav td:nth-child(11) {
    background: #f7f7f7;
}

/* Séparateurs entre les groupes */
.table-sav td:nth-child(3),
.table-sav td:nth-child(6),
.table-sav td:nth-child(9) {
    border-right: 2px solid #e5e7eb;
}

/* Survol */
.table-sav tr:hover td {
    filter: brightness(0.98);
}

@media (max-width: 768px) {
    .card-sav {
        padding: 12px;
    }
	
	#ancrecalcul {
		width: calc(100vw - 24px);
	}
}



/* Bouton calcul SAV */

#calculsav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;


	min-width: 200px;
	min-height: 50px;
	padding: 8px 14px;

    margin: 20px 0 5px;


    background: #990066;
    border: none;
    border-radius: 7px;

    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

#calculsav:hover {
    background: #b30b7a;
    transform: translateY(-2px);
}

#calculsav:active {
    transform: translateY(0);
}

#calculsav:focus-visible {
    outline: 3px solid rgba(153, 0, 102, .3);
    outline-offset: 3px;
}
