/*
Theme Name: Tandem Compagnie
Theme URI: https://tandem-compagnie.fr
Author: Tandem Compagnie
Description: Thème mobile-first pour Tandem Compagnie — théâtre d'improvisation. Design system : ink/paper + accents rose, teal, mint, jaune. Typographie Archivo Black / Karla.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tandem
Tags: one-column, custom-menu, custom-logo, editor-style, translation-ready, blog
*/

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Couleurs — neutres dominants, accents issus de la plaquette et du logo */
  --tc-ink: #16151a;
  --tc-ink-soft: #46434c;
  --tc-paper: #fbf8f5;
  --tc-paper-2: #f4e7e7;   /* blush plaquette */
  --tc-line: #e2dcd6;

  --tc-rose: #e2497b;
  --tc-rose-deep: #b32a58;
  --tc-teal: #0e9c93;
  --tc-teal-deep: #096b65;
  --tc-mint: #99d8d6;
  --tc-yellow: #ebe632;

  /* Typographie */
  --tc-font-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --tc-font-body: "Karla", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --tc-step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --tc-step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --tc-step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --tc-step-2:  clamp(1.5rem, 1.32rem + 0.9vw, 2rem);
  --tc-step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --tc-step-4:  clamp(2.6rem, 1.8rem + 4vw, 5rem);
  --tc-step-5:  clamp(3.2rem, 1.9rem + 6.5vw, 7rem);

  /* Espacements */
  --tc-s1: 0.5rem;
  --tc-s2: 0.75rem;
  --tc-s3: 1rem;
  --tc-s4: 1.5rem;
  --tc-s5: 2rem;
  --tc-s6: 3rem;
  --tc-s7: 4.5rem;
  --tc-s8: 6rem;

  /* Formes */
  --tc-radius: 4px;
  --tc-radius-lg: 18px;
  --tc-border: 2px solid var(--tc-ink);
  --tc-shadow: 6px 6px 0 var(--tc-ink);
  --tc-shadow-sm: 3px 3px 0 var(--tc-ink);

  --tc-wrap: 76rem;
  --tc-wrap-narrow: 44rem;
  --tc-gutter: clamp(1rem, 4vw, 3rem);
}

