/*
Theme Name: GeneratePress Child
Template: generatepress
Description: Theme enfant pour Dico Métiers - dictionnaire des métiers (données ROME) programmatique
Version: 1.0.0
*/

/* ============================================================
   VARIABLES - palette extraite du mockup (Dico Métiers, civic-tech)
   ============================================================ */
:root {
    --bg: #FFFFFF;
    --bg-soft: #F8FBFF;   /* tint sections */
    --navy: #0F172A;      /* texte fonce / footer */
    --blue: #2563EB;      /* primaire */
    --accent: #1D4ED8;    /* accent (hover) */
    --border: #E2E8F0;
    --surface: #F8FBFF;

    /* Alias pour compat + accents secteurs */
    --teal: #2563EB;      /* primaire = bleu */
    --mint: #93C5FD;      /* bleu clair sur fond navy */
    --violet: #7C3AED;    /* Support & Numérique */
    --lime: #22C55E;      /* Industrie & Production */
    --coral: #F59E0B;     /* Bâtiment & TP */
    --pink: #F43F5E;      /* Santé & Social */
    --cyan: #06B6D4;      /* Agriculture, Arts & Transport */
    --cat-teal: #06B6D4;

    --text-color: #475569;
    --text: #475569;
    --text-muted: #64748B;
    --header-h: 72px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 50px;
    --shadow: 0 2px 12px rgba(15,23,42,0.06);
    --shadow-md: 0 8px 28px rgba(15,23,42,0.10);
    --font: system-ui, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   RESET GENERAL
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: clip !important;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font) !important;
    color: var(--text-color) !important;
    background: var(--bg) !important;
    margin: 0 !important;
    padding-top: var(--header-h) !important;
    overflow-x: hidden !important;
}

html body,
html body[class] {
    padding-top: var(--header-h) !important;
}

/* ============================================================
   RESET WRAPPERS GENERATEPRESS
   ============================================================ */
.site-content {
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

.site-content > main,
body main.ds-fp,
body main.ds-archive,
body main.ds-search,
body main.ds-page,
body main.ds-404 {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 100% !important;
    display: block !important;
    float: none !important;
}

body .ds-single-wrapper {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#page, .site, #content {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.one-container .site-content,
.one-container,
.container,
.separate-containers,
.paging-navigation,
.inside-page-header {
    background-color: transparent !important;
}
.one-container .site-content { padding: 0 !important; }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font) !important;
    color: var(--navy) !important;
    line-height: 1.25 !important;
    margin-top: 0 !important;
}
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800 !important; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700 !important; }
h3 { font-size: clamp(18px, 2.5vw, 22px); font-weight: 700 !important; }
h4 { font-size: 18px; font-weight: 600 !important; }
p { line-height: 1.75 !important; margin-bottom: 1em !important; }

a {
    color: var(--blue) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}
a:hover { color: var(--accent) !important; }

/* ============================================================
   HEADER
   ============================================================ */
.ds-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: var(--bg) !important;
    border-bottom: 1px solid var(--border) !important;
    height: var(--header-h) !important;
    box-shadow: 0 1px 8px rgba(7,20,46,0.06) !important;
}
.ds-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Logo */
.ds-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    flex-shrink: 0;
    max-width: calc(100% - 80px);
}
.ds-logo-icon {
    width: 38px;
    height: 38px;
    background: var(--blue);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ds-logo-icon svg { width: 21px; height: 21px; fill: #fff; }
.ds-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy) !important;
    line-height: 1.1;
}
.ds-logo-sub {
    font-size: 11px;
    color: var(--blue) !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: block;
}

/* Nav desktop */
.ds-nav-desktop { display: none; flex: 1; justify-content: center; }
.ds-nav-desktop ul, .ds-nav-desktop li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.ds-nav-desktop ul { display: flex; align-items: center; gap: 4px; }
.ds-nav-desktop a {
    color: var(--navy) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm) !important;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s !important;
    white-space: nowrap !important;
    display: block !important;
}
.ds-nav-desktop a:hover,
.ds-nav-desktop .current-menu-item > a {
    background: var(--bg-soft) !important;
    color: var(--blue) !important;
}

/* Barre de recherche */
.ds-search-bar {
    display: none;
    align-items: center;
    gap: 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    flex-shrink: 0;
}
.ds-search-bar input[type="search"] {
    border: none !important;
    background: transparent !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    font-family: var(--font) !important;
    color: var(--text-color) !important;
    outline: none !important;
    width: clamp(150px, 15vw, 220px) !important;
    box-shadow: none !important;
}
.ds-search-bar input[type="search"]::placeholder { color: var(--text-muted) !important; }
.ds-search-bar button {
    background: var(--blue) !important;
    color: #fff !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    line-height: 1 !important;
    transition: background 0.2s !important;
    flex-shrink: 0 !important;
}
.ds-search-bar button:hover { background: var(--accent) !important; }
.ds-search-bar button svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    stroke: #fff !important;
    display: block !important;
    fill: none !important;
}

