/* Variante moderne du formulaire de devis (page /demande-de-devis-moderne).
 * Règles limitées à .lc-devis ; reprend la charte du site (jaune #EFC631, Playfair
 * Display pour les titres, Source Sans Pro pour le texte). */

.lc-devis {
    --lc-accent: #EFC631;
    --lc-accent-soft: #FDF6DC;
    --lc-ink: #212529;
    --lc-muted: #6c757d;
    --lc-line: #DDE1E5;
    --lc-danger: #C0392B;
    --lc-radius: 12px;
    max-width: 760px;
    margin: 0 auto;
    color: var(--lc-ink);
}

/* Sections */
.lc-section {
    background: #fff;
    border: 1px solid var(--lc-line);
    border-radius: 16px;
    padding: 24px 28px 8px;
    margin: 0 0 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.lc-section-title {
    float: left; /* légende dans le flux de la carte */
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    margin: 0 0 18px;
    padding: 0;
}
.lc-section-title + * { clear: both; }
.lc-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #000;
    color: var(--lc-accent);
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

/* Grille : une colonne, deux pour les champs courts sur ordinateur */
.lc-grid {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 20px;
}
@media (min-width: 768px) {
    .lc-grid { grid-template-columns: 1fr 1fr; }
    .lc-field { grid-column: 1 / -1; }
    .lc-field.lc-half { grid-column: auto; }
}

/* Champs */
.lc-field {
    margin-bottom: 18px;
    animation: lc-appear 0.2s ease-out;
}
@keyframes lc-appear {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
.lc-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.lc-required { color: var(--lc-muted); font-weight: 400; }
.lc-help, .lc-error {
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.35;
}
.lc-help { color: var(--lc-muted); }
.lc-error { color: var(--lc-danger); font-weight: 600; }

.lc-input,
.lc-devis .s_website_form_date .form-control {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font: inherit;
    font-size: 1rem;
    color: var(--lc-ink);
    background: #fff;
    border: 1px solid #CED4DA;
    border-radius: var(--lc-radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.lc-input { resize: vertical; min-height: 110px; }
.lc-input:focus,
.lc-devis .s_website_form_date .form-control:focus {
    outline: none;
    border-color: #B8941C;
    box-shadow: 0 0 0 4px rgba(239, 198, 49, 0.35);
}
.lc-input.is-invalid,
.lc-devis .s_website_form_date .form-control.is-invalid {
    border-color: var(--lc-danger);
    background-image: none;
    padding-right: 14px;
}

/* Champ date : icône intégrée au champ */
.lc-devis .s_website_form_date { position: relative; flex-wrap: nowrap; }
.lc-devis .s_website_form_date .form-control { padding-right: 46px; border-radius: var(--lc-radius) !important; }
.lc-devis .s_website_form_date .input-group-text {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    z-index: 5;
    background: transparent;
    border: 0;
    color: var(--lc-muted);
}

/* Choix : cartes cliquables */
.lc-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 576px) {
    .lc-choices { grid-template-columns: repeat(var(--lc-cols, 2), 1fr); }
}
.lc-choice {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #CED4DA;
    border-radius: var(--lc-radius);
    background: #fff;
    cursor: pointer;
    line-height: 1.35;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.lc-choice:hover { border-color: #ADB5BD; }
.lc-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.lc-choice-mark {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 2px solid #ADB5BD;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
/* Choix sélectionné : noir sur jaune, comme les boutons du site */
.lc-choice.is-checked {
    border-color: var(--lc-accent);
    background: var(--lc-accent);
    color: #000;
    font-weight: 600;
}
.lc-choice.is-checked .lc-choice-mark {
    border-color: #000;
    background: #000;
    box-shadow: inset 0 0 0 4px var(--lc-accent);
}
.lc-choice:focus-within { box-shadow: 0 0 0 4px rgba(239, 198, 49, 0.35); }

/* Choix courts : boutons segmentés */
.lc-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lc-segmented .lc-choice {
    flex: 1 1 0;
    min-width: max-content;
    justify-content: center;
    text-align: center;
    padding: 11px 16px;
    font-weight: 600;
}
.lc-segmented .lc-choice.is-checked { background: var(--lc-accent); color: #000; border-color: var(--lc-accent); }

.has-error .lc-choice { border-color: var(--lc-danger); }

/* Envoi */
.lc-actions {
    text-align: center;
    padding: 8px 0 24px;
}
.lc-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 280px;
    min-height: 56px;
    padding: 0 36px;
    border: 0;
    border-radius: 999px;
    background: var(--lc-accent);
    color: #000;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, background-color 0.15s;
}
.lc-submit:hover { background: #E5B91C; box-shadow: 0 6px 18px rgba(239, 198, 49, 0.45); }
.lc-submit:active { transform: translateY(1px); }
.lc-submit:disabled { opacity: 0.7; cursor: progress; }
.lc-form-error {
    color: var(--lc-danger);
    font-weight: 600;
    margin-bottom: 12px;
}
.lc-muted { color: var(--lc-muted); }
.lc-small { font-size: 0.85rem; margin-top: 12px; }

.lc-trap { position: absolute; left: -10000px; }

/* Confirmation */
.lc-sent {
    text-align: center;
    background: #fff;
    border: 1px solid var(--lc-line);
    border-radius: 16px;
    padding: 48px 28px;
}
.lc-sent h2 { font-family: 'Playfair Display', serif; margin: 16px 0 12px; }
.lc-sent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #397B21;
    color: #fff;
    font-size: 28px;
}

/* Mobile */
@media (max-width: 575.98px) {
    .lc-section { padding: 20px 16px 4px; border-radius: 14px; }
    .lc-section-title { font-size: 1.25rem; }
    .lc-submit { width: 100%; min-width: 0; }
}

/* Fond de page derrière les cartes ; introduction alignée sur le formulaire */
.lc-devis-page { background: #F6F5F4; }
.lc-devis-intro { max-width: 760px; margin: 0 auto; text-align: center; font-size: 1.05rem; color: #495057; }

/* Place réservée au formulaire tant que React ne l'a pas monté (élément vide) : sans elle, le
 * pied de page s'affiche en haut puis est repoussé (décalage de mise en page mesuré par
 * Lighthouse : CLS 0,5 sur ordinateur). Hauteurs un peu inférieures à celles du formulaire
 * affiché (relevé du 27/10/2026 : 3370 px sur téléphone, 2477 px à partir de 768 px) ; la règle
 * cesse de s'appliquer dès que le formulaire est là. Sans JavaScript, rien n'est réservé. */
@media (scripting: enabled) {
    #devis-root:empty { min-height: 3300px; }
}
@media (scripting: enabled) and (min-width: 768px) {
    #devis-root:empty { min-height: 2450px; }
}
