:root {
    --fond: #173D5D;
    --orange: #e19d3a;
    --jaune: #f5f5f5;
    --gris-clair: #f6f6f6;
    --gris-moyen: #ccc;
    --gris-fonce: #4a567f;
    --blanc: #fff;
    --border-radius: 5px;
    --shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    width: auto;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol";
    color: var(--gris-fonce);
    background: var(--gris-clair);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--gris-fonce);
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

ul,
li {
    margin: 0;
    padding: 0;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin: 0.67em 0;
}

h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    line-height: 1.3;
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.4;
}

h4 {
    margin: 0.5rem 0;
    padding: 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.global {
    max-width: 1140px;
    margin: clamp(0.3rem, 2vw, 0.5rem) auto;
    background: var(--blanc);
    padding: clamp(0.5rem, 3vw, 1rem);
    border: 1px solid var(--gris-moyen);
}

.centrer {
    max-width: 1000px;
    margin: 0.3rem auto;
    padding: 1rem;
}

.container {
    max-width: 1140px;
    margin: 0.3rem auto;
    background: var(--blanc);
    padding: 1rem;
    border: 1px solid var(--gris-moyen);
}

.container span {
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: block;
    font-weight: bold;
}

.container img {
    border: 1px solid #ddd;
    padding: 2px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

.pub {
    margin: 5px;
}

.plus > div {
    border: 1px solid #f1f1f1;
    margin-bottom: 2px;
    background: #f9f9f9;
    border-radius: var(--border-radius);
    clear: both;
}

.plus h4 {
    margin: 0;
}

.last {
    list-style: none;
}

.last ul {
    list-style: none;
    line-height: 170%;
}

.wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.footer {
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
}

img.spip_logo {
    border: 1px solid #ddd;
    padding: 2px;
    border-radius: 8px;
}

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

nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--fond);
    z-index: 99;
    will-change: transform;
    contain: layout;
}

nav .navbar {
    height: 100%;
    max-width: 1250px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: auto;
    padding: 0 clamp(25px, 5vw, 50px);
}

.navbar .logo a {
    font-size: clamp(24px, 4vw, 30px);
    color: var(--blanc);
    text-decoration: none;
    font-weight: 600;
}

nav .navbar .nav-links {
    line-height: 70px;
    height: 100%;
}

nav .navbar .links {
    display: flex;
}

nav .navbar .links li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    padding: 0 14px;
}

nav .navbar .links li a {
    height: 100%;
    text-decoration: none;
    white-space: nowrap;
    color: var(--blanc);
    font-size: 15px;
    font-weight: 500;
}

.links li:hover .htmlcss-arrow,
.links li:hover .js-arrow {
    transform: rotate(180deg);
}

nav .navbar .links li .arrow {
    height: 100%;
    width: 22px;
    line-height: 70px;
    text-align: center;
    display: inline-block;
    color: var(--blanc);
    transition: all var(--transition);
}

nav .navbar .links li .sub-menu {
    position: absolute;
    top: 70px;
    left: 0;
    line-height: 40px;
    background: var(--fond);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 4px 4px;
    display: none;
    z-index: 2;
}

nav .navbar .links li:hover .htmlCss-sub-menu,
nav .navbar .links li:hover .js-sub-menu {
    display: block;
}

