/*
Theme Name: Switch-Actu 2026
Author: Benjamin DESTREBECQ
Author URI: https://www.benjamindestrebecq.fr
Description: Thème WordPress personnalisé et optimisé dédié au site Switch-Actu, un site spécialisé dans l'actualité Nintendo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bonjour-nintendo
*/

:root {
    --main-red: #fa3931;
    --main-red-dark: #d12f28;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

a:hover {
    color: var(--main-red);
}

img {
    max-width: 100%;
    height: auto;
}

header {
    background: var(--main-red);
    color: var(--white);
    /* box-shadow: 0 4px 10px rgba(250, 57, 49, 0.3); */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.main-menu a {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.9;
}

.main-menu a:hover {
    color: var(--white);
    opacity: 1;
    text-decoration: underline;
}

.main-area {
    flex: 3;
}

.sidebar-area {
    flex: 1;
}

.date-separator {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--main-red);
    border-bottom: 3px solid #e0e0e0;
    margin: 20px 0 20px;
    padding-bottom: 5px;
}

.post-item:hover {
    transform: translateY(-2px);
}

.post-meta-time {
    font-weight: bold;
    color: #999;
    font-size: 0.85rem;
    min-width: 50px;
}

.post-cat {
    color: var(--white);
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 20px;
    font-weight: bold;
    margin: 0 15px 0 5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.post-title {
    font-weight: 500;
    margin: 0;
    font-size: 1rem;
}

.post-title a {
    color: var(--text-color);
}

.post-item:hover a {
    color: var(--main-red) !important;
}

article {
    background: var(--white);
    padding: 0 30px 30px 30px;
    border-radius: 10px;
}

.single-post-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #111;
}

.single-meta {
    color: #777;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.entry-content p {
    margin-bottom: 20px;
}

.seo-homepage-block .entry-content p {
    line-height: 1.5rem;
}

.entry-content h2 {
    color: var(--main-red);
    margin-top: 30px;
}

.entry-content blockquote {
    border-left: 5px solid var(--main-red);
    margin: 20px 0;
    padding-left: 20px;
    font-style: italic;
    color: #555;
}

.widget ul {
    list-style: none;
    padding: 0;
}

footer {
    background: #222;
    color: #aaa;
    padding: 50px 0 0 0;
    margin-top: 20px;
}

footer p {
    margin: 5px 0;
}

@media (max-width: 1280px) {
    .site-content {
        flex-direction: column;
    }

    article {
        padding: 0 15px 15px 15px;
    }

    .header-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        flex-direction: row;
        padding: 0 15px !important;
    }

    .main-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .date-separator {
        text-align: center;
    }

    .post-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-meta-time {
        margin-bottom: 5px;
    }

    .post-cat {
        margin: 5px 0 10px 0;
    }

    span.news-author {
        display: flex;
        gap: 1rem;
    }
}

@media screen and (min-width: 1001px) {
    header {
        padding: 15px 0;
    }
}

@media screen and (min-width: 1281px) {
    .site-content {
        display: flex;
        gap: 40px;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .wide-image-in-article {
        margin-left: -50px;
        margin-right: -50px;
        width: calc(100% + 100px);
        margin-bottom: 30px;
        overflow: hidden;
    }

    .wide-image-in-article img {
        width: 100%;
        display: block;
        border-radius: 10px;
        /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); */
    }

    .post-item {
        display: flex;
        background: var(--white);
        padding: 10px 25px;
        border-radius: 8px;
        margin-bottom: 15px;
        align-items: center;
        transition: transform 0.2s;
    }

    .container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 20px;
    }

    span.news-author {
        width: 15%;
        gap: 1rem;
        display: flex;
        text-align: right;
        justify-content: flex-end;
        flex-direction: row;
    }
}

@media screen and (max-width: 1000px) {
    header {
        padding: 15px 0 0 0;
    }
}


@media screen and (max-width: 1280px) {
    .site-content {
        display: flex;
        gap: 15px;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .wide-image-in-article {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        margin-bottom: 20px;
        overflow: hidden;
    }

    .wide-image-in-article {
        border-radius: 10px 10px 0 0 !important;
    }

    .wide-image-in-article img {
        width: 100%;
        display: block;
        border-radius: 10px 10px 0px 0px;
        /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); */
    }

    .post-item {
        background: var(--white);
        padding: 10px 25px;
        border-radius: 8px;
        margin-bottom: 15px;
        align-items: center;
        transition: transform 0.2s;
    }

    .container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 0;
    }
}

