/*
Theme Name: Ouaiscecool Moderne
Template: occ
Author: Fred.
Author URI: https://www.ouaiscecool.com/
Description: Version moderne du site des Ouaiscecool : responsive, mode sombre, visionneuse d'images et lecteur de sons.
Version: 1.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/

@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(fonts/figtree-italic.woff2) format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Caveat Brush"; src: url(fonts/caveat-brush.woff2) format("woff2"); font-display: swap; }

/* Couleurs : le kaki, le rose feutre et le lavande du site d'origine */
:root {
	color-scheme: light;
	--fond: #efebda;
	--bandeau: #d6d2bf;
	--carte: #fbf8ec;
	--sable: #e3dfcb;
	--encre: #27251f;
	--encre-douce: #5f5c4f;
	--trait: #27251f;
	--rose: #cf1a3c;
	--orange: #c9551a;
	--lavande: #c1bef1;
	--vert: #2f9a18;
	--ombre: 4px 4px 0 var(--trait);
	--titres: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
	--texte: "Figtree", "Segoe UI", Tahoma, sans-serif;
	--feutre: "Caveat Brush", "Comic Sans MS", cursive;
	--largeur: 1180px;
}

/* Mode sombre : seulement sur demande du visiteur (bouton de la barre), le clair est le défaut. */
:root[data-theme="dark"] {
	color-scheme: dark;
	--fond: #1b1a16;
	--carte: #26241f;
	--sable: #33302a;
	--encre: #f3efe0;
	--encre-douce: #b7b3a3;
	--trait: #000;
	--rose: #ff6079;
	--orange: #f2914f;
	--lavande: #8f8bdc;
	--vert: #7bd95a;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 1.0625rem/1.6 var(--texte); }
body.lecteur-ouvert { padding-bottom: 72px; }
img { max-width: 100%; height: auto; border: 0; }
figure { margin: 0; }
a { color: var(--rose); text-underline-offset: .15em; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--titres); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
hr { border: 0; border-top: 2px dashed var(--encre-douce); margin: 2em 0; }
table { border-collapse: collapse; }
input, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.evitement { position: absolute; left: -999px; z-index: 50; background: var(--encre); color: var(--fond); padding: .5em 1em; }
.evitement:focus { left: 8px; top: 8px; }

/* Bandeau : reste kaki dans les deux thèmes, c'est le fond des GIF d'origine */
.bandeau { background: var(--bandeau); }
.bandeau-haut { max-width: var(--largeur); margin: 0 auto; padding: 8px 20px 4px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.fortune { display: block; }
.logo img { display: block; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bandeau); border-top: 3px solid var(--lavande); border-bottom: 3px solid var(--trait); color: #27251f; }
.nav-dedans { max-width: var(--largeur); margin: 0 auto; padding: 2px 20px; display: flex; align-items: center; gap: 8px; }
.nav-liste { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; flex-wrap: wrap; gap: 0 2px; }
.nav-liste a { display: block; padding: .28em .55em; color: #bd1533; font: 1.32rem/1.25 var(--feutre); text-decoration: none; transition: transform .12s ease; }
.nav-liste a:hover { color: #a8430f; transform: rotate(-3deg) scale(1.08); }
.nav-liste .current-menu-item > a, .nav-liste .current_page_item > a { background: #27251f; color: #efebda; transform: rotate(-1.5deg); }
.nav-outils { display: flex; gap: 2px; margin-left: auto; }
.bouton-icone { display: inline-flex; align-items: center; gap: 6px; min-width: 40px; height: 40px; justify-content: center; padding: 0 6px; background: none; border: 0; color: #27251f; cursor: pointer; list-style: none; border-radius: 4px; }
.bouton-icone::-webkit-details-marker { display: none; }
.bouton-icone:hover { background: rgba(0, 0, 0, .1); }
.bouton-apparence { padding: 0 8px; color: #bd1533; font: 1.25rem var(--feutre); text-decoration: none; }
.bouton-apparence:hover { color: #a8430f; }
.bouton-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-burger { display: none; font: 1.3rem var(--feutre); color: #bd1533; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 3px; background: currentColor; transition: transform .15s; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; transform-origin: 50% 50%; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.menu-ouvert .burger { background: transparent; }
.menu-ouvert .burger::before { top: 0; transform: rotate(45deg); }
.menu-ouvert .burger::after { top: 0; transform: rotate(-45deg); }

.deroulant { position: relative; }
.deroulant-panneau { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); padding: 16px; background: var(--carte); color: var(--encre); border: 2px solid var(--trait); box-shadow: var(--ombre); font-size: 1rem; }
.compte-nom { font-family: var(--titres); font-weight: 700; margin: 0 0 .5em; }
.compte-liens { list-style: none; padding: 0; margin: .75em 0 0; }
.compte-liens li + li { margin-top: .3em; }
.compte-form { display: grid; gap: 10px; }
.compte-form label { display: grid; gap: 2px; font-size: .95rem; }
.compte-case { display: flex !important; align-items: center; gap: 8px; }
input[type="text"], input[type="password"], input[type="search"] { width: 100%; padding: .45em .6em; background: var(--fond); border: 2px solid var(--trait); border-radius: 0; }
.recherche { display: flex; gap: 8px; }
.recherche-page { max-width: 520px; margin-bottom: 24px; }

/* Boutons */
.bouton { display: inline-block; padding: .5em 1em; background: var(--rose); color: #fff; border: 2px solid var(--trait); box-shadow: 3px 3px 0 var(--trait); font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .1s ease, box-shadow .1s ease; }
:root[data-theme="dark"] .bouton { color: #1b1a16; }
.bouton:hover { color: #fff; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--trait); }
:root[data-theme="dark"] .bouton:hover { color: #1b1a16; }
.bouton:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--trait); }
.bouton-second, :root[data-theme="dark"] .bouton-second { background: var(--carte); color: var(--encre); }
.bouton-second:hover, :root[data-theme="dark"] .bouton-second:hover { color: var(--encre); }
.bouton-discret { margin-top: 14px; padding: .25em .7em; font-size: .9rem; background: var(--carte); color: var(--encre); }
.bouton-discret:hover { color: var(--encre); }
/* Mise en page */
.principal { max-width: var(--largeur); margin: 0 auto; padding: 28px 20px 56px; }
.colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.colonnes-seule { grid-template-columns: minmax(0, 1fr); }
.colonnes-agenda { grid-template-columns: minmax(0, 1fr) 320px; }
.titre-section { font-size: 1.7rem; margin: 0 0 .7em; }
.titre-section::after { content: ""; display: block; width: 72px; height: 5px; margin-top: 8px; background: var(--rose); transform: rotate(-1deg); }
.etiquette { display: inline-block; margin: 0; padding: .05em .5em; background: var(--lavande); color: #27251f; font: 1.15rem var(--feutre); transform: rotate(-1.5deg); }
.meta { margin: 0 0 .75em; color: var(--encre-douce); font-size: .92rem; }

/* La une */
.une { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: center; margin-bottom: 52px; }
.une-flyer { text-align: center; }
.affiche { display: block; transform: rotate(-2deg); transition: transform .2s ease; }
.affiche:hover { transform: rotate(0) scale(1.02); }
.affiche img { display: block; width: 100%; border: 2px solid var(--trait); box-shadow: 8px 8px 0 var(--trait); }
.bulle { position: relative; display: inline-block; margin: 0 0 14px; padding: .1em .8em; background: var(--carte); border: 2px solid var(--trait); border-radius: 50px; font: 1.7rem var(--feutre); color: var(--vert); transform: rotate(-2deg); }
.bulle::after { content: ""; position: absolute; left: 34px; bottom: -12px; width: 18px; height: 18px; background: var(--carte); border-right: 2px solid var(--trait); border-bottom: 2px solid var(--trait); transform: rotate(40deg) skew(14deg, 14deg); }
.une h1 em { font-style: normal; color: var(--rose); }
.une-concert { display: grid; justify-items: start; gap: 2px; margin: 0 0 1.2em; font-size: 1.25rem; font-weight: 700; }
.une-date { color: var(--encre-douce); font-size: 1rem; font-weight: 400; }
.une-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.4em 0; }
.une-contact { color: var(--encre-douce); font-size: .95rem; margin: 0; }

/* News */
.cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.carte { background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); display: flex; flex-direction: column; transition: transform .14s ease, box-shadow .14s ease; }
.carte:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 7px 7px 0 var(--trait); }
.carte-visuel { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 2px solid var(--trait); background: var(--sable); }
.carte-visuel img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.carte-corps { padding: 16px 18px 18px; }
.carte h2 { font-size: 1.25rem; margin-bottom: .3em; overflow-wrap: anywhere; }
.carte h2 a { color: var(--encre); text-decoration: none; }
.carte h2 a:hover { color: var(--rose); }
.carte p:last-child { margin-bottom: 0; }
.suite { margin: 28px 0 0; text-align: center; }

/* Colonne */
.cote { display: grid; gap: 28px; }
.encart h2 { font: 1.55rem var(--feutre); color: var(--orange); margin-bottom: .25em; }
.dates { list-style: none; margin: 0; padding: 0; }
.dates li { border-bottom: 1px dashed var(--encre-douce); }
.dates a { display: block; padding: .4em 0; color: var(--encre); text-decoration: none; line-height: 1.3; font-size: .98rem; }
.dates a:hover { color: var(--rose); }
.dates time { display: block; color: var(--encre-douce); font-size: .84rem; }
.plus-petit { display: inline-block; margin-top: .7em; font-size: .95rem; }

/* Lecture */
.lecture { background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); padding: clamp(20px, 4vw, 40px); min-width: 0; }
.lecture-seule { max-width: 820px; margin: 0 auto; }
.retour { margin: 0 0 1em; font-size: .95rem; }
.retour a { text-decoration: none; }
.contenu { overflow-wrap: anywhere; }
.contenu img { display: inline-block; }
.contenu table { max-width: 100%; }
.contenu td, .contenu th { padding: .3em .6em; }
.contenu iframe, .contenu video, .contenu embed { max-width: 100%; }
.voisines { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 2em; padding-top: 1em; border-top: 2px dashed var(--encre-douce); }
.voisine a { text-decoration: none; }
.voisine-apres { margin-left: auto; text-align: right; }
.admin { font-size: .9rem; }

/* Galerie, sons, vidéos */
.galerie h1 { overflow-wrap: anywhere; }
.ariane { margin: -.2em 0 1.2em; color: var(--encre-douce); font-size: .95rem; }
.info { max-width: 72ch; margin: 0 0 1.5em; }
.dossiers { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.dossier { display: flex; flex-direction: column; height: 100%; background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); color: var(--encre); text-decoration: none; transition: transform .14s ease, box-shadow .14s ease; }
.dossier:hover { color: var(--rose); transform: translate(-2px, -2px) rotate(-.8deg); box-shadow: 7px 7px 0 var(--trait); }
.dossier img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2px solid var(--trait); background: var(--sable); }
.dossier-nom { padding: 10px 12px 0; font-family: var(--titres); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.dossier-nom:last-child { padding-bottom: 10px; }
.dossier-nombre { padding: 2px 12px 10px; color: var(--encre-douce); font-size: .88rem; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.vignette { display: block; aspect-ratio: 4 / 3; background: var(--sable); border: 2px solid var(--trait); overflow: hidden; }
.vignette img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.vignette:hover img { transform: scale(1.07); }
.diapo { text-align: center; }
.diapo img { border: 2px solid var(--trait); box-shadow: var(--ombre); }
.diapo figcaption { margin-top: 14px; color: var(--encre-douce); }

.pistes { list-style: none; margin: 0; padding: 0; max-width: 780px; background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); }
.piste { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px dashed var(--encre-douce); }
.piste:last-child { border-bottom: 0; }
.piste-active { background: var(--sable); }
.piste-active .piste-titre { color: var(--rose); font-weight: 700; }
.piste-jouer { flex: none; width: 38px; height: 38px; padding: 8px; background: var(--rose); border: 2px solid var(--trait); border-radius: 50%; color: var(--carte); cursor: pointer; }
.piste-jouer svg { display: block; fill: currentColor; }
.piste-joue .piste-jouer { background: var(--orange); }
.piste-titre { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.piste-fichier { flex: none; font-size: .88rem; white-space: nowrap; }

.lecteur { position: fixed; inset: auto 0 0; z-index: 25; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #27251f; color: #f3efe0; border-top: 3px solid var(--lavande); }
.lecteur-bouton { flex: none; min-width: 40px; height: 40px; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.05rem; }
.lecteur-bouton:hover { color: #ff6079; }
.lecteur-titre { flex: 1 1 30%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.lecteur-position { flex: 2 1 40%; min-width: 60px; accent-color: #ff6079; }
.lecteur-temps { flex: none; font-size: .88rem; font-variant-numeric: tabular-nums; }

.videos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.video { display: flex; flex-direction: column; height: 100%; background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); color: var(--encre); text-decoration: none; transition: transform .14s ease, box-shadow .14s ease; }
.video:hover { color: var(--rose); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--trait); }
.video img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2px solid var(--trait); background: var(--sable); }
.video-titre { padding: 10px 12px 0; font-family: var(--titres); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.video-taille { margin-top: auto; padding: 4px 12px 10px; color: var(--encre-douce); font-size: .88rem; }

/* Visionneuse */
.visionneuse { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15, 14, 11, .94); color: #f3efe0; overflow: hidden; touch-action: pan-y; }
.visionneuse[open] { display: flex; align-items: center; justify-content: center; }
.visionneuse::backdrop { background: transparent; }
.visionneuse video { max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); }
.visionneuse img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.visionneuse-legende { position: absolute; left: 16px; right: 110px; bottom: 12px; margin: 0; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visionneuse-original { position: absolute; right: 16px; bottom: 12px; color: #ff9ab0; font-size: .95rem; }
.visionneuse-bouton { position: absolute; width: 52px; height: 52px; background: rgba(0, 0, 0, .55); border: 0; border-radius: 50%; color: inherit; font-size: 2rem; line-height: 1; cursor: pointer; }
.visionneuse-bouton:hover { background: #cf1a3c; }
.visionneuse-fermer { top: 12px; right: 12px; }
.visionneuse-avant { left: 12px; top: calc(50% - 26px); }
.visionneuse-apres { right: 12px; top: calc(50% - 26px); }

/* Agenda */
.agenda-liste { min-width: 0; }
.date-carte { background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); padding: 18px 20px; margin-bottom: 24px; }
.date-carte h2, .date-carte h3 { margin-top: .5em; }
.date-choisie { border-color: var(--rose); }
.annee { border-bottom: 2px solid var(--trait); }
.annee summary { display: flex; justify-content: space-between; padding: .45em 0; font-family: var(--titres); font-weight: 700; font-size: 1.2rem; cursor: pointer; }
.annee summary span { color: var(--encre-douce); font-weight: 400; font-size: 1rem; }
.annee .dates { padding-bottom: .7em; }
.calendriers { position: sticky; top: 76px; gap: 18px; }
.calendrier-nav { display: flex; justify-content: space-between; font-weight: 700; }
.calendrier-nav a { text-decoration: none; padding: 0 .4em; }
table.calendrier { width: 100%; table-layout: fixed; background: var(--carte); border: 2px solid var(--trait); font-size: .9rem; text-align: center; }
table.calendrier td { padding: .22em 0; }
table.calendrier tr:first-child td { padding: .35em 0; background: var(--sable); font-family: var(--titres); font-weight: 700; text-transform: capitalize; }
table.calendrier tr:nth-child(2) td { color: var(--encre-douce); font-size: .78rem; }
table.calendrier a { display: block; background: var(--rose); text-decoration: none; }
table.calendrier a span { color: var(--carte) !important; }
table.calendrier b { display: block; background: var(--encre); color: var(--fond); }

/* Pied */
.pied { background: #27251f; color: #efebda; border-top: 3px solid var(--lavande); }
.pied-dedans { max-width: var(--largeur); margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: center; }
.pied-signature { margin: 0; font: 1.35rem var(--feutre); }
.pied-liens { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.pied a { color: #ff9ab0; }
.pied a:hover { color: #f2b36f; }
.haut { position: fixed; right: 18px; bottom: 18px; z-index: 15; width: 46px; height: 46px; display: grid; place-items: center; background: var(--rose); color: var(--carte); border: 2px solid var(--trait); box-shadow: 3px 3px 0 var(--trait); font-size: 1.3rem; text-decoration: none; }
.haut:hover { color: var(--carte); }
.lecteur-ouvert .haut { bottom: 84px; }

@media (max-width: 1040px) {
	.fortune { display: none; }
	.bandeau-haut { justify-content: center; padding: 8px 16px 4px; }
	.nav-burger { display: inline-flex; }
	.nav-dedans { flex-wrap: wrap; padding: 2px 12px; }
	.nav-liste { display: none; order: 3; flex: 0 0 100%; flex-direction: column; padding: 4px 0 10px; }
	.menu-ouvert .nav-liste { display: flex; }
	.nav-liste a { padding: .32em .4em; font-size: 1.5rem; }
	.colonnes, .colonnes-agenda { grid-template-columns: minmax(0, 1fr); }
	.calendriers { position: static; }
	.cote .encart { max-width: 560px; }
}

@media (max-width: 760px) {
	body { font-size: 1rem; }
	.principal { padding: 20px 16px 44px; }
	.une { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-bottom: 36px; }
	.une-flyer { max-width: 300px; margin: 0 auto; width: 100%; }
	.cartes { grid-template-columns: minmax(0, 1fr); }
	.vignettes { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; }
	.dossiers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
	.lecteur { flex-wrap: wrap; }
	.lecteur-titre { flex-basis: calc(100% - 150px); }
	.lecteur-position { flex-basis: calc(100% - 100px); }
	.visionneuse-avant, .visionneuse-apres { top: auto; bottom: 44px; }
	.deroulant { position: static; }
	.deroulant-panneau { left: 16px; right: 16px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
	@view-transition { navigation: none; }
}

/* Blocs Colonnes et alignement (la feuille des blocs de WordPress n'est pas chargée) */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 2em; }
.wp-block-column { flex: 1 1 240px; min-width: 0; }
.has-text-align-right { text-align: right; }
