/*
Theme Name: Somaco Mayotte
Theme URI: https://www.somaco.fr
Author: Somaco
Author URI: https://www.somaco.fr
Description: Thème officiel de la SOMACO - Commerce de proximité à Mayotte. Quincaillerie, matériaux de construction, alimentation et plus encore depuis 1985.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: somaco
Tags: commerce, mayotte, somaco, magasins
*/

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
    --somaco-red: #C8102E;
    --somaco-red-dark: #A00D24;
    --somaco-red-light: #E8344E;
    --somaco-gray-dark: #333333;
    --somaco-gray-medium: #666666;
    --somaco-gray-light: #F2F2F2;
    --somaco-orange: #D4772C;
    --somaco-yellow: #F5C518;
    --somaco-white: #FFFFFF;
    --somaco-black: #1A1A1A;
    --somaco-purple: #8B5E8B;
    --somaco-pink: #D4A0D4;
    --somaco-green: #5A8C3C;

    --font-heading: 'Montserrat', 'Helvetica Neue', sans-serif;
    --font-body: 'Open Sans', 'Helvetica', sans-serif;

    --container-width: 1200px;
    --sidebar-width: 280px;
    --header-height: 80px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--somaco-gray-dark);
    background-color: var(--somaco-white);
}

a {
    color: var(--somaco-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--somaco-red-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--somaco-white);
    border-bottom: 3px solid var(--somaco-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

.site-logo img {
    height: 70px;
    width: auto;
}

.site-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--somaco-red);
    letter-spacing: 2px;
}

/* ============================================
   NAVIGATION PRINCIPALE
   ============================================ */
.main-navigation {
    background: var(--somaco-gray-dark);
}

.main-navigation ul {
    max-width: var(--container-width);
    margin: 0 auto;
    list-style: none;
    display: flex;
    padding: 0;
}

.main-navigation ul li {
    flex: 1;
    text-align: center;
}

.main-navigation ul li a {
    display: block;
    padding: 14px 20px;
    color: var(--somaco-white);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
    background: var(--somaco-red);
    color: var(--somaco-white);
}

/* Sub-menus */
.main-navigation ul li {
    position: relative;
}

.main-navigation ul li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--somaco-gray-dark);
    min-width: 220px;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.main-navigation ul li:hover ul.sub-menu {
    display: flex;
}

.main-navigation ul li ul.sub-menu li {
    flex: none;
    text-align: left;
}

.main-navigation ul li ul.sub-menu li a {
    padding: 10px 20px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: var(--somaco-red);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
}

/* ============================================
   LAYOUT - SIDEBAR + CONTENT
   ============================================ */
.site-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 20px;
}

.sidebar-left {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 20px 0;
}

.content-area {
    flex: 1;
    padding: 20px 0 20px 30px;
    min-width: 0;
}

/* ============================================
   SIDEBAR BUTTONS
   ============================================ */
.sidebar-nav .sidebar-btn {
    display: block;
    padding: 25px 20px;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--somaco-gray-dark);
    background: var(--somaco-white);
    border: 2px solid var(--somaco-gray-light);
    border-left: 5px solid var(--somaco-gray-light);
    transition: all 0.3s ease;
    position: relative;
}
.sidebar-nav .sidebar-btn .highlight {
    color: var(--somaco-red);
    font-weight: 900;
}
.sidebar-nav .sidebar-btn:hover {
    background: var(--somaco-red);
    color: var(--somaco-white);
    border-color: var(--somaco-red);
}
.sidebar-nav .sidebar-btn:hover .highlight {
    color: var(--somaco-white);
}
.sidebar-nav .sidebar-btn.active.btn-magasins {
    background: var(--somaco-red);
    color: var(--somaco-white);
    border-color: var(--somaco-red);
}
.sidebar-nav .sidebar-btn.active.btn-magasins::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    border: 15px solid transparent;
    border-left-color: var(--somaco-red);
}
.sidebar-nav .sidebar-btn.active.btn-magasins .highlight {
    color: var(--somaco-white);
}
.sidebar-nav .sidebar-btn.active.btn-valeurs {
    border-color: var(--somaco-orange);
    border-left-width: 5px;
}
.sidebar-nav .sidebar-btn.active.btn-valeurs .highlight {
    color: var(--somaco-orange);
}
.sidebar-nav .sidebar-btn.active.btn-produits {
    border-color: var(--somaco-gray-dark);
    border-left-width: 5px;
}
.sidebar-nav .sidebar-btn.active.btn-rejoindre {
    border-color: var(--somaco-gray-dark);
    border-left-width: 5px;
}

/* Sidebar categories */
.sidebar-categories {
    margin-top: 20px;
}

.sidebar-categories .cat-btn {
    display: block;
    padding: 12px 20px;
    margin-bottom: 2px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--somaco-white);
    letter-spacing: 0.5px;
}

