html, body {
    height: 100%;
    margin: 0;
    font-family: "Neue-Helvetica", "Helvetica", "Arial", "sans-serif" !important;
    font-weight: 300;
    font-size: 15px;
}

input {
    border: 0;
    border-bottom: 1px solid black;
    margin: 5% 0px;
    margin-top: 10px;
    border-radius: 0;
}

input:focus {
    outline: none;
    box-shadow: none;
}

/* Version desktop */
.main_grid {
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-rows: 100%;
    height: 100%;
}

.left_grid {
    display: grid;
    grid-template-rows: 50% 50%;
    grid-template-columns: 100%;
}

.right_grid {
    display: grid;
    grid-template-rows: 33% 67%;
    grid-template-columns: 100%;
}

.rightBottom_grid {
    display: grid;
    grid-template-columns: 67% 33%;
    grid-template-rows: 100%;
}

/* Version mobile */
/* Version mobile - améliorations */
@media (max-width: 768px) {
    html, body {
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    .main_grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 10px;
        box-sizing: border-box;
        gap: 15px;
    }
    
    .left_grid, .right_grid, .rightBottom_grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .box {
        min-height: 300px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Ajustements pour les éléments de contenu */
    .feed-scroll, .userFeed-scroll, .received-items-wrapper {
        width: 100%;
        max-width: 100%;
        aspect-ratio: unset;
        height: auto;
        max-height: 60vh;
    }
    
    .feed-item, .userFeed-item, .received-item {
        width: 95%;
        margin: 0 auto;
    }
    
    /* Boutons */
    .btn {
        width: 100%;
        margin: 10px 0;
    }
    
    /* Titres */
    .box_title {
        font-size: 18px;
    }
    
    .box_description {
        font-size: 15px;
    }
    
    /* Scroll horizontal */
    .userFeed-scroll, .received-items-wrapper {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Inputs */
    input {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ToDo List */
    .todolist {
        width: 100%;
        max-width: 100%;
    }
    
    /* Correction du zoom sur l'input dans iOS */
    @media screen and (max-width: 480px) {
        input, select, textarea {
            font-size: 16px;
        }
    }
}

.btn {
    height: 36px;
    margin: 4% 0;
    text-align: center;
    align-items: center;
    min-width: 140px;
    font-size: 14px;
    padding: 0px 12px;
    border-radius: 6px;
    border: none;
    background-color: white;
    border: 1px solid black;
    cursor: pointer;
    border-radius: 7px;
    font-family: "Neue-Helvetica", "Helvetica", "Arial", "sans-serif" !important;
    font-weight: 300;
    color : black;
}

.btn:hover {
    border: 2px solid black;
}

.shareBtn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: fit-content;
    height: 20px;
    background-color: white;
    color: black;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    border: 0;
    z-index: 1;
}

.add-to-kart {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: white;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    border: 0;
    z-index: 1;
}

/* box management */
.box {
    background-color: white;
    border: 1px solid black;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    position: relative;
}

.box_title {
    font-size: 19px;
    font-family: "Neue-Helvetica", "Helvetica", "Arial", "sans-serif" !important;
    font-weight: 300;
    border-bottom: 1px solid black;
    width: fit-content;
    text-align: center;
    margin: 10px 0px;
}

.box_description {
    font-size: 17px;
    font-family: "Neue-Helvetica", "Helvetica", "Arial", "sans-serif" !important;
    font-weight: 300;
    width: fit-content;
    text-align: center;
    margin: 1%;
}

.deleteContentBtn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: black;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    border: 0;
    z-index: 1;
}

.boxContent {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.managingBox{
    width: 100%;
   height : 100%;
   display:flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

.contentChoiceMenu {
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
    padding: 10px 0;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1;
    min-width: 140px;
    backdrop-filter: blur(4px);
    font-size: 15px;
}

.line {
    width: 100%;
    padding: 0;
    border: none;
    background-color: black;
    height: 1px;
    margin: 0px;
}

.contentChoiceItem {
    flex: 1 1 0%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contentChoiceItem:hover {
    border-left: 1px solid black;
}

.cancelChoiceItem {
    background-color: black;
    color: white;
    padding: 5px 0;
}

/* to do liste style */
.todolist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 200px;
    overflow-y: auto;
    padding: 2%;
    border: 1px solid black;
    border-radius: 5px;
    margin: 1%;
    display: none;
}

.todolist_error {
    color: red;
    margin: 2% 0px;
    display: none;
}

.todolist_addInput {
    border: 0;
    border-bottom: 1px solid black;
    margin: 5% 0px;
    margin-top: 10px;
}

.todolist_addInput:focus {
    outline: none;
    box-shadow: none;
}

.todolist_addBtn {
    min-width: fit-content;
    font-size: 12px;
    height: fit-content;
    margin: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2%;
    margin-left: 5px;
    border-left: 1px solid black;
}

.todo-text {
    flex: 1;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-btn {
    background-color: black;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
}

/* feed style */
.feed-scroll {
    display: flex;
    flex-direction: column;
    aspect-ratio: 9 / 16;
    width: 300px;
    height: 98%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafa;
    scroll-snap-type: y mandatory;
    margin-bottom: 2%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feed-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.feed-scroll::-webkit-scrollbar {
    display: none;
}

.feed-item {
    position: relative;
    scroll-snap-align: start;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 12px;
    background: white;
    transition: transform 0.2s ease;
}

.feed-item:active {
    transform: scale(0.98);
}

.feed-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 12px;
}

.feed-product-image {
    flex: 1;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.feed-product-card:hover .feed-product-image {
    transform: scale(1.03);
}

.feed-progress-container {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
    border-radius: 1px;
}

.feed-progress-bar {
    height: 100%;
    background: white;
    width: 0%;
    border-radius: 1px;
    transition: width 0.1s linear;
}

.feed-product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 15px;
    border-top: 1px solid #f0f0f0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: white;
}

.feed-product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-product-price {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

/* userFeed style */
.userFeed-scroll {
    display: flex;
    flex-direction: row;
    aspect-ratio: 4 / 3;
    width: 300px;
    overflow-y: hidden;
    overflow-x: auto;
    background: white;
    scroll-snap-type: x mandatory;
    margin-bottom: 2%;
    border: 1px solid black;
    border-radius: 7px;
    scroll-behavior: smooth;
    gap: 10px;
    padding: 10px;
    position: relative;
}

.userFeed-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.userFeed-scroll::-webkit-scrollbar {
    display: none;
}

.userFeed-item {
    position: relative;
    scroll-snap-align: center;
    width: 300px;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
}

.userFeed-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
}

.userFeed-product-image {
    flex: 1;
    width: 100%;
    height: calc(100% - 50px);
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.userFeed-product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-top: 1px solid #f0f0f0;
}

.userFeed-product-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    padding-right: 10px;
}

.userFeed-product-price {
    flex-shrink: 0;
    font-size: 12px;
    color: #000;
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 4px;
}

.userFeed-add-to-kart {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: white;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    border: 0;
    z-index: 1;
}

/* reception box */
.received-items-wrapper {
    display: flex;
    flex-direction: row;
    aspect-ratio: 4 / 3;
    width: 300px;
    overflow-y: hidden;
    overflow-x: auto;
    background: white;
    scroll-snap-type: x mandatory;
    margin-bottom: 2%;
    border-radius: 7px;
    scroll-behavior: smooth;
    gap: 30px;
    padding: 15px;
    position: relative;
}

.received-items-wrapper {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.received-items-wrapper::-webkit-scrollbar {
    display: none;
}

.received-item {
    position: relative;
    scroll-snap-align: center;
    width: 300px;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: 10px 11px 3px rgba(0, 0, 0, 0.532);
    background: white;
    border: 1px solid black;
}

.received-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border-radius: 7px;
    background: white;
}

.received-product-image {
    flex: 1;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.received-product-card:hover .product-image {
    transform: scale(1.02);
}

.received-product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-top: 1px solid #f0f0f0;
}

.received-product-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    padding-right: 10px;
}

.received-product-price {
    flex-shrink: 0;
    font-size: 12px;
    color: #000;
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Styles des cartes */
.kart-card {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.kart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Contenu des cartes */
.kart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.kart-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.kart-count {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.kart-preview {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.kart-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.kart-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kart-actions {
    display: flex;
    gap: 10px;
}

.kart-button {
    flex: 1;
    padding: 8px 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.kart-button:hover {
    background: #333;
}

/* Indicateurs de défilement */
.scroll-indicator {
    text-align: center;
    margin-top: 10px;
}

.scroll-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.scroll-dot.active {
    background: #000;
    transform: scale(1.2);
}

/* Ajout d'une meta viewport pour le responsive */
@media (max-width: 768px) {
    .box_title {
        font-size: 16px;
    }
    
    .box_description {
        font-size: 14px;
    }
    
    .btn {
        min-width: 120px;
        font-size: 13px;
        padding: 0 8px;
    }
    
    .feed-scroll, .userFeed-scroll, .received-items-wrapper {
        width: 95%;
        margin: 0 auto 10px;
    }
    
    .feed-item, .userFeed-item, .received-item {
        width: 100%;
    }
}