/* =============================================================================
   EVAL FORMATIONS — styles principaux (AssetMapper)
   ============================================================================= */

/* --- Variables ------------------------------------------------------------ */
:root {
    --color-primary: #1a5276;
    --color-primary-light: #2e86c1;
    --color-primary-dark: #154360;
    --color-success: #1e8449;
    --color-warning: #b7950b;
    --color-danger: #922b21;
    --color-info: #1a5276;
    --color-secondary: #717d7e;
    --color-bg: #f5f6fa;
    --color-card: #ffffff;
    --color-border: #dce1e7;
    --color-text: #2c3e50;
    --color-text-light: #717d7e;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, .12);
}

/* --- Reset & base --------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Navbar -------------------------------------------------------------- */
.navbar {
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.navbar-brand a {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .5px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu a {
    color: rgba(255, 255, 255, .85);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: .9rem;
    transition: background .15s;
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, .15);
    text-decoration: none;
    color: #fff;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, .25);
    padding-left: 16px;
}

.navbar-user span {
    font-size: .85rem;
    opacity: .8;
}

.btn-logout {
    background: rgba(255, 255, 255, .15);
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: .8rem;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, .3);
    text-decoration: none;
}

/* --- Layout -------------------------------------------------------------- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: .8rem;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
}

/* --- Page header --------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
}

.page-header .subtitle {
    color: var(--color-text-light);
    font-size: .95rem;
    margin-top: 4px;
}

.section {
    margin-top: 40px;
}

.section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

/* --- Alerts -------------------------------------------------------------- */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: .92rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4efdf;
    border-color: #a9dfbf;
    color: #1e8449;
}

.alert-danger {
    background: #fadbd8;
    border-color: #f5b7b1;
    color: #922b21;
}

.alert-warning {
    background: #fef9e7;
    border-color: #f9e79f;
    color: #b7950b;
}

.alert-info {
    background: #d6eaf8;
    border-color: #aed6f1;
    color: #1a5276;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius);
    border: none;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: filter .15s, transform .1s;
    text-decoration: none !important;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn:active {
    transform: scale(.98);
}

.btn-primary {
    background: var(--color-primary-light);
    color: #fff;
}

.btn-secondary {
    background: #e8eaed;
    color: var(--color-text);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-info {
    background: #5dade2;
    color: #fff;
}

.btn-success {
    background: var(--color-success);
    color: #fff;
}

.btn-sm {
    padding: 4px 12px;
    font-size: .8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* --- Table --------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 16px;
    font-size: .85rem;
    font-weight: 600;
    text-align: left;
}

.table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: .9rem;
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: #f0f4fa;
}

.table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.row--evaluated {
    background: #f0faf4;
}

.row--comment td {
    background: #fafafa;
    color: var(--color-text-light);
    font-size: .85rem;
    padding: 6px 16px;
}

.text-center {
    text-align: center;
    color: var(--color-text-light);
}

/* --- Badges -------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

.badge--success {
    background: #d4efdf;
    color: #1e8449;
}

.badge--warning {
    background: #fef9e7;
    color: #b7950b;
}

.badge--danger {
    background: #fadbd8;
    color: #922b21;
}

.badge--secondary {
    background: #e8eaed;
    color: #5d6d7e;
}

.badge--planifiee {
    background: #d6eaf8;
    color: #1a5276;
}

.badge--en_cours {
    background: #d4efdf;
    color: #1e8449;
}

.badge--terminee {
    background: #e8eaed;
    color: #5d6d7e;
}

.badge--annulee {
    background: #fadbd8;
    color: #922b21;
}

/* --- Stats grid (dashboard) ---------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card--highlight {
    border-top: 4px solid var(--color-primary-light);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.stat-label {
    color: var(--color-text-light);
    font-size: .9rem;
    margin-top: 4px;
}

.stat-link {
    display: inline-block;
    margin-top: 10px;
    font-size: .8rem;
}

/* --- Form cards ---------------------------------------------------------- */
.form-card {
    background: var(--color-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 700px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: .9rem;
}

.form-control {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .92rem;
    transition: border-color .2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(46, 134, 193, .15);
}

.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Symfony form auto-rendered */
.form-card div>label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: .9rem;
}

.form-card div>input,
.form-card div>select,
.form-card div>textarea {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .92rem;
    margin-bottom: 16px;
}

.form-card div>textarea {
    resize: vertical;
}

/* --- Login page ---------------------------------------------------------- */
.page-login {
    background: var(--color-primary);
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
}

.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--color-text-light);
    font-size: .9rem;
    margin-bottom: 28px;
}

