/* Squale Système — formulaire d'avis après commande (module lgcomments).
   À charger après la feuille du thème. Tous les sélecteurs sont limités à cette page. */

body#module-lgcomments-account {
    --sq-blue: #009ad0;
    --sq-blue-hover: #007cab;
    --sq-ink: #26333b;
    --sq-muted: #5d6c76;
    --sq-panel: #f7fafc;
    --sq-field: #fff;
    --sq-border: #dce7ed;
}

body#module-lgcomments-account #content-wrapper {
    max-width: 960px;
    margin: 26px auto 56px;
    float: none;
}

body#module-lgcomments-account #favoriteproducts_block_account {
    padding: clamp(22px, 4vw, 44px);
    background: #fff;
    border: 1px solid #dce7ed;
    border-top: 4px solid var(--sq-blue);
    border-radius: 12px;
    box-shadow: 0 16px 42px rgba(19, 75, 105, .09);
    color: var(--sq-ink);
}

body#module-lgcomments-account #favoriteproducts_block_account .page-heading {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    color: #202c33;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
}

body#module-lgcomments-account #favoriteproducts_block_account .page-heading::after {
    content: "Partagez votre expérience avec les produits de votre commande.";
    display: block;
    margin: 10px 0 28px;
    color: var(--sq-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

body#module-lgcomments-account #validate-form fieldset {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

body#module-lgcomments-account #validate-form legend.info-title {
    display: block;
    width: 100%;
    margin: 0 0 15px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--sq-border);
    color: #26333b;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

body#module-lgcomments-account #validate-form table.std {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
}

body#module-lgcomments-account #validate-form table.std tbody {
    display: block;
    width: 100%;
}

body#module-lgcomments-account #validate-form table.std tr {
    display: block;
    width: 100%;
    background: transparent;
}

body#module-lgcomments-account #validate-form table.std td,
body#module-lgcomments-account #validate-form table.std th {
    border: 0;
    background: transparent;
    color: var(--sq-ink);
    font-weight: 400;
    text-align: left;
}

body#module-lgcomments-account #validate-form table.std td.item {
    display: block;
    width: 100%;
    padding: 0;
}

body#module-lgcomments-account #validate-form table.std label {
    display: block;
    margin: 0 0 8px;
    color: #354b58;
    font-size: 14px;
    font-weight: 600;
}

body#module-lgcomments-account #validate-form textarea,
body#module-lgcomments-account #validate-form select.score {
    box-sizing: border-box;
    max-width: 100%;
    border: 1px solid #cad9e1;
    border-radius: 7px;
    background: var(--sq-field);
    color: #26333b;
    font: inherit;
    box-shadow: none;
}

body#module-lgcomments-account #validate-form textarea {
    display: block;
    width: 100% !important;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.5;
}

body#module-lgcomments-account #validate-form #lg_nick,
body#module-lgcomments-account #validate-form textarea[name^="product_title_"] {
    height: 48px !important;
    min-height: 48px;
}

body#module-lgcomments-account #validate-form textarea[name^="product_comment_"] {
    height: 130px !important;
    min-height: 130px;
}

body#module-lgcomments-account #validate-form textarea:focus,
body#module-lgcomments-account #validate-form select.score:focus {
    outline: 2px solid var(--sq-blue);
    outline-offset: 2px;
    border-color: var(--sq-blue);
}

/* Une fiche par produit, sans modifier les noms de champs ni le JavaScript du module. */
body#module-lgcomments-account #validate-form table.std tr:has(> th.item) {
    margin-top: 18px;
    padding: 18px 20px 0;
    border: 1px solid var(--sq-border);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--sq-panel);
}

body#module-lgcomments-account #validate-form table.std th.item {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 100px;
    padding: 0 0 18px;
    color: #26333b;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
}

body#module-lgcomments-account #validate-form table.std th.item img {
    display: block;
    flex: 0 0 auto;
    width: 96px;
    height: 96px !important;
    max-width: 96px;
    object-fit: contain;
    border: 0;
    border-radius: 7px;
    background: #fff;
}

body#module-lgcomments-account #validate-form table.std tr:has(> td.history_link) {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--sq-border);
    border-top: 1px solid #e5edf1;
    border-radius: 0 0 10px 10px;
    background: var(--sq-panel);
}

body#module-lgcomments-account #validate-form td.history_link {
    display: block !important;
    width: auto !important;
    max-width: none;
    padding: 0;
    color: #354b58;
    font-size: 14px;
    font-weight: 600;
}

body#module-lgcomments-account #validate-form td.history_link:first-child::before {
    content: "Votre note";
    display: block;
    margin-bottom: 9px;
}

body#module-lgcomments-account #validate-form select.score {
    min-width: 105px;
    height: 46px;
    padding: 0 12px;
    cursor: pointer;
}

body#module-lgcomments-account #validate-form td.history_link:first-child>div {
    float: none !important;
    margin-bottom: 10px;
}

body#module-lgcomments-account #validate-form td.history_link:first-child>div[style*="clear"] {
    display: none;
}

body#module-lgcomments-account #validate-form td.history_link img[id^="stars_"] {
    display: block;
    width: 100px !important;
    max-width: 100%;
    height: auto;
}

body#module-lgcomments-account #validate-form td.history_link textarea[name^="product_title_"] {
    margin: 7px 0 15px;
}

body#module-lgcomments-account #validate-form td.history_link textarea[name^="product_comment_"] {
    margin: 7px 0 0;
}

body#module-lgcomments-account #validate-form #sendcomments {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 8px 0 0;
    padding: 13px 20px;
    border: 1px solid var(--sq-blue);
    border-radius: 7px;
    background: var(--sq-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

body#module-lgcomments-account #validate-form #sendcomments:hover,
body#module-lgcomments-account #validate-form #sendcomments:focus {
    border-color: var(--sq-blue-hover);
    background: var(--sq-blue-hover);
    color: #fff;
}

@media (max-width: 767px) {
    body#module-lgcomments-account #content-wrapper {
        margin: 14px auto 36px;
    }

    body#module-lgcomments-account #favoriteproducts_block_account {
        padding: 20px 16px;
        border-radius: 8px;
    }

    body#module-lgcomments-account #validate-form table.std th.item {
        align-items: flex-start;
        gap: 12px;
        min-height: 0;
        font-size: 14px;
    }

    body#module-lgcomments-account #validate-form table.std th.item img {
        width: 72px;
        height: 72px !important;
        max-width: 72px;
    }

    body#module-lgcomments-account #validate-form table.std tr:has(> th.item) {
        padding: 14px 14px 0;
    }

    body#module-lgcomments-account #validate-form table.std tr:has(> td.history_link) {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 15px 14px;
    }

    body#module-lgcomments-account #validate-form td.history_link:first-child>div {
        display: inline-block;
        vertical-align: middle;
        margin-right: 12px;
    }
}