/* ===========================================
   C'naturel - Thème Plage Mer Sable
   Boutique + Panier + Espace membres + Admin
=========================================== */

/* BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #f5f0e8 0%, #e8e2d8 100%);
    color: #2d4a4a;
    line-height: 1.6;
}

a {
    color: #20b2aa;
    text-decoration: none;
    transition: 0.3s ease;
}

a:hover {
    color: #4682b4;
}

img {
    max-width: 100%;
    display: block;
}

main {
    min-height: 60vh;
}

/* MENU / HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #4682b4 0%, #20b2aa 50%, #008b8b 100%);
    box-shadow: 0 6px 20px rgba(70, 130, 180, 0.35);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-logo {
    color: white;
    text-decoration: none;
    font-size: 1.7rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.site-logo:hover {
    color: #f4e4bc;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.site-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.site-nav a:hover,
.site-nav a.active {
    background: rgba(240, 230, 140, 0.28);
    color: white;
    transform: translateY(-2px);
}

.cart-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f4e4bc;
    color: #2d4a4a;
    font-size: 0.82rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ANCIEN HEADER SI ENCORE UTILISÉ */
.header {
    background: linear-gradient(135deg, #4682b4 0%, #20b2aa 50%, #008b8b 100%);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(70, 130, 180, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.header nav a:hover {
    background: rgba(240, 230, 140, 0.3);
    transform: translateY(-2px);
}

/* HERO */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #87ceeb 0%, #98d8c8 50%, #f4e4bc 100%);
    position: relative;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 4rem;
    background: linear-gradient(135deg, #2d4a4a, #4682b4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1.5rem;
    font-weight: bold;
    text-shadow: none;
    position: relative;
    z-index: 10;
}

.hero p {
    font-size: 1.8rem;
    color: #2d4a4a !important;
    margin: 2rem auto 3rem;
    max-width: 650px;
    font-weight: 500;
    position: relative;
    z-index: 10;
}

.hero-img {
    max-width: 750px;
    width: 95%;
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(32, 178, 170, 0.5);
    border: 4px solid rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 10;
    margin: 0 auto;
}

/* BLOCS GÉNÉRAUX */
.section-box,
.form-box,
.account-box,
.cart-box {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(70, 130, 180, 0.15);
}

/* COLLECTION / BOUTIQUE */
.collection {
    padding: 5rem 2rem;
    max-width: 1300px;
    margin: 0 auto 5rem;
}

.collection h1,
.collection h2 {
    text-align: center;
    color: #4682b4;
    font-size: 3rem;
    margin-bottom: 3rem;
}

.galerie,
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.bijou,
.product-card {
    background: rgba(244, 228, 188, 0.98);
    padding: 2rem;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(70, 130, 180, 0.25);
    transition: all 0.35s ease;
    border: 3px solid rgba(32, 178, 170, 0.25);
    text-align: center;
}

.bijou:hover,
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(32, 178, 170, 0.30);
}

.bijou img,
.product-card img {
    width: 100%;
    height: 270px;
    object-fit: contain;
    object-position: center;
    border-radius: 22px;
    background: #fff;
    padding: 0.5rem;
}

.bijou p,
.product-card p {
    margin-top: 1rem;
    color: #2d4a4a;
    font-size: 1.05rem;
}

.price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #008b8b;
    margin: 1rem 0 0.5rem;
}

.stock {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}

.out-of-stock {
    color: #b00020;
    font-weight: bold;
}

/* BOUTONS */
button,
.btn,
input[type="submit"] {
    background: linear-gradient(135deg, #20b2aa, #4682b4);
    color: white;
    border: none;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(32, 178, 170, 0.25);
}

button:hover,
.btn:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    opacity: 0.96;
    color: white;
}

.btn-secondary {
    background: rgba(70, 130, 180, 0.12);
    color: #2d4a4a;
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(70, 130, 180, 0.22);
    color: #2d4a4a;
}

.btn-danger {
    background: #d9534f !important;
    color: white !important;
}

/* FORMULAIRES */
form {
    margin-top: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 2px solid rgba(70, 130, 180, 0.18);
    border-radius: 16px;
    font-size: 1rem;
    color: #2d4a4a;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    transition: 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #20b2aa;
    box-shadow: 0 0 0 4px rgba(32, 178, 170, 0.12);
}

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

label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: bold;
    color: #2d4a4a;
}

.form-row {
    margin-bottom: 1rem;
}