/* ==========================================================================
   2. RESET / BASE (mobile first)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--tc-paper);
  color: var(--tc-ink);
  font-family: var(--tc-font-body);
  font-size: var(--tc-step-0);
  line-height: 1.6;
  text-wrap: pretty;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--tc-rose-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--tc-ink); }
:focus-visible { outline: 3px solid var(--tc-teal); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--tc-font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 var(--tc-s3);
  text-transform: uppercase;
}
h1 { font-size: var(--tc-step-4); }
h2 { font-size: var(--tc-step-3); }
h3 { font-size: var(--tc-step-2); }
h4 { font-size: var(--tc-step-1); }
p, ul, ol { margin: 0 0 var(--tc-s3); }
ul, ol { padding-left: 1.2em; }
blockquote {
  margin: var(--tc-s4) 0;
  padding: var(--tc-s3) var(--tc-s4);
  border-left: 6px solid var(--tc-mint);
  font-size: var(--tc-step-1);
}
hr { border: 0; border-top: 2px solid var(--tc-line); margin: var(--tc-s6) 0; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--tc-ink); color: var(--tc-paper); padding: var(--tc-s2) var(--tc-s3);
}
.skip-link:focus { left: var(--tc-s3); top: var(--tc-s3); }

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.tc-wrap { width: 100%; max-width: var(--tc-wrap); margin-inline: auto; padding-inline: var(--tc-gutter); }
.tc-wrap--narrow { max-width: var(--tc-wrap-narrow); }
.tc-section { padding-block: var(--tc-s6); }
@media (min-width: 48em) { .tc-section { padding-block: var(--tc-s7); } }
.tc-section--blush { background: var(--tc-paper-2); }
.tc-section--ink { background: var(--tc-ink); color: var(--tc-paper); }
.tc-section--ink a { color: var(--tc-mint); }
.tc-section--mint { background: var(--tc-mint); }
.tc-section--photo {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  position: relative;
}
.tc-section--photo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(22,21,26,.25) 0%, rgba(22,21,26,.6) 100%);
}
.tc-section--photo > * { position: relative; z-index: 1; }
.tc-center { text-align: center; }

.tc-grid { display: grid; gap: var(--tc-s4); }
@media (min-width: 40em) { .tc-grid--2, .tc-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .tc-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.tc-grid--spaced { margin-top: var(--tc-s5); }

.tc-stack > * + * { margin-top: var(--tc-s3); }
.tc-eyebrow {
  font-family: var(--tc-font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--tc-step--1);
  color: var(--tc-teal-deep);
  margin: 0 0 var(--tc-s2);
}
.tc-lead { font-size: var(--tc-step-1); }
.tc-mark { background: var(--tc-yellow); padding: 0 0.15em; }
.tc-eyebrow--mint { color: var(--tc-mint); }
.tc-prose { max-width: 60ch; }
.tc-lead--narrow { max-width: 50ch; }
.tc-note { font-size: var(--tc-step--1); color: var(--tc-ink-soft); }
.tc-figure { margin: var(--tc-s5) 0; }
.tc-figure--bottom { margin-bottom: var(--tc-s5); }
.tc-actions { margin-top: var(--tc-s5); }
.tc-back-link { margin-top: var(--tc-s6); }
.tc-btn-group { margin-top: var(--tc-s6); display: flex; flex-wrap: wrap; gap: var(--tc-s3); }

/* ==========================================================================
   4. HEADER / NAV (mobile first : burger, puis barre horizontale)
   ========================================================================== */
.tc-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--tc-paper);
  border-bottom: var(--tc-border);
}
.tc-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--tc-s3);
  min-height: 64px;
}
.tc-logo { display: flex; align-items: center; gap: var(--tc-s2); text-decoration: none; color: var(--tc-ink); }
.tc-logo img, .tc-logo svg { height: 40px; width: auto; }
.tc-logo__text { font-family: var(--tc-font-display); font-size: var(--tc-step-1); text-transform: uppercase; }

.tc-burger {
  display: inline-flex; align-items: center; gap: var(--tc-s2);
  min-height: 44px; min-width: 44px; padding: 0 var(--tc-s2);
  background: var(--tc-ink); color: var(--tc-paper);
  border: 0; border-radius: var(--tc-radius);
  font-family: var(--tc-font-body); font-weight: 700; font-size: var(--tc-step--1);
  text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
}
.tc-burger__lines { display: grid; gap: 4px; width: 20px; }
.tc-burger__lines span { display: block; height: 2px; background: currentColor; }

.tc-nav { display: none; }
.tc-nav.is-open { display: block; }
.tc-nav ul { list-style: none; margin: 0; padding: 0 0 var(--tc-s4); }
.tc-nav li { border-top: 2px solid var(--tc-line); }
.tc-nav a {
  display: block; padding: var(--tc-s3) 0;
  min-height: 44px;
  font-family: var(--tc-font-display); text-transform: uppercase;
  font-size: var(--tc-step-1); color: var(--tc-ink); text-decoration: none;
}
.tc-nav a:hover, .tc-nav .current-menu-item > a { color: var(--tc-rose); }

@media (min-width: 62em) {
  .tc-burger { display: none; }
  .tc-nav, .tc-nav.is-open { display: block; }
  .tc-nav ul { display: flex; flex-wrap: wrap; gap: var(--tc-s4); padding: 0; }
  .tc-nav li { border: 0; }
  .tc-nav a {
    padding: 0; min-height: 0;
    font-family: var(--tc-font-body); font-weight: 700;
    font-size: var(--tc-step-0); text-transform: uppercase; letter-spacing: 0.06em;
  }
  .tc-nav a::after {
    content: ""; display: block; height: 3px; background: var(--tc-rose);
    transform: scaleX(0); transform-origin: left; transition: transform 0.18s ease;
  }
  .tc-nav a:hover::after, .tc-nav .current-menu-item > a::after { transform: scaleX(1); }
}

