/* 🎨 ================= VARIABLES GLOBALES ================= */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #0077cc;
  --light-bg: #f5f5f5;
  --card-bg: #ffffff;
  --accent-bg: #e0f7fa;
  --text-color: #222;
}

/* -------------------------------------------------- */
/* RESET + BASE */
/* -------------------------------------------------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.6;
  padding-top: 100px; /* espace pour le header sticky */
}

/* 👑 ================= HEADER ================= */

/* -------------------------------------------------- */
/* HEADER FIXE PREMIUM */
/* -------------------------------------------------- */

header {
  position: fixed;
  top: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  width: 100%;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */

.logo {
  display: flex;
  align-items: center;
  gap: 13px;
}

.logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
}

.logo span {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* -------------------------------------------------- */
/* MENU PRINCIPAL */
/* -------------------------------------------------- */

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}

nav a {
  text-decoration: none;
  color: #eee;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover,
nav .active {
  color: #00b5ff;
}

/* -------------------------------------------------- */
/* SOUS-MENUS */
/* -------------------------------------------------- */

.has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  top: 120%;
  left: 0;
  background: #111;
  padding: 10px 0;
  border-radius: 6px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.3s ease;
}

.has-submenu:hover .submenu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: block; /* ----- Affichage au survol ----- */
  padding: 10px 20px;
  color: #ddd;
}

.submenu li a:hover {
  background: #222;
  color: #00b5ff;
}

/* -------------------------------------------------- */
/* HEADER ICONS */
/* -------------------------------------------------- */

.header-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-icons button {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: 0.2s;
}

.header-icons button:hover {
  color: #00b5ff;
}

/* -------------------------------------------------- */
/* SEARCH BAR (toujours visible) */
/* -------------------------------------------------- */

.header-icons form {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 5px 10px;
  border-radius: 50px;
  gap: 8px;
}

.search-input {
  border: none;
  outline: none;
  width: 160px;
  font-size: 0.9rem;
}

.search-btn svg {
  stroke: #000;
  transition: 0.2s;
}

.search-btn:hover svg {
  stroke: #00b5ff;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  display: none;
  z-index: 9999;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
}

.suggestion-item {
  padding: 10px;
  transition: background 0.2s ease;
}

.suggestion-item a {
  text-decoration: none;
  color: #333;
  display: block;
}

.suggestion-item:hover {
  background: #f2f2f2;
}

mark {
  background-color: #ffd54f;
  color: #000;
  padding: 0 2px;
  border-radius: 3px;
}

/* 👣 ================= FOOTER (MODERNE) ================= */

/* -------------------------------------------------- */
/* FOOTER */
/* -------------------------------------------------- */