/* Bouton CTA */
.ds-header-cta { display: none; flex-shrink: 0; }
.ds-btn-primary {
    background: var(--blue) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 9px 18px !important;
    border-radius: var(--radius-sm) !important;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}
.ds-btn-primary:hover { background: var(--accent) !important; color: #fff !important; transform: translateY(-1px) !important; }

/* Hamburger */
#ds-menu-toggle { display: none !important; }
.ds-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.ds-burger:hover { background: var(--bg-soft); }
.ds-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s;
}
#ds-menu-toggle:checked ~ .ds-header .ds-burger span:nth-child(1) { transform: rotate(45deg) translate(5.5px, 5.5px); }
#ds-menu-toggle:checked ~ .ds-header .ds-burger span:nth-child(2) { opacity: 0; }
#ds-menu-toggle:checked ~ .ds-header .ds-burger span:nth-child(3) { transform: rotate(-45deg) translate(5.5px, -5.5px); }

/* Backdrop mobile */
.ds-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7,20,46,0.5);
    z-index: 980;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
#ds-menu-toggle:checked ~ .ds-mobile-backdrop { opacity: 1; visibility: visible; }

/* Drawer mobile - sous le header */
.ds-mobile-drawer {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(320px, 90vw);
    bottom: 0;
    background: var(--bg);
    z-index: 990;
    overflow-y: auto;
    padding: 24px 0 40px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(7,20,46,0.15);
}
#ds-menu-toggle:checked ~ .ds-mobile-drawer { transform: translateX(0); }
.ds-mobile-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: 50%;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ds-mobile-close::before,
.ds-mobile-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
}
.ds-mobile-close::before { transform: rotate(45deg); }
.ds-mobile-close::after  { transform: rotate(-45deg); }
.ds-mobile-nav { padding: 0 20px; margin-top: 52px; }
.ds-mobile-nav ul, .ds-mobile-nav li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.ds-mobile-nav li { border-bottom: 1px solid var(--border); }
.ds-mobile-nav a {
    display: block !important;
    color: var(--navy) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 15px 4px !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}
.ds-mobile-nav a:hover { color: var(--blue) !important; }
.ds-mobile-search { padding: 20px; }
.ds-mobile-search form {
    display: flex;
    gap: 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.ds-mobile-search input[type="search"] {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-family: var(--font) !important;
    color: var(--text-color) !important;
    outline: none !important;
    box-shadow: none !important;
}
.ds-mobile-search button {
    background: var(--blue) !important;
    border: none !important;
    padding: 0 16px !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0 !important;
}

/* ============================================================
   RESPONSIVE HEADER
   ============================================================ */
@media (min-width: 1024px) {
    .ds-nav-desktop  { display: flex !important; }
    .ds-search-bar   { display: flex !important; }
    .ds-header-cta   { display: flex !important; }
    .ds-burger       { display: none !important; }
    .ds-mobile-backdrop,
    .ds-mobile-drawer { display: none !important; }
    .ds-logo-sub { display: block !important; }
}
@media (max-width: 1023px) {
    .ds-logo-sub     { display: none !important; }
    .ds-header-inner { gap: 12px !important; }
    .ds-burger { margin-left: auto !important; display: flex !important; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.ds-footer {
    background: var(--navy) !important;
    color: rgba(255,255,255,0.85) !important;
    margin-top: 0 !important;
    padding: 60px 0 0 !important;
}
.ds-footer-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.ds-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ds-footer-brand .ds-logo-text { color: #fff !important; font-size: 22px; }
.ds-footer-brand .ds-logo-icon { background: var(--blue) !important; }
.ds-footer-brand .ds-logo-sub { color: var(--mint) !important; }
.ds-footer-pitch {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255,255,255,0.7) !important;
    margin-top: 14px !important;
    margin-bottom: 0 !important;
}
.ds-footer-col-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mint) !important;
    margin-bottom: 18px !important;
    margin-top: 0 !important;
}
.ds-footer-links {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ds-footer-links li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.ds-footer-links a {
    color: rgba(255,255,255,0.7) !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    line-height: 1.4 !important;
}
.ds-footer-links a:hover { color: var(--blue) !important; background-color: transparent !important; }
.ds-footer-bottom {
    padding: 20px 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0 !important;
}
.ds-footer-copy { font-size: 13px !important; color: rgba(255,255,255,0.5) !important; margin: 0 !important; }

@media (max-width: 900px) {
    .ds-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .ds-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
    .ds-footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .ds-footer-brand { grid-column: auto; }
    .ds-footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   PAGINATION (tuer les puces GP - lesson 93)
   ============================================================ */
ul.page-numbers,
nav.pagination ul,
.navigation.pagination ul,
.ds-pagination ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
}
ul.page-numbers li,
.navigation.pagination li,
.ds-pagination li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
ul.page-numbers li::marker,
.ds-pagination li::marker { content: none !important; }

/* ============================================================
   UTILITAIRES GLOBAL
   ============================================================ */
@media (max-width: 1023px) { body { overflow-x: hidden !important; } }
img { max-width: 100% !important; height: auto !important; }
