/* ---------------------------------------------------------- */
/* RESET + BASE */
/* ---------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background: #F2F4F7;
    display: flex;
    justify-content: center;
    padding: 0;
    color: #333;
}

.app {
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 60px rgba(0,0,0,0.08);
}

/* ---------------------------------------------------------- */
/* HEADER (titres congélateurs) */
/* ---------------------------------------------------------- */

.header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    padding: 16px;
    gap: 12px;
    border-bottom: 1px solid #e0e6ed;
}

.header div {
    background: #F7F9FC;
    border: 1px solid #E2E6EC;
    padding: 14px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.header div:hover {
    background: #eef2f7;
}

.header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* ---------------------------------------------------------- */
/* CONTENT — GRID 2 COLONNES */
/* ---------------------------------------------------------- */

.wrapper {
    display: flex;
    flex-direction: column;
    height: calc(var(--vh) * 100);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}



.index {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* Mobile — une colonne */
@media (max-width: 567px) {
    .index {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------- */
/* LISTE D’ÉLÉMENTS */
/* ---------------------------------------------------------- */

.index ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------------------------------------------------------- */
/* ITEM “CARTE MODERNE” */
/* ---------------------------------------------------------- */

.index ul li {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.36);
    transition: 0.2s;
    position: relative;
}

.top {
    font-size: 17px;
    font-weight: 600;
    color: #2F3A4B;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 20px;
    align-content: center;  
    height: 50px;
}
.top DIV {
    display: grid;
    align-content: center;  
    height: 50px;
}
.top DIV:first-child {
    display: block;
    text-align: center;
    align-content: center;
    color: #fff;
    font-size: 14px;
    height: 50px;
    border-radius: 14px;
    line-height: 15px;
}
.top .name {
    height: 50px;
    display: grid;
}

.top DIV:first-child SPAN {
    display: block;   
}
.top DIV:first-child .count {
    font-size: 20px;
    height: 50px;
    line-height: 13px;
    align-content: center;    
}
.top DIV:first-child .count.small {
    padding-top: 15px;
}
.top DIV:first-child SMALL {
    font-size: 10px;
    text-transform: uppercase;
    display: block;
}

.index ul li.ok .top DIV:first-child {
    background-color: #4CAF50; /* vert pastel */
}
.index ul li.moyen .top DIV:first-child{
    background-color: #FFC04C; /* orange pastel */
}
.index ul li.pas .top DIV:first-child  {
    background-color: #F44336; /* rouge pastel */
}


.bottom {
    padding-top: 12px;
    padding-bottom: 10px;
    margin-left: 70px;
    margin-top: -20px;
    display: none;
    font-size: 13px;
    line-height: 15px;
}
.bottom.show {
    display: block;
}
.bottom .date {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ligne {
    display: grid;
    grid-template-columns: 70px 150px 75px;
}
.ligne span:first-child {
    font-weight: 600;
    color: #607089;
    width: 70px;
    display: inline-block;
}
.fa-gears {
    font-size: 20px;
    color: #607089;
    cursor: pointer;
    position: absolute;
    top: calc(50% - 10px);
    right: 10px;
}

/* ---------------------------------------------------------- */
/* FOOTER */
/* ---------------------------------------------------------- */

footer {
    display: flex;
    justify-content: space-around;
    background: #ffffff;
    border-top: 1px solid #e8edf3;
    padding: 14px 0;
    position: relative;
}
footer div {
    flex: 1;
    text-align: center;
    font-size: 18px;
    color: #607089;
}
footer .button {
    background: #4CAF50;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 600;
    margin: 0 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: 0.2s;
    cursor: pointer;
}
footer .button:hover {
    background: #43A047;
}
footer .filter {
    padding: 12px 18px;
}



.ctx {
    position: absolute;
    bottom: 100%; /* juste au-dessus du footer */
    left: 0;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    overflow: hidden;
    transform-origin: bottom;
    animation: ctx-appear 0.18s ease-out;
    z-index: 500;
}


@keyframes ctx-appear {
    from { transform: scaleY(0.4); opacity: 0; }
    to   { transform: scaleY(1);   opacity: 1; }
}

.ctx-item {
    padding: 12px 18px;
    font-size: 16px;
    border-bottom: 1px solid #edf1f5;
    cursor: pointer;
}

.ctx-item:hover {
    background: #f3f6fa;
}

.ctx-item:last-child {
    border-bottom: none;
}

