/*
Theme Name: Sym Standard
Theme URI: https://protunisia.com
Author: Ahmed
Author URI: https://protunisia.com
Description: Thème WordPress moderne et personnalisable pour site Sym
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Sym
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== VARIABLES ===== */
:root {
    --primary-color: #e60000;
    --secondary-color: #333;
    --light-color: #f8f8f8;
    --text-color: #333;
    --border-color: #ddd;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #cc0000;
}

/* ===== HEADER STYLES ===== */
.site-branding h1 {
    margin: 0;
    font-size: 1.5rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Navigation colors */
.main-navigation a {
    color: #333;
    font-weight: 600;
}

.main-navigation a:hover {
    color: #e60000;
}

.main-navigation .current-menu-item > a {
    border-bottom: 2px solid #e60000;
}

/* ===== HERO SLIDER SECTION ===== */
.hero-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.hero-slider .container {
    padding: 0;
}

.hero-slider .n2-ss-slider {
    max-height: 500px !important;
}

.slider-fallback {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    z-index: 2;
}

.slider-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.slider-content p {
    font-size: 1.5rem;
}

/* ===== SECTION PRÉSENTATION SYM ===== */
.sym-presentation {
    padding: 80px 0;
    background: #fff;
}

.presentation-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.presentation-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.presentation-image:hover img {
    transform: scale(1.03);
}

.image-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #e60000;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(230,0,0,0.3);
}

.image-badge span {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}

.image-badge small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.presentation-content {
    padding: 20px 0;
}

.section-subtitle {
    display: inline-block;
    color: #e60000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.presentation-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.2;
}

.presentation-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}

.presentation-features {
    list-style: none;
    padding: 0;
    margin: 25px 0 30px;
}

.presentation-features li {
    padding: 8px 0;
    display: flex;
    align-items: flex-start;
    color: #444;
}

.presentation-features li:before {
    content: "✓";
    color: #e60000;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

.number-item {
    text-align: center;
}

.number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #e60000;
    line-height: 1;
}

.number-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #e60000;
    color: white;
}

.btn-primary:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: #e60000;
    border-color: #e60000;
}

.btn-outline:hover {
    background: #e60000;
    color: white;
}

.btn svg {
    width: 20px;
    height: 20px;
}

/* Post read more button */
.read-more {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 3px;
}

/* ===== SECTIONS GÉNÉRIQUES ===== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SECTION PRODUITS ===== */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.product-card p {
    color: #666;
    margin-bottom: 20px;
}

/* ===== SECTION SERVICES ===== */
.service-card {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.service-card:hover {
    background: #e9ecef;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #e60000;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* ===== IMAGES ===== */
.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== FORMS ===== */
.search-field {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.search-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
}

/* ===== WIDGETS ===== */
.widget-title {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .hero-slider .n2-ss-slider {
        max-height: 300px !important;
    }
    
    .slider-fallback {
        height: 300px;
    }
    
    .slider-content h2 {
        font-size: 2rem;
    }
    
    .slider-content p {
        font-size: 1.2rem;
    }
    
    .sym-presentation {
        padding: 60px 0;
    }
    
    .presentation-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    .presentation-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .presentation-title {
        font-size: 1.8rem;
    }
    
    .presentation-text p {
        font-size: 1rem;
    }
    
    .image-badge {
        top: 10px;
        left: 10px;
        padding: 10px;
    }
    
    .image-badge span {
        font-size: 1.5rem;
    }
}





/* Dans style.css - Icônes menu */
.menu-toggle-icon {
    display: inline-block;
    width: 24px;
    height: 20px;
    position: relative;
}

.menu-toggle-icon .bar {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle-icon .bar:nth-child(1) { top: 0; }
.menu-toggle-icon .bar:nth-child(2) { top: 9px; }
.menu-toggle-icon .bar:nth-child(3) { top: 18px; }

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Styles header-actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--text-color);
}

.search-wrapper {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.search-form-container {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    min-width: 300px;
    z-index: 100;
}

.search-form-container.active {
    display: block;
}

/* ========== HEADER MOBILE ========== */
@media (max-width: 768px) {
    /* Bouton hamburger visible */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1000;
    }
    
    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: #333;
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    /* Menu navigation */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        transition: right 0.4s ease-in-out;
        z-index: 999;
        padding: 80px 30px 30px;
        box-shadow: -2px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        width: 100%;
        margin: 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        border-bottom: 1px solid #eee;
        color: #333;
    }
    
    .main-navigation a:hover {
        color: #e60000;
        background: #f9f9f9;
    }
    
    /* Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Réorganisation header mobile */
    .header-inner {
        justify-content: space-between;
        padding: 15px 0;
    }
    
    .site-branding {
        flex: 1;
    }
    
    .header-actions {
        display: none;
    }
    
    /* Fermeture menu */
    .close-menu {
        position: absolute;
        top: 25px;
        right: 25px;
        background: none;
        border: none;
        font-size: 28px;
        color: #333;
        cursor: pointer;
        z-index: 1001;
    }
}

