.top-bar {
    padding: 10px 15px;
    display: flex;
    justify-content: center;
}

.top-logo {
    height: 40px;
    width: auto;
    display: block;
}

input, select, textarea {
    border-radius: 5px;
    border: solid 1px grey;
    padding: 5px;
}
.resp-cards {
        max-width: 700px;
        margin: 1em auto;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        grid-gap: 20px;
    }

.resp-card {
    border-radius: 10px;
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-rows: max-content auto 1fr;
    min-height: 200px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.resp-card:hover {
    transform: translateY(2px);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.15);
}

.info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.info-line svg {
    flex-shrink: 0;
}

.info-line span {
    line-height: 1;
}

.resp-card-content {
        padding: 0.5rem;
}

.resp-card h3 {
    margin: 0;
    padding: 0.5rem;
}

.link {
    text-decoration: none;
    color: black;
}


/* Sidebar */
#admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: #fff;
    padding: 20px;

    display: flex;
    flex-direction: column;
    gap: 15px;

    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    transform: none !important;

    transition: width 0.3s ease;
    overflow: hidden;
}

/* boutons admin */
#admin-sidebar button {
    background: #11366c;
    color: white;
    border: none;
    padding: 10px;
    text-align: left;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.svgSidebar {
    margin-left: 3px;     
}

#admin-sidebar button:hover {
    background: #0d2a52;
}

#admin-sidebar.collapsed {
    width: 50px;
}

#sidebarToggle {
    background-color: #fff !important;
}

#admin-sidebar.collapsed p,
#admin-sidebar.collapsed button {
    font-size: 0;
}

/*Page thématiques*/
.admin-card-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card-1 {
    grid-column: 1;
    grid-row: 1;
}

.card-2 {
    grid-column: 1;
    grid-row: 2;
}

.card-3 {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.admin-card {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
}

.admin-card h2 {
    color : #11366c;
}

.admin-card-item {
    display: flex;
    gap: 30px;
    padding: 0 15px 0 15px;
}

.item-creation-col-1,
.item-creation-col-2 {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 250px;
    margin-bottom: 10px;
}

.btnBox {
    display: flex;
}

.btn-agences {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-validate {
    margin-left: auto;
}

.accordionBtn {
    margin-left: auto;
    margin-top: 7em;
}

.accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.35s ease;
}

.accordion-content.active {
    max-height: 2000px;
    opacity: 1;
}

/* Page gestion des thématiques & items */
.badge-criticite {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    width: 10px;
    gap: 0.3rem;
    justify-content: center;
}

.criticite-0 {
    background: #6b7280;
}

.criticite-1 {
    background: #16a34a;
}

.criticite-2 {
    background: #eab308;
    color: black;
}

.criticite-3 {
    background: #ea580c;
}

.criticite-4 {
    background: #b91c1c;
}

.thema-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
}

.info {
    color:#6b7280;
    font-style: italic;
}

.thema-table-card {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 3em;
 }