.navbar .links li .sub-menu li {
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .links li .sub-menu a {
    color: var(--blanc);
    font-size: 15px;
    font-weight: 500;
}

.navbar .links li .sub-menu .more-arrow {
    line-height: 40px;
}

.navbar .links li .sub-menu .more-sub-menu {
    position: absolute;
    top: 0;
    left: 100%;
    border-radius: 0 4px 4px 4px;
    z-index: 1;
    display: none;
}

.links li .sub-menu .more:hover .more-sub-menu {
    display: block;
}

.navbar .search-box {
    position: relative;
    height: 40px;
    width: 40px;
}

.navbar .search-box i {
    position: absolute;
    height: 100%;
    width: 100%;
    line-height: 40px;
    text-align: center;
    font-size: 22px;
    color: var(--blanc);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.navbar .search-box .input-box {
    position: absolute;
    right: calc(100% - 40px);
    top: 80px;
    height: 60px;
    width: 300px;
    background: var(--fond);
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.navbar.showInput .search-box .input-box {
    top: 65px;
    opacity: 1;
    pointer-events: auto;
}

.search-box .input-box::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    background: var(--fond);
    right: 10px;
    top: -6px;
    transform: rotate(45deg);
}

.search-box .input-box input {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 4px;
    transform: translate(-50%, -50%);
    height: 35px;
    width: 280px;
    outline: none;
    padding: 0 15px;
    font-size: 16px;
    border: none;
}

.navbar .nav-links .sidebar-logo {
    display: none;
}

.navbar .bx-menu {
    display: none;
}

@media (max-width: 920px) {
    nav .navbar {
        max-width: 100%;
        padding: 0 25px;
    }

    nav .navbar .logo a {
        font-size: 27px;
    }

    nav .navbar .links li {
        padding: 0 10px;
        white-space: nowrap;
    }

    nav .navbar .links li a {
        font-size: 15px;
    }
}

@media (max-width: 800px) {
    .navbar .bx-menu {
        display: block;
        color: #fff !important;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    nav .navbar .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        display: block;
        max-width: 270px;
        width: 100%;
        height: 100vh;
        background: var(--fond) !important;
        line-height: 40px;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.5s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .navbar .nav-links .sidebar-logo {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .sidebar-logo .logo-name {
        font-size: 25px;
        color: var(--blanc);
    }

    .sidebar-logo i,
    .navbar .bx-menu {
        font-size: 25px;
        color: var(--blanc);
    }

    nav .navbar .links {
        display: block;
        margin-top: 20px;
    }

    nav .navbar .links li .arrow {
        line-height: 40px;
    }

    nav .navbar .links li {
        display: block;
    }
    
    nav .navbar .links li a {
        color: #fff !important;
    }

    nav .navbar .links li .sub-menu {
        position: relative;
        top: 0;
        box-shadow: none;
        display: none;
    }

    nav .navbar .links li .sub-menu li {
        border-bottom: none;
    }

    .navbar .links li .sub-menu .more-sub-menu {
        display: none;
        position: relative;
        left: 0;
    }

    .navbar .links li .sub-menu .more-sub-menu li {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .links li:hover .htmlcss-arrow,
    .links li:hover .js-arrow {
        transform: rotate(0deg);
    }

    .navbar .links li .sub-menu .more span {
        display: flex;
        align-items: center;
    }

    .links li .sub-menu .more:hover .more-sub-menu {
        display: none;
    }

    nav .navbar .links li:hover .htmlCss-sub-menu,
    nav .navbar .links li:hover .js-sub-menu {
        display: none;
    }

    .navbar .nav-links.show1 .links .htmlCss-sub-menu,
    .navbar .nav-links.show3 .links .js-sub-menu,
    .navbar .nav-links.show2 .links .more .more-sub-menu {
        display: block;
    }

    .navbar .nav-links.show1 .links .htmlcss-arrow,
    .navbar .nav-links.show3 .links .js-arrow {
        transform: rotate(180deg);
    }

    .navbar .nav-links.show2 .links .more-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 370px) {
    nav .navbar .nav-links {
        max-width: 100%;
    }
}

.search-icon,
.fleche {
    width: clamp(20px, 3vw, 25px);
    height: clamp(20px, 3vw, 25px);
    margin-top: 15px;
}

.fleche {
    margin-left: 5px;
}

.hamburger {
    width: 30px;
    height: 30px;
    margin-top: 15px;
    margin-left: 5px;
}

.chapo {
    font-weight: bold;
    font-size: 1.14em;
    line-height: 1.6;
}

.article a {
    background-color: #f3f3f3;
    padding: 2px 4px;
    border-radius: 2px;
}

.article strong > a {
    background-color: transparent;
}

.article strong > a::before,
.article strong > a::after {
    content: '\00a0';
}

.article_corps img {
    border: 12px solid var(--gris-moyen);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: block;
    margin: 1rem auto;
    max-width: 100%;
    height: auto;
}

.article_corps iframe {
    border: 12px solid var(--gris-moyen);
    border-radius: var(--border-radius);
    width: 95% !important;
    max-width: 100%;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.post {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #f1f1f1;
    border-radius: var(--border-radius);
    background: #fff;
    align-items: start;
}

.post img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.post h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.post p {
    margin: 0;
    line-height: 1.5;
    color: #666;
}

@media (max-width: 600px) {
    .post {
        grid-template-columns: 100px 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .post img {
        width: 100px;
        height: 100px;
        object-fit: cover;
    }
    
    .post h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .post p {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    img.spip_logo_max {
        width: 100px !important;
        max-width: 100px;
        height: 100px !important;
        object-fit: cover;
    }
}

.copyright {
    text-align: center;
    font-size: 85%;
    font-style: italic;
    color: #666;
}

.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

.heading {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: bold;
    border-left: 10px solid var(--orange);
    padding-left: 10px;
    margin: 1.5rem 0 1rem 0;
}

.heading-center {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: bold;
    border-left: 10px solid var(--orange);
    padding-left: 10px;
    text-align: center;
    color: var(--orange);
    margin: 1rem 0;
}

.heading-small {
    font-size: 1.15em;
    font-weight: bold;
    margin: 0.5rem 0;
}

.social-links {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
}

.google_news {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e0e0e0;
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0.75rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.google_news:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--orange);
}

.google_news img {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 4px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.google_news a {
    flex: 1;
    font-weight: 500;
    color: var(--gris-fonce);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    background: none;
    padding: 0;
}

.google_news a:hover {
    color: var(--orange);
    opacity: 1;
}

.google_news a::after {
    content: '→';
    font-size: 1.3em;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.google_news:hover a::after {
    transform: translateX(4px);
}

.tags-wrapper {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.tags-wrapper strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--gris-fonce);
    font-size: 1.05rem;
}

.tag-link {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    background: #f3f4f6;
    color: var(--gris-fonce);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.tag-link:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
    transform: translateY(-2px);
    opacity: 1;
}

@media (max-width: 600px) {
    .google_news {
        padding: 12px 14px;
        gap: 12px;
    }
    
    .google_news img {
        width: 38px;
        height: 38px;
    }
    
    .google_news a {
        font-size: 0.95rem;
    }
    
    .social-links {
        padding: 1rem;
    }
    
    .tags-wrapper {
        padding: 1rem;
    }
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--fond);
    color: var(--blanc);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    font-weight: bold;
}

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

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

.articles-similaires ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


/* Corrections menu optimisé */

.bx-menu,
.bx-x,
.search-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.has-submenu .arrow {
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.submenu-open .arrow {
    transform: rotate(180deg);
}

.search-box .input-box {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-box .input-box form {
    width: 100%;
}

.search-box .input-box input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.search-box .input-box input:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Fix overlay mobile */
@media (max-width: 800px) {
    body.menu-open {
        overflow: hidden;
    }
    
    .nav-links.show1::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}
