
/*from web*/
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

* {

  box-sizing: border-box;
}

*:focus,
*:active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}



.wrapper {
  display: inline-flex;
  list-style: none;
}

.wrapper .icon {
  position: relative;
  background: #ffffff;
  border-radius:15px;
  padding: 15px;
  margin: 10px;
  width: 50px;
  height: 50px;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .tooltip {
  position: absolute;
  top: 0;
  font-size: 14px;
  background: #ffffff;
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 5px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .tooltip::before {
  position: absolute;
  content: "";
  height: 8px;
  width: 8px;
  background: #ffffff;
  bottom: -3px;
  left: 50%;
  transform: translate(-50%) rotate(45deg);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .icon:hover .tooltip {
  top: -45px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wrapper .icon:hover span,
.wrapper .icon:hover .tooltip {
  text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}

.wrapper .facebook:hover,
.wrapper .facebook:hover .tooltip,
.wrapper .facebook:hover .tooltip::before {
  background: #1877F2;
  color: #ffffff;
}

.wrapper .tiktok:hover,
.wrapper .tiktok:hover .tooltip,
.wrapper .tiktok:hover .tooltip::before {
  background: #000000;
  color: #ffffff;
}

.wrapper .instagram:hover,
.wrapper .instagram:hover .tooltip,
.wrapper .instagram:hover .tooltip::before {
  background: #b621af;
  color: #ffffff;
}

.wrapper .youtube:hover,
.wrapper .youtube:hover .tooltip,
.wrapper .youtube:hover .tooltip::before {
  background: #CD201F;
  color: #ffffff;
}

.wrapper .pinterest:hover,
.wrapper .pinterest:hover .tooltip,
.wrapper .pinterest:hover .tooltip::before {
  background: #E60023;
  color: #ffffff;
}

/* deepseek styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f3f4f6;
    line-height: 1.6;
    animation: fadeIn 0.5s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content wrapper - this will grow to push footer down */
.main-content {
    flex: 1;
}

/* Footer */
footer {
    background-color: #1f2937;
    color: #ffffff;
    padding: 1.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    margin-top: auto; /* This pushes the footer to the bottom */
}

/* base style */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f3f4f6;
    line-height: 1.6;
    animation: fadeIn 0.5s ease-out;
}

/* Global fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    background-color: #FF6B6B; /* Rouge tomate doux */
    color: #ffffff;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
header:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

header h1:hover {
    transform: scale(1.05);
    color: #FFF9C4; /* Jaune très clair au hover */
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 0 1rem;
    position: relative;
    transition: all 0.3s ease;
}

header nav a:hover {
    color: #FFF9C4; /* Jaune très clair */
    transform: translateY(-2px);
}

header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #FFF9C4; /* Jaune très clair */
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

header nav .search-group {
    display: flex;
    margin-left: 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    padding: 0.25rem;
    transition: all 0.3s ease;
}
header nav .search-group:hover {
    background-color: rgba(255, 255, 255, 0.3);
}


#searchType,
#searchInput {
    height: 2rem;
    padding: 0.5rem;
    border: none;
    font-size: 1rem;
    line-height: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#searchType {
    border: none;
    background-color: rgba(255, 255, 255, 0.7); /* Fond semi-transparent blanc */
    color: #FF6B6B; /* Rouge tomate pour le texte */
    border-right: 1px solid rgba(255, 107, 107, 0.3); /* Bordure rouge clair */
    border-radius: 25px 0 0 25px;
    appearance: none; /* Supprime le style par défaut du select */
    padding-right: 1.5rem; /* Espace pour la flèche */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF6B6B'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

#searchInput {
    border: none;
    background-color: rgba(255, 255, 255, 0.7); /* Fond semi-transparent blanc */
    color: #5D4037; /* Marron foncé pour le texte */
    border-radius: 0 25px 25px 0;
}

#searchType:hover,
#searchInput:hover {
    transform: scale(1.02);
}

#searchInput:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Hero Section */
.hero {
    background-image: url('https://images.unsplash.com/photo-1512621776951-a57141f2eefd');
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0; /* Fallback color if image fails */
    min-height: 24rem;
    height: 24rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay for contrast */
    z-index: 1;
}

.hero .hero-content {
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
    position: relative;
    z-index: 2;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

/* Sections */
section {
    padding: 3rem 0;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.2s forwards;
}

section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

section h2:hover {
    color: #FF6B6B; /* Rouge tomate */
}

/* Category Grid */
.category-grid,
.recipe-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .category-grid,
    .recipe-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-card,
.recipe-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #1f2937;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.recipe-card:nth-child(1) { animation-delay: 0.1s; }
.recipe-card:nth-child(2) { animation-delay: 0.2s; }
.recipe-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card:hover,
.recipe-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.2);
}