.cat-btn.cat-papeterie { background: var(--somaco-pink); }
.cat-btn.cat-quincaillerie { background: var(--somaco-orange); }
.cat-btn.cat-destockage { background: var(--somaco-purple); }
.cat-btn.cat-professionnels { background: var(--somaco-red); }
.cat-btn.cat-catalogues { background: var(--somaco-gray-medium); }

.cat-btn:hover {
    opacity: 0.85;
    color: var(--somaco-white);
}

/* ============================================
   HERO / PAGE BANNER
   ============================================ */
.page-hero {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: var(--somaco-gray-dark);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    color: var(--somaco-white);
    padding: 20px 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    font-size: 13px;
    color: var(--somaco-gray-medium);
    padding: 10px 0;
    margin-bottom: 5px;
}

.breadcrumb a {
    color: var(--somaco-gray-medium);
}

.breadcrumb a:hover {
    color: var(--somaco-red);
}

/* ============================================
   CONTENT STYLES
   ============================================ */
.entry-content h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--somaco-black);
    margin: 30px 0 15px;
}

.entry-content h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--somaco-red);
    margin: 25px 0 10px;
}

.entry-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.entry-content ul, .entry-content ol {
    margin: 15px 0 15px 30px;
}

.entry-content li {
    margin-bottom: 8px;
}

/* ============================================
   HISTORIQUE TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 30px;
    margin: 30px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--somaco-red);
}

.timeline-item {
    position: relative;
    margin-bottom: 15px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--somaco-red);
    border: 3px solid var(--somaco-white);
    box-shadow: 0 0 0 2px var(--somaco-red);
}

.timeline-item .year {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--somaco-red);
    font-size: 16px;
}

.timeline-item .description {
    color: var(--somaco-gray-dark);
    font-size: 15px;
}

/* ============================================
   MAGASINS CARDS
   ============================================ */
.magasin-card {
    background: var(--somaco-white);
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.magasin-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.magasin-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--somaco-red);
    margin-bottom: 10px;
}

.magasin-card p {
    color: var(--somaco-gray-medium);
    line-height: 1.6;
}

/* ============================================
   TROUVER UN MAGASIN (widget)
   ============================================ */
.widget-trouver-magasin {
    background: var(--somaco-red);
    color: var(--somaco-white);
    padding: 30px;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 20px;
}

.widget-trouver-magasin h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--somaco-white);
}

.widget-trouver-magasin .logo-badge {
    display: inline-block;
    border: 3px solid var(--somaco-white);
    border-radius: 8px;
    padding: 15px 25px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 22px;
}

.widget-trouver-magasin .logo-badge span {
    display: block;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
}

/* ============================================
   NOS VALEURS - Cards
   ============================================ */
.valeur-block {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.valeur-block:last-child {
    border-bottom: none;
}

.valeur-block h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--somaco-black);
    margin-bottom: 15px;
}

/* ============================================
   NOUS REJOINDRE - 3 colonnes
   ============================================ */
.partenariat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.partenariat-card {
    background: var(--somaco-white);
    border: 1px solid #e0e0e0;
    padding: 30px 25px;
    text-align: left;
}

.partenariat-card .card-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
    color: var(--somaco-gray-medium);
}

.partenariat-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 15px;
}

.partenariat-card h3 .action {
    color: var(--somaco-red);
    font-weight: 800;
    display: block;
    font-size: 20px;
}

.partenariat-card p {
    color: var(--somaco-gray-medium);
    font-size: 14px;
    line-height: 1.7;
}

/* Offres emploi / stage header */
.offres-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.offre-box {
    text-align: center;
    padding: 30px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s;
}

.offre-box:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.offre-box .icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.offre-box h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--somaco-black);
}

.offre-box h3 .highlight {
    color: var(--somaco-red);
    font-weight: 800;
}

/* Partenariat section header */
.section-header-dark {
    background: var(--somaco-gray-dark);
    color: var(--somaco-white);
    padding: 15px 30px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin: 20px 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--somaco-gray-dark);
    color: rgba(255,255,255,0.8);
    margin-top: 40px;
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--somaco-white);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p, .footer-col li {
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--somaco-white);
}

.footer-bottom {
    background: var(--somaco-black);
    text-align: center;
    padding: 15px 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .site-container {
        flex-direction: column;
    }

    .sidebar-left {
        width: 100%;
        order: 2;
    }

    .content-area {
        padding-left: 0;
        order: 1;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar-nav .sidebar-btn {
        flex: 1;
        min-width: 150px;
        padding: 15px;
        margin-bottom: 0;
    }

    .sidebar-nav .sidebar-btn.btn-magasins::after {
        display: none;
    }

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

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

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
    }

    .main-navigation ul.toggled {
        display: flex;
    }

    .main-navigation ul li ul.sub-menu {
        position: static;
        box-shadow: none;
    }

    .page-hero {
        height: 200px;
    }

    .page-hero h1 {
        font-size: 28px;
    }

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

    .header-inner {
        flex-wrap: wrap;
    }
}
