/* =============================================================================
   Linov Configurateur — Styles front-office v2
   Colors : Navy #112A3E / Orange #F07F39
   ============================================================================= */

/* ---- Container ---- */
.linov-configurateur {
    margin: 2rem 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-family: inherit;
    overflow: hidden;
}

.linov-configurateur__title {
    font-size: 1rem;
    font-weight: 700;
    color: #112A3E;
    padding: 1.2rem 1.5rem .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    border-bottom: 3px solid #F07F39;
    margin: 0;
}

/* =============================================================================
   BANNIÈRE D'INFORMATION
   ============================================================================= */

.linov-info-banner {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .85rem 1.5rem;
    background: #f0f6ff;
    /*border-left: 3px solid #112A3E;*/
    margin: 0;
}

.linov-info-banner .material-icons {
    font-size: 1.1rem;
    color: #112A3E;
    flex-shrink: 0;
    margin-top: .05rem;
}

.linov-info-banner p {
    margin: 0;
    font-size: .82rem;
    color: #112A3E;
    line-height: 1.5;
}

/* =============================================================================
   PIÈCE JOINTE
   ============================================================================= */

.linov-configurateur__attachment {
    padding: 0 1.5rem 1.1rem;
    background: #fff;
}

.linov-attachment-hint {
    font-size: .7rem;
    color: #aaa;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: .4rem;
}

.linov-file-upload {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .4rem;
}

.linov-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.linov-file-upload__btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.1rem;
    border: 2px solid #ccc;
    border-radius: 0;
    background: #fff;
    color: #112A3E;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    user-select: none;
}

.linov-file-upload__btn .material-icons {
    font-size: 1rem;
}

.linov-file-upload__btn:hover {
    border-color: #F07F39;
    color: #F07F39;
}

.linov-file-upload__btn.has-file {
    border-color: #112A3E;
    color: #112A3E;
}