.category-card h3,
.recipe-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.category-card:hover h3,
.recipe-card:hover h3 {
    color: #FF6B6B;
}

.category-card p,
.recipe-card p {
    color: #4b5563;
}

.recipe-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: transform 0.3s ease;
}

.recipe-card:hover img {
    transform: scale(1.05);
}

/* Recipe Page */
.recipe-detail img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.recipe-detail img:hover {
    transform: scale(1.02);
}

.recipe-detail h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.recipe-detail p {
    color: #4b5563;
    margin-bottom: 1rem;
}

.recipe-detail h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.recipe-detail a {
    color: #FF6B6B;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.recipe-detail a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #FF6B6B;
    transition: width 0.3s ease;
}

.recipe-detail a:hover {
    color: #FF6B6B;
}

.recipe-detail a:hover::after {
    width: 100%;
}

/* Search Results */
.search-results p {
    color: #4b5563;
    text-align: center;
}

/* Footer */
footer {
    
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #1f2937;
    color: #ffffff;
    padding: 1.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

/* Admin Panel */
.centerer{
    display: flex;
    justify-content: center;
    
}
.admin-container {
    
    max-width: 32rem;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

.admin-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.admin-container form input,
.admin-container form textarea,
.admin-container form select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.admin-container form input:focus,
.admin-container form textarea:focus,
.admin-container form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    outline: none;
}

.admin-container form textarea {
    height: 8rem;
}

.admin-container form button {
    width: 100%;
    background-color: #2563eb;
    color: #ffffff;
    padding: 0.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.admin-container form button:hover {
    background-color: #1d4ed8;
    transform: scale(1.02);
}

.admin-container .error,
.admin-container .success {
    color: #dc2626;
    margin-bottom: 1rem;
}

.admin-container .success {
    color: #16a34a;
}

.admin-table {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.admin-table h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.admin-table a {
    color: #2563eb;
    text-decoration: none;
    margin-right: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.admin-table a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #FF6B6B;
    transition: width 0.3s ease;
}

.admin-table a:hover {
    color:#FF6B6B;
}

.admin-table a:hover::after {
    width: 100%;
}

.admin-table a.delete {
    color: #dc2626;
}

.admin-table a.delete::after {
    background-color: #dc2626;
}

.admin-table a.delete:hover {
    color: #b91c1c;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #d1d5db;
    transition: background-color 0.3s ease;
}

.admin-table tr:hover {
    background-color: #f9fafb;
}

.admin-table th {
    font-weight: 600;
}

.admin-table img {
    width: 8rem;
    margin-top: 0.5rem;
    transition: transform 0.3s ease;
}

.admin-table img:hover {
    transform: scale(1.05);
}

.admin-table .add-link {
    display: inline-block;
    background-color: #FF6B6B;
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.admin-table .add-link:hover {
    background-color: #FF6B6B;
    transform: scale(1.02);
}

/* Admin form labels */
form label {
    display: block;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.25rem;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .category-card h3,
    .recipe-card h3 {
        font-size: 1.125rem;
    }

    .admin-container {
        padding: 1rem;
    }

    .admin-table {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    header nav {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav .search-group {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }

    #searchType,
    #searchInput {
        color: white;
        background-color: rgba(255,255,255,0.1); /* Légère amélioration de lisibilité */
    }

    #searchType {
        border-radius: 0.25rem 0.25rem 0 0;
    }

    #searchInput {
        border-radius: 0 0 0.25rem 0.25rem;
    }
}