/*
 Theme Name:   Gastronomaniak
 Theme URI:    https://gastronomaniak.app
 Description:  Thème autonome pour Gastronomaniak — extension culinaire avec graphe de contenu et crédits MyCred.
 Author:       Steyer110
 Version:      1.0.0
 Text Domain:  gastronomaniak
*/

/* =========================================================
   1. VARIABLES — palette définitive
   ========================================================= */
/* ── Police globale Verdana (sans écraser icônes) ── */
body, p, li, td, th, label, input, textarea, select,
.gastro-nav__link, .gastro-megamenu__link,
.gastro-card__title, .gastro-card__meta, .gastro-card__info,
.gastro-hero__tagline, .gastro-stat__label {
  font-family: Verdana, Geneva, sans-serif;
}


:root {
  --g-primary:      #C4562A;   /* terracotta */
  --g-primary-rgb:  196,86,42;
  --g-accent:       #D4860A;   /* safran */
  --g-accent-rgb:   212,134,10;
  --g-secondary:    #F0EBE0;   /* lin chaud */
  --g-bg:           #FAF6F0;   /* crème ivoire */
  --g-card:         #FFFFFF;
  --g-text:         #2C1F13;   /* cacao */
  --g-muted:        #6B5B4E;   /* ardoise */
  --g-border:       rgba(196,86,42,0.12);
  --g-border-light: rgba(196,86,42,0.06);

  --g-font-serif:   'Playfair Display', Georgia, serif;
  --g-font-sans:    Verdana, Geneva, sans-serif;

  --g-radius-sm:    4px;
  --g-radius-md:    8px;
  --g-radius-lg:    12px;

  --g-shadow:       0 1px 3px rgba(44,31,19,0.08);
  --g-shadow-md:    0 4px 16px rgba(44,31,19,0.10);
}

/* =========================================================
   2. BASE & RESET
   ========================================================= */

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

body {
  background: var(--g-bg);
  color: var(--g-text);
  font-family: var(--g-font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--g-font-serif);
  font-weight: 700;
  color: var(--g-text);
  line-height: 1.25;
}

a { color: var(--g-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* =========================================================
   3. NAVIGATION
   ========================================================= */

/* === NAV PRINCIPALE === */
.gastro-nav {
  background: var(--g-text);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 1rem;
}

.gastro-nav__logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.gastro-nav__logo-img { height: 52px; width: auto; display: block; }

.gastro-nav__links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex: 1;
}

.gastro-nav__item { position: relative; }

.gastro-nav__link {
  display: flex;
  align-items: center;
  gap: .25rem;
  color: rgba(250,246,240,0.75);
  font-size: .875rem;
  letter-spacing: .02em;
  padding: 0 1rem;
  height: 70px;
  transition: color .15s, background .15s;
  text-decoration: none;
  white-space: nowrap;
}

.gastro-nav__link:hover,
.gastro-nav__item.is-open .gastro-nav__link { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }

.gastro-nav__arrow { font-size: .6rem; opacity: .5; transition: transform .2s; }
.gastro-nav__item.is-open .gastro-nav__arrow { transform: rotate(180deg); }

.gastro-nav__right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

.gastro-nav__credits {
  background: var(--g-accent);
  color: var(--g-text);
  font-size: .8125rem;
  font-weight: 600;
  padding: .375rem .875rem;
  border-radius: var(--g-radius-sm);
  white-space: nowrap;
}

/* === MEGA-MENU === */
.gastro-megamenu {
  position: absolute;
  top: 70px;
  left: 0;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  padding: 1.5rem;
  display: none;
  gap: 2rem;
  z-index: 300;
  min-width: 480px;
}

.gastro-nav__item--mega.is-open .gastro-megamenu { display: flex; }

.gastro-megamenu__col { min-width: 140px; }

.gastro-megamenu__title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--g-primary);
  margin: 0 0 .625rem;
  padding-bottom: .4rem;
  border-bottom: 1.5px solid rgba(196,86,42,.15);
}

.gastro-megamenu__link {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .8125rem;
  color: var(--g-text);
  padding: .225rem 0;
  text-decoration: none;
  transition: color .1s;
}

.gastro-megamenu__link:hover { color: var(--g-primary); text-decoration: none; }

.gastro-megamenu__link--more {
  color: var(--g-primary);
  font-weight: 600;
  margin-top: .25rem;
}

.gastro-megamenu__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g-accent);
  flex-shrink: 0;
}

