/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #2d3748;
    background: #ffffff;
    font-size: 16px;
}

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

/* =============================================
   TYPOGRAPHIE
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #1a202c;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #2b6cb0;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #1a4971;
    text-decoration: underline;
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Skip Link Accessibilité */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* =============================================
   HEADER - RESPONSIVE HEIGHT
   ============================================= */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--accent-color);
    padding: 0;
    z-index: 1000;
    height: var(--header-height-desktop, 70px);
    transition: height 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sticky uniquement si la classe est présente */
.site-header.sticky {
    position: sticky;
    top: 0;
} 

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding .site-title {
    font-size: 1.5rem;
    margin: 0;
}

.site-branding .site-title a {
    color: #1a202c;
    text-decoration: none;
}

.custom-logo {
    max-height: calc(var(--header-height-desktop, 70px) - 20px);
    width: auto;
    height: auto;
}

/* =============================================
   HEADER ACTIONS (Menu + Panier)
   ============================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* =============================================
   ICÔNE PANIER
   ============================================= */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    text-decoration: none;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 100;
}

.cart-icon:hover {
    color: var(--primary-color);
    background: #f1f5f9;
}

.cart-icon svg {
    width: 22px;
    height: 22px;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

.cart-icon.bump .cart-count {
    animation: cartBump 0.3s ease;
}

@keyframes cartBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* =============================================
   NAVIGATION PRINCIPALE - DESKTOP
   ============================================= */
.main-navigation {
    position: relative;
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    align-items: center;
    padding: 0;
    margin: 0;
}

.main-menu > .menu-item {
    position: relative;
}

.main-menu > .menu-item > a {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 8px;
    background: transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.main-menu > .menu-item > a:hover,
.main-menu > .menu-item > a:focus {
    background: #f1f5f9;
    color: var(--primary-color);
    text-decoration: none;
}

.main-menu > .menu-item.current-menu-item > a,
.main-menu > .menu-item.current_page_parent > a {
    background: var(--primary-color);
    color: #ffffff;
}

.main-menu > .menu-item.current-menu-item > a:hover,
.main-menu > .menu-item.current_page_parent > a:hover {
    background: var(--link-hover-color);
    color: #ffffff;
    text-decoration: none;
}

.main-menu > .menu-item.menu-item-anchor > a {
    cursor: default;
}

.submenu-arrow {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 220px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    list-style: none;
    margin: 0.3rem 0 0 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-menu .menu-item:hover > .sub-menu,
.main-menu .menu-item:focus-within > .sub-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.main-menu .sub-menu .menu-item {
    position: relative;
}

.main-menu .sub-menu .sub-menu {
    top: -0.5rem;
    left: 100%;
    margin: 0 0 0 0.5rem;
}

.main-menu .sub-menu a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #4a5568;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.main-menu .sub-menu a:hover,
.main-menu .sub-menu a:focus {
    background: #f7fafc;
    color: var(--primary-color);
    padding-left: 1.5rem;
    text-decoration: none;
}

.main-menu .sub-menu .submenu-arrow {
    float: right;
    margin-top: 0.3rem;
    transform: rotate(-90deg);
}

/* =============================================
   MENU TOGGLE (HAMBURGER)
   ============================================= */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 18px;
}

.menu-toggle-icon .bar {
    display: block;
    width: 100%;
    height: 2px;
    background: #4a5568;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

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

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

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

/* =============================================
   OVERLAY
   ============================================= */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* =============================================
   CONTENT AREA
   ============================================= */
.site-main {
    min-height: 60vh;
    padding: 2rem 0;
}

.content-area {
    padding: 2rem 0;
}

/* Grille des articles */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.post-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-content h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.post-content h2 a {
    color: #1a202c;
}

.post-content h2 a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* =============================================
   MÉTADONNÉES - STYLE AMÉLIORÉ
   ============================================= */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0;
    color: #718096;
    font-size: 0.85rem;
    border-top: 1px solid #f0f4f8;
    border-bottom: 1px solid #f0f4f8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-item svg {
    flex-shrink: 0;
    color: #94a3b8;
}

.meta-item a {
    color: #718096;
    text-decoration: none;
}

.meta-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Métadonnées du single */
.single .entry-header .entry-meta {
    justify-content: center;
    padding: 0.8rem 0;
    margin: 0.5rem 0 1.5rem;
    border-top: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
}

.single .entry-header .entry-meta .meta-item {
    font-size: 0.9rem;
}

.single .entry-header .entry-meta .meta-item svg {
    width: 18px;
    height: 18px;
}

/* Tags */
.tags-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.tag-item {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4a5568;
    transition: all 0.2s ease;
}

.tag-item a {
    color: #4a5568;
    text-decoration: none;
}

.tag-item:hover {
    background: var(--primary-color);
    color: #fff;
}

.tag-item:hover a {
    color: #fff;
}

.post-excerpt {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.read-more:hover {
    color: var(--link-hover-color);
    transform: translateX(4px);
    text-decoration: none;
}

/* =============================================
   SINGLE POST
   ============================================= */
.single-post .entry-header {
    margin-bottom: 2rem;
}

.single-post .entry-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.single-post .entry-content {
    font-size: 1.1rem;
}

.single-post .entry-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* =============================================
   ALIGNEMENT DES IMAGES DANS LE CONTENU
   ============================================= */
.entry-content img {
    max-width: 100%;
    height: auto;
}

/* Aligné à gauche */
.entry-content .alignleft {
    float: left;
    margin: 0.5rem 1.5rem 0.5rem 0;
    max-width: 50%;
}

/* Aligné à droite */
.entry-content .alignright {
    float: right;
    margin: 0.5rem 0 0.5rem 1.5rem;
    max-width: 50%;
}

/* Aligné au centre */
.entry-content .aligncenter {
    display: block;
    margin: 1.5rem auto;
    clear: both;
}

/* Images avec légende */
.entry-content .wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.entry-content .wp-caption .wp-caption-text {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.4rem;
    text-align: center;
}

/* Réinitialisation sur mobile */
@media (max-width: 768px) {
    .entry-content .alignleft,
    .entry-content .alignright {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 100%;
    }
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination,
.woocommerce-pagination {
    margin-top: 3rem;
}

.page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
}

.page-numbers li {
    display: inline;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    transition: all 0.2s;
}

.page-numbers .current {
    background: #2b6cb0;
    color: #fff;
    border-color: #2b6cb0;
}

.page-numbers a:hover {
    background: #ebf4ff;
    border-color: #2b6cb0;
}

/* =============================================
   404 PAGE
   ============================================= */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 h1 {
    font-size: 8rem;
    color: #e2e8f0;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404 h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.error-404 .search-form {
    max-width: 400px;
    margin: 2rem auto;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.footer-navigation a {
    color: #cbd5e0;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-navigation a:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #718096;
}

/* =============================================
   FOOTER TRANSPARENT
   ============================================= */
/* Desktop uniquement */
@media (min-width: 769px) {
    .site-footer.transparent-desktop {
        background-color: transparent !important;
    }
}

/* Mobile uniquement */
@media (max-width: 768px) {
    .site-footer.transparent-mobile {
        background-color: transparent !important;
    }
}

/* Les deux en même temps */
.site-footer.transparent-desktop.transparent-mobile {
    background-color: transparent !important;
}

/* =============================================
   SEARCH FORM - STYLE AMÉLIORÉ
   ============================================= */
.search-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.search-form input[type="search"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.search-form button {
    padding: 0.7rem 1.5rem;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: var(--button-hover-bg);
}

/* Animation shake pour validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

/* =============================================
   FORMULAIRES - STYLE AMÉLIORÉ
   ============================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
    color: #2d3748;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

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

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #2d3748;
}

input[type="submit"],
button[type="submit"],
.submit-button {
    padding: 0.7rem 2rem;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.submit-button:hover {
    background: var(--button-hover-bg);
}

/* =============================================
   COMMENTS - STYLE AMÉLIORÉ
   ============================================= */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--accent-color);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.comment-author .says {
    font-weight: 400;
    color: #718096;
}

.comment-meta {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.comment-meta a {
    color: #718096;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Formulaire de commentaire */
.comment-respond {
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.comment-form label {
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
}

.comment-form .form-submit {
    margin-top: 1rem;
}

/* =============================================
   UTILITIES
   ============================================= */
.text-center {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================
   LAYOUT & SIDEBAR
   ============================================= */
.layout-wrapper {
    display: flex;
    gap: 2rem;
}

.layout-wrapper.full-width .content-primary {
    flex: 1;
    max-width: 100%;
}

.layout-wrapper.with-sidebar .content-primary {
    flex: 0 0 70%;
    max-width: 70%;
}

.layout-wrapper.with-sidebar .sidebar-primary {
    flex: 0 0 30%;
    max-width: 30%;
}

.sidebar-primary {
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.sidebar-primary .widget {
    margin-bottom: 2rem;
}

.sidebar-primary .widget:last-child {
    margin-bottom: 0;
}

.sidebar-primary .widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2b6cb0;
}

.sidebar-primary ul {
    list-style: none;
    padding: 0;
}

.sidebar-primary ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-primary ul li:last-child {
    border-bottom: none;
}

/* =============================================
   RECHERCHE
   ============================================= */
.search-toggle,
.search-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #4a5568;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 100;
}

.search-toggle:hover,
.search-toggle-mobile:hover {
    color: var(--primary-color);
    background: #f1f5f9;
}

.search-toggle-mobile {
    display: none;
}

.search-bar {
    display: none;
    background: #f8fafc;
    border-top: 1px solid var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    padding: 0.8rem 0;
    animation: slideDown 0.25s ease;
}

.search-bar.active {
    display: block;
}

.search-bar .search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-bar-mobile {
    display: none;
    background: #f8fafc;
    border-top: 1px solid var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    padding: 0.6rem 0;
    animation: slideDown 0.25s ease;
}

.search-bar-mobile.active {
    display: block;
}

.mobile-search-panel {
    display: none;
    padding: 0 0 1rem 0;
    margin-top: 0.5rem;
}

.mobile-search-panel .search-form input[type="search"] {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

