/* === Layout === */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
    min-height: 100vh;
}

/* === Top Bar === */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #2c3e50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-bar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.top-bar-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
}

.top-bar-user a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.top-bar-user a:hover {
    background: rgba(255,255,255,0.1);
}

/* === Sidebar === */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 240px;
    background: #34495e;
    overflow-y: auto;
    z-index: 90;
}

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
}

.sidebar-nav > li > a,
.sidebar-nav > li > .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-nav > li > a:hover,
.sidebar-nav > li > .menu-toggle:hover,
.sidebar-nav > li.active > a,
.sidebar-nav > li.active > .menu-toggle {
    background: #2c3e50;
    color: #fff;
}

.menu-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.sidebar-nav > li.open > .menu-toggle .menu-arrow {
    transform: rotate(90deg);
}

/* Sub-menu */
.sidebar-submenu {
    list-style: none;
    display: none;
    background: #2c3e50;
}

.sidebar-nav > li.open > .sidebar-submenu {
    display: block;
}

.sidebar-submenu li a {
    display: block;
    padding: 10px 20px 10px 40px;
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-submenu li a:hover,
.sidebar-submenu li.active a {
    color: #fff;
    background: #243342;
}

/* === Main Content === */
.main-wrapper {
    margin-left: 240px;
    margin-top: 56px;
    padding: 25px 30px;
    min-height: calc(100vh - 56px);
}

/* === Content Styles === */
h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

h4 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
    color: #2c3e50;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

thead {
    background: #ecf0f1;
}

th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.9rem;
}

th {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
    text-transform: uppercase;
}

th a {
    color: #2c3e50;
    text-decoration: none;
}

th a:hover {
    color: #3498db;
}

td.actions {
    white-space: nowrap;
}

td.actions a,
td.actions button,
td.actions form {
    display: inline;
    margin-right: 8px;
}

/* === Links & Buttons === */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #2980b9;
}

.button, button, input[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.button:hover, button:hover, input[type="submit"]:hover {
    background: #2980b9;
    color: #fff;
}

.button.float-right {
    float: right;
    margin-top: 15px;
}

/* === Forms === */
fieldset {
    border: none;
    padding: 0;
    margin-bottom: 15px;
}

.input {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* === Flash Messages === */
.message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === Pagination === */
.paginator {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination {
    list-style: none;
    display: flex;
    gap: 4px;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #3498db;
    text-decoration: none;
}

.pagination li a:hover {
    background: #3498db;
    color: #fff;
}

.pagination li.active span {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination li.disabled span {
    color: #bdc3c7;
}

.paginator p {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* === Dashboard === */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dashboard-card h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.dashboard-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.dashboard-card a {
    text-decoration: none;
    color: inherit;
}

/* === Utilities === */
.content {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.actions {
    margin-top: 15px;
}

.actions a, .actions form {
    margin-right: 10px;
}

/* === Google Reviews === */
.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.title-bar h3 {
    margin-bottom: 0;
}

.filters {
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f5f6fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.filters span {
    font-weight: 600;
    color: #2c3e50;
}

.filter-active {
    font-weight: 600;
    color: #2c3e50 !important;
    text-decoration: underline !important;
}

.stars {
    color: #f39c12;
    font-size: 1rem;
    letter-spacing: 1px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.badge-new {
    background: #3498db;
}

.badge-draft {
    background: #f39c12;
}

.badge-sent {
    background: #27ae60;
}

.review-card {
    background: #f9f9f9;
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 15px;
}

.review-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.review-body {
    margin-bottom: 15px;
}

.review-body p {
    line-height: 1.6;
    color: #333;
}

.reply-block {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.reply-block h4 {
    margin: 0 0 8px;
}

.reply-block p {
    line-height: 1.6;
}

.reply-block small {
    display: block;
    margin-top: 8px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.reply-sent {
    background: #d4edda;
    border-left: 4px solid #27ae60;
}

.reply-draft {
    background: #fef9e7;
    border-left: 4px solid #f39c12;
}

.review-summary {
    background: #f9f9f9;
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.review-summary p {
    margin-top: 10px;
    line-height: 1.6;
}

.button-success {
    background: #27ae60;
}

.button-success:hover {
    background: #219a52;
}

/* === Contracts === */
.contract-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.status-draft {
    background: #95a5a6;
}

.status-partial {
    background: #f39c12;
}

.status-signed {
    background: #27ae60;
}

/* Couleurs de ligne dans la liste des contrats */
tr.row-signed {
    background: #d4edda;
}

tr.row-signed:hover {
    background: #c3e6cb;
}

tr.row-pending {
    background: #fef9e7;
}

tr.row-pending:hover {
    background: #fdebd0;
}

tr.row-overdue {
    background: #f8d7da;
}

tr.row-overdue:hover {
    background: #f5c6cb;
}

.contract-common-fields {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    font-size: 0.9rem;
}

.contract-employees-list {
    margin-bottom: 20px;
}

.contract-employees-list select {
    min-width: 180px;
}

.input.file small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.8rem;
}

legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.signature-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    background: #fff;
}