/* Animation hamburger */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Empêcher le scroll quand menu ouvert */
body.menu-open {
    overflow: hidden;
}




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

/* Bouton hamburger - CACHÉ sur desktop */
.menu-toggle {
    display: none !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 10px !important;
    width: 40px !important;
    height: 40px !important;
    position: relative !important;
    z-index: 1001 !important;
}

/* Traits du hamburger */
.menu-toggle span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: #333 !important;
    margin: 5px auto !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
}

/* Animation quand actif */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0 !important;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
}

/* ========== MEDIA QUERIES MOBILE ========== */
@media screen and (max-width: 768px) {
    /* Afficher le bouton sur mobile */
    .menu-toggle {
        display: block !important;
    }
    
    /* Cacher le menu desktop */
    .main-navigation #primary-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        flex-direction: column !important;
        padding: 80px 25px 30px !important;
        margin: 0 !important;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1) !important;
        box-shadow: -3px 0 20px rgba(0,0,0,0.15) !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
    }
    
    /* Menu ouvert */
    .main-navigation.active #primary-menu {
        right: 0 !important;
    }
    
    /* Style des liens */
    .main-navigation #primary-menu li {
        width: 100% !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .main-navigation #primary-menu a {
        display: block !important;
        padding: 15px 0 !important;
        font-size: 17px !important;
        color: #333 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }
    
    /* Overlay (créé par JavaScript) */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Bouton fermeture (créé par JavaScript) */
    .close-menu-btn {
        display: none;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 28px;
        color: #333;
        cursor: pointer;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        z-index: 1002;
    }
    
    /* Empêcher le scroll */
    body.menu-open {
        overflow: hidden !important;
    }
    
    /* Réorganisation header mobile */
    .header-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    
    .site-branding {
        order: 1;
        flex: 1;
    }
    
    .menu-toggle {
        order: 3;
    }
    
    .main-navigation {
        order: 4;
        width: 100%;
    }
    
    .header-actions {
        display: none !important;
    }
    
    /* Ajustements responsive */
    .header-inner {
        padding: 15px 0 !important;
    }
    
    .site-branding img {
        max-height: 40px !important;
    }
}

/* Cacher le bouton sur desktop */
@media screen and (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
    
    .menu-overlay,
    .close-menu-btn {
        display: none !important;
    }
}