.gastro-megamenu__cta {
  margin-top: 1rem;
  padding: .875rem 1rem;
  background: var(--g-secondary);
  border-radius: 8px;
}

.gastro-megamenu__cta-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--g-primary);
  margin-bottom: .25rem;
}

.gastro-megamenu__cta-sub { font-size: .75rem; color: var(--g-muted); }

/* === HAMBURGER === */
.gastro-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .375rem;
}

.gastro-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: all .25s;
}

.gastro-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gastro-hamburger.is-active span:nth-child(2) { opacity: 0; }
.gastro-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === MENU MOBILE === */
.gastro-mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--g-text);
  z-index: 150;
  overflow-y: auto;
}

.gastro-mobile-menu.is-open { display: block; }
.gastro-mobile-menu__inner { padding: 1rem 0; }

.gastro-mobile-item { border-bottom: 1px solid rgba(255,255,255,.08); }

.gastro-mobile-item__toggle {
  padding: .875rem 1.5rem;
  color: rgba(255,255,255,.85);
  font-size: .9375rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.gastro-mobile-item__sub { display: none; background: rgba(0,0,0,.25); }
.gastro-mobile-item__sub.is-open { display: block; }
.gastro-mobile-item__sub a {
  display: block;
  padding: .5rem 2rem;
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  text-decoration: none;
}
.gastro-mobile-item__sub a:hover { color: #fff; }

body.menu-open { overflow: hidden; }

/* =========================================================
   4. LAYOUT CONTENEUR
   ========================================================= */

.gastro-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gastro-wrap--narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================================================
   5. SECTION HEADER (hero fiche)
   ========================================================= */

.gastro-hero {
  background: var(--g-primary);
  padding: 2.5rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.gastro-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--g-accent);
}

.gastro-hero__breadcrumb {
  font-size: .75rem;
  color: rgba(250,246,240,0.65);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.gastro-hero__breadcrumb a { color: rgba(250,246,240,0.65); }
.gastro-hero__breadcrumb a:hover { color: var(--g-secondary); text-decoration: none; }
.gastro-hero__breadcrumb span { margin: 0 .375rem; }

.gastro-hero__title {
  font-family: var(--g-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #FFFFFF;
  margin: 0 0 .5rem;
}

.gastro-hero__tagline {
  font-size: 1rem;
  color: rgba(250,246,240,0.82);
  font-style: italic;
  margin: 0 0 1.25rem;
}

.gastro-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.gastro-hero__tag {
  font-size: .75rem;
  padding: .25rem .75rem;
  border-radius: 20px;
  background: rgba(250,246,240,0.15);
  color: rgba(250,246,240,0.9);
  border: 1px solid rgba(250,246,240,0.2);
}

.gastro-hero__tag--accent {
  background: var(--g-accent);
  color: var(--g-text);
  border-color: var(--g-accent);
  font-weight: 600;
}

/* =========================================================
   6. STATS BAR (temps, pers., crédits)
   ========================================================= */

.gastro-stats {
  background: var(--g-card);
  border-bottom: 1px solid var(--g-border);
  display: flex;
}

.gastro-stat {
  flex: 1;
  text-align: center;
  padding: 1rem .5rem;
  border-right: 1px solid var(--g-border);
}

.gastro-stat:last-child { border-right: none; }

.gastro-stat__value {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--g-text);
  font-family: var(--g-font-serif);
  line-height: 1;
  margin-bottom: .25rem;
}

.gastro-stat__value--accent { color: var(--g-accent); }

.gastro-stat__label {
  display: block;
  font-size: .6875rem;
  color: var(--g-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* =========================================================
   7. CONTENU FICHE
   ========================================================= */

.gastro-fiche {
  background: var(--g-card);
  border: 1px solid var(--g-border-light);
  border-radius: var(--g-radius-lg);
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: var(--g-shadow);
}

.gastro-fiche__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none;
  display: block;
}

.gastro-fiche__body { padding: 2rem; }

.gastro-fiche__section-title {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--g-muted);
  margin: 0 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--g-secondary);
  display: inline-block;
}

.gastro-fiche__desc {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--g-text);
  margin: 0 0 2rem;
}

/* Liste ingrédients */
.gastro-ingredients-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .375rem;
}

.gastro-ingredients-list li {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .5rem .75rem;
  background: var(--g-bg);
  border-radius: var(--g-radius-sm);
  font-size: .9375rem;
}