.footer-widgets {
    padding: 40px 20px;
    border-bottom: 1px solid #333;
}

.footer-grid {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    align-items: center;
}

.footer-col {
    flex: 1;
}

.footer-widget .widget-title {
    color: var(--main-red);
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-left: none;
    padding-left: 0;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget a {
    color: #aaa;
}

.footer-widget a:hover {
    color: var(--main-red);
}

.footer-copyright {
    text-align: center;
    padding: 20px 0;
    background: #111;
    font-size: 0.8rem;
    color: #666;
}

.footer-copyright p {
    margin: 0;
}

.footer-widget {
    background: initial !important;
}

@media (max-width: 1280px) {
    .footer-grid {
        flex-direction: column;
    }
}

.bnb-toc-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); */
}

.bnb-toc-title {
    font-size: 1.3rem;
    color: var(--main-red);
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.bnb-toc-container ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.bnb-toc-container ul ul {
    padding-left: 20px;
    margin-top: 5px;
}

.bnb-toc-container li {
    line-height: 1.4;
    padding: 5px 0;
}

.bnb-toc-container a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.bnb-toc-container a:hover {
    color: var(--main-red);
    text-decoration: underline;
}

.bnb-toc-level-3 a,
.bnb-toc-level-4 a,
.bnb-toc-level-5 a {
    font-size: 0.95em;
    color: #555;
    font-weight: 400;
}

.featured-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .featured-section {
        grid-template-columns: 1fr;
    }
}

div#comments {
    padding: 30px 15px !important;
    margin: 30px auto;
    background: #f4f4f4;
    border-radius: 10px;
    margin-bottom: 0;
}

.container.site-content {
    margin-top: 20px;
}

.category header.page-header {
    background: transparent;
    padding: 0;
    margin-bottom: 40px;
    box-shadow: none;
}

.category h1.page-title {
    margin: 0;
    padding: 0;
}

.site-branding img.custom-logo {
    width: 300px;
    height: auto;
}

.site-branding {
    line-height: 0;
}

figcaption.wp-element-caption {
    font-style: italic;
    padding-bottom: 5px;
}

.sidebar-area .widget {
    background: var(--white);
    padding: 5px 20px;
    border-radius: 10px;
}

.sidebar-area .widget:not(:last-child) {
    margin-bottom: 15px;
}

.wp-block-group__inner-container.is-layout-constrained.wp-block-group-is-layout-constrained p,
.wp-block-group__inner-container.is-layout-constrained.wp-block-group-is-layout-constrained ul {
    margin: 5px 0;
}

.entry-content p {
    line-height: 2rem;
    font-size: 1rem;
    color: #494949;
}

h1.single-post-title {
    color: #fa3931;
}

.page h1.single-post-title {
    padding-top: 20px;
}

.footer-widget,
.footer-widget a {
    color: #fff;
}

.footer-widget {
    padding: 0;
    margin: 0;
}

.wide-image-in-article {
    border-radius: 10px;
}

.site-content ul.wp-block-list {
    line-height: 2rem;
    font-size: 1rem;
    color: #494949;
}

ul.wp-block-latest-posts__list.has-dates.wp-block-latest-posts li {
    margin-bottom: 10px;
}

time.wp-block-latest-posts__post-date {
    color: grey;
    font-style: italic;
}

.entry-content a,
.single-jeux #main a {
    color: #fa3931;
}

.categories {
    margin-top: 30px;
    font-style: italic;
    font-size: .9rem;
}

section.post-author-bio {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    margin-top: 10px;
    background: #f4f4f4;
    align-items: center;
    border-radius: 10px;
}

section.post-author-bio img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: block;
}

.post-navigation {
    font-style: italic;
}

@media screen and (max-width: 1280px) {
    span.post-cat {
        margin-left: 5px;
    }

    .latest-list h3.post-title {
        margin: 5px 0;
    }

    section#seo-homepage-content {
        padding: 10px 5px;
    }
}

@media screen and (max-width: 1670px) {
    .container.site-content {
        width: 93%;
    }
}

ul.wp-block-latest-posts__list.has-dates.wp-block-latest-posts li:first-child {
    margin-top: 10px;
}