.linov-file-upload__name {
    font-size: .82rem;
    color: #888;
    font-style: italic;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linov-file-upload__name.has-file {
    color: #112A3E;
    font-style: normal;
    font-weight: 600;
}

/* =============================================================================
   OPTIONS (conteneur)
   ============================================================================= */

.linov-configurateur__options {
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   OPTION DIMENSION (Longueur) — cartes avec image
   ============================================================================= */

.linov-option--dimension {
    padding: 1.1rem 1.5rem 1.3rem;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.linov-option__name--dimension {
    font-size: .7rem;
    font-weight: 700;
    color: #112A3E;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: .9rem;
}

.linov-option__dimension-hint {
    display: none; /* masqué : l'image suffit */
}

.linov-option__values--dimension {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .7rem;
}

/* Carte dimension */
.linov-option__dim-label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 2px solid #ddd;
    border-radius: 0;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
    background: #fff;
    overflow: hidden;
    user-select: none;
    text-align: center;
    width:20%;
}

.linov-option__dim-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.linov-option__dim-label:hover {
    border-color: #F07F39;
}

.linov-option__dim-label.is-selected {
    border-color: #F07F39;
    box-shadow: 0 0 0 1px #F07F39;
}

/* Image dans la carte */
.linov-option__dim-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8e8e8;
    flex-shrink: 0;
}

.linov-option__dim-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.linov-option__dim-label:hover .linov-option__dim-img img {
    transform: scale(1.04);
}

/* Texte sous l'image */
.linov-option__dim-text {
    padding: .55rem .4rem .6rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.linov-option__dim-size {
    font-size: 1rem;
    font-weight: 800;
    color: #112A3E;
}

.linov-option__dim-price {
    font-size: .78rem;
    color: #F07F39;
    font-weight: 600;
}

.linov-option__dim-notice {
    display: none !important;
}

/* =============================================================================
   OPTIONS STANDARD
   ============================================================================= */

.linov-option {
    padding: .95rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.linov-option:last-child {
    border-bottom: none;
}

/* En-tête option : icône + nom + prix sélectionné */
.linov-option__header {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .7rem;
}

.linov-option__image {
    flex-shrink: 0;
    margin-bottom: 0;
}

.linov-option__image img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 0px;
}

.linov-option__name {
    font-size: .75rem;
    font-weight: 700;
    color: #112A3E;
    text-transform: uppercase;
    letter-spacing: .07em;
    flex: 1;
    margin: 0;
}

/* Prix de la valeur sélectionnée (affiché à droite du nom) */
.linov-option__selected-price {
    font-size: .88rem;
    font-weight: 700;
    color: #F07F39;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* Valeurs */
.linov-option__values {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* Boutons radio */
.linov-option__value-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .42rem .85rem;
    border: 2px solid #ccc;
    border-radius: 0px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    background: #fff;
    user-select: none;
    font-size: .8rem;
    font-weight: 700;
    color: #112A3E;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.linov-option__value-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.linov-option__value-label:hover {
    border-color: #F07F39;
    color: #F07F39;
}

.linov-option__value-label.is-selected {
    border-color: #F07F39;
    color: #F07F39;
    background: #fff;
}

/* Valeur avec image (surcharge produit) — carte façon dimension */
.linov-option__value-label--with-image {
    flex-direction: column;
    align-items: stretch;
    width: 130px;
    padding: 0;
    overflow: hidden;
    text-align: center;
}

.linov-option__value-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8e8e8;
    flex-shrink: 0;
}

.linov-option__value-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.linov-option__value-label--with-image:hover .linov-option__value-img img {
    transform: scale(1.04);
}

.linov-option__value-label--with-image .linov-option__value-text {
    padding: .5rem .4rem;
    white-space: normal;
}

/* Badge prix sur les boutons (affiché si prix > 0) */
.linov-option__price-badge {
    font-size: .75rem;
    font-weight: 600;
    color: #F07F39;
    margin-left: .15rem;
}

.linov-option__price-badge--free {
    color: #F07F39;
}

/* Disponibilité selon la variante choisie */
.linov-option__price-badge--included {
    color: #0D7A69;
}

.linov-option__price-badge--unavailable {
    color: #888;
    font-weight: 400;
}

.linov-option__value-label.is-unavailable,
.linov-option__dim-label.is-unavailable {
    cursor: not-allowed;
    border-style: dashed;
    border-color: #ddd;
    color: #999;
    background: #f7f7f7;
}

.linov-option__value-label.is-unavailable:hover,
.linov-option__dim-label.is-unavailable:hover {
    border-color: #ddd;
    color: #999;
}

.linov-option__value-label.is-unavailable img,
.linov-option__dim-label.is-unavailable img {
    opacity: .45;
    transform: none;
}

.linov-option__qty-control.is-unavailable .linov-qty-btn,
.linov-option__qty-control.is-unavailable .linov-qty-input {
    opacity: .45;
    cursor: not-allowed;
}

.linov-option__rule-note {
    margin: .5rem 0 0;
    font-size: .8rem;
    color: #888;
}

/* Produit sans option : le prix est la seule ligne du récapitulatif */
.linov-configurateur--price-only .linov-price-breakdown__total {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

/* Option sans choix à faire : une ligne d'état remplace les boutons */
.linov-option--locked .linov-option__values,
.linov-option--locked .linov-option__qty-control,
.linov-option--locked .linov-option__selected-price {
    display: none;
}

.linov-option__rule-status {
    margin: 0;
    font-size: .85rem;
}

.linov-option--included .linov-option__rule-status {
    color: #0D7A69;
    font-weight: 600;
}

.linov-option--included .linov-option__rule-status::before {
    content: "✓ ";
}

.linov-option--unavailable .linov-option__name,
.linov-option--unavailable .linov-option__rule-status {
    color: #999;
}

.linov-option--unavailable .linov-option__image {
    opacity: .45;
}

/* =============================================================================
   OPTION TYPE QUANTITÉ (compteur +/-)
   ============================================================================= */

.linov-option__qty-control {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.linov-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 2px solid #ccc;
    border-radius: 0px;
    background: #fff;
    color: #112A3E;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    user-select: none;
    padding: 0;
}

.linov-qty-btn:hover {
    border-color: #F07F39;
    color: #F07F39;
}

.linov-qty-btn:active {
    background: #fff3e8;
}

.linov-qty-input {
    width: 58px;
    height: 34px;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 0;
    font-size: .95rem;
    font-weight: 700;
    color: #112A3E;
    background: #fff;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.linov-qty-input::-webkit-outer-spin-button,
.linov-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.linov-qty-unit-price {
    font-size: .8rem;
    font-weight: 600;
    color: #F07F39;
    margin-left: .2rem;
}

.linov-qty-unit-price--free {
    color: #888;
}

/* =============================================================================
   RÉCAPITULATIF PRIX
   ============================================================================= */

.linov-configurateur__summary {
    padding: 1rem 1.5rem;
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.linov-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.linov-price-breakdown__base,
.linov-price-breakdown__option-line {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: #666;
}

.linov-price-breakdown__option-line {
    padding-left: 1rem;
    color: #888;
    font-style: italic;
}

.linov-price-breakdown__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #e0e0e0;
    padding-top: .8rem;
    margin-top: .5rem;
}

.linov-price-breakdown__total-label {
    font-size: .7rem;
    font-weight: 700;
    color: #112A3E;
    text-transform: uppercase;
    letter-spacing: .12em;
}

/* Bloc droit du total : prix + mention HT */
.linov-price-breakdown__total-right {
    text-align: right;
}

.linov-price-breakdown__total-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: #F07F39;
    line-height: 1;
    transition: color .3s;
}

.linov-price-breakdown__total-ht {
    display: block;
    font-size: .65rem;
    color: #aaa;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-top: .2rem;
}

.linov-price-breakdown__total-value.linov-price--changed {
    color: #F07F39;
}

.linov-price-value {
    font-weight: 600;
}

.linov-configurateur__disclaimer {
    font-size: .75rem;
    color: #bbb;
    margin-top: .7rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.linov-configurateur__disclaimer .material-icons {
    font-size: .95rem;
}

/* =============================================================================
   COORDONNÉES DE CONTACT
   ============================================================================= */

.linov-configurateur__contact {
    padding: 1.1rem 1.5rem;
    border-top: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.linov-configurateur__contact-title {
    font-size: .7rem;
    font-weight: 700;
    color: #112A3E;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: .9rem;
}

.linov-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem 1.2rem;
}

.linov-contact-field {
    display: flex;
    flex-direction: column;
}

.linov-required {
    color: #F07F39;
    font-weight: 700;
}

/* =============================================================================
   MESSAGE
   ============================================================================= */

.linov-configurateur__message {
    padding: 0 1.5rem 1.1rem;
    background: #fff;
}

.linov-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: #112A3E;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.linov-textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: .6rem;
    font-size: .9rem;
    line-height: 1.5;
    transition: border-color .2s;
    color: #333;
}

.linov-textarea:focus {
    border-color: #F07F39;
    outline: none;
    box-shadow: 0 0 0 2px rgba(240,127,57,.12);
}

/* =============================================================================
   BOUTON DEVIS
   ============================================================================= */

.linov-configurateur__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem 1.3rem;
    background: #fff;
    border-top: 1px solid #e8e8e8;
}

.linov-btn-devis {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2.2rem;
    font-size: .85rem;
    font-weight: 700;
    border-radius: 0;
    background: #F07F39;
    color: #fff !important;
    border: none;
    text-transform: uppercase;
    letter-spacing: .07em;
    transition: background .18s, transform .1s;
    cursor: pointer;
    text-decoration: none;
}

.linov-btn-devis:hover {
    background: #d96b26;
    color: #fff !important;
}

.linov-btn-devis:active {
    transform: scale(.97);
}

/* =============================================================================
   ALERTES
   ============================================================================= */

.linov-error-alert {
    animation: linov-slide-in .25s ease;
}

@keyframes linov-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   MON COMPTE — Liste des devis
   ============================================================================= */

.linov-my-devis {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.linov-devis-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.linov-devis-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .8rem 1.2rem;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
}

.linov-devis-card__meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.linov-devis-card__id {
    font-weight: 700;
    color: #112A3E;
}

.linov-devis-card__date {
    font-size: .82rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.linov-devis-card__date .material-icons {
    font-size: .9rem;
}

.linov-devis-card__status {
    font-size: .78rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.linov-status-pending  { background: #fff3cd; color: #856404; }
.linov-status-sent     { background: #cce5ff; color: #004085; }
.linov-status-accepted { background: #d4edda; color: #155724; }
.linov-status-refused  { background: #f8d7da; color: #721c24; }

.linov-devis-card__body {
    padding: 1.2rem;
}

.linov-devis-card__product {
    margin-bottom: .8rem;
    font-size: .95rem;
}

.linov-options-list {
    list-style: none;
    padding: 0;
    margin: .5rem 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.linov-options-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .88rem;
    color: #555;
}

.linov-opt-name {
    font-weight: 600;
    color: #112A3E;
}

.linov-opt-separator { color: #aaa; }

.linov-opt-price {
    font-size: .78rem;
    background: #fff3e8;
    border: 1px solid #F07F39;
    border-radius: 10px;
    padding: .05rem .4rem;
    color: #F07F39;
    margin-left: auto;
}

.linov-devis-card__total {
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 1px solid #eee;
    font-size: .95rem;
    color: #555;
}

.linov-price-total {
    font-size: 1.2rem;
    color: #F07F39;
    margin-left: .4rem;
    font-weight: 700;
}

.linov-devis-card__message {
    padding: .8rem 1.2rem;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: .88rem;
    color: #666;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .linov-option__values--dimension {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .linov-configurateur__title,
    .linov-option--dimension,
    .linov-option,
    .linov-configurateur__summary,
    .linov-configurateur__contact,
    .linov-configurateur__message,
    .linov-configurateur__actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .linov-contact-grid {
        grid-template-columns: 1fr;
    }

    .linov-option__values {
        flex-direction: column;
    }

    .linov-option__value-label {
        width: 100%;
    }

    .linov-price-breakdown__total {
        flex-direction: column;
        align-items: flex-start;
        gap: .4rem;
    }

    .linov-devis-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
}
