* {
    box-sizing: border-box;
}

body {
    background: repeating-linear-gradient(
        90deg,
        #e8d4c3,
        #e8d4c3 25px,
        #d9beaa 25px,
        #d9beaa 50px
    );
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.back-button {
    position: absolute;
    top: 30px;
    left: 25px;
    font-size: 36px;
    color: #c0292b;
    text-decoration: none;
    transform: rotate(180deg);
    font-weight: bold;
}

.back-arrow {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 60px;
    color: #c0292b;
    text-decoration: none;
    font-weight: bold;
    z-index: 10;
}

.btnhome {
    display: inline-block;
    background-color: #a42b2b;
    color: #e8dfd0;
    padding: 12px 24px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.3s ease;
}

.btnhome:hover {
    background-color: #822222;
}

.bottom-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 0px;
}

.btn-add {
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.btn-add:hover {
    transform: translateY(-2px);
}

#catalog-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-items: center;
    padding: 20px 5%;
}

.recipe-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.recipe-card-item .image-frame {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid #6d5852;
    overflow: hidden;
    background-color: #c4e4ff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.recipe-card-item .recipe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card-title {
    margin-top: 12px;
    font-size: 18px;
    color: #6d5852;
    font-weight: bold;
    text-align: center;
}

.search-container {
    text-align: center;
    margin: 20px 0;
}

.search-container input {
    width: 320px;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background-color: #6d5852;
    color: #ffffff;
    font-size: 16px;
    text-align: center;
    outline: none;
}

.search-container input::placeholder {
    color: #e2dcd9;
}

.content-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-left: 5%;
    margin-top: 60px;
    gap: 60px;
}

.left-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title {
    font-size: 42px;
    color: #6d5852;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.content-container .image-frame {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 8px solid #6d5852;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge {
    margin-top: 20px;
    width: 200px;
    padding: 10px 0;
    background-color: #6d5852;
    color: #e8dfd0;
    text-align: center;
    border-radius: 12px;
    font-size: 20px;
    letter-spacing: 2px;
    font-weight: bold;
}

.right-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    max-height: 120px;
    width: auto;
}

.ingredients-card {
    width: 200px;
    min-height: 300px;
    padding: 20px;
    background-color: #6d5852;
    color: #e8dfd0;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.ingredients-card h2 {
    font-size: 22px;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ingredients-card ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.ingredients-card li {
    margin-bottom: 8px;
    font-size: 14px;
}

.add-recipe-body {
    background: repeating-linear-gradient(
        to right,
        #ebd7c0,
        #ebd7c0 40px,
        #d8c3ab 40px,
        #d8c3ab 80px
    );
    margin: 0;
    padding: 0;
    font-family: "Comic Sans MS", "Chalkboard SE", sans-serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.top-right-logo {
    position: absolute;
    top: 10px;
    right: 20px;
}

.top-right-logo .logo-img {
    width: 200px;
    height: auto;
}

.main-add-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    height: 100vh;
    padding-top: 50px;
}

.left-section-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.image-circle-frame {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 12px solid #6d5852;
    overflow: hidden;
    background-color: #c4e4ff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1;
}

.image-circle-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-input {
    margin-top: 20px;
    background-color: #6d5852;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 24px;
    font-family: inherit;
    text-align: center;
    width: 220px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    outline: none;
    text-transform: uppercase;
}

.badge-input::placeholder {
    color: #e2dcd9;
}

.hidden-name-input {
    position: absolute;
    top: -40px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed #6d5852;
    border-radius: 8px;
    padding: 8px;
    font-family: inherit;
    font-size: 18px;
    text-align: center;
    width: 250px;
    outline: none;
}

.hidden-name-input:focus {
    background: #fff;
    border-style: solid;
}

.right-section-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ingredients-box {
    background-color: #6d5852;
    width: 300px;
    height: 420px;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.ingredients-title {
    color: #ffffff;
    font-size: 28px;
    margin: 0 0 20px 0;
    letter-spacing: 2px;
}

.ingredients-textarea {
    background: transparent;
    border: none;
    width: 100%;
    flex-grow: 1;
    color: #ffffff;
    font-size: 20px;
    font-family: inherit;
    text-align: center;
    resize: none;
    outline: none;
}

.ingredients-textarea::placeholder {
    color: #ffffff;
    font-size: 24px;
    opacity: 0.8;
}

.search-title-bar {
    position: absolute;
    top: 25px;
    left: 120px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.search-title-bar input {
    width: 200px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #6d5852;
    outline: none;
    font-size: 14px;
}

.action-buttons-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-action {
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
    color: white;
}

.btn-action:hover {
    transform: scale(1.05);
}

.btn-load {
    background-color: #6d5852;
    padding: 8px 14px;
}

.btn-add-recipe {
    background-color: #c0292b;
}

.btn-update-recipe {
    background-color: #27ae60;
}

.btn-delete-recipe {
    background-color: #e74c3c;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.pagination-btn {
    background-color: #6d5852;
    color: #e8dfd0;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #54433e;
}

.pagination-btn:disabled {
    background-color: #a39590;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    font-size: 16px;
    font-weight: bold;
    color: #6d5852;
}

.home-container, .accueil-container, body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.buttons-container, .home-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}