/* ===== FREDYFREDO.CH - ACCUEIL V10 ===== */
.ff-home-v8 {
  --c-bg: #fffbf5;        
  --c-card: #ffffff;      
  --c-text: #5f594a;      
  --c-title: #2f3b20;     
  --c-accent: #6da13f;    
  --c-border: #eee5d5;
  --radius: 24px;
  color: var(--c-text);
  line-height: 1.6;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* -- THEME SOMBRE -- */
.ff-home-v8.dark-theme {
  --c-bg: #1c1f1a;
  --c-card: #141712;
  --c-text: #c5cdbe;
  --c-title: #f4f7f5;
  --c-accent: #6da13f;
  --c-border: #333930;
}
.ff-home-v8.dark-theme .ff-promo-box { background: #2a2318; border-color: #d35400; }
.ff-home-v8.dark-theme .ff-social-btn { background: #2a3324 !important; color: #f4f7f5 !important; border: 1px solid var(--c-border); }
.ff-home-v8.dark-theme .ff-newsletter-box { border: 1px solid var(--c-border); }

.ff-home-v8 * { box-sizing: border-box; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.ff-fade-in { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* --- HERO --- */
.ff-hero-v8 {
  display: flex !important; align-items: center; gap: 50px; margin-bottom: 60px;
  background: var(--c-card) !important; padding: 40px !important; border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid var(--c-border) !important;
  position: relative; overflow: hidden; transition: background-color 0.4s, border-color 0.4s;
}
.ff-hero-img { position: relative; z-index: 2; flex-shrink: 0; }
.ff-hero-img::before {
  content: ""; position: absolute; top: -15px; left: -15px; right: -15px; bottom: -15px;
  background: rgba(109, 161, 63, 0.15); z-index: -1;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: ff-morph 8s ease-in-out infinite alternate;
  transition: background-color 0.4s;
}
@keyframes ff-morph { 0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; } 100% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; transform: rotate(5deg); } }
.ff-hero-img img { width: 250px; height: 250px; object-fit: cover; border-radius: 50%; border: 6px solid var(--c-card); box-shadow: 0 8px 20px rgba(0,0,0,0.1); transition: transform 0.4s ease, border-color 0.4s; position: relative; z-index: 2; }
.ff-hero-img img:hover { transform: scale(1.03) rotate(2deg); }

.ff-hero-txt { z-index: 2; position: relative; }
.ff-hero-txt h1 { font-size: clamp(2rem, 4vw, 3rem) !important; color: var(--c-title) !important; margin: 0 0 15px !important; font-weight: 800; transition: color 0.4s; }
.ff-hero-txt p { font-size: 1.1rem; margin-bottom: 25px; color: var(--c-text); opacity: 0.8; transition: color 0.4s; }

.ff-search-wrapper { display: flex; flex-direction: column; gap: 12px; max-width: 450px; }
.ff-hero-search { display: flex; gap: 10px; width: 100%; align-items: stretch; }
.ff-search-input {
  flex: 1; padding: 14px 20px !important; border-radius: 50px !important; border: 2px solid var(--c-border) !important;
  font-family: inherit !important; font-size: 1rem !important; transition: 0.3s;
  background: var(--c-bg) !important; color: var(--c-title) !important;
  -webkit-appearance: searchfield;
}
.ff-search-input:focus { border-color: var(--c-accent) !important; outline: none !important; box-shadow: 0 0 0 3px rgba(109, 161, 63, 0.1) !important; }
.ff-search-btn { background: var(--c-accent) !important; color: white !important; border: none !important; padding: 0 25px !important; border-radius: 50px !important; font-weight: bold !important; cursor: pointer; transition: 0.2s; font-size: 1.1rem !important; }
.ff-search-btn:hover { background: #3f752d !important; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(109, 161, 63, 0.3) !important; }

.ff-dark-toggle-home { 
  background: var(--c-bg) !important; color: var(--c-title) !important; border: 2px solid var(--c-border) !important; 
  border-radius: 50% !important; padding: 0 !important; width: 50px !important; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: 0.2s; 
}
.ff-dark-toggle-home:hover { border-color: var(--c-accent) !important; transform: translateY(-2px); }

.ff-hero-alt-link { font-size: 0.95rem; color: var(--c-accent) !important; font-weight: bold !important; display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; }
.ff-hero-alt-link:hover { color: var(--c-title) !important; text-decoration: underline !important; }

/* --- NAV --- */
/* (Flexbox properly targets the new <li> elements created for semantic accuracy!) */
.ff-nav-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 60px; }
.ff-nav-grid li { display: flex; flex: 1 1 280px; max-width: 400px; }
.ff-nav-card { width: 100%; background: var(--c-card) !important; padding: 25px !important; border-radius: 20px !important; border: 1px solid var(--c-border) !important; transition: 0.3s; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; color: inherit; }
.ff-nav-card:hover { transform: translateY(-5px); border-color: var(--c-accent) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.ff-nav-icon { font-size: 2.5rem; margin-bottom: 10px; }
.ff-nav-card h2 { font-size: 1.5rem !important; margin: 0 0 10px !important; color: var(--c-title) !important; font-weight: bold; border: none !important; transition: color 0.4s; }
.ff-nav-link { color: var(--c-accent) !important; font-weight: bold !important; margin-top: auto; }
.ff-badge { position: absolute; top: 15px; right: 15px; background: #e67e22; color: white !important; font-size: 0.7rem; font-weight: bold; padding: 3px 8px; border-radius: 10px; text-transform: uppercase; }

/* --- RECETTE UNE --- */
.ff-featured-section { margin-bottom: 60px; }
.ff-featured-card { display: flex; background: var(--c-card) !important; border-radius: var(--radius); border: 1px solid var(--c-accent) !important; overflow: hidden; color: inherit; transition: transform 0.3s, box-shadow 0.3s, background-color 0.4s; box-shadow: 0 10px 20px rgba(109, 161, 63, 0.1); position: relative; }
.ff-featured-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(109, 161, 63, 0.2); }
.ff-featured-img { width: 45%; object-fit: cover; }
.ff-featured-content { padding: 35px; display: flex; flex-direction: column; justify-content: center; width: 55%; }
.ff-ribbon-3d { position: absolute; top: 30px; left: -40px; background: #e67e22; color: #fff; padding: 8px 45px; font-weight: 900; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4); transform: rotate(-45deg); z-index: 10; text-align: center; width: 250px; }
.ff-featured-content h2 { font-size: 1.8rem !important; color: var(--c-title) !important; margin: 0 0 15px !important; line-height: 1.2 !important; border:none !important; transition: color 0.4s; }
.ff-featured-content p { color: var(--c-text); opacity: 0.8; margin-bottom: 20px; font-size: 1.05rem; }
.ff-featured-btn { background: var(--c-accent); color: white !important; padding: 10px 20px; border-radius: 50px; font-weight: bold; width: fit-content; transition: 0.2s; }
.ff-featured-btn:hover { background: #3f752d; }

/* --- FAVORIS --- */
.ff-fav-section { margin-bottom: 60px; }
.ff-section-title { text-align: center; font-size: 2rem !important; color: var(--c-title) !important; margin-bottom: 30px !important; position: relative; border: none !important; font-weight: bold; transition: color 0.4s; }
.ff-section-title::after { content: ""; display: block; width: 60px; height: 3px; background: var(--c-accent); margin: 10px auto 0; border-radius: 2px; }
.ff-fav-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; }
.ff-fav-card { background: var(--c-card) !important; border: 1px solid var(--c-border) !important; border-radius: 20px !important; padding: 30px !important; position: relative; overflow: hidden; flex: 1 1 320px; display: flex; flex-direction: column; transition: background-color 0.4s, border-color 0.4s; }
.ff-fav-card.ugly { border-left: 5px solid #e67e22 !important; }
.ff-fav-card.spices { border-left: 5px solid #c0392b !important; }
.ff-fav-head { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.ff-fav-icon { font-size: 2rem; }
.ff-fav-title { font-size: 1.3rem !important; margin: 0 !important; color: var(--c-title) !important; border: none !important; font-weight:bold; transition: color 0.4s; }
.ff-fav-card p { margin-bottom: 20px; } 
.ff-promo-box { background: #fff8e1; border: 2px dashed #e67e22; border-radius: 12px; padding: 15px; text-align: center; margin-top: auto; margin-bottom: 15px; transition: background-color 0.4s, border-color 0.4s; }
.ff-promo-code { font-family: monospace !important; font-size: 1.5rem !important; font-weight: bold !important; letter-spacing: 2px; color: #d35400 !important; display: block; margin: 5px 0; }
.ff-btn-copy { background: #e67e22 !important; color: white !important; border: none !important; padding: 8px 16px !important; border-radius: 5px !important; cursor: pointer; font-weight: bold; font-size: 0.9rem; transition: 0.2s; }
.ff-btn-copy:hover { background: #d35400 !important; }
.ff-ugly-link, .ff-spice-link { margin-top: auto; text-align: center; }
.ff-ugly-link { display: block; background: #27ae60 !important; color: white !important; padding: 10px 20px !important; border-radius: 50px !important; font-weight: bold !important; transition: 0.2s; width: 100%; }
.ff-ugly-link:hover { background: #219150 !important; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3); }
.ff-spice-link { display: block; color: #c0392b !important; font-weight: bold !important; padding: 10px !important; transition:0.2s; }
.ff-spice-link:hover { text-decoration: underline !important; background: rgba(192, 57, 43, 0.1) !important; border-radius: 8px !important; }

/* --- FOOTER --- */
.ff-newsletter-box { background: var(--c-title) !important; color: white !important; border-radius: 24px !important; padding: 40px !important; text-align: center; position: relative; overflow: hidden; transition: background-color 0.4s, border-color 0.4s; }
.ff-newsletter-box h2 { font-size: 1.8rem !important; margin: 0 0 10px !important; color: #eaf4e1 !important; border: none !important; font-weight: bold; }
.ff-social-links { display: flex; justify-content: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
.ff-social-btn { display: flex; align-items: center; gap: 8px; padding: 10px 25px !important; border-radius: 50px !important; font-weight: bold !important; color: var(--c-title) !important; transition: 0.2s; background: white !important; border: 1px solid transparent; }
.ff-social-btn:hover { background: var(--c-accent) !important; color: white !important; transform: translateY(-3px); border-color: var(--c-accent); }
@keyframes ff-pulse-green { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); } 70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.ff-whatsapp-btn { display: flex; align-items: center; gap: 8px; padding: 10px 25px !important; border-radius: 50px !important; font-weight: bold !important; color: #ffffff !important; background: #25D366 !important; border: 2px solid #25D366 !important; transition: 0.2s; animation: ff-pulse-green 2s infinite; }
.ff-whatsapp-btn:hover { background: #1da851 !important; border-color: #1da851 !important; transform: translateY(-3px); animation: none; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4) !important; }

@media (max-width: 768px) {
  .ff-hero-v8 { flex-direction: column-reverse; text-align: center; padding: 25px !important; }
  .ff-hero-img img { width: 180px; height: 180px; margin-bottom: 10px; }
  .ff-search-wrapper { margin: 0 auto; align-items: center; }
  .ff-featured-card { flex-direction: column; }
  .ff-featured-img { width: 100%; height: 200px; }
  .ff-featured-content { width: 100%; padding: 25px; align-items: center; text-align: center; }
}

/* --- GRILLE DYNAMIQUE (Accueil & Index) --- */
.ff-dynamic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 25px;
}

.ff-dynamic-card {
	background: var(--c-card, #ffffff);
	border: 1px solid var(--c-border, #eee5d5);
	border-radius: var(--radius, 20px);
	overflow: hidden;
	color: inherit;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
	display: flex;
	flex-direction: column;
	position: relative;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
	text-decoration: none; /* Nettoyage des liens par défaut */
}

.ff-dynamic-card:hover {
	transform: translateY(-5px);
	border-color: var(--c-accent, #6da13f);
	box-shadow: 0 35px 60px rgba(0, 0, 0, 0.15), 0 20px 30px rgba(109, 161, 63, 0.25);
}

.ff-dynamic-card__img-wrap {
	width: 100%;
	height: 180px;
	overflow: hidden;
	background: var(--c-bg, #fbf9f2);
}

.ff-dynamic-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.ff-dynamic-card:hover .ff-dynamic-card__img {
	transform: scale(1.05); /* L'effet de zoom léger demandé */
}

.ff-dynamic-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
	font-weight: bold;
	font-size: 0.9rem;
}

.ff-dynamic-card__content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: space-between;
}

.ff-dynamic-card__title {
	font-family: 'Playfair Display', serif;
	font-size: 1.25rem !important;
	color: var(--c-title, #2f3b20) !important;
	margin: 0 0 15px !important;
	line-height: 1.3 !important;
	border: none !important;
	font-weight: bold;
	transition: color 0.3s;
}

.ff-dynamic-card:hover .ff-dynamic-card__title {
	color: var(--c-accent, #6da13f) !important;
}

.ff-dynamic-btn {
	font-size: 0.85rem;
	font-weight: bold;
	color: var(--c-accent, #6da13f);
	text-transform: uppercase;
	transition: padding-left 0.2s ease;
	margin-top: auto;
}

.ff-dynamic-card:hover .ff-dynamic-btn {
	padding-left: 5px; /* Petit effet de mouvement vers la flèche */
}

/* Boutons de Filtres JavaScript (Index) */
.ff-filters {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.ff-filter-btn {
	background: var(--c-bg, #fbf9f2);
	color: var(--c-title, #2f3b20);
	border: 1px solid var(--c-border, #eee5d5);
	padding: 8px 18px;
	border-radius: 50px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.9rem;
}

.ff-filter-btn:hover {
	background: var(--c-accent, #6da13f);
	color: white;
	border-color: var(--c-accent, #6da13f);
	transform: translateY(-2px);
}

.ff-filter-btn.active {
	background: var(--c-accent, #6da13f);
	color: white;
	border-color: var(--c-accent, #6da13f);
	box-shadow: 0 4px 10px rgba(109, 161, 63, 0.3);
}

/* Apparence en Dark Mode (pour que les grilles soient belles même dans le noir !) */
.dark-theme .ff-dynamic-card {
	background: var(--c-card, #141712);
	border-color: var(--c-border, #333930);
}
.dark-theme .ff-dynamic-card__title {
	color: var(--c-title, #f4f7f5) !important;
}
.dark-theme .ff-dynamic-card__img-wrap {
	background: #2a3324;
}
.dark-theme .ff-filter-btn {
	background: var(--c-card, #141712);
	color: var(--c-text, #c5cdbe);
	border-color: var(--c-border, #333930);
}
.dark-theme .ff-filter-btn:hover,
.dark-theme .ff-filter-btn.active {
	background: var(--c-accent, #6da13f);
	color: white;
	border-color: var(--c-accent, #6da13f);
}