.twitter-tweet.twitter-tweet-rendered {
    margin: auto;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #fff;
    color: #222222;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-numbers:hover {
    background: #fa3931;
    color: #fff;
    border-color: #fa3931;
    transform: scale(1.08);
}

.page-numbers.current {
    background: #fa3931;
    color: #fff;
    border-color: #fa3931;
    width: 40px;
    height: 40px;
}

.page-numbers.next,
.page-numbers.prev {
    width: auto;
    padding: 0 1.5rem;
    border-radius: 10px;
    font-weight: 700;
}

/* Bouton voir toute l'actualité - Style pagination */
.view-all-posts {
    display: flex;
    align-items: center;
    margin: 1rem 0 0 0;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    height: 40px;
    background: #fa3931;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-view-all:hover {
    background: #fff;
    color: #fa3931;
}

.author-info {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
}

.post-comments-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
}

.post-comments-count svg {
    fill: currentColor;
    flex-shrink: 0;
}

.post-comments-count:hover {
    color: #d60000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.menu-toggle-checkbox {
    display: none;
}

.menu-toggle-label {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle-label span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: 0.3s;
    display: block;
}

.menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-menu .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    font-size: 1.1em;
    font-weight: 600;
}

.main-menu .menu > .menu-item {
    position: relative;
}

.main-menu a {
    color: var(--white);
    padding: 5px 0;
    display: block;
    text-decoration: none;
}

.main-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--white);
    border-radius: 0 0 5px 5px;
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.main-menu .menu-item-has-children:hover > .sub-menu {
    display: block;
    opacity: 1;
}

.main-menu .sub-menu a {
    color: var(--text-color);
    padding: 8px 15px;
    font-weight: 400;
    white-space: nowrap;
}

.main-menu .sub-menu a:hover {
    background-color: #f0f0f0;
    color: var(--main-red);
}

.main-menu .menu-item-has-children > a:after {
    content: "\25BC";
    font-size: 0.6em;
    margin-left: 8px;
    position: relative;
    top: -2px;
    display: inline-block;
    transition: transform 0.3s;
}

.main-menu .menu-item-has-children:hover > a:after {
    transform: rotate(180deg);
}

.header-search {
    display: flex;
    align-items: center;
    margin-left: 15px;
    position: relative;
}

.search-toggle-checkbox {
    display: none;
}

.search-toggle-label {
    cursor: pointer;
    padding: 6px;
}

.search-icon {
    font-size: 26px;
    color: #ffeceb;
}

.search-form-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: auto;
    max-width: 90vw;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.search-toggle-checkbox:checked ~ .search-form-container {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.search-form {
    display: flex;
    gap: 0;
    justify-content: center;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #fa3931;
    border-radius: 6px 0 0 6px;
    font-size: 1em;
    color: #333;
}

.search-form input[type="search"]::placeholder {
    color: #999;
}

.search-form button.search-submit {
    background-color: #fa3931;
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.2s;
}

.search-form button.search-submit:hover {
    background-color: #d63a28;
}

@media (max-width: 992px) {
    .menu-toggle-label {
        display: flex;
        order: 2;
    }

    .header-search {
        order: 3;
        margin-left: 0;
    }

    .main-menu {
        order: 3;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .menu-toggle-checkbox:checked ~ .main-menu {
        max-height: 2000px;
    }

    .main-menu .menu {
        flex-direction: column;
        gap: 0;
        padding: 20px;
        text-align: left;
        display: flex;
    }

    .main-menu .menu > .menu-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-menu a {
        padding: 15px 0;
        font-size: 1em;
    }

    .main-menu .sub-menu {
        position: static;
        display: block;
        opacity: 1;
        max-height: none;
        overflow: visible;
        background: transparent;
        padding: 0 0 0 20px;
    }

    .main-menu .sub-menu a {
        color: rgba(255, 255, 255, 0.8);
        padding: 12px 0;
        font-size: 0.9em;
    }

    .main-menu .menu-item-has-children > a:after {
        transform: none !important;
    }

    .main-menu .search-form-container {
        position: static;
        background: transparent;
        padding: 10px 0 20px 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
    }

    .header-search .search-toggle-label {
        display: none;
    }
}

.main-menu {
    margin-left: auto;
}

.header-search {
    margin-left: 15px;
}
