/*==============================================================================
  Tout le CSS consolidé
==============================================================================*/
/* — Variables CSS — */
:root {
  --bg-page:       #111827;
  --text:          #eaeaea;
  --text-dark:     #111;
  --accent:        #73f9ff;
  --accent-hover:  #40cec3;
  --radius:        0.5rem;
  --shadow-md:     0 4px 12px rgba(0,0,0,0.4);
  --error:         #ff4f4f;
  --focus-ring:    rgba(95,251,241,0.5);
  --font:          'Roboto', sans-serif;
  --card-bg:       #1e1e1e;
  --transition:    0.3s ease-in-out;
}

/* — Reset & fond global — */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

/*==============================================================================
  Layout général
==============================================================================*/
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.corps {
  flex: 1;
}

/*==============================================================================
  Header & navigation
==============================================================================*/
.site-header {
  padding: 1rem 2rem;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Logo */
.logo a {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
}
/* Menu (connecté & visiteur) */
.entete.nav,
.site-header nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.entete.nav a,
.site-header nav ul li a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition), box-shadow 0.2s;
}
/* Hover */
.entete.nav a:hover,
.site-header nav ul li a:hover {
  background: var(--accent);
  color: var(--text-dark);
}
/* Focus accessible */
.entete.nav a:focus,
.site-header nav ul li a:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
/* Bouton “+ Article” */
.styled-recette-btn {
  background: var(--accent);
  color: var(--text-dark);
}
.styled-recette-btn:hover {
  background: var(--accent-hover);
}
/* Lien “Se déconnecter” */
.nav-login-btn {
  background: var(--accent);
  color: var(--text-dark);
}
.nav-login-btn:hover {
  background: var(--accent-hover);
}
/* Burger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
}

/*==============================================================================
  Carousel
==============================================================================*/
.carousel-wrapper {
  position: relative;
  max-width: 90%;
  margin: 0 auto;
  overflow: hidden;
  padding: 2rem 0;
}
.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.5s ease-in-out;
}
.carousel-card {
  flex: 0 0 calc(80% - 1rem);
  max-width: calc(80% - 1rem);
  box-sizing: border-box;
  padding: 0.5rem;
}
.carousel-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  background: #1a1a1d;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

/*==============================================================================
  Modale (overlay + conteneur + contenu)
==============================================================================*/
/* Overlay sombre */
.ov,
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
}
/* Fenêtre modale */
.mdl,
.modal-window {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
}
.ov.show,
.modal-overlay.open {
  display: block;
}
.mdl.show,
.modal-window.open {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  color: var(--text);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: fadeIn var(--transition);
  display: flex;
  flex-direction: column;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-header,
.hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #333;
}
.modal-header h2,
.hdr h2 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--accent);
}
.modal-close,
.cl {
  font-size: 1.8rem;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.modal-close:hover,
.cl:hover {
  color: var(--text);
}

.bdy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}
.bdy label,
.bdy select,
.bdy input:not([type=file]),
.bdy textarea {
  width: 100%;
  padding: .75rem;
  background: #2b2b2b;
  border: 1px solid #444;
  border-radius: var(--radius);
  color: var(--text);
}
.bdy input[type=file] { display: none; }
.custom-file-upload {
  display: block;
  margin-top: .5rem;
  color: var(--accent);
  cursor: pointer;
}
.imgp { margin-top: .5rem; text-align: center; }
.imgv { max-width:100%; border-radius:var(--radius); border:1px solid #333; }

.ftr {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #111;
  border-top: 1px solid #333;
}
#messageCapture {
  flex: 1;
  color: var(--error);
  font-size: .9rem;
}
.loaderCapture img {
  width: 24px;
  height: 24px;
}
.postBtn {
  padding: .75rem 1.5rem;
  background: var(--accent);
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  transition: background var(--transition);
}
.postBtn:hover {
  background: var(--accent-hover);
}

/*==============================================================================
  Hero & Sections
==============================================================================*/

/* HERO */
.hero {
  padding: 4rem 0;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.hero-text p {
  margin-bottom: 1.5rem;
}
.hero-illu img {
  max-width: 100%;
}

/* SECTIONS À GRILLE */
.section-grid {
  padding: 3rem 0;
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 1.5rem;
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: .75rem 0;
}
.card p {
  color: rgba(234,234,234,.7);
}
.card-icon {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: 4px;
}
.css { background-image:url('assets/icon-css.svg'); /* etc. */}

/* SECTION 3 COLS (Formations/Podcasts) */
.section-threecols {
  padding: 3rem 0;
}
.cols-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
.col-text h2 {
  color: var(--accent);
}

/* PREMIUM */
.section-premium {
  padding: 3rem 0;
  text-align: center;
}
.toggle-period {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 2rem;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input { display:none; }
.slider {
  position:absolute; cursor:pointer;
  top:0; left:0; right:0; bottom:0;
  background:#444; border-radius:34px;
  transition:.2s;
}
.slider:before {
  position:absolute; content:"";
  height:16px; width:16px;
  left:2px; bottom:2px;
  background:#fff; border-radius:50%;
  transition:.2s;
}
input:checked + .slider { background: var(--accent); }
input:checked + .slider:before {
  transform: translateX(20px);
}
.premium-card {
  display:inline-block;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align:center;
}
.premium-price {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.premium-features {
  list-style: none;
  margin-bottom: 1.5rem;
}
.premium-features li {
  padding: .75rem 0;
  border-top: 1px solid #333;
}

/* FOOTER */
.site-footer {
  background: var(--bg);
  padding: 3rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-about p {
  margin: 1rem 0;
  color: rgba(234,234,234,.7);
}
.footer-links ul {
  list-style: none;
}
.footer-links a {
  color: var(--fg);
  display: block;
  margin: .5rem 0;
}
.socials a {
  display:inline-block;
  margin-right: .5rem;
}

.text-overlay {
  background: rgba(0,0,0,0.6);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}
.text-overlay h1 {
  font-size: 3rem;
  color: var(--accent);
}
.text-overlay p {
  font-size: 1.2rem;
  margin: 1rem 0;
}
.cta-btn {
  background: var(--accent);
  color: #000;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
}

/*==============================================================================
  Projects & Journal
==============================================================================*/
.main-content { padding: 4rem 2rem; }
.projects-grid,
.work-section .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}
.project-card:hover { transform: translateY(-5px); }
.project-card img { width: 100%; height: auto; display: block; }
.card-info {
  padding: 1rem;
}
.card-info h3 { color: var(--accent); margin-bottom: .5rem; }
.card-info p { color: rgba(234,234,234,0.7); }

.journal-section article { margin-bottom: 2rem; }
.journal-section article h3 {
  color: var(--accent);
  margin-bottom: .5rem;
}

/*==============================================================================
  Footer & Responsive
==============================================================================*/
.site-footer {
  text-align: center;
  padding: 3rem 1rem;
  background: #111;
  margin-top: 4rem;
}
.site-footer .socials a {
  margin: 0 .8rem;
  color: rgba(234,234,234,0.7);
  text-decoration: none;
  font-size: .9rem;
}
.site-footer .socials a:hover { color: var(--accent); }

@media (max-width: 767px) {
  .nav-container { flex-direction: column; align-items: flex-start; }
  .entete.nav { flex-direction: column; width: 100%; gap: .5rem; }
  .entete.nav a { width: 100%; text-align: center; }
  .modal-content { width: 95%; }
}

