/*
Theme Name:  Colchide
Theme URI:   https://colchide.com
Description: Thème léger de Colchide : fiches célébrités en 7 langues. Nécessite le plugin Colchide Core.
Version:           1.5.5
Requires at least: 6.4
Requires PHP: 8.1
Author:      Treelike
Text Domain: colchide
License:     GPL-2.0-or-later
*/

:root {
	--rose: #c52e8e;
	--rose-fonce: #9e1f70;
	--rose-pale: #fbeef6;
	--encre: #1d1b22;
	--gris: #5f5b66;
	--trait: #e9e5ec;
	--fond: #ffffff;
	--fond-2: #faf8fb;
	--rayon: 14px;
	--ombre: 0 1px 2px rgba(29, 27, 34, .06), 0 6px 20px rgba(29, 27, 34, .06);
	--max: 1120px;
	--police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; font-family: var(--police); font-size: 17px; line-height: 1.6; color: var(--encre); background: var(--fond); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-fonce); text-underline-offset: 2px; }
a:hover { color: var(--rose); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
a.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; color: var(--encre); border-radius: 8px; box-shadow: var(--ombre); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
button:focus-visible, .btn:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- en-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--trait); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--rose), #7b2cbf); color: #fff; font-size: 18px; }
.brand span b { color: var(--rose); }
.header-search { flex: 1; max-width: 420px; margin-left: auto; }
.header-search input { width: 100%; padding: 9px 14px 9px 38px; border: 1px solid var(--trait); border-radius: 999px; background: var(--fond-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235f5b66' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; font: inherit; font-size: 15px; }
.header-search input:focus { outline: 2px solid var(--rose); outline-offset: 1px; background-color: #fff; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; padding: 6px 10px; border: 1px solid var(--trait); border-radius: 999px; font-size: 14px; font-weight: 600; text-transform: uppercase; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--trait); border-radius: 10px; box-shadow: var(--ombre); min-width: 150px; }
.lang-switch li a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--encre); font-size: 15px; }
.lang-switch li a:hover, .lang-switch li a[aria-current] { background: var(--rose-pale); color: var(--rose-fonce); }

/* ---------- accueil ---------- */
.hero { background: radial-gradient(1200px 400px at 10% -10%, #f7d6ea 0, transparent 60%), radial-gradient(900px 400px at 100% 0, #e9dcf7 0, transparent 55%), var(--fond-2); padding: 56px 0 44px; border-bottom: 1px solid var(--trait); }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); margin: 0 0 10px; max-width: 760px; }
.hero p { color: var(--gris); margin: 0 0 22px; max-width: 640px; }
.hero form { display: flex; gap: 8px; max-width: 560px; }
.hero input { flex: 1; padding: 14px 18px; font: inherit; border: 1px solid var(--trait); border-radius: 999px; box-shadow: var(--ombre); }
.hero button, .btn { white-space: nowrap; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--rose); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.hero button:hover, .btn:hover { background: var(--rose-fonce); }
.section { padding-top: 34px; padding-bottom: 34px; }
.section h2 { font-size: 24px; margin: 0 0 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.card a { display: flex; flex-direction: column; height: 100%; padding: 16px; border: 1px solid var(--trait); border-radius: var(--rayon); text-decoration: none; color: var(--encre); background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card a:hover { transform: translateY(-2px); box-shadow: var(--ombre); border-color: #f0c9e2; }
.card .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; background: var(--rose-pale); }
.card .initials { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; margin-bottom: 10px; background: var(--rose-pale); color: var(--rose-fonce); font-weight: 800; }
.card strong { font-size: 16px; line-height: 1.3; }
.card small { color: var(--gris); font-size: 14px; margin-top: 4px; }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.card-article a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--encre); background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-article a:hover { transform: translateY(-2px); box-shadow: var(--ombre); border-color: #f0c9e2; }
.card-article img, .card-article .no-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--rose-pale); }
.card-article .no-img { background: linear-gradient(135deg, var(--rose-pale), #e9defa); }
.card-article strong { padding: 12px 14px 14px; font-size: 16px; line-height: 1.35; }

/* ---------- fiche ---------- */
.fiche { padding-top: 30px; padding-bottom: 50px; }
.fiche-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.fiche-head h1 { font-size: clamp(30px, 4.6vw, 46px); margin: 0 0 6px; }
.fiche-head .sub { color: var(--gris); margin: 0 0 20px; font-size: 18px; }
.answer { position: relative; padding: 18px 20px 18px 22px; margin: 0 0 24px; border-radius: var(--rayon); background: var(--rose-pale); border: 1px solid #f3cfe5; font-size: 19px; line-height: 1.55; }
.answer::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--rose); }
.photo { margin: 0 0 24px; }
.photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: var(--rayon); }
.photo figcaption { font-size: 12px; color: var(--gris); margin-top: 6px; }
.facts { margin: 0 0 26px; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.facts h2 { font-size: 18px; margin: 0; padding: 14px 18px; background: var(--fond-2); border-bottom: 1px solid var(--trait); }
.facts dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.facts dl > div { padding: 12px 18px; border-bottom: 1px solid var(--trait); }
.facts dl > div:nth-child(odd) { border-right: 1px solid var(--trait); }
.facts dt { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 650; }
.tag-est { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff3d6; color: #8a5a00; font-size: 11px; font-weight: 700; vertical-align: middle; text-transform: uppercase; letter-spacing: .03em; }
.bio h2 { font-size: 22px; margin: 0 0 8px; }
.note { margin-top: 28px; padding: 14px 16px; border-radius: 10px; background: var(--fond-2); color: var(--gris); font-size: 14px; }
.note p { margin: 0 0 6px; }
.note a { color: var(--gris); }
.aside-box { position: sticky; top: 84px; }
.related h2 { font-size: 18px; margin: 0 0 12px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--trait); text-decoration: none; color: var(--encre); }
.related li a span { color: var(--gris); white-space: nowrap; }
.related li a:hover strong { color: var(--rose-fonce); }

/* ---------- publicités ---------- */
/* Emplacements masqués tant que le visiteur n'a pas accepté (pas de blocs vides après un refus). */
.cc-ad { display: none; margin: 20px 0; justify-content: center; align-items: center; background: var(--fond-2); border-radius: 8px; overflow: hidden; }
.cc-consent-ok .cc-ad { display: flex; }

/* ---------- pages, formulaires ---------- */
.page { padding-top: 34px; padding-bottom: 60px; }
.cc-form p { margin: 0 0 14px; }
.cc-form input:not([type=checkbox]), .cc-form select, .cc-form textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--trait); border-radius: 8px; }
.cc-form button { padding: 12px 22px; border: 0; border-radius: 999px; background: var(--rose); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cc-hp { position: absolute; left: -9999px; }
.cc-notice { padding: 12px 16px; border-radius: 8px; background: var(--rose-pale); margin-bottom: 16px; }
.cc-error { color: #b42318; font-weight: 600; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 24px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--trait); border-radius: 8px; text-decoration: none; }
.pagination .current { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ---------- pied de page ---------- */
.site-footer { border-top: 1px solid var(--trait); background: var(--fond-2); padding: 28px 0; color: var(--gris); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.site-footer a { color: var(--gris); }
.site-footer a.footer-legal { font-size: 13px; text-decoration: none; opacity: .88; }
.site-footer a.footer-legal:hover { text-decoration: underline; opacity: 1; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--gris); text-decoration: underline; cursor: pointer; }

/* ---------- consentement (fenêtre modale) ---------- */
html.cc-consent-lock { overflow: hidden; }
.consent-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(29, 27, 34, .55); }
.consent-backdrop[hidden] { display: none; }
.consent { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); max-height: min(85vh, 640px); overflow: auto; margin: 0; padding: 24px 22px 20px; background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: 0 16px 48px rgba(29, 27, 34, .22); font-size: 15px; }
.consent[hidden] { display: none; }
.consent-brand { margin-bottom: 12px; }
.consent-brand-img { display: block; width: auto; height: 40px; border-radius: 50%; }
.consent-brand-fallback { width: 40px; height: 40px; font-size: 18px; }
.consent-title { margin: 0 0 12px; font-size: 1.25rem; line-height: 1.25; color: var(--encre); }
.consent-text, .consent-partners, .consent-policy { margin: 0 0 12px; color: var(--encre); }
.consent-policy a { color: var(--rose-fonce); font-weight: 600; }
.consent .actions { display: flex; gap: 10px; margin-top: 4px; }
.consent .consent-choice { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid var(--rose); background: #fff; color: var(--rose-fonce); }
.consent .consent-choice:hover { background: var(--rose-pale); }

@media (max-width: 860px) {
	.consent { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 60vh; border-radius: var(--rayon) var(--rayon) 0 0; }
	.fiche-grid { grid-template-columns: 1fr; }
	.aside-box { position: static; }
	.site-header .wrap { flex-wrap: wrap; padding-bottom: 10px; }
	.header-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
	.lang-switch { margin-left: auto; }
	.facts dl { grid-template-columns: 1fr; }
	.facts dl > div:nth-child(odd) { border-right: 0; }
	body { font-size: 16px; }
}

.bio .credit { margin: 8px 0 0; color: var(--gris); font-size: 13px; }
.bio .credit a { color: inherit; }
.facts .sources { margin: 10px 0 0; color: var(--gris); font-size: 13px; }
.facts .sources a { color: inherit; }
