/* =========================================================================
   Petits Mouchoirs — habillage de l'application (par-dessus Bootstrap 3)
   ========================================================================= */

:root {
    --pm-navy: #1f2d3d;
    --pm-navy-dark: #16212e;
    --pm-accent: #2f80ed;
    --pm-accent-dark: #1f66c7;
    --pm-accent-soft: #e8f1fd;
    --pm-bg: #f3f5f9;
    --pm-card: #ffffff;
    --pm-border: #e2e8f0;
    --pm-text: #2b2f36;
    --pm-muted: #6b7280;
    --pm-success: #27ae60;
    --pm-warning: #f2994a;
    --pm-danger: #eb5757;
    --pm-radius: 10px;
    --pm-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
}

/* ---------- Base ---------- */
html { background: var(--pm-bg); }
body {
    background: var(--pm-bg);
    color: var(--pm-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    padding-top: 76px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--pm-accent); }
a:hover, a:focus { color: var(--pm-accent-dark); text-decoration: none; }
h1, h2, h3, h4 { font-weight: 600; color: var(--pm-navy); letter-spacing: -.01em; }
.lead { color: var(--pm-muted); }

/* ---------- Barre de navigation ---------- */
.navbar-pm {
    background: var(--pm-navy);
    border: 0;
    box-shadow: 0 2px 12px rgba(16, 24, 40, .25);
    min-height: 56px;
}
.navbar-pm .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .01em;
    height: 56px;
    line-height: 26px;
    padding: 15px 15px;
}
.navbar-pm .navbar-brand .fa { color: #7cc4ff; margin-right: 6px; }
.navbar-pm .navbar-brand:hover, .navbar-pm .navbar-brand:focus { color: #fff; }
.navbar-pm .navbar-nav > li > a {
    color: rgba(255, 255, 255, .78);
    padding: 18px 13px;
    line-height: 20px;
    font-weight: 500;
    transition: color .15s, background .15s;
}
.navbar-pm .navbar-nav > li > a .fa { margin-right: 6px; opacity: .75; }
.navbar-pm .navbar-nav > li > a:hover,
.navbar-pm .navbar-nav > li > a:focus,
.navbar-pm .navbar-nav > .open > a,
.navbar-pm .navbar-nav > .open > a:hover,
.navbar-pm .navbar-nav > .open > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}
.navbar-pm .navbar-nav > .active > a,
.navbar-pm .navbar-nav > .active > a:hover,
.navbar-pm .navbar-nav > .active > a:focus {
    color: #fff;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--pm-accent);
}
.navbar-pm .caret { margin-left: 4px; opacity: .7; }
.navbar-pm .navbar-toggle {
    border-color: rgba(255, 255, 255, .25);
    margin-top: 11px;
    margin-bottom: 11px;
}
.navbar-pm .navbar-toggle .icon-bar { background: #fff; }
.navbar-pm .navbar-toggle:hover, .navbar-pm .navbar-toggle:focus { background: rgba(255, 255, 255, .1); }
.navbar-pm .dropdown-menu {
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    box-shadow: var(--pm-shadow);
    padding: 6px 0;
    margin-top: 0;
}
.navbar-pm .dropdown-menu > li > a { padding: 8px 18px; color: var(--pm-text); }
.navbar-pm .dropdown-menu > li > a:hover, .navbar-pm .dropdown-menu > li > a:focus { background: var(--pm-accent-soft); color: var(--pm-accent-dark); }
.navbar-pm .dropdown-menu > li > a .fa { width: 18px; color: var(--pm-muted); }
.navbar-pm .navbar-user > a .fa-user-circle { font-size: 18px; vertical-align: -2px; margin-right: 6px; opacity: 1; color: #7cc4ff; }
@media (max-width: 767px) {
    .navbar-pm .navbar-collapse { background: var(--pm-navy-dark); border-top: 1px solid rgba(255, 255, 255, .08); }
    .navbar-pm .navbar-nav > li > a { padding: 12px 15px; }
    .navbar-pm .navbar-nav > .active > a { box-shadow: inset 3px 0 0 var(--pm-accent); }
    .navbar-pm .navbar-nav .open .dropdown-menu > li > a { color: rgba(255, 255, 255, .8); }
    .navbar-pm .navbar-nav .open .dropdown-menu > li > a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
}

/* ---------- Fil d'Ariane ---------- */
.breadcrumb {
    background: transparent;
    padding: 4px 0 14px;
    margin: 0;
    font-size: 13px;
}
.breadcrumb > li + li:before { content: "\203A"; color: #b6bec9; padding: 0 8px; }
.breadcrumb > .active { color: var(--pm-muted); }

/* ---------- Carte de page ---------- */
.starter-template {
    background: var(--pm-card);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow);
    padding: 26px 32px 32px;
    margin-bottom: 32px;
    text-align: left;
}
.starter-template > h1,
.starter-template > h1:first-child {
    font-size: 24px;
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--pm-border);
    position: relative;
}
.starter-template > h1:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 3px;
    border-radius: 3px;
    background: var(--pm-accent);
}
.starter-template > h1 .btn, .starter-template h2 .btn { vertical-align: middle; margin-left: 10px; }
.starter-template h2 {
    font-size: 19px;
    margin: 26px 0 12px;
}
.starter-template h3 {
    font-size: 16px;
    margin: 22px 0 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--pm-muted);
}
.starter-template h3:first-child { margin-top: 0; }