.gastro-ingredients-list li strong {
  color: var(--g-text);
  font-weight: 600;
  white-space: nowrap;
}

.gastro-ingredients-list li span {
  color: var(--g-muted);
  font-size: .875rem;
}

/* Méthode */
.gastro-methode {
  margin: 0 0 2rem;
}

.gastro-methode p,
.gastro-methode li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--g-text);
}

.gastro-methode ol {
  padding-left: 1.25rem;
}

.gastro-methode ol li {
  margin-bottom: .75rem;
  padding-left: .5rem;
}

/* Note du chef */
.gastro-note-chef {
  background: var(--g-secondary);
  border-left: 3px solid var(--g-accent);
  border-radius: 0 var(--g-radius-md) var(--g-radius-md) 0;
  padding: 1.125rem 1.25rem;
  margin: 0 0 2rem;
}

.gastro-note-chef__label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--g-accent);
  margin-bottom: .375rem;
}

.gastro-note-chef p {
  margin: 0;
  font-size: .9375rem;
  color: var(--g-text);
  line-height: 1.65;
}

/* =========================================================
   8. INGRÉDIENTS VEDETTES (tags avec lien)
   ========================================================= */

.gastro-vedettes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2rem;
}

.gastro-vedette-tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .375rem .875rem;
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
  border: 1px solid;
}

.gastro-vedette-tag--linked {
  background: rgba(196,86,42,0.08);
  color: var(--g-primary);
  border-color: rgba(196,86,42,0.25);
}

.gastro-vedette-tag--linked:hover {
  background: var(--g-primary);
  color: #FFFFFF;
  text-decoration: none;
}

.gastro-vedette-tag--plain {
  background: var(--g-secondary);
  color: var(--g-muted);
  border-color: var(--g-border);
}

/* =========================================================
   9. BLOC MÉCRÉDIT (accès payant)
   ========================================================= */

.gastro-paywall {
  background: var(--g-bg);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.gastro-paywall__icon {
  font-size: 2rem;
  margin-bottom: .75rem;
  opacity: .4;
}

.gastro-paywall__title {
  font-family: var(--g-font-serif);
  font-size: 1.25rem;
  color: var(--g-text);
  margin: 0 0 .5rem;
}

.gastro-paywall__desc {
  font-size: .9375rem;
  color: var(--g-muted);
  margin: 0 0 1.5rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.gastro-paywall__solde {
  font-size: .875rem;
  color: var(--g-muted);
  margin-bottom: 1rem;
}

.gastro-paywall__solde strong { color: var(--g-text); }

.gastro-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--g-radius-md);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}

.gastro-btn--primary {
  background: var(--g-primary);
  color: #FFFFFF;
}

.gastro-btn--primary:hover {
  background: #a8441e;
  color: #FFFFFF;
  text-decoration: none;
}

.gastro-btn--accent {
  background: var(--g-accent);
  color: var(--g-text);
}

.gastro-btn--accent:hover {
  background: #b8720a;
  color: var(--g-text);
  text-decoration: none;
}

.gastro-btn--outline {
  background: transparent;
  color: var(--g-primary);
  border: 1.5px solid var(--g-primary);
}

.gastro-btn--outline:hover {
  background: var(--g-primary);
  color: #FFFFFF;
  text-decoration: none;
}

/* =========================================================
   10. GRILLE DE CARTES (archives, liées)
   ========================================================= */

.gastro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.gastro-card {
  background: var(--g-card);
  border-radius: var(--g-radius-lg);
  overflow: hidden;
  border: 1px solid var(--g-border-light);
  box-shadow: var(--g-shadow);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.gastro-card:hover {
  box-shadow: var(--g-shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.gastro-card--vedette {
  border: 2px solid var(--g-primary);
}

/* Format portrait — ratio 3:4 */
.gastro-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--g-secondary);
  height: auto;
}

.gastro-card__img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--g-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g-muted);
  font-size: .875rem;
  height: auto;
}

.gastro-card__badge {
  display: inline-block;
  padding: .25rem .625rem;
  border-radius: 20px;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}

.gastro-card__badge--vedette {
  background: var(--g-primary);
  color: #FFFFFF;
}

.gastro-card__body { padding: 1rem 1.125rem; flex: 1; display: flex; flex-direction: column; }

.gastro-card__meta {
  font-size: .6875rem;
  color: var(--g-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .375rem;
}

.gastro-card__title {
  font-family: var(--g-font-serif);
  font-size: 1.0625rem;
  color: var(--g-text);
  margin: 0 0 .75rem;
  line-height: 1.3;
  flex: 1;
}

.gastro-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .75rem;
  border-top: 1px solid var(--g-border-light);
  margin-top: auto;
}

