/* ===================================================================
   Styles Globaux pour le site "Recettes Provençales"
   Palette: Soleil, Mer & Provence
   =================================================================== */

/* --- Variables (Palette) --- */
:root {
  --color-primary: #005a9c; /* Bleu Mer profond */
  --color-accent: #fca311; /* Jaune Soleil / Ochre */
  --color-background: #ffffff; /* Fond blanc pur */
  --color-sidebar-bg: #f9f7f3; /* Fond beige/sable très clair */
  --color-text: #2c3e50; /* Gris ardoise (plus doux que le noir) */
  --color-text-light: #5a6a78;
  --color-main-title: #c94c1e; /* Rouge Terracotta / Terre cuite */
  --color-border: #eae5da; /* Bordure couleur sable */
  --font-heading: "Playfair Display", serif;
  --font-body: "Lato", sans-serif;
}

/* --- Réinitialisation et Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* Pour les ancres internes */
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background-color: var(--color-background);
  color: var(--color-text);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

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

.main-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-primary); /* Bleu par défaut pour les titres */
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
  margin-top: 2rem;
}
h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}
h3.recipe-subtitle {
  /* Spécial pour les sous-titres de l'index */
  font-size: 1.2rem;
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul,
ol {
  margin-left: 20px;
  margin-bottom: 1rem;
}
ul.ingredients-list {
  list-style-type: square;
}

/* ===================================================================
   Structure et Mise en page
   =================================================================== */

/* --- Header --- */
.site-header {
  padding: 2rem 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.logo a {
  text-decoration: none;
}
.logo h1 {
  font-size: 2.8rem; /* Un peu plus grand */
  margin: 0;
  color: var(--color-main-title); /* Couleur Terracotta */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Ombre légère */
}

/* --- Navigation Principale --- */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav li {
  margin: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--color-text-light);
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

/* Gère la page active */
.main-nav a:hover,
.main-nav a.active {
  background-color: var(--color-primary); /* Fond Bleu Mer */
  color: #ffffff;
  text-decoration: none;
}
/* Style spécial pour le lien "index" sur la page d'accueil */
.main-nav a.active span {
  font-weight: 700;
  color: #ffffff;
}

/* --- Grille Principale (Contenu + Sidebar) --- */
.main-content-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 colonne par défaut pour mobile */
  gap: 2rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 2px solid var(--color-border);
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ===================================================================
   Contenu Spécifique
   =================================================================== */

/* --- Page d'accueil / Page de liens --- */
.page-content {
  background: #fdfdfd;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.poeme {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--color-sidebar-bg);
  border-left: 4px solid var(--color-accent); /* Bordure Jaune Soleil */
  margin: 2rem 0;
}

/* --- Sidebar --- */
.sidebar .sidebar-widget {
  background: var(--color-sidebar-bg); /* Fond Sable */
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}
.sidebar-widget h3 {
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary); /* Ligne Bleue */
}
/* --- CSS À METTRE DANS VOTRE FICHIER style.css PRINCIPAL --- */

.video-container {
    width: 100%;
    max-width: 200px; /* Limite la largeur maximale */
    height: 250px;    /* Hauteur fixe pour correspondre au contenu */
    border: none;     /* Pas de bordure sur le conteneur */
    overflow: hidden; /* Cache tout ce qui pourrait dépasser */
    margin: 0 auto 0.5rem auto; /* Centre le conteneur */
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none; /* Important pour ne pas avoir de bordure d'iframe */
}
.sidebar-widget .liens {
  font-weight: 700;
}

/* --- Pages de Recettes --- */
.page-header {
  text-align: center;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 1rem;
}
.page-header h2 {
  margin-top: 0;
}

.recipe-index {
  background: #fdfdfd;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.recipe-index h3 {
  margin-top: 0;
}
.recipe-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
}
.recipe-index li {
  margin-bottom: 0.5rem;
}

.recipe {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.recipe-header {
  background: var(--color-primary); /* Fond Bleu Mer */
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.recipe-header h2 {
  color: #ffffff;
  margin: 0;
  font-size: 1.6rem;
}
.recipe-header .back-to-top {
  color: #ffffff;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 700;
}
.recipe-header .back-to-top:hover {
  text-decoration: underline;
}

.recipe-content {
  padding: 1.5rem 2rem 2rem 2rem;
}
.recipe-content ul {
  list-style-type: square;
}
.recipe-content strong {
  color: var(--color-text);
}
.recipe-author {
  font-style: italic;
  font-weight: 700;
  color: var(--color-text-light);
  margin-top: 1.5rem;
}

/* --- Style pour la page de Liens --- */
.link-list {
  list-style: none;
  margin: 2rem 0 0 0;
  padding: 0;
}
.link-list li {
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.link-list li:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.link-list a {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
}
.link-list a strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}
.link-list a span {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ===================================================================
   Responsive (Mobile, Tablette, Desktop)
   =================================================================== */

/* --- Tablettes (et petits ordinateurs) --- */
@media (min-width: 768px) {
  .main-content-grid {
    grid-template-columns: 2.5fr 1fr;
  }

  .site-header {
    flex-direction: row;
    justify-content: space-between;
  }

  .logo {
    text-align: left;
    margin-bottom: 0;
  }
}

/* --- Petits mobiles --- */
@media (max-width: 480px) {
  .recipe-index ul {
    columns: 1;
    -webkit-columns: 1;
    -moz-columns: 1;
  }
  .recipe-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .recipe-header .back-to-top {
    margin-top: 0.5rem;
  }
}
