/*
Theme Name: Superette Romain
Theme URI: https://superetteromain.com
Author: Superette Romain
Author URI: https://superetteromain.com
Description: Thème WordPress personnalisé pour Superette Romain - E-commerce avec WooCommerce
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: superette-romain
Tags: e-commerce, woocommerce, supermarket, shop, business
*/

/* ===================================
   RESET & BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --text-color: #333333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 30px 0;
}

.main-content {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* ===================================
   HEADER
   =================================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 100;
}

.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info i {
    margin-right: 5px;
}

.header-main {
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 80px;
    width: auto;
}

.site-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.site-description {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===================================
   NAVIGATION
   =================================== */
.main-navigation {
    background: var(--dark-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    font-weight: 500;
    transition: background 0.3s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.menu-toggle i {
    margin-right: 8px;
}

/* ===================================
   CART & SEARCH
   =================================== */
.header-cart {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--dark-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.search-form {
    display: flex;
    gap: 5px;
    align-items: center;
}

.search-form input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 250px;
    font-size: 14px;
}

.search-form button {
    padding: 10px 18px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: var(--secondary-color);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    background: linear-gradient(rgba(46, 204, 113, 0.3), rgba(39, 174, 96, 0.3)), url('images/hero-bg.png') center/cover no-repeat;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-section h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    font-weight: bold;
}

.hero-section p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.btn-hero {
    background: var(--accent-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 18px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-weight: bold;
    display: inline-block;
}

.btn-hero:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

/* ===================================
   WOOCOMMERCE PRODUCTS
   =================================== */
.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.products > * {
    min-width: 0;
}

.product {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.add-to-cart:hover {
    background: var(--secondary-color);
}

/* ===================================
   SIDEBAR
   =================================== */
.sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--dark-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--light-color);
}

.widget li:last-child {
    border-bottom: none;
}

/* ===================================
   FOOTER
   =================================== */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: var(--light-color);
}

.footer-widget a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablette et petits écrans (992px et moins) */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--dark-color);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu a {
        width: 100%;
        padding: 15px 20px;
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 10px 20px;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        background: var(--secondary-color);
    }
    
    .menu-toggle i {
        font-size: 20px;
    }
    
    .hero-section h1 {
        font-size: 36px;
    }
    
    .products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        padding: 20px;
    }
}

/* Mobile (767px et moins) */
@media (max-width: 767px) {
    /* Header responsive */
    .site-header {
        position: relative;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }
    
    .search-form {
        width: 100%;
        justify-content: center;
    }
    
    .search-form input {
        width: 100%;
        max-width: none;
        flex: 1;
    }
    
    .header-cart {
        justify-content: center;
        margin-top: 10px;
    }
    
    /* Top bar responsive */
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 5px 0;
    }
    
    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 12px;
    }
    
    .top-bar-right {
        font-size: 12px;
    }
    
    /* Logo responsive */
    .site-logo img {
        max-height: 60px;
    }
    
    .site-title {
        font-size: 22px;
    }
    
    .site-description {
        font-size: 12px;
    }
    
    /* Header main responsive */
    .header-main {
        padding: 15px 0;
    }
    
    /* Navigation mobile */
    .main-navigation {
        position: relative;
    }
    
    /* Hero section responsive */
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 28px;
        padding: 0 15px;
    }
    
    .hero-section p {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .btn-hero {
        font-size: 16px;
        padding: 12px 30px;
    }
    
    /* Products grid responsive */
    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
    
    /* Fallback pour shortcodes WooCommerce sans wrapper */
    ul.products.featured-products,
    ul.products.new-products,
    ul.products.sale-products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 15px !important;
    }
    
    /* Reset pour articles/produits sur mobile */
    ul.products li.product,
    .product {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        clear: none !important;
        float: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .product img {
        height: 200px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Content wrapper */
    .main-content {
        padding: 15px;
    }
    
    /* Sidebar */
    .sidebar {
        padding: 15px;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
}

/* Petits mobiles (576px et moins) */
@media (max-width: 576px) {
    /* Typography mobile */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    /* Header mobile */
    .top-bar {
        padding: 5px 0;
    }
    
    .contact-info {
        font-size: 11px;
        gap: 10px;
    }
    
    .site-logo img {
        max-height: 45px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .site-description {
        font-size: 11px;
    }
    
    .header-main {
        padding: 10px 0;
    }
    
    .header-right {
        gap: 10px;
    }
    
    /* Hero mobile */
    .hero-section h1 {
        font-size: 24px;
    }
    
    .hero-section p {
        font-size: 14px;
    }
    
    .btn-hero {
        font-size: 14px;
        padding: 10px 25px;
    }
    
    /* Products single column on small mobile */
    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    
    .product img {
        height: 250px;
    }
    
    /* Navigation mobile */
    .menu-toggle {
        margin: 8px 15px;
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .menu-toggle i {
        font-size: 18px;
    }
    
    .nav-menu a {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    /* Search form mobile */
    .search-form {
        flex-direction: row;
        width: 100%;
    }
    
    .search-form input {
        font-size: 14px;
        padding: 10px 12px;
        flex: 1;
        min-width: 0;
    }
    
    .search-form button {
        padding: 10px 12px;
        flex-shrink: 0;
    }
    
    .search-form button span {
        display: none;
    }
    
    /* Cart mobile */
    .cart-icon {
        font-size: 22px;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    /* Footer mobile */
    .footer-widget h3 {
        font-size: 18px;
    }
    
    .footer-widget ul li {
        font-size: 14px;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    /* Buttons mobile */
    .add-to-cart,
    .btn-hero,
    button {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    /* Spacing mobile */
    .main-content {
        padding: 10px;
    }
    
    .sidebar {
        padding: 10px;
    }
    
    .container {
        padding: 0 10px;
    }
}

/* Très grands écrans (1400px et plus) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 56px;
    }
    
    .hero-section p {
        font-size: 22px;
    }
}

/* Mode paysage mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 20px 0;
    }
    
    .hero-section h1 {
        font-size: 24px;
    }
    
    .hero-section p {
        font-size: 14px;
    }
    
    .nav-menu {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* Support tactile */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter la taille des zones tactiles */
    button,
    a,
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-menu a {
        padding: 15px 20px;
    }
    
    /* Désactiver les effets hover sur tactile */
    .product:hover,
    .nav-menu a:hover {
        transform: none;
    }
}