.gastro-card__info {
  font-size: .8125rem;
  color: var(--g-muted);
}

.gastro-card__credits {
  background: var(--g-accent);
  color: var(--g-text);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .625rem;
  border-radius: var(--g-radius-sm);
}

.gastro-card__credits--free {
  background: rgba(196,86,42,0.1);
  color: var(--g-primary);
}

/* =========================================================
   11. GRAPHE DE NAVIGATION (ingrédient → recettes → astuces)
   ========================================================= */

.gastro-graph {
  background: var(--g-secondary);
  border-radius: var(--g-radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

.gastro-graph__title {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--g-muted);
  margin: 0 0 1rem;
}

.gastro-graph__row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.gastro-graph__row:last-child { margin-bottom: 0; }

.gastro-graph__label {
  font-size: .75rem;
  color: var(--g-muted);
  width: 100%;
  margin-bottom: .25rem;
}

.gastro-graph__link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .375rem .75rem;
  border-radius: 20px;
  font-size: .8125rem;
  background: var(--g-card);
  color: var(--g-text);
  border: 1px solid var(--g-border);
  text-decoration: none;
  transition: all .15s;
}

.gastro-graph__link:hover {
  background: var(--g-primary);
  color: #FFFFFF;
  border-color: var(--g-primary);
  text-decoration: none;
}

.gastro-graph__arrow {
  color: var(--g-muted);
  font-size: .75rem;
  padding: 0 .25rem;
}

/* =========================================================
   12. SAISONS
   ========================================================= */

.gastro-saisons {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}

.gastro-saison {
  padding: .375rem .875rem;
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 500;
}

.gastro-saison--actif {
  background: var(--g-primary);
  color: #FFFFFF;
}

.gastro-saison--inactif {
  background: var(--g-secondary);
  color: var(--g-muted);
}

/* =========================================================
   13. SECTION TITRE (séparateur éditorial)
   ========================================================= */

.gastro-section-header {
  text-align: center;
  margin: 3rem 0 2rem;
}

.gastro-section-header__eyebrow {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--g-muted);
  margin-bottom: .5rem;
}

.gastro-section-header__title {
  font-family: var(--g-font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--g-text);
  margin: 0 0 .75rem;
}

.gastro-section-header__line {
  width: 40px;
  height: 2px;
  background: var(--g-accent);
  margin: 0 auto;
}

/* =========================================================
   14. CRÉATEUR / CHEF
   ========================================================= */

.gastro-createur {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--g-bg);
  border-radius: var(--g-radius-md);
  border: 1px solid var(--g-border-light);
  margin: 2rem 0;
}

.gastro-createur__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--g-secondary);
  object-fit: cover;
  flex-shrink: 0;
}

.gastro-createur__name {
  font-weight: 600;
  font-size: .9375rem;
  color: var(--g-text);
  margin: 0 0 .125rem;
}

.gastro-createur__bio {
  font-size: .8125rem;
  color: var(--g-muted);
  margin: 0;
}

.gastro-createur__link {
  font-size: .8125rem;
  color: var(--g-primary);
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================================
   15. RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .gastro-nav { padding: 0 1rem; }
  .gastro-nav__links { display: none; }
  .gastro-hamburger { display: flex; }
  .gastro-hero { padding: 1.5rem 1rem 1.25rem; }
  .gastro-fiche__body { padding: 1.25rem; }
  .gastro-stats { overflow-x: auto; }
  .gastro-stat { min-width: 80px; }
  .gastro-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

@media (max-width: 480px) {
  .gastro-grid { grid-template-columns: 1fr; }
  .gastro-hero__title { font-size: 1.5rem; }
}

/* =========================================================
   16. UTILITAIRES
   ========================================================= */

.gastro-divider {
  border: none;
  border-top: 1px solid var(--g-border-light);
  margin: 2rem 0;
}

.gastro-acces-ok {
  color: #2E7D32;
  font-size: .875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}

.gastro-skeleton {
  background: linear-gradient(90deg, var(--g-secondary) 25%, var(--g-bg) 50%, var(--g-secondary) 75%);
  background-size: 200% 100%;
  animation: gastro-shimmer 1.4s infinite;
  border-radius: var(--g-radius-sm);
}

@keyframes gastro-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