.site-footer {
  background-color: #0077cc;
  color: #fff;
  padding: 40px 20px;
  font-size: 15px;
  margin-top: 40px;
}
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}
.footer-about h3 {
  margin-top: 0;
  color: #fff;
  font-size: 18px;
  margin-bottom: 10px;
}
.footer-links ul,
.footer-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links a,
.footer-categories a {
  color: #dcdcdc;
  text-decoration: none;
  display: block;
  margin: 6px 0;
  transition: color 0.3s;
}
.footer-links a:hover,
.footer-categories a:hover {
  color: #000000;
}
.footer-newsletter input {
  padding: 8px;
  width: 100%;
  border: none;
  border-radius: 4px;
  margin-bottom: 10px;
}
.footer-newsletter button {
  padding: 8px 14px;
  background-color: navy;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
.footer-newsletter button:hover {
  background-color: #063b09;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 30px;
  padding-top: 20px;
}
.footer-socials a {
  margin: 0 8px;
  color: #dcdcdc;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-socials a:hover {
  color: #13ee13;
}

/* 📝 ================= ARTICLE ================= */

/* -------------------------------------------------- */
/* PAGE GLOBAL */
/* -------------------------------------------------- */

.article-content {
  max-width: 95%;
  margin: auto;
  margin-top: 40px;
  padding: 30px 40px 20px 40px;
  font-size: 1.1rem;
  line-height: 1.6;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ----- Intro ----- */
.intro-article h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.intro-image {
  text-align: center;
  margin-bottom: 1.5rem;
}

.intro-image img {
  width: 80%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tip-section h2 {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

/* ----- Tips (flex + image/text) ----- */

/* ==== TIP SECTION — ajustements pro ==== */
.tip-section h2 {
  margin-bottom: 10px;
}

/* Conteneur flexible des tips */
.tip-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem; /* un peu plus compact */
  align-items: center; /* aligne verticalement texte/image */
  margin-top: 0.8rem;
}

/* Zone texte (garde priorité flex, espace propre) */
.tip-text {
  flex: 1 1 300px; /* plus large pour le texte */
  margin: 0; /* évite double espacement */
  padding: 0; /* on gère l'espace via h2/p */
}

/* Liste interne (puces) */
.tip-list {
  margin-left: 1.1rem;
  margin-top: 8px;
}

/* Zone image */
.tip-image-side,
.tip-image-top {
  flex: 0 0 auto; /* taille contrôlée, ne pousse pas le texte */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Images : respecter ratio, limiter la largeur et éviter hauteur excessive */
.tip-image-side img,
.tip-image-top img {
  width: 330px; /* largeur contrôlée pour garder équilibre */
  height: auto; /* conserve ratio original (608x405) */
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: block;
  margin: 0; /* supprime espaces indésirables */
}

/* Ajustement fin des titres et paragraphes dans la tip */
.tip-text h3,
.tip-text h4 {
  margin: 6px 0 10px 0;
}

.tip-text p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

/* ----- Conclusion ----- */
.article-conclusion {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--accent-bg);
}

.article-conclusion h2 {
  font-size: 1.6rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.recap-box {
  background-color: var(--accent-bg);
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.recap-box h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.recap-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.recap-list li {
  padding: 0.6rem 0;
  font-weight: bold;
  color: var(--text-color);
}

/*-- 📤 Boutons de partage --*/

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.buttons a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f0f0f0;
  color: #000;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s;
}

.related-articles {
  background: #f9fafb;
  padding: 15px;
  border-radius: 10px;
  margin-top: 30px;
}

.related-articles h3 {
  margin-bottom: 10px;
  color: #0a58ca;
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles a {
  color: #111;
  text-decoration: none;
}

.related-articles a:hover {
  text-decoration: underline;
}

/* 🎯 ================= FEATURED / BANNERS ================= */

/* -------------------------------------------------- */
/* CARTES D’ARTICLES */
/* -------------------------------------------------- */

/*Article Vitrine*/

.featured-article {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
  background: #f9f9f9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured-article img {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: cover;
}

.featured-text {
  flex: 1;
  padding: 20px;
}

.featured-text h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.featured-text p {
  font-size: 1rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

.featured-text .btn {
  display: inline-block;
  padding: 10px 16px;
  background-color: #0077cc;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.featured-text .btn:hover {
  background-color: #005fa3;
}

/*Autres Articles Recents 
et Articles Dans les Rubrique*/

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.article-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: 0.25s;
  display: block;
}
.article-card a {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.article-card h3 {
  margin: 0;
  padding: 15px;
  line-height: 1.2;
  font-size: 1rem;
  color: var(--text-color);
}
.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-card:hover {
  transform: translateY(-4px);
  color: #00b5ff;
}

/*Article Resultat*/

.result-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: 0.25s;
}

.result-card :hover {
  transform: translateY(-4px);
}
.result-card h2 a {
  text-decoration: none;
  color: #000;
  font-size: 1.1rem;
}

.result-card p {
  margin-top: 6px;
  color: #333;
}

/* -------------------------------------------------- */
/* SECTIONS PARTICULLIERES */
/* -------------------------------------------------- */

/*index.html*/

/* ℹ ================= SECTION À PROPOS ================= */
.apropos-section {
  background-color: #fdf6e3;
  padding: 30px;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 18px;
  line-height: 1.6;
  color: var(--primary-color);
}

.apropos-section h2 {
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.apropos-section em {
  display: block;
  margin-top: 20px;
  font-style: italic;
  font-weight: bold;
  color: var(--secondary-color);
}

/* 📂 ================= CATÉGORIES ================= */
.categories {
  margin: 60px 0;
  text-align: center;
}

.categories h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: brightness(0.75);
  transition: filter 0.3s ease;
}

.category-card:hover img {
  filter: brightness(0.9);
}

.category-card span {
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/*Pour les pages des Rubriques*/

/* 🛠 ================= PAGE HOOKS ================= */
.category-banner {
  position: relative;
  color: #fff;
  padding: 80px 20px;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.category-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.6;
}

/* les liens désactivés visuellement */
.card-link.disabled {
  pointer-events: none;
  opacity: 0.6;
  cursor: default;
}

/* -------------------------------------------------- */
/* BOUTON GLOBAL */
/* -------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: #00b5ff;
  color: #fff !important;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.25s;
  font-weight: 600;
}

.btn:hover {
  background: #008ecc;
}

/* les boutons partage  */
.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f0f0f0;
  color: #000;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s;
}

.share-btn:hover {
  background: #dbeafe; /* bleu clair */
}
