/* ==========================================================
   My LMNP Admin - Feuille de style de base
   Charte : bleu reservation en ligne, lignes propres, badges
   Contexte : pages Elementor plein ecran, desktop fixe
   ========================================================== */

:root {
    --lmnp-bleu: #0066FF;
    --lmnp-bleu-fonce: #0047B3;
    --lmnp-bleu-clair: #E6F0FF;
    --lmnp-gris-texte: #333333;
    --lmnp-gris-bordure: #DDDDDD;
    --lmnp-fond: #F7F9FC;
    --lmnp-vert-ok: #22A559;
    --lmnp-orange-attente: #F5A623;
    --lmnp-rouge-erreur: #E5484D;
    --lmnp-radius: 8px;
}

/* -------------------- Structure generale -------------------- */

.lmnp-accueil-wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--lmnp-gris-texte);
}

.lmnp-accueil-wrap h1 {
    color: var(--lmnp-bleu-fonce);
    font-weight: 700;
    margin-bottom: 24px;
}

.lmnp-accueil-boutons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* -------------------- Bandeau de raccourcis (haut de page) -------------------- */

.lmnp-bandeau-boutons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Boutons du bandeau reduits (10 boutons principaux depuis le
   2026-10-25, 11 sur certaines pages). */
.lmnp-bandeau-boutons .lmnp-btn {
    padding: 10px 18px;
    font-size: 12px;
}

/* -------------------- Boutons -------------------- */

.lmnp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--lmnp-radius);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.lmnp-btn:active {
    transform: scale(0.98);
}

.lmnp-btn-primary {
    background-color: var(--lmnp-bleu);
    color: #FFFFFF;
}

.lmnp-btn-primary:hover {
    background-color: var(--lmnp-bleu-fonce);
    color: #FFFFFF;
}

.lmnp-btn-secondaire {
    background-color: #FFFFFF;
    color: var(--lmnp-bleu);
    border: 1px solid var(--lmnp-bleu);
}

.lmnp-btn-secondaire:hover {
    background-color: var(--lmnp-bleu-clair);
}

.lmnp-btn-danger {
    background-color: #FFFFFF;
    color: var(--lmnp-rouge-erreur);
    border: 1px solid var(--lmnp-rouge-erreur);
}

.lmnp-btn-danger:hover {
    background-color: #FDEDED;
}

.lmnp-btn-disabled {
    background-color: #F0F0F0;
    color: #AAAAAA;
    border: 1px solid var(--lmnp-gris-bordure);
    cursor: not-allowed;
}

/* Ligne d'actions de la liste des reservations : distinction visuelle
   entre les boutons communs (France + Suisse) et ceux specifiques a la
   sequence France - meme couleur de texte (bleu), fond different. */
/* !important : neutralise le style par defaut du theme sur les balises
   <button> (Supprimer, Valider), qui sinon l'emporte sur une classe seule
   et affiche un fond noir la ou les <a> (Modifier, Self Check-in) restent
   corrects. */
.lmnp-btn-commun {
    background-color: #FFFFFF !important;
    color: var(--lmnp-bleu) !important;
    border: 1px solid var(--lmnp-bleu) !important;
}

.lmnp-btn-commun:hover {
    background-color: var(--lmnp-bleu-clair) !important;
}

.lmnp-btn-france {
    background-color: #000000 !important;
    color: var(--lmnp-bleu) !important;
    border: 1px solid #000000 !important;
}

.lmnp-btn-france:hover {
    background-color: #222222 !important;
}

/* Etape "France" deja jouee (progression l'a depassee, ou heure de
   check-out deja saisie) : reste active/cliquable pour permettre de la
   rejouer si besoin, mais visuellement distincte de l'etape en cours
   (lmnp-btn-france, bleu/fond noir) et de l'etape pas encore atteinte
   (lmnp-btn-disabled, grise/non cliquable). */
.lmnp-btn-deja-joue {
    background-color: var(--lmnp-rouge-erreur) !important;
    color: var(--lmnp-gris-texte) !important;
    border: 1px solid var(--lmnp-rouge-erreur) !important;
}

.lmnp-btn-deja-joue:hover {
    opacity: 0.85;
}

