/*
Theme Name:  Recettes Ehtymag
Theme URI:   https://recettes-ehtymag.com
Author:      Maison Ehtym
Author URI:  https://ehtymag.com
Description: Thème custom pour Recettes-Ehtymag — L'autel des saveurs du monde
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: recettes-ehtymag
Tags:        food, recipes, custom-theme, responsive
*/

/* ============================================================
   VARIABLES CSS GLOBALES
   ============================================================ */
:root {
  /* Palette de couleurs */
  --color-cacao:       #3B2010;
  --color-saffron:     #E8821A;
  --color-paprika:     #C63B1E;
  --color-turmeric:    #F2B724;
  --color-baobab:      #2D5A3D;
  --color-terracotta:  #C4622D;
  --color-sand:        #F5E8CC;
  --color-cream:       #FEFAF4;
  --color-dark-footer: #2A1808;

  /* Typographie */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Espacements */
  --spacing-xs:  8px;
  --spacing-sm:  16px;
  --spacing-md:  24px;
  --spacing-lg:  36px;
  --spacing-xl:  52px;

  /* Conteneur */
  --container-max: 1200px;
  --container-pad: 28px;

  /* Rayons */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-pill: 100px;

  /* Bordures */
  --border-light: 0.5px solid rgba(0, 0, 0, 0.07);
  --border-medium: 1px solid rgba(0, 0, 0, 0.12);

  /* Breakpoints (référence commentée) */
  /* --bp-desktop:  1024px  */
  /* --bp-tablet:   768px   */
  /* --bp-mobile:   480px   */
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-cacao);
  background-color: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-saffron);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
}

/* ============================================================
   TYPOGRAPHIE GLOBALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-cacao);
}

h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
h4 { font-size: clamp(16px, 2vw, 20px); }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
  line-height: 1.75;
  margin-bottom: var(--spacing-sm);
}

p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   CONTENEUR
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

.color-saffron    { color: var(--color-saffron); }
.color-paprika    { color: var(--color-paprika); }
.color-baobab     { color: var(--color-baobab); }
.color-terracotta { color: var(--color-terracotta); }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: opacity 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn:hover  { opacity: 0.88; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-saffron);
  color: #fff;
}

.btn-dark {
  background: var(--color-cacao);
  color: var(--color-cream);
}

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

.btn-ghost {
  background: var(--color-sand);
  color: var(--color-cacao);
}

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-recettes    { background: #FEF0DC; color: #A85A00; }
.badge-saveurs     { background: #F0E8FF; color: #5B3B8C; }
.badge-bien-manger { background: #E0F2E9; color: #1B5E35; }
.badge-maison      { background: #F3ECE4; color: #7A3B1E; }
.badge-divers      { background: #F0EFF5; color: #555; }
.badge-saffron     { background: var(--color-saffron); color: #fff; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--color-cacao);
}

.section-title em {
  font-style: italic;
  color: var(--color-saffron);
}

.section-link {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-saffron);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.section-link:hover {
  opacity: 0.75;
  color: var(--color-saffron);
}

/* ============================================================
   CARTES ARTICLES
   ============================================================ */
.card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  border: var(--border-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 32, 16, 0.08);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card-thumb-placeholder {
  width: 100%;
  background: var(--color-sand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(59, 32, 16, 0.2);
  font-size: 48px;
}

.card-body {
  padding: 12px 14px 16px;
}

.card-cat {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-cacao);
  line-height: 1.35;
  margin-bottom: 8px;
  display: block;
}

.card-title:hover {
  color: var(--color-saffron);
}

.card-meta {
  font-size: 11px;
  color: #aaa;
  font-weight: 300;
}

/* ============================================================
   RESPONSIVE GLOBAL
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --container-pad: 20px;
    --spacing-xl: 40px;
    --spacing-lg: 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-pad: 16px;
    --spacing-xl: 32px;
    --spacing-lg: 24px;
    --spacing-md: 20px;
  }
}

@media (max-width: 480px) {
  :root {
    --container-pad: 14px;
    --spacing-xl: 28px;
    --spacing-lg: 20px;
    --spacing-md: 16px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 12px;
  }
}
