/* Calendrier éditorial — calendrier-editorial.com */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-subtle: #f1f5f9;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-light: #e0e7ff;
    --color-primary-soft: #eef2ff;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-success: #10b981;
    --color-danger: #dc2626;
    --font-main: 'DM Sans', system-ui, -apple-system, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --transition: 150ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg-alt);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: var(--color-primary); }

.site-nav { background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--color-text); text-decoration: none; white-space: nowrap; }
.site-links { display: flex; align-items: center; gap: 4px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.site-links::-webkit-scrollbar { display: none; }
.site-links a { display: block; padding: 6px 12px; font-size: 0.9rem; font-weight: 500; color: var(--color-text-muted); text-decoration: none; border-radius: 999px; white-space: nowrap; }
.site-links a:hover { color: var(--color-primary); background: var(--color-primary-soft); }
.site-links a[aria-current="page"] { color: var(--color-primary); background: var(--color-primary-light); }

.header { background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-primary-light) 100%); border-bottom: 1px solid var(--color-border); padding: 40px 0 28px; text-align: center; }
.header h1 { font-size: clamp(1.75rem, 4vw, 2.35rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; }
.header h1 .highlight { color: var(--color-primary); font-weight: 600; }
.header .subtitle { font-size: 1.1rem; color: var(--color-text-muted); max-width: 760px; margin: 0 auto; }
.header .subtitle strong { color: var(--color-text); font-weight: 600; }
.header-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 18px; list-style: none; }
.header-badges li { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 500; }
.header-badges svg { color: var(--color-success); }

.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; margin-bottom: 14px; font-size: 0.85rem; color: var(--color-text-muted); }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--color-text-light); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }

.main { padding: 24px 0 32px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; font-family: var(--font-main); font-size: 0.9rem; font-weight: 500; border-radius: var(--radius-md); cursor: pointer; border: none; white-space: nowrap; text-decoration: none; transition: all var(--transition); }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-bg-alt); }
.btn-secondary.is-pressed { background: var(--color-primary-light); color: var(--color-primary); border-color: transparent; }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.btn:focus-visible, .dropdown-item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.dropdown { position: relative; }
.dropdown-arrow { transition: transform var(--transition); }
.dropdown.active .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all var(--transition); z-index: 30; }
.dropdown.active .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; width: 100%; padding: 9px 12px; background: none; border: 0; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; color: var(--color-text); }
.dropdown-item:hover { background: var(--color-bg-subtle); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px); background: var(--color-text); color: white; padding: 12px 18px; border-radius: var(--radius-md); opacity: 0; pointer-events: none; transition: all 200ms ease; z-index: 80; font-size: 0.92rem; max-width: min(420px, calc(100% - 32px)); }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.error { background: var(--color-danger); }
.toast.success { background: #065f46; }
.ce-toast-link { display: block; margin-top: 6px; color: white; font-weight: 700; }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 24px; opacity: 0; visibility: hidden; transition: all var(--transition); z-index: 50; }
.modal.active { opacity: 1; visibility: visible; }
.modal-content { background: white; border-radius: var(--radius-lg); padding: 28px 24px 24px; width: min(640px, 100%); max-height: 84vh; overflow: auto; position: relative; box-shadow: var(--shadow-lg); transform: translateY(8px); transition: transform var(--transition); }
.modal.active .modal-content { transform: translateY(0); }
.modal-small { max-width: 480px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 1.4rem; cursor: pointer; color: var(--color-text-muted); }
.modal-close:hover { background: var(--color-bg-subtle); }
.modal-content h2 { font-size: 1.25rem; margin-bottom: 8px; }
.modal-content h3 { font-size: 1rem; margin: 18px 0 6px; }
.modal-content p { color: var(--color-text-muted); margin-bottom: 12px; font-size: 0.95rem; }

.aff-block { display: none; }
body[data-aff="on"] .aff-block { display: block; }
.aff-line { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.aff-prompt { position: fixed; right: 16px; bottom: 16px; width: min(340px, calc(100% - 32px)); background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px 16px 14px; z-index: 70; opacity: 0; transform: translateY(8px); transition: all 200ms ease; }
.aff-prompt.visible { opacity: 1; transform: translateY(0); }
.aff-prompt-close { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--color-text-muted); }
.aff-prompt-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-light); margin-bottom: 4px; }
.aff-prompt-title { font-size: 1.02rem; margin-bottom: 6px; padding-right: 16px; }
.aff-prompt-text { font-size: 0.88rem; color: var(--color-text-muted); margin-bottom: 12px; }
.aff-prompt-cta { display: inline-flex; background: var(--color-primary); color: white; text-decoration: none; font-weight: 600; font-size: 0.88rem; padding: 8px 12px; border-radius: var(--radius-md); }