/* ==========================================================================
   5. BOUTONS
   ========================================================================== */
.tc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 var(--tc-s4);
  background: var(--tc-rose); color: #fff;
  border: var(--tc-border); border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow-sm);
  font-family: var(--tc-font-body); font-weight: 700; font-size: var(--tc-step-0);
  text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tc-btn:hover, .tc-btn:focus { color: #fff; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--tc-ink); }
.tc-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--tc-ink); }
.tc-btn--teal { background: var(--tc-teal); }
.tc-btn--ghost { background: transparent; color: var(--tc-ink); box-shadow: none; }
.tc-btn--ghost:hover { background: var(--tc-yellow); color: var(--tc-ink); }
.tc-btn--block { width: 100%; }

/* ==========================================================================
   6. CARTES
   ========================================================================== */
.tc-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: var(--tc-border); border-radius: var(--tc-radius-lg);
  padding: var(--tc-s4);
  height: 100%;
}
.tc-card--accent { background: var(--tc-paper-2); }
.tc-card__media { margin: calc(-1 * var(--tc-s4)) calc(-1 * var(--tc-s4)) var(--tc-s3); }
.tc-card__media img { border-radius: 16px 16px 0 0; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.tc-card__meta { font-size: var(--tc-step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--tc-teal-deep); }
.tc-card__title { font-size: var(--tc-step-2); margin-block: var(--tc-s2); }
.tc-card__title a { color: inherit; text-decoration: none; }
.tc-card__title a:hover { color: var(--tc-rose); }
.tc-card p:last-child { margin-bottom: 0; }
.tc-card__foot { margin-top: auto; padding-top: var(--tc-s3); }

.tc-card--illustrated { flex-direction: row; align-items: flex-end; gap: var(--tc-s3); padding-left: var(--tc-s3); overflow: hidden; }
.tc-card__illus { flex-shrink: 0; width: 100px; align-self: stretch; display: flex; align-items: flex-end; }
.tc-card__illus img { width: 100%; height: auto; display: block; }
.tc-card__body { flex: 1; min-width: 0; }
.tc-card--illustrated .tc-card__title { margin-top: 0; }

.tc-card--person { flex-direction: row; align-items: flex-start; gap: var(--tc-s4); }
.tc-card__person-photo { flex-shrink: 0; width: 100px; }
.tc-card__person-photo img {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: var(--tc-border);
}
.tc-card__person-body { flex: 1; min-width: 0; }
.tc-card--person .tc-card__title { margin-top: 0; }

.tc-placeholder {
  aspect-ratio: 16/10;
  background: repeating-linear-gradient(45deg, var(--tc-paper-2) 0 10px, #fff 10px 20px);
  border-bottom: var(--tc-border);
  display: grid; place-items: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: var(--tc-step--1); color: var(--tc-ink-soft);
  border-radius: 16px 16px 0 0;
}

/* ==========================================================================
   7. HERO
   ========================================================================== */
.tc-hero { background: var(--tc-ink); color: var(--tc-paper); padding-block: var(--tc-s6) var(--tc-s7); position: relative; overflow: hidden; }
.tc-hero__title { font-size: var(--tc-step-5); margin-bottom: var(--tc-s4); }
.tc-hero__title em { font-style: normal; color: var(--tc-mint); }
.tc-hero p { max-width: 34ch; font-size: var(--tc-step-1); }
.tc-hero__actions { display: flex; flex-wrap: wrap; gap: var(--tc-s3); margin-top: var(--tc-s4); }
.tc-hero__blob {
  position: absolute; right: -12%; top: -20%;
  width: 60vw; aspect-ratio: 1; border-radius: 50%;
  background: var(--tc-teal); opacity: 0.35; pointer-events: none;
}
.tc-hero--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.tc-hero--photo::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(22,21,26,.1) 0%, rgba(22,21,26,.52) 100%);
  pointer-events: none;
}

