/* Thème clair */
/* :root { */
    /* --bg-color: #f5f5f5; */
    /* --text-color: #333; */
    /* --primary-color: #6200ee; */
    /* --secondary-color: #03dac6; */
    /* --error-color: #b00020; */
    /* --surface-color: #ffffff; */
    /* --border-color: #ddd; */
/* } */
:root {
    /* Couleurs principales pour le thème clair */
    --bg-color: #f8f9fa;            /* Fond clair presque blanc */
    --text-color: #2b2d42;         /* Noir bleuâtre pour le texte */
    --primary-color: #fd9644;      /* #6c5ce7 Violet (même que le thème sombre pour la cohérence) */
    --primary-color-light: #a29bfe; /* Violet clair */
    --secondary-color: #fd9644;    /* Orange (même que le thème sombre) */
    --error-color: #ef476f;         /* Rouge pour les erreurs */
    --success-color: #06d6a0;       /* Vert émeraude pour les succès */
    --surface-color: #ffffff;      /* Blanc pur pour les surfaces */
    --border-color: #dee2e6;       /* Bordure légère */

    /* Couleurs pour les recettes */
    --recipe-card-bg: #ffffff;      /* Fond blanc pour les cartes */
    --recipe-tag-bg: #e7d8ff;       /* Fond violet très clair pour les étiquettes */
    --recipe-meta-color: #6c5ce7;   /* Couleur violet pour les métadonnées */

    /* Dégradés (identiques au thème sombre pour la cohérence) */
    --primary-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --secondary-gradient: linear-gradient(135deg, #fd9644, #fc5c65);
	
    /* Polices */
    --font-title: 'Schoolbell', serif;      /* Police pour les titres principaux */
    --font-subtitle: 'Schoolbell', sans-serif;   /* Police pour les sous-titres */
    --font-text: 'Open Sans', sans-serif;        /* Police pour le texte principal */	
	
}

/* Reset et règles de base pour le responsive */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

#root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Images et médias */
img {
    max-width: 100%;
    height: auto;
}

/* Liens et boutons */
a, button {
    tap-highlight-color: transparent; /* Supprime le surlignage au toucher */
}

/* Scroll fluide */
html {
    scroll-behavior: smooth;
}

body.light-theme {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-text);
	font-size: 85%;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.header {
    background-color: var(--surface-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.header h1 {
    margin: 0;
    color: var(--primary-color);
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-color);
}

main {
    background-color: var(--surface-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.footer {
    text-align: center;
    padding: 15px;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

form label {
    margin-top: 10px;
    color: var(--secondary-color);
}

form input {
    padding: 8px;
    margin-top: 5px;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

form button {
    margin-top: 15px;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    /* color: var(--primary-color); */
	color: white;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid var(--border-color);
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: rgba(98, 0, 238, 0.1);
}

/* Styles pour les recettes */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recipe-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-card h2 {
    margin-top: 0;
    color: var(--primary-color);
}

.recipe-card h2 a {
    color: inherit;
    text-decoration: none;
}

.recipe-card h2 a:hover {
    text-decoration: underline;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    color: var(--secondary-color);
}

.recipe-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.recipe-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.ingredient-group, .step-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.ingredient-group .form-group, .step-group .form-group {
    flex: 1;
}

.ingredient-group .form-group:first-child, .step-group .form-group:first-child {
    flex: 0 0 120px;
}

.remove-ingredient-button, .remove-step-button {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ingredients-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.ingredients-list li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.ingredients-list .quantity {
    font-weight: bold;
    margin-right: 10px;
}

.steps-list {
    padding-left: 20px;
    margin: 15px 0;
}

.steps-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.button {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.button:hover {
    background-color: var(--secondary-color);
	color:  white;
}

.delete-button {
    background-color: var(--error-color);
}

.delete-button:hover {
    background-color: #a00020;
}

.cancel-button {
    background-color: #666;
}

.cancel-button:hover {
    background-color: #888;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 5px;
}

/* Styles pour l'admin */
.admin-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.user-table th, .user-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.user-table th {
    background-color: var(--primary-color);
    color: white;
}

.role-form {
    display: inline;
}

.role-form select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-color);
}

/* Styles pour les catégories */
.category-filter {
    margin: 20px 0;
    background-color: var(--surface-color);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.category-item {
    display: block;
    padding: 8px 12px;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.category-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.category-item.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.recipe-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    /* background-color: var(--primary-color);     */
	background-color: transparent;
    color: white;
    border-radius: 15px;
    font-size: 0.8em;
}

.category-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.category-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Styles pour les titres h1 - Thème clair */
h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    position: relative;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* Style pour les titres dans les cartes de recette */
.recipe-card h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Style pour les titres dans les pages de recette */
.recipe-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.recipe-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* Styles pour la table des recettes (admin) */
.recipe-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.recipe-table th, .recipe-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.recipe-table th {
    background-color: var(--primary-color);
    color: white;
}

.success-button {
    background-color: var(--secondary-color);
    color: var(--bg-color);
}

.success-button:hover {
    background-color: color-mix(in srgb, var(--secondary-color), white 20%);
}

/* Structure de la page pour un footer collant */
#root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    width: 100%;
}

.header {
    background-color: var(--surface-color);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    margin-top: auto; /* Permet de pousser le footer en bas */
}

/* Styles pour le footer */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3, .footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.footer-section p {
    margin: 5px 0;
    color: var(--text-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Styles pour les pages de compte */
.account-info {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.info-group {
    margin-bottom: 15px;
}

.info-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--secondary-color);
}

.info-group p {
    margin: 0;
    padding: 5px 0;
}

.account-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.account-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert.success {
    background-color: color-mix(in srgb, var(--secondary-color), transparent 80%);
    color: var(--bg-color);
    border: 1px solid var(--secondary-color);
}

.alert.error {
    background-color: color-mix(in srgb, var(--error-color), transparent 80%);
    color: var(--bg-color);
    border: 1px solid var(--error-color);
}

/* Styles pour les liens - Thème clair */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Liens dans le header */
.header a {
    color: var(--text-color);
    font-weight: 500;
}

.header a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Liens dans le footer */
.footer a {
    color: var(--text-color);
}

.footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Liens dans les boutons */
.button {
    color: white;
}

/* Liens dans les cartes de recette */
.recipe-card a {
    /* color: var(--primary-color); */
	color: white;
    font-weight: 500;
}

.recipe-card a:hover {
    /* color: var(--primary-color); */
	color: white;
    text-decoration: none;
}

/* Liens dans les alertes et messages */
.alert a {
    color: inherit;
    text-decoration: underline;
}

/* Liens visités */
/* a:visited { */
    /* color: color-mix(in srgb, var(--primary-color), var(--secondary-color) 30%); */
/* } */

/* Liens actifs */
a:active {
    color: var(--secondary-color);
}

/* Liens dans les pages de compte */
.account-actions a {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.account-form a {
    color: var(--secondary-color);
}

.account-form a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Liens dans les tableaux */
table a {
    color: var(--primary-color);
    text-decoration: none;
}

table a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Liens dans les boutons des tableaux */
.recipe-table .button {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Boutons qui ressemblent à des liens */
.button-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.button-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Styles pour les icônes */
.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-link i {
    font-size: 0.9em;
    width: 1em;
    text-align: center;
}

/* Taille des icônes dans les boutons */
.button i {
    margin-right: 8px;
}

/* Icônes dans le header */
.header a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Icônes dans le footer */
.footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Icônes dans les cartes de recette */
.recipe-card a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Icônes dans les actions de compte */
.account-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Champs de formulaire */
form input, form textarea, form select {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    width: 100%;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

form input:focus, form textarea:focus, form select:focus {
    border-color: var(--primary-color-light);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color), transparent 80%);
}

main {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--bg-color), #000 5%) 0%,
        color-mix(in srgb, var(--bg-color), #2a2a4a 10%) 100%);
    /* ... (le reste des propriétés) */
}

/* Police pour les titres principaux (h1) */
h1 {
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    position: relative;
    line-height: 1.2;
}

/* Police pour les sous-titres (h2) */
h2 {
    font-family: var(--font-subtitle);
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin: 20px 0 15px 0;
    padding-bottom: 8px;
    position: relative;
    line-height: 1.3;
}

/* Police pour les sous-sous-titres (h3) */
h3 {
    font-family: var(--font-subtitle);
    font-weight: 500;
    color: var(--text-color);
    font-size: 1.4rem;
    margin: 0px 0 10px 0;
    line-height: 1.4;
}

h4 {
    font-family: var(--font-subtitle);
}

/* Police pour le texte principal */
body, p, li, input, textarea, select {
    font-family: var(--font-text);
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.6;
}

/* Style spécial pour le titre des recettes */
.recipe-title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    line-height: 1.2;
}

/* Styles pour la page d'accueil */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Section Hero */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background-color: color-mix(in srgb, var(--surface-color), transparent 80%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-content {
    max-width: 600px;
}

.hero-section h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Section des fonctionnalités */
.features-section {
    margin-bottom: 40px;
    text-align: center;
}

.features-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background-color: color-mix(in srgb, var(--surface-color), transparent 90%);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-card p {
    color: color-mix(in srgb, var(--text-color), transparent 20%);
    line-height: 1.5;
}

/* Section des recettes publiques */
.public-recipes-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: color-mix(in srgb, var(--surface-color), transparent 80%);
    border-radius: 10px;
}

.public-recipes-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.public-recipes-actions {
    margin-top: 20px;
}

/* Section des témoignages */
.testimonials-section {
    margin-bottom: 40px;
    text-align: center;
}

.testimonials-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.testimonial-card {
    background-color: color-mix(in srgb, var(--surface-color), transparent 90%);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.testimonial-avatar {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.5;
}

.testimonial-author {
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--text-color), transparent 30%);
}

/* Section CTA */
.cta-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--primary-gradient);
    border-radius: 10px;
    color: white;
}

.cta-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-section p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons */
.primary-button {
    background-color: var(--primary-color);
    color: white;
}

.secondary-button {
    background-color: var(--secondary-color);
    color: var(--bg-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .features-section h2,
    .public-recipes-section h2,
    .testimonials-section h2,
    .cta-section h2 {
        font-size: 1.3rem;
    }

    .button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Header responsive */
.header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav {
    display: flex;
    gap: 10px;
}

/* Bouton de menu mobile (masqué par défaut) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Menu mobile */
.nav-mobile {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
    gap: 5px;
}

.nav-mobile a {
    padding: 8px 10px;
    background-color: color-mix(in srgb, var(--surface-color), transparent 80%);
    border-radius: 4px;
}

/* Bouton de basculement de thème */
.theme-switch-wrapper {
    margin-left: 10px;
}

/* Règles pour les écrans ≤ 768px */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
    }

    .nav.active {
        display: flex;
    }
	
    .nav-mobile.active {
        display: flex;
    }

    .nav-mobile {
        display: none;
    }

    .header {
        padding: 10px;
    }

    .theme-switch-wrapper {
        margin-left: 0;
        order: 3;
        width: 100%;
        text-align: right;
        margin-top: 10px;
    }
}

/* Conteneur principal */
main {
    width: 100%;
    padding: 15px;
    margin: 15px auto;
    max-width: 1200px;
}

/* Grille des recettes */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Cartes de recette */
.recipe-card {
    padding: 12px;
    border-radius: 6px;
}

/* Filtres par catégorie */
.category-filter {
    margin: 15px 0;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-item {
    padding: 6px 10px;
    font-size: var(--text-sm);
}

/* Formulaires */
.recipe-form {
    padding: 15px;
}

.form-row {
    flex-direction: column;
    gap: 10px;
}

.form-group {
    width: 100%;
}

/* Tableaux */
table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

@media (max-width: 768px) {
    /* Grille des recettes */
    .recipe-grid {
        grid-template-columns: 1fr;
    }

    /* Cartes de recette */
    .recipe-card {
        padding: 10px;
    }

    /* Filtres par catégorie */
    .category-list {
        justify-content: center;
    }

    /* Formulaires */
    .form-row {
        flex-direction: column;
    }

    /* Boutons dans les formulaires */
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .button {
        width: 100%;
    }

    /* Ingrédients et étapes */
    .ingredient-group, .step-group {
        flex-direction: column;
        gap: 5px;
    }

    /* Tableaux */
    th, td {
        padding: 8px;
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    /* Titres */
    h1 {
        font-size: 1.4rem;
    }

    .recipe-title {
        font-size: 1.6rem;
    }

    /* Boutons */
    .button {
        padding: 6px 10px;
        font-size: var(--text-sm);
    }
}

/* Footer responsive */
.footer {
    padding: 15px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

/* Liens du footer */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        min-width: 100%;
        margin-bottom: 15px;
    }

    .social-icons {
        justify-content: center;
    }
}

/* Formulaires */
.ingredient-row, .step-group {
    flex-direction: column;
}

@media (min-width: 768px) {
    .ingredient-row {
        flex-direction: row;
    }
}

/* Formulaires de compte */
.account-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 15px;
}

@media (max-width: 480px) {
    .account-form {
        padding: 10px;
    }
}

/* Tableaux admin */
.user-table, .recipe-table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

.user-table th, .user-table td,
.recipe-table th, .recipe-table td {
    white-space: nowrap;
    padding: 8px 10px;
}

@media (max-width: 768px) {
    .user-table th, .user-table td,
    .recipe-table th, .recipe-table td {
        padding: 6px 8px;
        font-size: var(--text-sm);
    }
}

/* Règles pour les tablettes (≤ 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

/* Règles pour les mobiles (≤ 768px) */
@media (max-width: 768px) {
    :root {
        --text-base: 0.95rem;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }
}

/* Règles pour les petits mobiles (≤ 480px) */
@media (max-width: 480px) {
    :root {
        --text-base: 0.9rem;
        --h1-size: 1.4rem;
        --h2-size: 1.2rem;
        --recipe-title-size: 1.6rem;
    }

    .button {
        padding: 6px 10px;
        font-size: var(--text-sm);
    }

    .recipe-meta span {
        display: block;
    }
}

/* Conteneur des checkboxes */
.category-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

/* Label des checkboxes */
.category-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* Checkboxes */
.category-checkboxes input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Sur mobile (≤ 768px) : affiche en colonne */
@media (max-width: 768px) {
    .category-checkboxes {
        flex-direction: column;
        gap: 8px;
    }
}

/* Bannière de consentement RGPD */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 15px;
    z-index: 3000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.cookie-consent-content p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-consent-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.cookie-consent-link:hover {
    text-decoration: underline;
}

/* Styles pour les catégories */

/* Grille des catégories (admin) */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Carte de catégorie */
.category-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.category-icon {
    font-size: 1.5rem;
    color: var(--category-color, var(--primary-color));
}

.category-card h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.category-description {
    color: color-mix(in srgb, var(--text-color), transparent 30%);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.category-actions {
    display: flex;
    gap: 8px;
}

/* Formulaire de catégorie */
.category-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-form .form-group {
    margin-bottom: 15px;
}

.category-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.category-form input[type="text"],
.category-form textarea,
.category-form input[type="color"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: color-mix(in srgb, var(--surface-color), transparent 50%);
    color: var(--text-color);
    font-family: var(--font-text);
}

.category-form input[type="color"] {
    height: 40px;
    padding: 5px;
    cursor: pointer;
}

/* Liste des catégories (filtre) */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: color-mix(in srgb, var(--surface-color), transparent 90%);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: var(--text-sm);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.category-item:hover {
    background-color: color-mix(in srgb, var(--primary-color), transparent 80%);
    color: white;
}

.category-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-item .category-icon {
    font-size: 1rem;
}

/* Étiquettes de catégorie dans les recettes */
.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background-color: color-mix(in srgb, var(--category-color, var(--primary-color)), transparent 90%);
    color: white;
    border-radius: 15px;
    font-size: var(--text-xs);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--category-color, var(--primary-color));
}

.category-tag:hover {
    background-color: var(--category-color, var(--primary-color));
    transform: scale(1.05);
}

.category-tag .category-icon {
    font-size: 0.9rem;
}