/* Outil */
.ce-toolbar, .ce-filters, .ce-stage, .ce-cal { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.ce-toolbar { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ce-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ce-title { flex: 1 1 180px; min-width: 0; font: inherit; font-weight: 700; font-size: 1.05rem; border: 1px solid transparent; border-radius: var(--radius-md); padding: 8px 10px; }
.ce-title:hover, .ce-title:focus { border-color: var(--color-border); outline: none; }
.ce-monthnav { display: inline-flex; align-items: center; gap: 6px; }
.ce-monthnav strong { min-width: 140px; text-align: center; }
.ce-monthnav .btn { padding: 6px 12px; font-size: 1.1rem; }
.ce-select-label, .ce-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--color-text-muted); }
.ce-select-label select, .ce-form input, .ce-form select, .ce-form textarea { font: inherit; font-size: 0.95rem; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); background: white; width: 100%; }
.ce-import-label input { display: none; }
.ce-filters { margin-top: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ce-filter-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ce-filter-line > span { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-light); width: 58px; }
.ce-chip-filter { border: 1px solid var(--color-border); background: white; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 0.8rem; cursor: pointer; color: var(--color-text-muted); }
.ce-chip-filter.is-on { border-color: transparent; background: color-mix(in srgb, var(--ce-c, var(--color-primary)) 14%, white); color: var(--color-text); font-weight: 600; }
.ce-stage { margin-top: 12px; padding: 12px; }
.ce-hint { margin-top: 10px; font-size: 0.82rem; color: var(--color-text-muted); }
.ce-cal { border: 0; padding: 0; }
.ce-cal-head, .ce-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.ce-cal-head div { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--color-text-light); text-transform: uppercase; padding: 4px 0 8px; }
.ce-day { min-height: 108px; border: 1px solid var(--color-border); padding: 4px; display: flex; flex-direction: column; gap: 3px; background: white; text-align: left; }
.ce-day-out { background: var(--color-bg-alt); }
.ce-day.is-today { box-shadow: inset 0 0 0 2px var(--color-primary); }
.ce-day.is-drop { background: var(--color-primary-soft); }
.ce-day-num { font-size: 0.75rem; font-weight: 700; color: var(--color-text-muted); }
.ce-key, .ce-chip, .ce-more { border: 0; border-radius: 4px; text-align: left; cursor: pointer; font: inherit; }
.ce-key { background: color-mix(in srgb, var(--ce-c) 16%, white); color: var(--color-text); font-size: 0.68rem; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-chip { background: color-mix(in srgb, var(--ce-c) 12%, white); border-left: 3px solid var(--ce-c); padding: 3px 5px; display: flex; flex-direction: column; gap: 0; }
.ce-chip small { color: var(--color-text-muted); font-size: 0.65rem; }
.ce-chip-topic { font-size: 0.75rem; font-weight: 600; line-height: 1.25; }
.ce-chip.is-dragging { opacity: 0.45; pointer-events: none; }
.ce-more { background: transparent; color: var(--color-primary); font-size: 0.72rem; font-weight: 700; padding: 0 4px; }
.ce-counts { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; margin-top: 12px; font-size: 0.85rem; color: var(--color-text-muted); }
.ce-counts li { display: inline-flex; align-items: center; gap: 6px; }
.ce-counts li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ce-c, var(--color-border-strong)); }
.ce-empty { color: var(--color-text-muted); padding: 12px; }
.ce-list .ce-linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--color-primary); cursor: pointer; text-align: left; }
.ce-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ce-c); margin-right: 6px; }

.ce-form { display: flex; flex-direction: column; gap: 10px; }
.ce-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--color-text-muted); }
.ce-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ce-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
#ceShareUrl { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 10px; }