/* Bouton "Self Check-in" Suisse, colonne "Actions specifiques" : bleu/
   fond noir (lmnp-btn-france) tant que non envoye, rouge/fond noir des
   qu'il a ete envoye au moins 1 fois - reste actif dans les 2 cas
   (rejouable, jamais desactive). */
.lmnp-btn-checkin-envoye {
    background-color: #000000 !important;
    color: var(--lmnp-rouge-erreur) !important;
    border: 1px solid #000000 !important;
}

.lmnp-btn-checkin-envoye:hover {
    background-color: #222222 !important;
}

/* Etape a ne pas oublier (ex: "Infos horaire check-out" a J-2) */
.lmnp-btn-urgent {
    color: var(--lmnp-rouge-erreur);
    border-color: var(--lmnp-rouge-erreur);
    font-weight: 700;
    text-decoration: underline;
}

.lmnp-btn-urgent:hover {
    background-color: #FDEDED;
}

/* -------------------- Tableau des reservations -------------------- */

.lmnp-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    border-radius: var(--lmnp-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lmnp-table th {
    background-color: var(--lmnp-bleu-clair);
    color: var(--lmnp-bleu-fonce);
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lmnp-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--lmnp-gris-bordure);
    font-size: 14px;
}

.lmnp-table tr:last-child td {
    border-bottom: none;
}

.lmnp-table tr:hover td {
    background-color: var(--lmnp-fond);
}

/* -------------------- Compteurs par residence (liste reservations) -------------------- */

.lmnp-compteurs-residence {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

/* -------------------- Badges de statut -------------------- */

.lmnp-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.lmnp-badge-ok {
    background-color: #E6F7ED;
    color: var(--lmnp-vert-ok);
}

.lmnp-badge-attente {
    background-color: #FEF3E2;
    color: var(--lmnp-orange-attente);
}

.lmnp-badge-erreur {
    background-color: #FDECEC;
    color: var(--lmnp-rouge-erreur);
}

/* Colonne "Depart" de la liste des reservations : date + heure de
   check-out prevue (France), mises en avant pour reperer le planning du
   lendemain d'un coup d'oeil dans le recap quotidien. */
.lmnp-badge-checkout-heure {
    background-color: #FDECEC;
    color: var(--lmnp-rouge-erreur);
    font-weight: 700;
}

/* -------------------- Page "Ajouter une reservation" -------------------- */

.lmnp-ajouter-bas {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1000px;
    margin: 32px auto 0;
    flex-wrap: wrap;
}

.lmnp-ajouter-bas-gauche,
.lmnp-ajouter-bas-droite {
    flex: 1 1 0;
    min-width: 280px;
}

/* -------------------- Formulaires d'envoi d'email (2 colonnes) -------------------- */

.lmnp-email-form {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1400px;
    flex-wrap: wrap;
}

.lmnp-email-form-gauche {
    flex: 0 0 360px;
}

.lmnp-email-form-droite {
    flex: 1 1 480px;
}

.lmnp-email-form .lmnp-form-row {
    max-width: 100%;
}

.lmnp-email-form-droite textarea {
    min-height: 340px;
}

/* -------------------- Formulaires -------------------- */

.lmnp-form-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px 24px;
    max-width: 1400px;
}

.lmnp-form-grid .lmnp-form-row {
    margin-bottom: 12px;
}

.lmnp-form-grid .lmnp-form-row label {
    font-size: 13px;
}

.lmnp-form-grid .lmnp-form-row input[type="text"],
.lmnp-form-grid .lmnp-form-row input[type="email"],
.lmnp-form-grid .lmnp-form-row input[type="tel"],
.lmnp-form-grid .lmnp-form-row input[type="date"],
.lmnp-form-grid .lmnp-form-row input[type="number"],
.lmnp-form-grid .lmnp-form-row select,
.lmnp-form-grid .lmnp-form-row textarea {
    padding: 8px 10px;
    font-size: 13px;
}

.lmnp-form-section h3 {
    margin-top: 0;
}

.lmnp-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    max-width: 480px;
}

.lmnp-form-grid .lmnp-form-row {
    max-width: 100%;
}

.lmnp-form-row label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.lmnp-form-row label.lmnp-label-vide {
    color: var(--lmnp-rouge-erreur);
}

.lmnp-form-row label.lmnp-label-rempli {
    color: var(--lmnp-vert-ok);
}