/* --- Evaluation form ----------------------------------------------------- */
.eval-header {
    text-align: center;
    margin-bottom: 24px;
}

.eval-header h1 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.eval-subtitle {
    color: var(--color-text-light);
}

.eval-agent-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--color-primary-light);
}

.eval-agent-card div {
    font-size: .9rem;
    line-height: 1.8;
}

.eval-scale-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    font-size: .82rem;
}

.scale-item {
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.scale--4 {
    background: #d4efdf;
    color: #1e8449;
}

.scale--3 {
    background: #d6eaf8;
    color: #1a5276;
}

.scale--2 {
    background: #fef9e7;
    color: #b7950b;
}

.scale--1 {
    background: #fadbd8;
    color: #922b21;
}

.eval-section {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.eval-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}

/* Radio button groups (note-group) */
.note-group .form-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 12px;
}

.note-group input[type="radio"] {
    accent-color: var(--color-primary-light);
}

/* Symfony rendered radio rows */
.eval-section>div {
    margin-bottom: 18px;
}

.eval-section>div>label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: .9rem;
}

.eval-section ul.list-unstyled {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.eval-section ul.list-unstyled li {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .88rem;
}

.eval-section ul.list-unstyled input[type="radio"] {
    accent-color: var(--color-primary-light);
}

.eval-submit {
    text-align: center;
    padding: 24px 0;
}

/* --- Rapport eval -------------------------------------------------------- */
.stats-eval-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.eval-category {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.eval-category h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 14px;
}

.notes-list {
    list-style: none;
    padding: 0;
}

.notes-list li {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .88rem;
}

.notes-list li:last-child {
    border-bottom: none;
}

.note {
    font-weight: 700;
    color: var(--color-primary-light);
}

.note-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 700;
}

.note-badge--good {
    background: #d4efdf;
    color: #1e8449;
}

.note-badge--bad {
    background: #fadbd8;
    color: #922b21;
}

.note-badge--large {
    font-size: .92rem;
    padding: 5px 14px;
}

.rapport-summary {
    font-size: .95rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

/* --- Confirmation -------------------------------------------------------- */
.confirmation-container {
    text-align: center;
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.confirmation-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.confirmation-container h1 {
    color: var(--color-primary);
    margin-bottom: 12px;
}

.confirmation-score {
    font-size: 1.3rem;
    margin: 20px 0;
}

/* --- Score cards --------------------------------------------------------- */
.eval-recap-scores {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.score-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.score-card--global {
    border-top: 4px solid var(--color-primary-light);
}

.score-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary-light);
}

.score-label {
    font-size: .8rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.eval-comments {
    background: #f9f9f9;
    border-radius: var(--radius);
    padding: 16px 20px;
    border-left: 3px solid var(--color-border);
}

.eval-comments h3 {
    font-size: .95rem;
    margin-bottom: 8px;
}

/* --- Empty state --------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--color-text-light);
    font-size: 1rem;
}

/* --- Table rapport ------------------------------------------------------- */
.table--rapport th,
.table--rapport td {
    font-size: .82rem;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 768px) {
    .navbar-menu a {
        display: none;
    }

    .eval-agent-card {
        grid-template-columns: 1fr;
    }

    .eval-recap-scores {
        grid-template-columns: 1fr 1fr;
    }

    .form-row-2col {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .eval-scale-legend {
        flex-direction: column;
    }

    .eval-recap-scores {
        grid-template-columns: 1fr;
    }
}