/* Dates clés */
.ce-datebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 18px; }
.ce-datebar .ce-chip-filter.is-on, .ce-idea-filters .ce-chip-filter.is-on { background: var(--color-primary-light); color: var(--color-primary); }
.ce-month-block { margin: 0 0 28px; }
.ce-month-block h3 { font-size: 1.2rem; margin-bottom: 10px; }
.ce-datelist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ce-datelist li { display: grid; grid-template-columns: 168px 1fr auto; gap: 10px 16px; align-items: center; padding: 12px 14px; background: white; border: 1px solid var(--color-border); border-left: 4px solid var(--ce-c, var(--color-primary)); border-radius: var(--radius-md); }
.ce-datelist time { font-size: 0.82rem; color: var(--color-text-muted); text-transform: capitalize; }
.ce-datelist strong { display: block; }
.ce-datelist .ce-idea { display: block; font-size: 0.88rem; color: var(--color-text-muted); font-weight: 400; }
.ce-idea-filters { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.ce-idea-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ce-idea-row span { font-size: 0.78rem; font-weight: 700; color: var(--color-text-muted); min-width: 72px; }
.ce-ideas-meta { margin: 0 0 12px; font-size: 0.88rem; color: var(--color-text-muted); }
#ceIdeas .ce-datelist > li > span { font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.3; }
.ce-jump { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; }
.ce-jump a { text-decoration: none; font-size: 0.82rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: white; border: 1px solid var(--color-border); }

.author-box { max-width: 840px; margin: 0 0 28px; padding: 14px 16px; background: var(--color-bg-alt); border-radius: var(--radius-md); font-size: 0.92rem; color: var(--color-text-muted); }
.author-box strong { color: var(--color-text); }

.seo-content { background: var(--color-bg); border-top: 1px solid var(--color-border); padding: 64px 0; }
.seo-section { margin-bottom: 56px; }
.seo-section:last-child { margin-bottom: 0; }
.seo-section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.01em; line-height: 1.3; }
.seo-section h3 { font-size: 1.15rem; font-weight: 600; margin: 28px 0 12px; }
.section-intro { font-size: 1.05rem; color: var(--color-text-muted); margin-bottom: 16px; max-width: 840px; }
.section-intro strong, .seo-list strong, .data-table td strong { color: var(--color-text); }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.seo-card { padding: 22px; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.seo-icon { font-size: 1.6rem; margin-bottom: 8px; }
.seo-card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.seo-card p, .seo-list { color: var(--color-text-muted); font-size: 0.95rem; }
.seo-list { max-width: 840px; margin: 0 0 16px 20px; }
.seo-list li { margin-bottom: 8px; }
.howto-steps { list-style: none; counter-reset: howto; max-width: 840px; margin-bottom: 8px; }
.howto-steps li { counter-increment: howto; position: relative; padding: 8px 0 8px 46px; color: var(--color-text-muted); }
.howto-steps li strong { color: var(--color-text); }
.howto-steps li::before { content: counter(howto); position: absolute; left: 0; top: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); color: white; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.table-scroll { overflow-x: auto; margin: 0 0 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: white; }
.data-table th, .data-table td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.data-table thead th { background: var(--color-bg-subtle); }
.data-table td { color: var(--color-text-muted); }
.callout { max-width: 840px; padding: 14px 16px; margin: 0 0 16px; background: var(--color-primary-soft); border-left: 4px solid var(--color-primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--color-text-muted); font-size: 0.95rem; }
.callout strong { color: var(--color-text); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.faq-item summary { padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--color-text-muted); font-weight: 400; font-size: 1.2rem; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 16px; color: var(--color-text-muted); font-size: 0.95rem; }

.xlsx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.xlsx-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.xlsx-card h3 { font-size: 1.05rem; }
.xlsx-card p { color: var(--color-text-muted); font-size: 0.9rem; flex: 1; }
.xlsx-card .btn { align-self: flex-start; }

.notfound { min-height: 100vh; display: flex; align-items: center; text-align: center; background: linear-gradient(135deg, white, var(--color-primary-light)); }
.notfound-code { font-size: 5rem; font-weight: 700; color: var(--color-primary); line-height: 1; }
.notfound h1 { font-size: 1.5rem; margin: 8px 0; }
.notfound-text { max-width: 480px; margin: 0 auto 20px; color: var(--color-text-muted); }

.footer { padding: 32px 0; text-align: center; border-top: 1px solid var(--color-border); background: var(--color-bg-alt); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; list-style: none; margin-bottom: 16px; }
.footer-nav a { color: var(--color-text); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--color-primary); }
.footer-tagline { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }
.footer-credit a { color: var(--color-primary); text-decoration: none; font-weight: 600; }
.footer-links { margin-top: 12px; display: flex; justify-content: center; gap: 10px; font-size: 0.85rem; }
.footer-links a { color: var(--color-text-muted); text-decoration: none; }
.footer-separator { color: var(--color-border-strong); }

@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .site-brand span { display: none; }
    .header { padding: 28px 0 20px; }
    .header .subtitle { font-size: 1rem; }
    .ce-day { min-height: 72px; }
    .ce-chip small, .ce-cal-head { display: none; }
    .ce-form-row, .ce-datelist li { grid-template-columns: 1fr; }
    .ce-datelist li .btn { justify-self: start; }
}

@media print {
    @page { size: A4 landscape; margin: 10mm; }
    .site-nav, .header, .seo-content, .footer, .ce-toolbar, .ce-filters, .ce-hint, .modal, .toast, .aff-prompt, .ce-no-print, .breadcrumb { display: none !important; }
    body, .main { background: white; padding: 0; }
    .ce-stage, .ce-cal { border: 0; }
    .ce-day { min-height: 68px; break-inside: avoid; }
    .ce-chip small { display: block; }
    .container { max-width: none; }
}