.lmnp-form-row input[type="text"],
.lmnp-form-row input[type="email"],
.lmnp-form-row input[type="tel"],
.lmnp-form-row input[type="date"],
.lmnp-form-row input[type="number"],
.lmnp-form-row select,
.lmnp-form-row textarea {
    padding: 10px 12px;
    border: 1px solid var(--lmnp-gris-bordure);
    border-radius: var(--lmnp-radius);
    font-size: 14px;
}

.lmnp-form-row input:focus,
.lmnp-form-row select:focus,
.lmnp-form-row textarea:focus {
    outline: none;
    border-color: var(--lmnp-bleu);
    box-shadow: 0 0 0 3px var(--lmnp-bleu-clair);
}

/* -------------------- Actions de ligne (tableau) -------------------- */

.lmnp-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Separateur visuel entre la colonne "Actions communes" et la colonne
   "Actions specifiques" de la liste des reservations. */
.lmnp-col-separee {
    border-left: 2px solid var(--lmnp-gris-bordure);
}

.lmnp-row-actions form {
    margin: 0;
    display: inline-flex;
}

.lmnp-row-actions .lmnp-btn {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Colonne "Actions communes" : 4 boutons sur 2 lignes de 2.
   Colonne "Actions specifiques" (France) : 6 boutons sur 2 lignes de 3. */
.lmnp-row-actions-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.lmnp-row-actions-grille-3 {
    grid-template-columns: repeat(3, 1fr);
}

.lmnp-row-actions-grille form,
.lmnp-row-actions-grille .lmnp-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.lmnp-table-scroll {
    width: 100%;
    overflow-x: auto;
}

/* -------------------- Modale (ex: proposition d'envoi immediat
   de l'Article L324-2 juste apres l'ajout d'une reservation dont
   l'arrivee est a 6 jours ou moins) -------------------- */

.lmnp-modale-fond {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lmnp-modale-boite {
    background-color: #FFFFFF;
    border-radius: var(--lmnp-radius);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.lmnp-modale-boite h3 {
    color: var(--lmnp-bleu-fonce);
    margin-top: 0;
}

.lmnp-modale-form {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Colonne "Montant" de la liste des reservations : clic sur le montant
   pour saisir une avance payee par le client (2026-10-14). */
.lmnp-avance summary {
    cursor: pointer;
    text-decoration: underline dotted;
    white-space: nowrap;
}
.lmnp-avance-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    min-width: 160px;
}
.lmnp-avance-form input {
    width: 100%;
}
.lmnp-avance-info {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    color: #2e7d32;
    white-space: nowrap;
}

/* Factures (ecran [lmnp_factures], 2026-10-21) */
.lmnp-btn-desactive {
    opacity: 0.5;
    cursor: not-allowed;
}

.lmnp-aide {
    font-size: 0.9em;
    color: #666;
}

.lmnp-lignes-facture input {
    width: 100%;
    box-sizing: border-box;
}

.lmnp-lignes-facture td:first-child {
    width: 50%;
}

.lmnp-lignes-facture .lmnp-montant-ligne,
.lmnp-lignes-facture tfoot td:last-child {
    text-align: right;
    white-space: nowrap;
}

.lmnp-choix-sejours {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 6px 10px;
    margin-bottom: 8px;
}

.lmnp-choix-sejours label {
    display: block;
    padding: 3px 0;
}

.lmnp-form-inline {
    display: inline-block;
    margin: 0;
}

/* -------------------- Ecran Configuration (logements, messages) -------------------- */

.lmnp-form-row.lmnp-form-row-large {
    max-width: 900px;
}

.lmnp-form-row-large textarea {
    font-family: inherit;
    line-height: 1.5;
}

.lmnp-table input.lmnp-input-km {
    width: 110px;
    padding: 6px 8px;
}

.lmnp-radio-ligne {
    display: block;
    font-weight: normal;
    white-space: nowrap;
    margin: 2px 0;
}

.lmnp-form-ligne {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

/* -------------------- Indemnites km : annee, onglets pays -------------------- */

.lmnp-form-annee {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lmnp-form-annee label {
    font-weight: 600;
    font-size: 14px;
}

.lmnp-form-annee input[type="number"] {
    width: 110px;
    padding: 10px 12px;
    border: 1px solid var(--lmnp-gris-bordure);
    border-radius: var(--lmnp-radius);
    font-size: 14px;
}

.lmnp-onglets {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--lmnp-bleu);
}

.lmnp-onglet {
    padding: 10px 24px;
    border: 1px solid var(--lmnp-gris-bordure);
    border-bottom: none;
    border-radius: var(--lmnp-radius) var(--lmnp-radius) 0 0;
    background: var(--lmnp-fond);
    color: var(--lmnp-gris-texte);
    font-weight: 600;
    text-decoration: none;
}

.lmnp-onglet:hover {
    background: var(--lmnp-bleu-clair);
}

.lmnp-onglet.lmnp-onglet-actif {
    background: var(--lmnp-bleu);
    border-color: var(--lmnp-bleu);
    color: #fff;
}

.lmnp-onglet-contenu {
    padding-top: 16px;
}

.lmnp-sous-tableau {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 20px;
}

.lmnp-ajout-fichier {
    margin: 8px 0;
    padding: 10px 12px;
    border: 1px solid var(--lmnp-gris-bordure);
    border-radius: var(--lmnp-radius);
    background: #fff;
}

.lmnp-ajout-fichier summary {
    cursor: pointer;
}

/* Bouton d'ajout (vert), ex: "Ajouter un logement" de la Configuration. */
.lmnp-btn-ajout {
    background-color: var(--lmnp-vert-ok);
    color: #fff;
}

.lmnp-btn-ajout:hover {
    background-color: #1b8a49;
    color: #fff;
}

/* -------------------- Menu principal a sous-menus (2026-10-25) -------------------- */

.lmnp-menu-groupe {
    position: relative;
    display: inline-block;
}

.lmnp-sous-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 220px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--lmnp-gris-bordure);
    border-radius: var(--lmnp-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Petit pont invisible : le sous-menu ne se ferme pas entre le bouton
   et la liste. */
.lmnp-sous-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.lmnp-menu-groupe:hover .lmnp-sous-menu,
.lmnp-menu-groupe:focus-within .lmnp-sous-menu {
    display: block;
}

.lmnp-sous-menu li {
    margin: 0;
}

.lmnp-sous-menu a {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--lmnp-gris-texte);
    text-decoration: none;
    white-space: nowrap;
}

.lmnp-sous-menu a:hover,
.lmnp-sous-menu a:focus {
    background: var(--lmnp-bleu-clair);
    color: var(--lmnp-bleu-fonce);
}

.lmnp-sous-menu a.lmnp-menu-courant {
    font-weight: 700;
    color: var(--lmnp-bleu);
}

.lmnp-menu-groupe .lmnp-btn span {
    margin-left: 6px;
}

/* -------------------- Module TO DO (2026-11-01) -------------------- */

/* Les 3 prochaines taches, a droite du menu principal. */
.lmnp-todo-bandeau {
    margin-left: auto;
    max-width: 360px;
    padding: 6px 12px;
    border: 1px solid var(--lmnp-gris-bordure);
    border-radius: var(--lmnp-radius);
    background: #fff;
    font-size: 12px;
    line-height: 1.4;
}

.lmnp-todo-bandeau-titre {
    font-weight: 700;
    color: var(--lmnp-bleu-fonce);
    text-decoration: none;
}

.lmnp-todo-bandeau ul {
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.lmnp-todo-bandeau li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lmnp-todo-bandeau-date {
    font-weight: 600;
}

.lmnp-todo-bandeau-vide {
    margin-left: 8px;
    color: #777;
}

.lmnp-todo-bandeau .lmnp-todo-retard,
.lmnp-todo-table .lmnp-todo-retard .lmnp-todo-delai {
    color: var(--lmnp-rouge-erreur);
    font-weight: 600;
}

.lmnp-todo-bandeau .lmnp-todo-proche,
.lmnp-todo-table .lmnp-todo-proche .lmnp-todo-delai {
    color: #B9770E;
    font-weight: 600;
}

/* Ecran [lmnp_todo] */
.lmnp-todo-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.lmnp-todo-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
}

.lmnp-todo-champ-texte {
    flex: 1 1 320px;
}

.lmnp-todo-table td form {
    margin: 0;
}

@media (max-width: 782px) {
    .lmnp-todo-bandeau {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }
}
