/*
Theme Name: Twenty Twenty-Four
Theme URI: https://wordpress.org/themes/twentytwentyfour/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs, such as presenting a business, blogging and writing or showcasing work. A multitude of possibilities open up with just a few adjustments to color and typography. Twenty Twenty-Four comes with style variations and full page designs to help speed up the site building process, is fully compatible with the site editor, and takes advantage of new design tools introduced in WordPress 6.4.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.0
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfour
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/
:root{
  --terracotta:#B25B47;
  --terracotta-dark:#8E4435;
  --beige-dark:#C8A98A;             /* beige foncé pour lien actif */
  --cream:#FAE9D8;
  --paper:#F7EFE7;
  --ink:#4b3a34;
  --shadow:0 10px 30px rgba(0,0,0,.06);
  --muted:#a88f84;
  --radius:14px;
  --container:1100px;
}

html, body { max-width: 100%; overflow-x: clip; }
.container { max-width: 1100px; margin-inline: auto; padding-inline: 16px; }
img, video, canvas, svg, iframe { max-width: 100%; height: auto; display: block; }


/* --- bouton hamburger --- */
/* === HAMBURGER unifié (fix + croix) === */
.hamburger{
  position: fixed; top:16px; right:16px; z-index:1100; /* au-dessus de l’overlay (z=1000) */
  width:42px; height:42px; border:0; border-radius:10px;
  background: var(--terracotta-dark);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: inline-block;
  padding: 0;                     /* pas de padding pour l’animation */
}

.hamburger__bar{
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform .22s ease, opacity .18s ease, top .22s ease;
}

/* positions au repos (3 traits) */
.hamburger__bar:nth-child(1){ top: 14px; }
.hamburger__bar:nth-child(2){ top: 21px; }
.hamburger__bar:nth-child(3){ top: 28px; }

/* état ouvert -> croix */
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1){
  top: 21px; transform: rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2){
  opacity: 0; transform: scaleX(.6);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3){
  top: 21px; transform: rotate(-45deg);
}

/* confort */
@media (pointer:coarse){
  .hamburger{ width:48px; height:48px; }
  .hamburger__bar{ left:12px; right:12px; }
}
@media (prefers-reduced-motion: reduce){
  .hamburger__bar{ transition: none; }
}

/* body lock quand le menu est ouvert (tu l’avais déjà) */
body.no-scroll{ overflow:hidden; }

/* si admin connecté (barre WP) : décale un peu */
.admin-bar .hamburger{ top: 64px; }

/* empêcher le scroll du body quand ouvert */
body.no-scroll{ overflow:hidden; }

/* responsive : sur très petits écrans, le panneau peut prendre toute la largeur si tu préfères */
@media (max-width:420px){
  .offcanvas__panel{ width:100%; min-width:auto; }
}




.hamburger__bar{ width:22px; height:2px; background:var(--ink); }

.offcanvas{ position:fixed; inset:0; z-index:1000; pointer-events:none; }
.offcanvas.is-open{ pointer-events:auto; }
.offcanvas__overlay{ position:absolute; inset:0; background:rgba(0,0,0,.35); opacity:0; transition:opacity .25s; }
.offcanvas.is-open .offcanvas__overlay{ opacity:1; }
.offcanvas__panel{
  position:absolute; top:0; right:0; height:100vh;
  width:33vw; min-width:280px; max-width:420px;
  background:var(--beige-dark); box-shadow:-8px 0 30px rgba(0,0,0,.15);
  transform:translateX(100%); transition:transform .28s ease; display:flex; flex-direction:column;
}
.offcanvas.is-open .offcanvas__panel{ transform:translateX(0); }
.offcanvas__header{ display:flex; align-items:center; justify-content:center; padding:50px 18px; }
.offcanvas__close{ border:0; background:#fff; width:36px; height:36px; border-radius:8px; box-shadow:var(--shadow); cursor:pointer; }
.offcanvas__nav{ display:flex;justify-content: center;align-items: center; flex-direction:column; gap:12px; padding:22px 22px 30px; }
.offcanvas__link{ font-family:"Playfair Display",serif; font-size:22px; text-decoration:none; color:var(--ink); padding:8px 2px; border-radius:8px; transition:color .2s, transform .18s; display:inline-block; }
.offcanvas__link:hover{ transform:translateX(-2px); color:var(--terracotta); }
.offcanvas__link.is-active{ color:var(--terracotta-dark); }
body.no-scroll{ overflow:hidden; }

@media (max-width:420px){ .offcanvas__panel{ width:100%; min-width:auto; } }



/* === HAMBURGER → CROSS (override minimal) === */
/* garde ton style existant, on rajoute ce qu'il faut pour l'animation */

.hamburger:focus-visible{ outline: 3px solid #EACDBF; outline-offset: 2px; }

/* barres : absolues + animables */
/* positions au repos */
.hamburger__bar:nth-child(1){ top: 14px; }
.hamburger__bar:nth-child(2){ top: 21px; }
.hamburger__bar:nth-child(3){ top: 28px; }

/* état OUVERT (menu visible) -> croix */
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1){
  top: 21px; transform: rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2){
  opacity: 0; transform: scaleX(0.6);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3){
  top: 21px; transform: rotate(-45deg);
}

/* confort tactile */
@media (pointer: coarse){
  .hamburger{ width:48px; height:48px; }
  .hamburger__bar{ left:12px; right:12px; }
}
@media (prefers-reduced-motion: reduce){
  .hamburger__bar{ transition: none; }
}

/* === HAMBURGER — version finale, robuste === */
.hamburger{
  position: fixed !important;
  top:16px; right:16px; z-index:1100;
  width:42px; height:42px;
  border:0; border-radius:10px;
  background: var(--terracotta-dark);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: inline-block !important; /* écrase le display:grid précédent */
  padding: 0 !important;            /* pas de padding, sinon la croix se décale */
}

.hamburger__bar{
  position: absolute !important;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform .22s ease, opacity .18s ease, top .22s ease;
}

/* positions au repos */
.hamburger__bar:nth-of-type(1){ top: 14px; }
.hamburger__bar:nth-of-type(2){ top: 21px; }
.hamburger__bar:nth-of-type(3){ top: 28px; }

/* état ouvert -> croix (on cible l'attribut ET la classe .is-open) */
.hamburger[aria-expanded="true"] .hamburger__bar:nth-of-type(1),
.hamburger.is-open .hamburger__bar:nth-of-type(1){
  top: 21px; transform: rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-of-type(2),
.hamburger.is-open .hamburger__bar:nth-of-type(2){
  opacity: 0; transform: scaleX(.6);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-of-type(3),
.hamburger.is-open .hamburger__bar:nth-of-type(3){
  top: 21px; transform: rotate(-45deg);
}

@media (pointer:coarse){
  .hamburger{ width:48px; height:48px; }
  .hamburger__bar{ left:12px; right:12px; }
}
@media (prefers-reduced-motion: reduce){
  .hamburger__bar{ transition: none; }
}


