
/* ------------------------------
   STYLE GENERAL
------------------------------ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px 15px;
    font-family: Arial, sans-serif;
    background: #f8f5f0;
    color: #443b35;
    line-height: 1.6;
}

h1 {
    text-align: center;
    color: #795548;
    margin-bottom: 30px;
}

h2 {
    color: #795548;
}

/* ------------------------------
   FORMULAIRES
------------------------------ */

form {
    max-width: 750px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d8cec5;
    border-radius: 7px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    background: #fffdfa;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #b47b5b;
    box-shadow: 0 0 4px rgba(180,123,91,0.3);
}

/* ------------------------------
   BOUTONS
------------------------------ */

button {
    display: block;
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    background: #98705b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #795548;
}

/* ------------------------------
   MESSAGES ET LIENS
------------------------------ */

p {
    text-align: center;
}

a {
    color: #98705b;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* ------------------------------
   TELEPHONE ET TABLETTE
------------------------------ */

@media screen and (max-width: 600px) {

    body {
        padding: 15px 10px;
    }

    h1 {
        font-size: 25px;
    }

    form {
        padding: 18px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* GRILLE DES PREPARATIONS */

.navigation {
    text-align: center;
    margin-bottom: 25px;
}

.grille-preparations {
    max-width: 1100px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.carte-preparation {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.carte-preparation img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.contenu-carte {
    padding: 18px;
}

.contenu-carte h2 {
    margin-top: 0;
}

.categorie {
    display: inline-block;
    padding: 5px 12px;
    background: #f1e4d9;
    color: #795548;
    border-radius: 20px;
    font-size: 13px;
}

.recherche {
    max-width: 750px;
}

/* FICHE DETAIL */

.fiche-detail {
    max-width: 850px;
    margin: 25px auto;
    padding: 30px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.photo-detail {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
}

.fiche-detail h2 {
    border-bottom: 2px solid #f1e4d9;
    padding-bottom: 8px;
    margin-top: 30px;
}

.fiche-detail p {
    text-align: left;
    white-space: normal;
}

@media screen and (max-width: 600px) {
    .fiche-detail {
        padding: 18px;
    }
}
/* Affichage côte à côte des ingrédients et de la préparation */

.ingredients-preparation {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 25px;
    width: 100%;
    margin-top: 30px;
}

.bloc-ingredients,
.bloc-preparation {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 20px;
    background: #fffaf5;
    border: 1px solid #eaded2;
    border-radius: 12px;
}

@media screen and (max-width: 600px) {
    .ingredients-preparation {
        grid-template-columns: 1fr !important;
    }
}
/* Présentation des ingrédients et de la préparation */

.ingredients-preparation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

.bloc-ingredients,
.bloc-preparation {
    background: #fffaf5;
    padding: 25px;
    border: 1px solid #eaded2;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(80, 50, 30, 0.08);
}

.bloc-ingredients h2,
.bloc-preparation h2 {
    color: #79543b;
    border-bottom: 2px solid #eaded2;
    padding-bottom: 12px;
    margin-top: 0;
}

.bloc-ingredients p,
.bloc-preparation p {
    line-height: 1.8;
    color: #4b4038;
    white-space: normal;
}

@media screen and (max-width: 600px) {
    .ingredients-preparation {
        grid-template-columns: 1fr;
    }
}
.description-preparation {
    background: #fffaf5;
    padding: 25px;
    margin-top: 25px;
    border-radius: 14px;
    border: 1px solid #eaded2;
}

.temps-preparation-cuisson {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.bloc-temps {
    background: #f1e7dc;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
}

.bloc-temps h3 {
    color: #79543b;
}

@media screen and (max-width: 600px) {
    .temps-preparation-cuisson {
        grid-template-columns: 1fr;
    }
}
.categorie-rendement {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.bloc-info {
    background: #fffaf5;
    padding: 20px;
    border: 1px solid #eaded2;
    border-radius: 14px;
}

.bloc-info p {
    margin-bottom: 0;
    color: #79543b;
}

@media screen and (max-width: 600px) {
    .categorie-rendement {
        grid-template-columns: 1fr;
    }
}
.contenu-carte h2 {
    text-align: center;
    margin-top: 0;
}
.carte-preparation .contenu-carte {
    text-align: center !important;
    width: 100%;
}

.carte-preparation .contenu-carte h2 {
    text-align: center !important;
    width: 100%;
    margin: 0 auto;
}

/* BARRE DE NAVIGATION */

.barre-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #795548;
    padding: 15px;
    margin: 20px auto 30px;
    border-radius: 12px;
    max-width: 1200px;
}

.barre-navigation a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 8px;
}

.barre-navigation a:hover {
    background: #98705b;
    text-decoration: none;
}

@media screen and (max-width: 600px) {
    .barre-navigation {
        flex-direction: column;
    }

    .barre-navigation a {
        width: 100%;
        text-align: center;
    }
}
/* COMPTEUR DE RECETTES */

.compteur-recettes {
    max-width: 300px;
    margin: 30px auto;
    padding: 25px;
    text-align: center;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.compteur-recettes h2 {
    margin-top: 0;
}

.nombre-recettes {
    font-size: 45px;
    font-weight: bold;
    color: #795548;
    margin: 10px 0;
}

/* NAVIGATION DE L'ACCUEIL */

.navigation-accueil {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px auto;
}

.navigation-accueil a {
    display: inline-block;
    padding: 12px 18px;
    background: #795548;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.navigation-accueil a:hover {
    background: #98705b;
    text-decoration: none;
}
/* COMPTEURS COTE A COTE */

.grille-compteurs {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
    flex-wrap: wrap;
    margin: 30px auto;
}

.grille-compteurs .compteur-recettes {
    width: 260px;
    margin: 0;
}

@media screen and (max-width: 600px) {
    .grille-compteurs {
        flex-direction: column;
        align-items: center;
    }
}
/* FORCER LES COMPTEURS COTE A COTE */

.grille-compteurs {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
    width: 100%;
    flex-wrap: nowrap;
    margin: 30px auto;
}

.grille-compteurs .compteur-recettes {
    display: block;
    flex: 0 1 260px;
    width: 260px;
    margin: 0;
}

@media screen and (max-width: 600px) {
    .grille-compteurs {
        flex-wrap: wrap;
    }
}

/* MENUS DEROULANTS */

.barre-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: #795548;
    padding: 15px;
    border-radius: 12px;
    margin: 20px auto 30px;
}

.barre-navigation a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    display: block;
}

.menu-deroulant {
    position: relative;
}

.sous-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #795548;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.menu-deroulant:hover .sous-menu {
    display: block;
}

.barre-navigation a:hover {
    background: #98705b;
    border-radius: 8px;
}

.sous-menu a {
    padding: 12px;
}

@media screen and (max-width: 600px) {
    .barre-navigation {
        flex-direction: column;
    }

    .menu-deroulant {
        width: 100%;
        text-align: center;
    }

    .sous-menu {
        position: static;
        width: 100%;
    }

    .menu-deroulant:hover .sous-menu {
        display: block;
    }
}