.thema-table thead th {
    background: linear-gradient(to top, #d6e6ff, #f7fbff);
}

.thema-table {
    border-collapse: collapse;
    width: 100%;
}

.thema-table th {
    text-align: left;
    padding:10px;
}

.thema-table tr:nth-child(even) {
    background-color: #e6ecff;
}

.thema-table-actif {
    text-align: center;
    vertical-align: middle;
}

.item-edit-form-wrapper, .agence-edit-form-wrapper, .resp-edit-form-wrapper {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;;
}

.itemInput, .themaInput, .agenceTypeInput {
    margin-bottom: 10px;
}

.item-edit-form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agence-type-checkboxes {
    display: flex;
    flex-direction: row;
    gap:5px;
}

.checkbox-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.thema-history {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.thema-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    max-height: 70vh;   /* limite la hauteur */
    overflow-y: auto;   /* scroll vertical */
}

.edit-thema-card {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
}

/*Page gestion des agences */

.agence-create-card-wrapper {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px 15px 20px 15px;
}

.agence-form, .resp-form {
    display: flex;
    flex-direction: column;
}

.form-label-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: linear-gradient(to top, #d6e6ff, #f7fbff);
    padding: 10px;
    font-weight: 600;
    text-align: center;
}

.form-input-row {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap:20px;
    padding: 10px;
}

.form-card-wrapper {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.agences-table-card-wrapper {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 20px;
}

.agences-table-card {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
}

.agences-table thead th {
    background: linear-gradient(to top, #d6e6ff, #f7fbff);
    padding: 10px;
}

.agences-table {
    border-collapse: collapse;
    width:100%;
}

.agences-table tbody tr:nth-child(even) {
    background: #e6ecff !important;
}

.agences-table td {
    text-align: center;
    vertical-align: middle;
}

/*Page modif agence*/
.agence-edit-form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/*Page responsables*/
.badge-admin {
    background: #c62828;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.new-resp-card-wrapper {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
}

.resp-table-wrapper {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 20px;
}

.resp-table {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 1em;
    width: 100%;
    border-collapse: collapse;
}

.resp-agences-nombre {
    text-align: center;
}

.resp-table thead th {
    background: linear-gradient(to top, #d6e6ff, #f7fbff);
    padding: 10px;
}

.resp-table td {
    padding: 5px;
}

.edit-btn {
    color: #e6ecff;
    text-decoration: none;
}

.edit-btn-resp {
    display: flex;
    align-items: center;
    justify-content: center;
}

.free-agences-card {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 1em;
    width: 50%;
}

.free-agences-table {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 1em;
    border-collapse: collapse;
}

.free-agences-table thead th {
    background: linear-gradient(to top, #d6e6ff, #f7fbff);
    padding: 10px;
}

.free-agences-table thead{
    display: table;
    width: 100%;
    table-layout: fixed;
}

.free-agences-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
    text-align: center;
}

.free-agences-table tbody {
    display: block;
    max-height: 50vh;
    overflow-y: auto;
}

/*Page edit responsable*/
.resp-edit-form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/*Page stats*/
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.resp-edit-form-wrapper form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.resp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.resp-form-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 10px;
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    padding: 15px;
}

.resp-agences {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    border-radius: 10px;
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
}

.agences-list {
    max-height: 70vh;   /* limite la hauteur */
    overflow-y: auto;   /* scroll vertical */
}

.resp-agences label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.resp-submit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.green {
    background-color: #2ecc71;
}

.red {
    background-color: #e74c3c;
}

.black {
    background-color: #2c3e50;
}

.orange {
    background-color: #f39c12;
}

.grey {
    background-color: #95a5a6;
}

.table-stats {
    box-shadow:  0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin-top: 1em;
    width: 100%;
    border-collapse: collapse;
}

.table-stats thead th {
    background: linear-gradient(to top, #d6e6ff, #f7fbff);
    padding:10px;
}

.table-stats tbody td {
    padding: 5px;
}

.table-stats th,
.table-stats td,
.audit-table th,
.audit-table td {
    text-align: center;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.audit-table th {
    background: #11366c !important;
    color: white;
    text-align: center;
    padding: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.audit-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.audit-table tbody tr:nth-child(even) {
    background: #f7f9fc;
}

.audit-table tbody tr:hover {
    background: #eef3ff;
}

/* Animation ouverture audit table */
.details-row {
    background-color: #e7f1ff;
}

.details-cell {
    padding: 0 !important;
    border: none;
}

.details-wrapper {
    max-height: 0;
    overflow: hidden;

    opacity: 0;

    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        padding 0.25s ease;

    padding: 0 15px;
}

.details-row.open .details-wrapper {
    max-height: 1000px; /* suffisamment grand */
    opacity: 1;
    padding: 15px;
}

/* fin animation */

.red-cross {
    display: flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.li-statut {
    display:flex;
    align-items:center;
    gap:8px;
}

/*Partie Timeline*/
#timeline-container {
    max-width: 1100px;
    margin: 0 auto;
}

.card-rapport {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid #ccc;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.rapport-ok {
    border-left-color: #22c55e;
}

.rapport-ko {
    border-left-color: #ef4444;
}

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

.rapport-summary {
    margin-bottom: 12px;
    color: #666;
}

.rapport-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rapport-items li:nth-child(even) {
    background-color: #e6ecff;
    border-radius: 10px;
}

.rapport-items li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rapport-items li:last-child {
    border-bottom: none;
}