/* PANIER */
.cart-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cart-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 10px 30px rgba(70, 130, 180, 0.10);
}

.cart-item img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 14px;
    background: #fafafa;
    padding: 0.35rem;
}

.cart-item h3 {
    margin: 0 0 0.5rem;
    color: #2d4a4a;
}

.cart-total {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(244, 228, 188, 0.8);
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: right;
}

/* COMPTE */
.account-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.order-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(70, 130, 180, 0.10);
}

/* À PROPOS */
.apropos {
    padding: 5rem 2rem;
    max-width: 950px;
    margin: 3rem auto;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.18), rgba(152, 216, 200, 0.18), rgba(244, 228, 188, 0.3));
    border-radius: 35px;
    box-shadow: 0 25px 70px rgba(32, 178, 170, 0.25);
    text-align: center;
}

.apropos h1 {
    color: #4682b4;
    font-size: 3rem;
    margin-bottom: 2.5rem;
}

.apropos p {
    font-size: 1.45rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 2.2rem auto;
}

.apropos-img {
    max-width: 600px;
    width: 92%;
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(70, 130, 180, 0.45);
    border: 5px solid rgba(255, 255, 255, 0.9);
    margin: 3rem auto;
    display: block;
}

/* MESSAGES */
.alert-success {
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: bold;
}

.alert-error {
    background: rgba(176, 0, 32, 0.10);
    color: #b00020;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* FOOTER */
.footer {
    background: linear-gradient(to top, #2d4a4a 0%, #4682b4 70%);
    color: #f4e4bc;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 6rem;
}

.footer a {
    color: #f4e4bc;
    font-weight: bold;
}

.footer a:hover {
    color: white;
}

/* =========================
   ADMIN MULTI-PAGES
========================= */
.admin-body {
    background: linear-gradient(to bottom, #f5f0e8 0%, #e8e2d8 100%);
    color: #2d4a4a;
}

.admin-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    background: linear-gradient(135deg, #2d4a4a, #4682b4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.admin-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    display: inline-block;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(244, 228, 188, 0.28);
    color: white;
    transform: translateY(-2px);
}

.admin-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.admin-topbar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(70, 130, 180, 0.12);
}

.admin-topbar h1 {
    margin: 0 0 0.5rem;
    color: #4682b4;
}

.admin-box {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 15px 40px rgba(70, 130, 180, 0.15);
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(70, 130, 180, 0.12);
}

.admin-card h2 {
    margin-top: 0;
    color: #2d4a4a;
}

.admin-btn-link {
    display: inline-block;
    margin-top: 1rem;
    background: linear-gradient(135deg, #20b2aa, #4682b4);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-weight: bold;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.admin-product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(70, 130, 180, 0.12);
}

.admin-product-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    margin-bottom: 1rem;
}

.admin-list-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(70, 130, 180, 0.15);
    border-radius: 18px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-inline-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.admin-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fafa;
    border: 1px solid #20b2aa;
    color: #2d4a4a;
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
}

.admin-thumb-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.admin-thumb-card {
    width: 180px;
    background: white;
    border-radius: 18px;
    padding: 0.8rem;
    box-shadow: 0 8px 20px rgba(70, 130, 180, 0.12);
}

.admin-thumb-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0.8rem;
}

.admin-logo-box img {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(70, 130, 180, 0.12);
    margin-bottom: 1rem;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.admin-table th,
.admin-table td {
    padding: 0.85rem;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #f3f8f8;
    color: #2d4a4a;
}

.admin-table td form {
    margin: 0;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
    }

    .cart-item > div:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .site-logo {
        text-align: center;
    }

    .site-nav {
        justify-content: center;
    }

    .site-nav a {
        font-size: 0.95rem;
        padding: 0.6rem 0.9rem;
    }

    .header nav {
        gap: 1.2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.5rem;
    }

    .galerie,
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .apropos,
    .collection,
    .section-box,
    .form-box,
    .account-box,
    .cart-box {
        padding: 2rem 1.2rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cart-item img {
        height: 180px;
        margin: 0 auto;
    }

    .cart-total {
        text-align: center;
    }

    .admin-page {
        padding: 1rem 0.75rem 3rem;
    }

    .admin-box,
    .admin-topbar {
        padding: 1.2rem;
    }

    .admin-inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-thumb-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4.5rem 1rem;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .collection h1,
    .collection h2,
    .apropos h1 {
        font-size: 2.2rem;
    }

    button,
    .btn,
    input[type="submit"] {
        width: 100%;
    }
}