/* Page d'accueil (hero) */
.page-hero {
    text-align: center;
    padding: 64px 32px;
    background: linear-gradient(160deg, var(--pm-navy) 0%, #2a4a73 60%, var(--pm-accent) 140%);
    border: 0;
    color: #fff;
}
.page-hero > h1, .page-hero > h1:first-child { color: #fff; border: 0; font-size: 30px; margin-bottom: 10px; padding: 0; }
.page-hero > h1:after { display: none; }
.page-hero .lead { color: rgba(255, 255, 255, .78); font-size: 17px; margin: 0; }
.page-hero .hero-icon { font-size: 44px; color: #7cc4ff; margin-bottom: 14px; display: block; }

/* Page de connexion */
.page-login { max-width: 440px; margin: 32px auto; }
.page-login .login-title { text-align: center; margin: 0 0 22px; font-size: 22px; }
.page-login .login-title .fa { display: block; font-size: 34px; color: var(--pm-accent); margin-bottom: 10px; }
.page-login .btn { width: 100%; float: none !important; }

/* Espacement vertical entre colonnes empilées (comportement d'origine) */
.row > [class*="col-"] { margin-top: 12px; }
.row + .row { margin-top: 12px; }
@media (min-width: 1200px) { .row [class*="col-lg-"] + [class*="col-lg-"] { margin-top: 0; } }
@media (min-width: 992px) { .row [class*="col-md-"] + [class*="col-md-"] { margin-top: 0; } }
@media (min-width: 768px) { .row [class*="col-sm-"] + [class*="col-sm-"] { margin-top: 0; } }

/* ---------- Formulaires ---------- */
.form-control {
    border: 1px solid #d5dbe5;
    border-radius: 6px;
    box-shadow: none;
    height: 38px;
    color: var(--pm-text);
    transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; }
.form-control:focus {
    border-color: var(--pm-accent);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, .18);
}
.form-control::placeholder { color: #a5adba; }
span.form-control { background: #fafbfd; }
.input-group-addon {
    background: #f1f4f8;
    border: 1px solid #d5dbe5;
    border-radius: 6px;
    color: #4b5563;
    font-weight: 500;
    font-size: 13px;
    min-width: 150px;
    text-align: left;
}
.input-group .input-group-addon:first-child { border-right: 0; }
.input-group .input-group-addon:last-child { border-left: 0; }
.col-xs-6 .input-group-addon, .col-xs-4 .input-group-addon, .col-xs-3 .input-group-addon, .col-xs-2 .input-group-addon { min-width: 90px; }
.input-group .form-control { z-index: 1; }
.input-group.text-right .form-control { text-align: right; }
.has-error .input-group-addon { background: #fdecec; border-color: var(--pm-danger); color: #b42318; }
.has-error .form-control { border-color: var(--pm-danger); }
.has-warning .input-group-addon { background: #fff4e5; border-color: var(--pm-warning); color: #b54708; }
.has-warning .form-control { border-color: var(--pm-warning); }
.help-block { font-size: 12.5px; margin: 4px 0 0 2px; }
.has-error .help-block { color: #b42318; }
.has-warning .help-block { color: #b54708; }
label { font-weight: 500; }

/* ---------- Boutons ---------- */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 7px 16px;
    text-shadow: none;
    box-shadow: none;
    background-image: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:focus, .btn:active:focus { outline: 0; box-shadow: 0 0 0 3px rgba(47, 128, 237, .25); }
.btn-primary { background: var(--pm-accent); border-color: var(--pm-accent); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary:active:hover { background: var(--pm-accent-dark); border-color: var(--pm-accent-dark); }
.btn-danger { background: var(--pm-danger); border-color: var(--pm-danger); }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: #d64545; border-color: #d64545; }
.btn-default { background: #fff; border-color: #d5dbe5; color: var(--pm-text); }
.btn-default:hover, .btn-default:focus { background: #f3f5f9; border-color: #c4ccd8; }
.btn.fa { font-family: FontAwesome, inherit; }
.btn.fa:before { font-family: FontAwesome; }
.btn-primary.fa { padding: 7px 12px; font-size: 14px; vertical-align: middle; }
.btn-ok { color: #fff; }

/* ---------- Alertes ---------- */
.alert {
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 8px;
    background-image: none;
    box-shadow: none;
    text-shadow: none;
    padding: 13px 18px;
}
.alert-danger { background: #fdf2f2; border-color: #f7c6c6; border-left-color: var(--pm-danger); color: #8a1f1f; }
.alert-success { background: #eefaf2; border-color: #bfe8cd; border-left-color: var(--pm-success); color: #1d6b3a; }
.alert-warning { background: #fff7eb; border-color: #f9dcb6; border-left-color: var(--pm-warning); color: #8a4b0a; }
.alert-info { background: var(--pm-accent-soft); border-color: #bfd8f8; border-left-color: var(--pm-accent); color: #1d4f8f; }
.alert ul { margin-bottom: 0; padding-left: 18px; }
.alert a { font-weight: 600; }
.well-sm.alert { padding: 10px 14px; margin-bottom: 8px; }

/* ---------- Tableaux ---------- */
.table { margin-bottom: 0; }
.table > thead > tr > th {
    background: #f1f4f8;
    color: #4b5563;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--pm-border) !important;
    vertical-align: middle;
    padding: 11px 10px;
    white-space: nowrap;
}
.table > thead > tr > th .fa { color: #9aa3b2; }
.table > tbody > tr > td { vertical-align: middle; padding: 10px; border-top: 1px solid var(--pm-border); }
.table > tfoot > tr > th, .table > tfoot > tr > td {
    background: #fafbfd;
    color: var(--pm-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 8px;
    border-top: 1px solid var(--pm-border);
}
.table > tfoot select {
    width: 100%;
    max-width: 100%;
    height: 28px;
    font-size: 12px;
    border: 1px solid #d5dbe5;
    border-radius: 5px;
    background: #fff;
    color: var(--pm-text);
}
.table-bordered { border: 1px solid var(--pm-border); border-radius: 8px; overflow: hidden; }
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > th {
    border-color: var(--pm-border);
}
.table-striped > tbody > tr:nth-of-type(odd) { background: #fafbfd; }
.table > tbody > tr:hover { background: var(--pm-accent-soft) !important; }
.table > tbody > tr.warning > td { background: #fff7eb; box-shadow: inset 3px 0 0 var(--pm-warning); }
.table > tbody > tr.warning:hover > td { background: #fff1dc !important; }
.table > tbody > tr.danger > td { background: #fdf2f2; box-shadow: inset 3px 0 0 var(--pm-danger); }
.table > tbody > tr.success > td { background: #eefaf2; box-shadow: inset 3px 0 0 var(--pm-success); }
.table > tbody > tr.info > td { background: var(--pm-accent-soft); }
.table td .fa-info-circle { color: #9aa3b2; }
.table td a.fa-globe { font-size: 16px; }
/* bouton "détail" rond en bout de ligne */
.table a.fa-arrow-right.fa-2x {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 14px;
    text-align: center;
    border-radius: 50%;
    background: var(--pm-accent-soft);
    color: var(--pm-accent);
    transition: background .15s, color .15s, transform .15s;
}
.table a.fa-arrow-right.fa-2x:hover { background: var(--pm-accent); color: #fff; transform: translateX(2px); }
.table a.fa-trash, .table a.fa-trash-o, .table a.fa-times, .table a.fa-remove { color: var(--pm-danger); }

/* ---------- DataTables ---------- */
.dataTables_wrapper { margin-top: 4px; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info { color: var(--pm-muted); font-size: 13px; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d5dbe5;
    border-radius: 6px;
    height: 34px;
    padding: 4px 10px;
    box-shadow: none;
    background: #fff;
}
.dataTables_wrapper .dataTables_filter input { width: 220px; margin-left: 8px; }
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--pm-accent); box-shadow: 0 0 0 3px rgba(47, 128, 237, .18); outline: 0; }
.dataTables_wrapper .dataTables_paginate { margin-top: 10px; }
.dataTables_wrapper .pagination > li > a {
    border-color: var(--pm-border);
    color: var(--pm-text);
    margin-left: 4px;
    border-radius: 6px !important;
    padding: 5px 11px;
}
.dataTables_wrapper .pagination > li > a:hover { background: var(--pm-accent-soft); color: var(--pm-accent-dark); }
.dataTables_wrapper .pagination > .active > a,
.dataTables_wrapper .pagination > .active > a:hover { background: var(--pm-accent); border-color: var(--pm-accent); color: #fff; }
.dataTables_wrapper .pagination > .disabled > a { color: #b6bec9; }
table.dataTable thead .sorting:after, table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after { opacity: .35; }
table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after { opacity: .9; color: var(--pm-accent); }
.dataTables_wrapper.form-inline .form-control { height: 34px; }

/* ---------- Onglets ---------- */
.nav-tabs { border-bottom: 1px solid var(--pm-border); margin-bottom: 18px; }
.nav-tabs > li > a {
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--pm-muted);
    font-weight: 500;
    padding: 10px 16px;
    margin-right: 4px;
}
.nav-tabs > li > a:hover { background: transparent; border-color: transparent; color: var(--pm-text); border-bottom-color: #cbd5e1; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    border: 0;
    border-bottom: 3px solid var(--pm-accent);
    color: var(--pm-accent-dark);
    background: transparent;
}

/* ---------- Fenêtres modales ---------- */
.modal-content { border: 0; border-radius: var(--pm-radius); box-shadow: 0 20px 60px rgba(16, 24, 40, .3); }
.modal-header { border-bottom: 1px solid var(--pm-border); padding: 16px 22px; }
.modal-header .modal-title { font-weight: 600; }
.modal-body { padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--pm-border); padding: 14px 22px; background: #fafbfd; border-radius: 0 0 var(--pm-radius) var(--pm-radius); }
.modal-backdrop.in { opacity: .45; }

/* ---------- Infobulles ---------- */
.tooltip-inner { background: var(--pm-navy); border-radius: 6px; padding: 6px 10px; font-size: 12px; }
.tooltip.top .tooltip-arrow { border-top-color: var(--pm-navy); }
.tooltip.bottom .tooltip-arrow { border-bottom-color: var(--pm-navy); }
.tooltip.left .tooltip-arrow { border-left-color: var(--pm-navy); }
.tooltip.right .tooltip-arrow { border-right-color: var(--pm-navy); }

/* ---------- Timeline (tableau de bord) ---------- */
.timeline { padding: 10px 0 10px; }
.timeline:before { background: var(--pm-border); width: 2px; margin-left: -1px; }
.timeline > li { margin-bottom: 14px; }
.timeline > li > .timeline-panel {
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow);
    padding: 14px 18px;
    text-align: left;
}
.timeline > li > .timeline-panel:before { border-left-color: var(--pm-border); border-right-color: var(--pm-border); }
.timeline > li > .timeline-badge {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 1.05em;
    margin-left: -20px;
    top: 18px;
    box-shadow: 0 0 0 4px var(--pm-bg), 0 2px 6px rgba(16, 24, 40, .2);
}
.timeline-badge.info { background: var(--pm-accent) !important; }
.timeline-badge.success { background: var(--pm-success) !important; }
.timeline-badge.warning { background: var(--pm-warning) !important; }
.timeline-badge.danger { background: var(--pm-danger) !important; }
.timeline-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline-heading > p { margin: 0; order: 2; }
.timeline-title { font-size: 14px; font-weight: 600; color: var(--pm-navy); }
.timeline-title:before { content: "\f007"; font-family: FontAwesome; color: #9aa3b2; margin-right: 6px; font-weight: normal; }
.timeline-heading small { font-size: 12px; }
.timeline-heading small .fa { margin-right: 4px; }
.timeline-body { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--pm-border); }
.timeline-body > p { color: var(--pm-text); }
@media (max-width: 767px) {
    ul.timeline:before { left: 30px; }
    ul.timeline > li > .timeline-badge { left: 10px; }
    ul.timeline > li > .timeline-panel { width: calc(100% - 70px); }
}

/* ---------- Pied de page ---------- */
.pm-footer {
    text-align: center;
    color: #9aa3b2;
    font-size: 12px;
    padding: 8px 0 28px;
}
.pm-footer .fa { color: #b6c6dc; margin-right: 4px; }

/* ---------- Divers ---------- */
sup, sub { font-size: 70%; }
.text-muted { color: var(--pm-muted); }
hr { border-top-color: var(--pm-border); }
.container { max-width: 1240px; }
@media (max-width: 767px) {
    body { padding-top: 68px; }
    .starter-template { padding: 18px 16px 22px; border-radius: 8px; }
    .input-group-addon { min-width: 110px; }
    .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; }
}

/* ---------- Ajustements ---------- */
/* valeurs affichées dans un input-group (pages de détail) : pas de retour à la ligne */
span.form-control { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-xs-6 .input-group-addon, .col-xs-4 .input-group-addon, .col-xs-3 .input-group-addon, .col-xs-2 .input-group-addon { min-width: 80px; }
textarea[readonly].form-control { background: #fafbfd; color: var(--pm-text); }
/* tableaux larges : défilement horizontal dans la carte plutôt que débordement de page */
.dataTables_wrapper { overflow-x: auto; }
/* capture d'écran d'annonce absente */
.sale-image-missing {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border: 1px dashed #d5dbe5;
    border-radius: 8px;
    color: var(--pm-muted);
    background: #fafbfd;
}
.sale-image-missing:before { content: "\f03e  Aperçu de l'annonce indisponible"; font-family: FontAwesome, inherit; }
/* bloc des périodes tarifaires (formulaire de location) */
.starter-template h4 { font-size: 15px; margin: 22px 0 8px; }
.row > h4 { padding: 0 15px; }
fieldset {
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    padding: 4px 15px 14px;
    margin: 12px 0 6px;
    background: #fafbfd;
}
fieldset legend {
    width: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--pm-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 0;
    margin: 0 0 4px;
    padding: 0 6px;
}
fieldset legend .fa-trash { color: var(--pm-danger); cursor: pointer; margin-left: 6px; opacity: .8; }
fieldset legend .fa-trash:hover { opacity: 1; }
.js-button-add-periodprice { cursor: pointer; }
.row > fieldset { margin-left: 15px; margin-right: 15px; }
/* champs courts avec unité (ans, %) : libellé compact et unité sans largeur minimale */
.input-group-compact .input-group-addon:first-child { min-width: 95px; }
.input-group-compact .form-control + .input-group-addon { min-width: 0; padding-left: 10px; padding-right: 10px; }
