/* Formulaire de creation et de modification d'une annonce (templates/event/event-create.html) ;
   base : command.css (cartes, boutons) */

.listing-form {
    max-width: 920px;
}

.listing-form__warning {
    border-color: #f0c9c4;
    background: #fdf6f5;
    color: #7a1f16;
}

.lf-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    margin-right: 6px;
    border-radius: 50%;
    background: #b38f4f;
    color: #fff;
    font-size: 0.8em;
    vertical-align: middle;
}

/* Champs sur deux colonnes ; les champs larges prennent toute la ligne */
.lf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.lf-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.lf-field--wide {
    grid-column: 1 / -1;
}

.lf-field > label {
    font-weight: bold;
    font-size: 0.95em;
}

.lf-required {
    color: #b38f4f;
}

.lf-field input[type="text"],
.lf-field input[type="number"],
.lf-field input[type="email"],
.lf-field input[type="url"],
.lf-field input[type="date"],
.lf-field input:not([type]),
.lf-field select,
.lf-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--gris-bordure);
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.lf-field textarea {
    min-height: 90px;
    resize: vertical;
}

.lf-field input:focus,
.lf-field select:focus,
.lf-field textarea:focus {
    outline: 2px solid #d9c49a;
    border-color: #b38f4f;
}

.lf-field input[type="file"] {
    font-size: 0.9em;
}

/* Prix et devise (MoneyWidget : montant + devise) sur une ligne */
.lf-field:has(select[name="day_cost_1"]) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.lf-field:has(select[name="day_cost_1"]) > label,
.lf-field:has(select[name="day_cost_1"]) > .lf-help,
.lf-field:has(select[name="day_cost_1"]) > .lf-error {
    width: 100%;
}

.lf-field input[name="day_cost_0"] {
    width: 60%;
    display: inline-block;
}

.lf-field select[name="day_cost_1"] {
    width: 38%;
    display: inline-block;
}

.lf-help {
    color: var(--gris-secondaire);
    font-size: 0.85em;
    line-height: 1.35;
}

.lf-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: #c0392b;
}

.lf-error {
    color: #c0392b;
    font-size: 0.88em;
}

.lf-error--top {
    margin-bottom: 10px;
    font-weight: bold;
}

/* Photos actuelles */
.lf-photos {
    margin-bottom: 12px;
}

.lf-photos img {
    max-height: 110px;
    width: auto;
    border-radius: 8px;
}

/* Services (lignes generees par Event.render_eventservices / EventUtils.all_services) */
.lf-services {
    margin-bottom: 14px;
}

.lf-services .render_services_line {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 150px minmax(0, 1.4fr);
    align-items: center;
    gap: 8px 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gris-fond);
}

.lf-services__head {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 150px minmax(0, 1.4fr);
    gap: 8px 12px;
    color: var(--gris-secondaire);
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lf-services .render_services_line br {
    display: none;
}

.lf-services label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lf-services input[type="number"],
.lf-services select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--gris-bordure);
    border-radius: 8px;
    background: #fff;
}

.listing-form__submit {
    margin: 10px 0 0;
    text-align: right;
}

/* Select2 (pays, ville) : pleine largeur */
.lf-field .select2-container {
    width: 100% !important;
}

@media (max-width: 760px) {
    .lf-grid,
    .lf-grid--three {
        grid-template-columns: 1fr;
    }

    .lf-services .render_services_line {
        grid-template-columns: 1fr 1fr;
    }

    .lf-services__head {
        display: none;
    }

    .lf-services .render_services_line label {
        grid-column: 1 / -1;
    }

    .listing-form__submit {
        text-align: left;
    }
}

/* Informations fiscales DAC7 (templates/dac7/profile.html) */
.listing-form__ok {
    color: #2f6b28;
}

.lf-kind > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.lf-kind label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
}

/* Monaco, Grands Prix : demarche officielle (event/compliance.py) */
.lf-monaco {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid #ba9966;
    background: var(--gris-fond, #f6f1e9);
}

/* Regles monegasques en fenetre (event-create.js), fermee par la croix */
.lf-dialog {
    max-width: 640px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px 24px 16px;
    border: 0;
    border-top: 3px solid #ba9966;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.lf-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}
.lf-dialog__title {
    margin: 0 32px 12px 0;
    font-size: 1.2rem;
}
.lf-dialog h4 {
    margin-top: 16px;
    font-size: 1rem;
}
.lf-dialog__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    background: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #555;
    cursor: pointer;
}
.lf-dialog__close:hover,
.lf-dialog__close:focus-visible {
    color: #000;
}

/* Fiche des regles monegasques (templates/event/_monaco_rules_content.html) */
.monaco-rules__list {
  margin: 0 0 10px;
  padding-left: 20px;
  display: block !important;   /* navbar.css met toutes les listes en flex */
}

.monaco-rules__list li {
  margin-bottom: 4px;
}
