/* ═══════════════════════════════════════
   infirmier.pro — CSS principal
   Charte graphique B+C validée mai 2026
═══════════════════════════════════════ */

:root {
    --color-primary:   #2D2D2D;
    --color-secondary: #2A9D8F;
    --color-accent:    #E9C46A;
    --color-bg:        #FAFAFA;
    --color-text:      #111111;
    --color-text-sec:  #666666;
    --font-display:    'Libre Baskerville', serif;
    --font-body:       'Nunito', sans-serif;
    --fs-h1:   38px;
    --fs-h2:   28px;
    --fs-h3:   21px;
    --fs-body: 17px;
    --fs-cap:  13px;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-secondary); }

/* Reset listes dans les navs (menus WordPress en ul/li) */
.site-navbar ul,
.site-navbar li,
.mobile-nav ul,
.mobile-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-navbar ul  { display: flex; gap: 36px; align-items: center; }
.mobile-nav ul   { display: flex; flex-direction: column; }
.mobile-nav li   { border-bottom: 1px solid rgba(255,255,255,.07); }

/* ── CONTAINER ── */
.site-container { max-width: 1140px; margin: 0 auto; padding: 0 28px; }

/* ── CONTENEUR PRINCIPAL ── */
.main-box {
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    overflow: hidden;
    margin: 28px 0 40px;
}

/* ── PILLS CATÉGORIES ── */
.cat-pills-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 14px 24px;
    border-bottom: 1px solid #E5E5E5;
    background: #FAFAFA;
}
.cat-pills-bar::-webkit-scrollbar { display: none; }
.cat-pill {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-sec);
    background: #EFEFEF;
    border-radius: 20px;
    padding: 6px 16px;
    white-space: nowrap;
    text-decoration: none;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}
.cat-pill:hover {
    background: var(--color-secondary);
    color: #fff;
}
.cat-pill--active {
    background: var(--color-primary);
    color: #fff;
}
.cat-pill--active:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ── HEADER ── */
/* !important nécessaire pour écraser le CSS de GeneratePress (thème parent) */
.site-header {
    background: var(--color-primary) !important;
    padding: 0 32px !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    height: 68px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    border: none !important;
    box-shadow: none !important;
}
.header-left { display: flex; align-items: center; }
.header-date {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    font-weight: 500;
}
.header-center { text-align: center; }
.site-logo {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 24px;
    color: #FAFAFA;
    text-decoration: none;
    letter-spacing: -.5px;
    display: block;
}
.site-logo span { color: var(--color-secondary); }
.site-logo:hover,
.site-logo:focus { color: #FAFAFA !important; text-decoration: none; }
.site-logo:hover span,
.site-logo:focus span { color: var(--color-secondary) !important; }
.logo-tagline {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    letter-spacing: .3px;
    margin-top: 2px;
    font-weight: 500;
}
.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}
.btn-newsletter {
    background: var(--color-secondary);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background .15s;
}
.btn-newsletter:hover { background: #238a7d; color: white; }

/* ── NAVBAR CATÉGORIES ── */
.site-navbar {
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    height: 40px;
    position: sticky;
    top: 68px;
    z-index: 99;
}
.site-navbar a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .7px;
    height: 40px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: all .15s;
}
.site-navbar a:hover,
.site-navbar .current-menu-item > a {
    color: white;
    border-bottom-color: var(--color-secondary);
}