/* ==========================================================================
   8. LISTES SPÉCIFIQUES
   ========================================================================== */
.tc-course { border: var(--tc-border); border-radius: var(--tc-radius-lg); padding: var(--tc-s4); background: #fff; }
.tc-course h3 { color: var(--tc-rose-deep); }
.tc-course dl { display: grid; gap: var(--tc-s1); margin: 0; }
.tc-course dt { font-size: var(--tc-step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--tc-ink-soft); }
.tc-course dd { margin: 0 0 var(--tc-s2); }

.tc-dates { display: flex; flex-wrap: wrap; gap: var(--tc-s2); list-style: none; padding: 0; }
.tc-dates li {
  border: var(--tc-border); border-radius: 999px;
  padding: 0.3em 0.9em; background: var(--tc-mint);
  font-weight: 700; font-size: var(--tc-step--1); text-transform: uppercase; letter-spacing: 0.08em;
}
.tc-dates--spaced { margin-top: var(--tc-s3); }
.tc-dates--invert li { background: #fff; }

/* Séances L.E.O.N.I.E. */
.tc-sessions { list-style: none; padding: 0; margin: var(--tc-s5) 0 0; display: grid; gap: var(--tc-s2); }
.tc-session {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center; gap: var(--tc-s4);
  padding: var(--tc-s3) var(--tc-s4);
  background: #fff; border: var(--tc-border); border-radius: var(--tc-radius);
}
@media (max-width: 39.99em) {
  .tc-session { grid-template-columns: 56px 1fr; }
  .tc-session__cta { grid-column: 1 / -1; }
}
.tc-session__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--tc-mint); border-radius: var(--tc-radius);
  padding: var(--tc-s2) var(--tc-s1); text-align: center; line-height: 1.1;
}
.tc-session__day   { font-family: var(--tc-font-display); font-size: var(--tc-step-2); }
.tc-session__month { font-size: var(--tc-step--1); text-transform: uppercase; letter-spacing: .08em; }
.tc-session__title { font-weight: 700; margin: 0 0 var(--tc-s1); }
.tc-session__meta  { font-size: var(--tc-step--1); color: var(--tc-ink-soft); margin: 0; }
.tc-session__cta   { white-space: nowrap; }

.tc-checklist { list-style: none; padding: 0; display: grid; gap: var(--tc-s2); }
.tc-checklist li { display: grid; grid-template-columns: 1.2em 1fr; gap: var(--tc-s2); }
.tc-checklist li::before { content: ""; width: 0.75em; height: 0.75em; margin-top: 0.45em; border-radius: 2px; background: var(--tc-rose); }

