/* =========================================================
   VARIABLES – PALETTE BLOG ARTISTIQUE
   ========================================================= */
:root {
  --bg: #f6f5f2;
  --paper: #ffffff;
  --text: #2b2b2b;
  --text-light: #666;
  --border: #ddd;
  --accent: #8b0000;
  --menu-bg: #f0eee9;
  --menu-hover: #e3e1dc;
}

/* =========================================================
   BASE
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

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

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  text-align:center;
  background:var(--paper);
  border-bottom:1px solid var(--border);
}

.site-header .logo{
  background:black;
  padding:2rem;
  display:block;
  margin:0 auto 2rem;
}

.logo{
  display:block;
  width:100%;
  max-width:none;
  height:150px;
  object-fit:contain;
  background:#000;
  padding:1.5rem 0;
  box-sizing:content-box;
}

.site-header h1{
  margin:0;
  font-size:3rem;
  letter-spacing:1px;
}

.site-header h2{
  margin:.5rem 0 0;
  font-weight:normal;
  font-size:1.3rem;
  color:var(--text-light);
}

/* ===== LANGUAGE SWITCH ===== */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.lang-switch img {
  height: 22px;
  width: auto;
  display: block;
}

/* =========================================================
   MENU (BLOG CLASSIQUE)
   ========================================================= */
nav {
  background: var(--menu-bg);
  border-bottom: 1px solid var(--border);
}

.main-menu {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu > li {
  position: relative;
}

.main-menu a,
.menu-accordion > span {
  display: block;
  padding: .9rem 1.3rem;
  color: var(--text);
  font-size: .95rem;
  text-transform: uppercase;
  cursor: pointer;
}

.main-menu a:hover,
.menu-accordion > span:hover {
  background: var(--menu-hover);
}

.menu-accordion .submenu{
  display:none;
}

.menu-accordion.open .submenu{
  display:block;
}

/* =========================================================
   SOUS-MENUS (ACCORDÉON VERTICAL)
   ========================================================= */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper);
  min-width: 240px;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  z-index: 100;
}

.submenu.open {
  display: block;
}

.submenu li a {
  padding: .8rem 1rem;
  display: block;
  color: var(--text-light);
}

.submenu li a:hover {
  background: var(--menu-hover);
  color: var(--text);
}

/* =========================================================
   CONTENU / ARTICLES
   ========================================================= */
.section {
  background: var(--paper);
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid var(--border);
}

.section h2 {
  margin-top: 0;
  font-size: 2rem;
}

/* =========================================================
   GALERIES – STYLE BLOG (CARTES)
   ========================================================= */
.carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.carousel img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.carousel img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}

/* =========================================================
   VIEWER (LIGHTBOX)
   ========================================================= */
#viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#viewer.hidden {
  display: none;
}

#viewer img {
  max-width: 90%;
  max-height: 80%;
  z-index: 1;
  transition: transform .2s;
}

/* =========================================================
   VIEWER – BOUTONS (STYLE ANCIEN)
   ========================================================= */
.viewer-controls {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1002;
}

.viewer-controls button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #666;
  background: #111;
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Boutons carrés */
#zoom-in,
#zoom-out,
#toggle-desc {
  border-radius: 4px;
}

/* Bouton X rond */
#close {
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid #600;
}

/* =========================================================
   DESCRIPTION OVERLAY
   ========================================================= */
#description {
  position: fixed;
  bottom: 40px;
  background: rgba(255,255,255,.95);
  color: var(--text);
  padding: 1.2rem 1.5rem;
  border-radius: 6px;
  max-width: 70%;
  z-index: 1003;
  text-align: center;
  font-size: .95rem;
}

/* =========================================================
   FORMULAIRE CONTACT
   ========================================================= */
form {
  max-width: 600px;
  margin: auto;
}

.form-row {
  display: flex;
  gap: 12px;
}

input, textarea {
  width: 100%;
  padding: .8rem;
  margin: .6rem 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: .95rem;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

button {
  padding: .7rem 2.5rem;
  border: none;
  border-radius: 30px;
  background: var(--accent);
  color: white;
  font-size: .95rem;
  cursor: pointer;
  margin-top: 1rem;
}

button:hover {
  opacity: .9;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {

  .site-header h1 {
    font-size: 2.4rem;
  }

  main {
    margin: 2rem auto;
  }

  .form-row {
    flex-direction: column;
  }

  .carousel {
    grid-template-columns: 1fr;
  }

  .logo{
    height:110px;
    padding:1rem 0;
  }
}

@media (max-width: 900px) {
  .carousel {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .carousel {
    grid-template-columns: 1fr;
  }
}

/* ===== MENU RESPONSIVE MOBILE ===== */

.header-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 1rem;
  position:relative;
}

/* Desktop : menu horizontal */
nav ul{
  display:flex;
  justify-content:center;
  gap:2rem;
  list-style:none;
  padding:0;
  margin:0;
  flex-wrap:nowrap;
}

/* ===== MENU DESKTOP ===== */
nav {
  position: relative;
  background: var(--menu-bg);
  border-bottom: 1px solid var(--border);
}

#menu-toggle {
  display: none;
}

/* ===== MOBILE ===== */
@media (max-width:768px){

  #menu-toggle{
    display:block;
    background:none;
    border:none;
    font-size:2.4rem;
    font-weight:bold;
    cursor:pointer;
    color:#000;            /* ← ICÔNE VISIBLE */
    z-index:1200;          /* ← AU-DESSUS DU LOGO */
  }


  nav{
    position:fixed;
    inset:0;
    background:var(--paper);
    z-index:1000;
    transform:translateX(-100%);
    transition:transform .3s ease;
    overflow-y:auto;
    padding-top:5rem;
  }

  nav.open{
    transform:translateX(0);
  }

  nav ul{
    flex-direction:column;
    align-items:center;
    gap:1.5rem;
  }

  nav a{
    font-size:1.4rem;
  }

  /* Sous-menus accordéon */
  nav li ul{
    position:static;
    width:100%;
    text-align:center;
  }
}