/* URGENT - FORCER l'affichage du bouton menu mobile */
@media screen and (max-width: 768px) {
    #mobile-menu-toggle.menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: #e60000 !important;
        border: 2px solid #e60000 !important;
        border-radius: 5px;
        cursor: pointer;
        padding: 0;
        margin-left: 15px;
        position: relative;
        z-index: 1000;
    }
    
    #mobile-menu-toggle.menu-toggle span {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 22px;
        height: 2px;
        background: white !important;
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    /* Animation */
    #mobile-menu-toggle.menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
        background: white !important;
    }
    
    #mobile-menu-toggle.menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    #mobile-menu-toggle.menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -5px);
        background: white !important;
    }
    
    /* Menu */
    #primary-menu {
        display: none;
    }
    
    .main-navigation.active #primary-menu {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 250px;
        height: 100vh;
        background: white;
        padding: 70px 20px 20px;
        margin: 0;
        box-shadow: -3px 0 15px rgba(0,0,0,0.1);
        z-index: 999;
        overflow-y: auto;
    }
    
    #primary-menu li {
        width: 100%;
        margin: 0;
        list-style: none;
    }
    
    #primary-menu a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
        color: #333;
        text-decoration: none;
        font-size: 16px;
    }
    
    /* Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Cacher header-actions */
    .header-actions {
        display: none !important;
    }
    
    /* Réorganisation */
    .header-inner {
        justify-content: space-between !important;
    }
}

/* Cacher sur desktop */
@media screen and (min-width: 769px) {
    #mobile-menu-toggle.menu-toggle {
        display: none !important;
    }
    
    #primary-menu {
        display: flex !important;
    }
}




/* =========================================== */
/* MENU MOBILE - SOLUTION DÉFINITIVE */
/* =========================================== */

/* 1. BOUTON HAMBURGER - CACHÉ SUR DESKTOP */
#mobile-menu-toggle.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
    margin: 0 0 0 15px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 2. LES 3 TRAITS */
#mobile-menu-toggle.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    opacity: 1;
    visibility: visible;
}

/* 3. ANIMATION QUAND ACTIF */
#mobile-menu-toggle.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: #e60000;
}

#mobile-menu-toggle.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: #e60000;
}

/* ========== MOBILE SEULEMENT (< 768px) ========== */
@media screen and (max-width: 768px) {
    /* 4. AFFICHER LE BOUTON SUR MOBILE */
    #mobile-menu-toggle.menu-toggle {
        display: flex !important;
    }
    
    /* 5. CACHER LE MENU DESKTOP */
    #primary-menu.menu-wrapper {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        padding: 80px 25px 30px !important;
        margin: 0 !important;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1) !important;
        box-shadow: -3px 0 20px rgba(0,0,0,0.15) !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        display: block !important;
        flex-direction: column !important;
    }
    
    /* 6. MENU OUVERT */
    .main-navigation.active #primary-menu.menu-wrapper {
        right: 0 !important;
    }
    
    /* 7. STYLE DES LIENS */
    #primary-menu.menu-wrapper li {
        width: 100% !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    #primary-menu.menu-wrapper a {
        display: block !important;
        padding: 15px 0 !important;
        font-size: 17px !important;
        color: #333 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }
    
    #primary-menu.menu-wrapper a:hover {
        color: #e60000 !important;
        padding-left: 10px !important;
    }
    
    /* 8. OVERLAY (créé par JS) */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* 9. BOUTON FERMETURE (créé par JS) */
    .close-menu-btn {
        display: none;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 28px;
        color: #333;
        cursor: pointer;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        z-index: 1002;
    }
    
    /* 10. EMPÊCHER SCROLL */
    body.menu-open {
        overflow: hidden !important;
    }
    
    /* 11. RÉORGANISATION HEADER MOBILE */
    .header-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    .site-branding {
        flex: 1;
        min-width: 0;
    }
    
    .site-branding a {
        display: flex;
        align-items: center;
    }
    
    .site-branding img {
        max-height: 40px;
        width: auto;
    }
    
    .header-actions {
        display: none !important;
    }
    
    .main-navigation {
        width: auto;
    }
}

/* ========== DESKTOP SEULEMENT (> 768px) ========== */
@media screen and (min-width: 769px) {
    /* 12. CACHER BOUTON SUR DESKTOP */
    #mobile-menu-toggle.menu-toggle {
        display: none !important;
    }
    
    /* 13. CACHER OVERLAY ET BOUTON FERMETURE */
    .menu-overlay,
    .close-menu-btn {
        display: none !important;
    }
    
    /* 14. AFFICHER MENU NORMAL */
    #primary-menu.menu-wrapper {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
}