/* =========================================================
   STYLE.CSS — BASE GLOBALE
   Contient : reset, typo, layout, header, nav, cards,
              carousel, footer, pagination, formulaires,
              recette-page, mobile.
   NE PAS dupliquer ces règles dans les CSS modules.
========================================================= */

/* ======================
   RESET
====================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f7f7;
    color: #333;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ======================
   TITRES
====================== */

h1, h2, h3 {
    color: #5c4452;
    margin-bottom: 10px;
}

/* ======================
   CONTAINER GLOBAL
====================== */

.container {
    width: 92%;
    max-width: 1100px;
    margin: auto;
    padding: 20px 0;
}

/* ======================
   HEADER
====================== */

.header-bar {
    background: linear-gradient(135deg, #e8c6d9, #c78fb3);
    color: #3d2b35;
    padding: 18px 20px;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.header-text h1 {
    font-size: 22px;
    color: #fff;
}

.header-text p {
    font-size: 14px;
    color: #fff;
    opacity: 0.9;
}

/* ======================
   NAV
====================== */

.nav-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.nav-menu a {
    background: rgba(255,255,255,0.92);
    color: #4a2f3a;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    transition: background .2s, transform .2s;
}

.nav-menu a:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* ======================
   HAMBURGER
====================== */

.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* ======================
   HERO
====================== */

.hero {
    padding: 10px 0;
    text-align: center;
}

.hero h2 {
    font-size: 22px;
    color: #5c4452;
}

/* ======================
   GRID + CARDS
====================== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease, filter .3s ease;
}

.card:hover img {
    transform: scale(1.05);
    filter: brightness(0.92);
}

.card-content {
    padding: 12px;
}

/* ======================
   TITRE DE SECTION
====================== */

.articles-title {
    text-align: center;
    font-size: 26px;
    margin: 20px 0;
    color: #5c4452;
}

/* ======================
   LIEN LIRE LA SUITE
====================== */

.read-more {
    display: inline-block;
    margin-top: 6px;
    color: #b57aa1;
    font-weight: bold;
    transition: color .2s ease;
}

.read-more:hover {
    color: #8f4f7a;
}

/* ======================
   FORMULAIRE RECHERCHE
====================== */

.search {
    margin: 15px 0;
}

.search form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search input[type="text"],
.search select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.search button,
button[type="submit"],
form button {
    padding: 8px 16px;
    background: #c78fb3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}

.search button:hover,
button[type="submit"]:hover,
form button:hover {
    background: #a96f96;
}

/* ======================
   CAROUSEL
====================== */

.carousel {
    position: relative;
    width: 100%;
    max-width: 850px;
    margin: 25px auto;
    border-radius: 10px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform .5s ease;
}

.slide {
    flex: 0 0 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    color: #fff;
    padding: 10px 12px;
}

.caption h2 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 4px;
}

.slide-link {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.85);
    color: #4a2f3a;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    z-index: 10;
    transition: background .2s;
}

.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
    background: #fff;
}

/* ======================
   PAGE RECETTE
====================== */

.recipe-page {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.recipe-image {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin-bottom: 15px;
}

.recipe-content p,
.recipe-content ul {
    margin-bottom: 10px;
}

.recipe-content ul {
    padding-left: 22px;
}

.recipe-content li {
    margin-bottom: 6px;
}

.recipe-content a {
    color: blue;
    text-decoration: underline;
}

.recipe-content a:visited {
    color: purple;
}

.categorie {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    font-style: italic;
}

/* ======================
   FOOTER
====================== */

.footer {
    background: #fff;
    border-top: 1px solid #e6e6e6;
    padding: 30px 15px;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    color: #555;
    margin-bottom: 8px;
}

.footer a {
    color: #b57aa1;
}

.footer a:hover {
    color: #8f4f7a;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}

/* ======================
   PAGINATION
====================== */

.pagination {
    text-align: center;
    margin: 25px 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 2px;
    background: #fff;
    border-radius: 6px;
    color: #b57aa1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: background .2s ease;
}

.pagination a:hover,
.pagination a.active {
    background: #f0e2eb;
    color: #5c4452;
    font-weight: bold;
}

/* ======================
   FORMULAIRE CONTACT
====================== */

form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

form textarea {
    resize: vertical;
}

/* ======================
   PAGE CONNEXION
====================== */

.login-box {
    max-width: 380px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.login-error {
    color: #c0392b;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

/* ======================
   MOBILE
====================== */

@media (max-width: 768px) {

    .grid {
        grid-template-columns: 1fr;
    }

    .recipe-page {
        margin: 0;
        border-radius: 0;
        padding: 18px;
    }

    .recipe-image {
        max-height: 240px;
    }

    .slide img {
        height: 240px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        background: rgba(255,255,255,0.95);
        padding: 10px;
        border-radius: 10px;
    }

    .nav-menu.open {
        display: flex;
    }

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

    .menu-toggle {
        display: block;
    }

    .header-top {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}


/* ======================
   PAGES D'ERREUR
====================== */

.error-page {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #e8c6d9;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 2px 4px 0 #c78fb3;
}

.error-page h1 {
    font-size: 28px;
    color: #5c4452;
    margin-bottom: 15px;
}

.error-page p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.error-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-home {
    display: inline-block;
    padding: 10px 20px;
    background: #c78fb3;
    color: #fff;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: background .2s, transform .2s;
}

.btn-home:hover {
    background: #a96f96;
    transform: translateY(-2px);
    color: #fff;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 80px;
    }
    .error-page h1 {
        font-size: 22px;
    }
}

/* ======================
   BREADCRUMB
====================== */

.breadcrumb {
    background: #fff;
    border-bottom: 1px solid #ede0e8;
    padding: 8px 0;
}

.breadcrumb-inner {
    width: 92%;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: #888;
}

.breadcrumb-inner a {
    color: #b57aa1;
    transition: color .2s;
}

.breadcrumb-inner a:hover {
    color: #5c4452;
}

.breadcrumb-sep {
    color: #ccc;
    font-size: 14px;
    padding: 0 2px;
}

.breadcrumb-current {
    color: #5c4452;
    font-weight: bold;
}

/* ======================
   RECHERCHE GLOBALE
====================== */

.search-summary {
    text-align: center;
    font-size: 15px;
    color: #666;
    margin: 15px 0 25px;
}

.search-summary strong {
    color: #5c4452;
    font-size: 18px;
}

.search-summary em {
    color: #b57aa1;
}

.search-section {
    margin-bottom: 40px;
}

.search-type-title {
    font-size: 20px;
    color: #5c4452;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8c6d9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-count {
    background: #c78fb3;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 20px;
}

.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.search-empty p {
    margin-bottom: 20px;
}

/* Barre recherche globale dans le header */
.header-search {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.header-search form {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 400px;
}

.header-search input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    outline: none;
}

.header-search button {
    padding: 10px 16px;
    background: #c78fb3;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background .2s;
}

.header-search button:hover {
    background: #a96f96;
}

@media (max-width: 768px) {
    .header-search form {
        max-width: 100%;
    }
}