.tc-partners { display: grid; gap: var(--tc-s4); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: center; }
.tc-partners figure { margin: 0; border: var(--tc-border); border-radius: var(--tc-radius-lg); background: #fff; padding: var(--tc-s4); text-align: center; }
.tc-partners figcaption { font-weight: 700; margin-top: var(--tc-s2); }
.tc-partners--spaced { margin-top: var(--tc-s5); }

/* ==========================================================================
   9. CONTENU ÉDITORIAL / FORMULAIRES
   ========================================================================== */
.tc-entry > * { margin-bottom: var(--tc-s3); }
.tc-entry h2 { margin-top: var(--tc-s5); }
.tc-entry figure { margin: var(--tc-s4) 0; }
.tc-entry img { border-radius: var(--tc-radius-lg); border: var(--tc-border); }
.alignleft, .alignright, .aligncenter { margin: var(--tc-s3) auto; }
@media (min-width: 48em) {
  .alignleft { float: left; margin: 0 var(--tc-s4) var(--tc-s3) 0; }
  .alignright { float: right; margin: 0 0 var(--tc-s3) var(--tc-s4); }
}
.wp-caption-text, figcaption { font-size: var(--tc-step--1); color: var(--tc-ink-soft); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], textarea, select {
  width: 100%; min-height: 48px; padding: var(--tc-s2) var(--tc-s3);
  font-family: inherit; font-size: var(--tc-step-0);
  background: #fff; color: var(--tc-ink);
  border: var(--tc-border); border-radius: var(--tc-radius);
}
textarea { min-height: 160px; }
label { display: block; font-weight: 700; margin-bottom: var(--tc-s1); }
input[type="submit"], button[type="submit"] {
  min-height: 48px; padding: 0 var(--tc-s4);
  background: var(--tc-ink); color: var(--tc-paper);
  border: var(--tc-border); border-radius: var(--tc-radius);
  font-family: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer;
}

/* Bloc Pourquoi Tandem — split image/texte */
.tc-why { display: flex; flex-direction: column; gap: var(--tc-s5); }
.tc-why__image { display: none; }
.tc-why__content { max-width: var(--tc-wrap-narrow); }
@media (min-width: 48em) {
  .tc-why--has-image { flex-direction: row; align-items: stretch; gap: var(--tc-s6); }
  .tc-why--has-image .tc-why__content { max-width: none; flex: 1; }
  .tc-why__image {
    display: block; flex: 0 0 38%;
    border-radius: var(--tc-radius-lg); overflow: hidden;
  }
  .tc-why__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
}

/* Formulaire de contact */
.tc-form { display: grid; gap: var(--tc-s4); margin-top: var(--tc-s5); }
.tc-field { display: grid; gap: var(--tc-s1); }
.tc-field-row { display: grid; gap: var(--tc-s4); }
@media (min-width: 40em) { .tc-field-row { grid-template-columns: 1fr 1fr; } }
.tc-form__hp { display: none !important; }

.tc-form-notice {
  padding: var(--tc-s3) var(--tc-s4);
  border: var(--tc-border); border-radius: var(--tc-radius);
  margin-bottom: var(--tc-s4);
}
.tc-form-notice--ok    { background: var(--tc-mint); }
.tc-form-notice--error { background: var(--tc-paper-2); border-color: var(--tc-rose); }
.tc-form-notice strong { display: block; margin-bottom: var(--tc-s1); }

/* Pagination */
.tc-pagination { display: flex; flex-wrap: wrap; gap: var(--tc-s2); margin-top: var(--tc-s5); }
.tc-pagination .page-numbers {
  display: grid; place-items: center; min-width: 44px; min-height: 44px;
  border: var(--tc-border); border-radius: var(--tc-radius);
  text-decoration: none; font-weight: 700; color: var(--tc-ink); background: #fff;
}
.tc-pagination .current { background: var(--tc-ink); color: var(--tc-paper); }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.tc-footer { background: var(--tc-ink); color: var(--tc-paper); padding-block: var(--tc-s6); margin-top: var(--tc-s7); }
.tc-footer a { color: var(--tc-mint); }
.tc-footer__grid { display: grid; gap: var(--tc-s5); }
@media (min-width: 48em) { .tc-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.tc-footer h2 { font-size: var(--tc-step-2); }
.tc-footer ul { list-style: none; padding: 0; display: grid; gap: var(--tc-s2); }
.tc-footer__contact { font-family: var(--tc-font-display); font-size: var(--tc-step-2); text-transform: none; margin: 0; }
.tc-footer__legal { margin-top: var(--tc-s5); padding-top: var(--tc-s3); border-top: 2px solid rgba(251,248,245,0.25); font-size: var(--tc-step--1); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