/* ── HAMBURGER ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--color-primary);
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    z-index: 98;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    transition: background .15s;
}
.mobile-nav a:hover { background: rgba(255,255,255,.06); }
.mobile-nav .mobile-nav-cta {
    background: var(--color-secondary);
    color: white;
    font-weight: 700;
    margin: 16px 28px 20px;
    border-radius: 4px;
    text-align: center;
    border-bottom: none;
}

/* ── SÉPARATEUR DE SECTION ── */
.sep {
    height: 3px;
    background: linear-gradient(to right, var(--color-secondary) 100px, #E2E2E2 100px);
}

/* ── LAYOUT PRINCIPAL ── */
.content-area {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 48px;
    padding: 32px 28px 36px;
    padding-bottom: 64px;
}

/* ── BOUTONS ── */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all .15s;
    cursor: pointer;
}
.btn-primary  { background: var(--color-secondary); color: white; }
.btn-primary:hover { background: #238a7d; color: white; }
.btn-outline  { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-accent   { background: var(--color-accent); color: var(--color-primary); font-weight: 700; }
.btn-accent:hover { background: #d4af50; }

/* ── BADGE CATÉGORIE ── */
.cat-badge {
    display: inline-block;
    background: var(--color-secondary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
}
.cat-badge:hover { background: #238a7d; color: white; }

/* ── ENCADRÉS ÉDITORIAUX ── */
.box {
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    margin: 24px 0;
}
.box .box-label { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.box-info    { background: #E8F5F4; border-left: 4px solid var(--color-secondary); }
.box-info    .box-label { color: var(--color-secondary); }
.box-alert   { background: #FFF8E8; border-left: 4px solid var(--color-accent); }
.box-alert   .box-label { color: #9a7000; }
.box-conseil { background: #F3F3F3; border-left: 4px solid var(--color-primary); }
.box-conseil .box-label { color: var(--color-primary); }

/* ── PAGE ACCUEIL ── */

/* Section titre */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E2E2E2;
    padding-bottom: 10px;
    margin-bottom: 24px;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    color: var(--color-primary);
}
.section-head a {
    font-size: 14px;
    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: none;
}

/* Article à la une */
.featured {
    background: white;
    border: 1px solid #E4E4E4;
    border-radius: 6px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 40px;
}
.featured-img { position: relative; min-height: 260px; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 32px; }
.featured-body .cat-badge { margin-bottom: 12px; }
.featured-title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    line-height: 1.25;
    color: var(--color-primary);
    margin: 10px 0 12px;
}
.featured-title a { text-decoration: none; color: inherit; }
.featured-title a:hover { color: var(--color-secondary); }
.featured-meta    { font-size: var(--fs-cap); color: var(--color-text-sec); margin-bottom: 14px; }
.featured-excerpt { color: var(--color-text-sec); margin-bottom: 22px; font-size: 15px; line-height: 1.65; }

/* Grille articles */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}
.card {
    background: white;
    border: 1px solid #E4E4E4;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.card-img { position: relative; height: 175px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-body .cat-badge { margin-bottom: 10px; }
.card-title {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.3;
    margin: 8px 0 10px;
    color: var(--color-primary);
}
.card-title a { text-decoration: none; color: inherit; }
.card-title a:hover { color: var(--color-secondary); }
.card-meta { font-size: var(--fs-cap); color: var(--color-text-sec); }

/* ── PAGE ARTICLE ── */
.article-header { padding: 44px 0 28px; }
.article-title {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    line-height: 1.2;
    color: var(--color-primary);
    margin: 14px 0 14px;
}
.article-meta { font-size: var(--fs-cap); color: var(--color-text-sec); margin-bottom: 20px; }
.article-sep  { width: 60px; height: 3px; background: var(--color-secondary); margin-bottom: 28px; }
.article-img  {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 40px;
    aspect-ratio: 16 / 9;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; }

.article-body h2 { font-family: var(--font-display); font-size: var(--fs-h2); color: var(--color-primary); margin: 32px 0 12px; }
.article-body h3 { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--color-primary); margin: 24px 0 8px; }
.article-body p  { margin-bottom: 18px; line-height: 1.78; }
.article-body strong { color: var(--color-primary); }
.article-body a  { color: var(--color-secondary); }

table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
th { background: var(--color-primary); color: white; padding: 11px 16px; text-align: left; font-weight: 600; }
td { padding: 10px 16px; border-bottom: 1px solid #EBEBEB; }
tr:nth-child(even) td { background: #F5F5F5; }

/* CTA newsletter dans l'article */
.cta-article {
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
    padding: 32px;
    margin: 40px 0;
    text-align: center;
}
.cta-article h3 { font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }
.cta-article p  { opacity: .78; margin-bottom: 22px; font-size: 15px; }

/* ── SIDEBAR ── */
.widget {
    background: white;
    border: 1px solid #E4E4E4;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 22px;
}
.widget-head {
    background: var(--color-primary);
    color: white;
    padding: 13px 20px;
    font-family: var(--font-display);
    font-size: 16px;
}
.widget-body { padding: 16px 20px; }

/* Widget recherche — même style que widget-newsletter */
.widget-search {
    background: var(--color-primary);
    color: white;
    padding: 0;
    border-radius: 6px;
    margin-bottom: 22px;
    border: none;
}
.widget-search .widget-body { padding: 24px; }
.widget-search .search-form { display: flex; gap: 8px; }
.widget-search .search-field {
    flex: 1;
    padding: 11px 14px;
    border: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text);
    background: white;
    outline: none;
}
.widget-search .search-submit {
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 11px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.widget-search .search-submit:hover { background: #238a7d; }

/* Widget newsletter */
.widget-newsletter {
    background: var(--color-primary);
    color: white;
    padding: 24px;
    border-radius: 6px;
    margin-bottom: 22px;
}
.widget-newsletter h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; }
.widget-newsletter p  { font-size: 14px; opacity: .75; margin-bottom: 14px; line-height: 1.5; }
.widget-newsletter input {
    width: 100%; padding: 11px 14px; border: none; border-radius: 4px;
    font-family: var(--font-body); font-size: 14px; margin-bottom: 10px;
}
.widget-newsletter .btn { width: 100%; text-align: center; font-size: 14px; display: block; padding: 11px; }

/* Widget échéances */
.echeance {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}
.echeance:last-of-type { border-bottom: none; }
.echeance-label { font-size: 14px; font-weight: 600; }
.echeance-date  { font-size: var(--fs-cap); color: var(--color-text-sec); margin-top: 2px; }
.echeance-tag   { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 3px; white-space: nowrap; margin-left: 10px; flex-shrink: 0; }
.tag-red    { background: #FFE0E0; color: #C62828; }
.tag-orange { background: #FFF3E0; color: #E65100; }
.tag-gray   { background: #EBEBEB; color: #555; }
.widget-more {
    display: block;
    text-align: center;
    color: var(--color-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 12px;
}

/* ── FOOTER ── */
.site-footer {
    background: var(--color-primary);
    color: white;
    padding: 52px 28px 24px;
    margin-top: 64px;
}
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 20px;
}
.footer-brand .site-logo { font-size: 20px; display: inline-block; margin-bottom: 12px; }
.footer-brand p { opacity: .55; font-size: 14px; line-height: 1.65; }
.footer-col h4 {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; opacity: .45; margin-bottom: 12px;
}
.footer-col a {
    display: block; color: white; text-decoration: none;
    font-size: 14px; opacity: .65; margin-bottom: 8px; transition: opacity .15s;
}
.footer-col a:hover { opacity: 1; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: .35;
}

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
    .site-header   { display: flex !important; padding: 0 20px; }
    .header-left   { display: none; }
    .header-center { flex: 1; text-align: left; min-width: 0; }
    .header-right  { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
    .logo-tagline  { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .site-navbar { display: none; }
    .hamburger { display: flex; }

    .content-area { grid-template-columns: 1fr; padding-top: 28px; }
    .featured { grid-template-columns: 1fr; }
    .featured-img { min-height: 200px; }
    .articles-grid { grid-template-columns: 1fr; }

    .article-title { font-size: 26px; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 4px; }
}
