/*
 * assets/css/main.css — GalerieGRAPH Custom Theme
 *
 * Ce fichier contient :
 *   - Variables CSS de secours (sans Tailwind)
 *   - Styles de base globaux
 *   - Composants non-Tailwind (prose, filtres galerie, animations)
 *   - Styles formulaires globaux
 *
 * NOTE : Le design system principal repose sur Tailwind CDN.
 * Ce fichier complète ou overrides certains comportements.
 */

/* ── Reset de base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Material Symbols ───────────────────────────────── */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ── Grille industrielle (background pattern) ────────── */
.industrial-grid {
  background-image: radial-gradient(#e0e3e5 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Prose GalerieGRAPH (pages légales, articles) ───── */
.gg-prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  color: #191c1e;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e3e5;
}

.gg-prose h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  color: #191c1e;
  margin-bottom: 0.75rem;
}

.gg-prose p {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  line-height: 1.75;
  color: #555f6f;
  margin-bottom: 1rem;
}

.gg-prose ul, .gg-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.gg-prose li {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #555f6f;
  margin-bottom: 0.5rem;
}

.gg-prose a {
  color: #f97316;
  text-decoration: underline;
}

.gg-prose a:hover {
  color: #9d4300;
}

.gg-prose strong {
  color: #191c1e;
  font-weight: 700;
}

.gg-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.gg-prose th {
  background: #191c1e;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.75rem 1rem;
  text-align: left;
}

.gg-prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e3e5;
  color: #555f6f;
}

/* ── Filtres galerie / boutique ─────────────────────── */
.filter-btn.active,
.cat-btn.active {
  background-color: #f97316;
  color: #ffffff;
  border-color: #f97316;
}

.gallery-item.hidden-item {
  display: none;
}

/* ── Animations utilitaires ─────────────────────────── */
@keyframes gg-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gg-fade-in {
  animation: gg-fadeIn 0.3s ease forwards;
}

/* ── Badge panier animation ─────────────────────────── */
#cart-count {
  transition: transform 0.2s ease;
}
#cart-count.scale-125 {
  transform: scale(1.25);
}

/* ── Toast notification (personnaliser.php) ──────────── */
.gg-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #191c1e;
  color: #ffffff;
  padding: 0.875rem 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 4px solid #f97316;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gg-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Formulaires globaux ─────────────────────────────── */
.gg-input {
  width: 100%;
  border: 1.5px solid #e0e3e5;
  background: #ffffff;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #191c1e;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0.125rem;
}

.gg-input:focus {
  border-color: #f97316;
  outline: 2px solid rgba(249, 115, 22, 0.2);
  outline-offset: 0;
}

.gg-input::placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
}

.gg-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #191c1e;
  display: block;
  margin-bottom: 0.375rem;
}

.gg-label .required {
  color: #f97316;
  margin-left: 2px;
}

/* ── Upload zone (contact, demande-compte-pro) ────────── */
.gg-upload-zone {
  border: 2px dashed #e0e3e5;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 0.125rem;
}

.gg-upload-zone:hover {
  border-color: #f97316;
  background: #fff7f3;
}

.gg-upload-zone input[type="file"] {
  display: none;
}

/* ── Nav pagination WooCommerce / blog ───────────────── */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid #e0e3e5;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #555f6f;
  text-decoration: none;
  transition: all 0.2s;
  margin: 0 0.25rem;
}

.page-numbers:hover,
.page-numbers.current {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
}

/* ── Sticky ancres (techniques.php) ─────────────────── */
.gg-anchor-bar {
  position: sticky;
  top: 73px;
  z-index: 40;
}

/* ── Modales produit (personnaliser.php) ─────────────── */
.gg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.gg-modal.open {
  display: flex;
}

.gg-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.gg-modal-content {
  position: relative;
  background: #ffffff;
  max-width: 56rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
}

/* ═══════════════════════════════════════════════════
   FALLBACKS TOKENS TAILWIND CUSTOM — GalerieGRAPH
   ═══════════════════════════════════════════════════
   Ces règles sont des doublons intentionnels des tokens Tailwind custom.
   Elles garantissent :
     1. Le rendu correct même si le CDN Tailwind est lent ou bloqué
     2. L'élimination du FOUC (flash of unstyled content)
     3. La résistance aux resets WP / WooCommerce
   Specificité : (0,1,0) — identique aux classes utilitaires Tailwind.
   En production (Tailwind CLI compilé), ce bloc peut être supprimé.
   ═══════════════════════════════════════════════════ */

/* Arrière-plans surface */
.bg-surface                 { background-color: #f7f9fb; }
.bg-on-surface              { background-color: #191c1e; }
.bg-inverse-surface         { background-color: #2d3133; }
.bg-surface-variant         { background-color: #e0e3e5; }
.bg-surface-container       { background-color: #eceef0; }
.bg-surface-container-low   { background-color: #f2f4f6; }
.bg-surface-container-high  { background-color: #e6e8ea; }
.bg-surface-container-highest { background-color: #e0e3e5; }
.bg-surface-container-lowest  { background-color: #ffffff; }
.bg-background              { background-color: #f7f9fb; }

/* Arrière-plans couleurs d'accentuation */
.bg-primary-container       { background-color: #f97316; }
.bg-primary                 { background-color: #9d4300; }
.bg-primary-fixed           { background-color: #ffdbca; }
.bg-primary-fixed-dim       { background-color: #ffb690; }
.bg-secondary               { background-color: #555f6f; }
.bg-secondary-container     { background-color: #d6e0f3; }
.bg-secondary-fixed         { background-color: #d9e3f6; }
.bg-tertiary                { background-color: #575e70; }
.bg-tertiary-fixed          { background-color: #dce2f7; }
.bg-error                   { background-color: #ba1a1a; }
.bg-error-container         { background-color: #ffdad6; }

/* Couleurs de texte — tokens */
.text-on-surface            { color: #191c1e; }
.text-on-surface-variant    { color: #584237; }
.text-primary-container     { color: #f97316; }
.text-primary               { color: #9d4300; }
.text-on-primary            { color: #ffffff; }
.text-on-primary-container  { color: #582200; }
.text-secondary             { color: #555f6f; }
.text-on-secondary-fixed    { color: #121c2a; }
.text-inverse-primary       { color: #ffb690; }
.text-on-background         { color: #191c1e; }

/* Couleurs de bordure — tokens */
.border-surface-variant     { border-color: #e0e3e5; }
.border-primary-container   { border-color: #f97316; }
.border-primary             { border-color: #9d4300; }
.border-on-surface          { border-color: #191c1e; }
.border-outline-variant     { border-color: #e0c0b1; }

/* Opacités token utilisées dans les templates */
.bg-primary-container\/10   { background-color: rgba(249, 115, 22, 0.10); }
.bg-primary-container\/20   { background-color: rgba(249, 115, 22, 0.20); }
.bg-on-surface\/40          { background-color: rgba(25, 28, 30, 0.40); }
.bg-on-surface\/80          { background-color: rgba(25, 28, 30, 0.80); }

/* Couleurs de fond fondamentales pour les sections hero (critique) */
section.bg-on-surface,
div.bg-on-surface           { background-color: #191c1e !important; }

section.bg-surface-container-low,
div.bg-surface-container-low { background-color: #f2f4f6 !important; }

/* Classes inline-flex / flex sur bg-primary-container (badges, tags) */
span.bg-primary-container,
div.bg-primary-container,
a.bg-primary-container,
button.bg-primary-container { background-color: #f97316 !important; }

/* Texte blanc garanti sur fonds sombres */
.bg-on-surface h1,
.bg-on-surface h2,
.bg-on-surface p { color: inherit; }

/* Corps de page — fond clair par défaut */
body { background-color: #f7f9fb; color: #191c1e; }

/* ── Surcharges hautes priorité via body.gg-site ────────
 * Résiste aux resets WP/WC résiduels si wp_dequeue_style ne
 * suffit pas (ex : plugin qui re-enqueue wp-block-library).
 * Spécificité (0,2,1) > resets génériques (0,0,1) ou (0,1,0).
 */
body.gg-site .bg-on-surface              { background-color: #191c1e; }
body.gg-site .bg-primary-container       { background-color: #f97316; }
body.gg-site .bg-surface-container-low   { background-color: #f2f4f6; }
body.gg-site .bg-white                   { background-color: #ffffff; }
body.gg-site .bg-surface                 { background-color: #f7f9fb; }
body.gg-site .bg-gray-800                { background-color: #1f2937; }
body.gg-site .bg-gray-900                { background-color: #111827; }

body.gg-site .text-white                 { color: #ffffff; }
body.gg-site .text-on-surface            { color: #191c1e; }
body.gg-site .text-primary-container     { color: #f97316; }
body.gg-site .text-secondary             { color: #555f6f; }
body.gg-site .text-gray-300              { color: #d1d5db; }
body.gg-site .text-gray-400              { color: #9ca3af; }

body.gg-site .border-surface-variant     { border-color: #e0e3e5; }
body.gg-site .border-primary-container   { border-color: #f97316; }
body.gg-site .border-on-surface          { border-color: #191c1e; }

/* Fonts custom (fallback si Tailwind ne charge pas les font families) */
.font-headline { font-family: 'Space Grotesk', sans-serif; }
.font-body     { font-family: 'Inter', sans-serif; }
.font-label    { font-family: 'Inter', sans-serif; }

/* industrial-grid : défini ligne 31, pas de doublon nécessaire */

/* ═══════════════════════════════════════════════════
   FALLBACKS LAYOUT — si Tailwind CDN ne charge pas
   ═══════════════════════════════════════════════════ */

/* Display */
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.block        { display: block; }
.inline-block { display: inline-block; }
.grid         { display: grid; }
.hidden       { display: none; }

/* Flex direction */
.flex-col     { flex-direction: column; }
.flex-row     { flex-direction: row; }
.flex-wrap    { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1       { flex: 1 1 0%; }

/* Flex/Grid align */
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start   { justify-content: flex-start; }
.justify-end     { justify-content: flex-end; }
.self-start   { align-self: flex-start; }
.self-end     { align-self: flex-end; }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

/* Grid colonnes courantes */
.grid-cols-1  { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.z-50     { z-index: 50; }
.z-40     { z-index: 40; }
.z-10     { z-index: 10; }
.inset-0  { inset: 0; }
.top-0    { top: 0; }
.top-full { top: 100%; }
.bottom-0 { bottom: 0; }
.left-0   { left: 0; }
.right-0  { right: 0; }

/* Sizing */
.w-full      { width: 100%; }
.h-full      { height: 100%; }
.min-w-0     { min-width: 0; }
.mx-auto     { margin-left: auto; margin-right: auto; }
.max-w-screen-2xl { max-width: 1536px; }

/* Overflow */
.overflow-hidden  { overflow: hidden; }
.overflow-x-auto  { overflow-x: auto; }

/* Spacing critique — navigation + sections */
.pt-\[73px\]  { padding-top: 73px; }
.px-6         { padding-left: 1.5rem;  padding-right: 1.5rem; }
.px-8         { padding-left: 2rem;    padding-right: 2rem; }
.py-3         { padding-top: 0.75rem;  padding-bottom: 0.75rem; }
.py-4         { padding-top: 1rem;     padding-bottom: 1rem; }
.py-6         { padding-top: 1.5rem;   padding-bottom: 1.5rem; }
.py-8         { padding-top: 2rem;     padding-bottom: 2rem; }
.py-14        { padding-top: 3.5rem;   padding-bottom: 3.5rem; }
.py-16        { padding-top: 4rem;     padding-bottom: 4rem; }
.py-20        { padding-top: 5rem;     padding-bottom: 5rem; }
.py-24        { padding-top: 6rem;     padding-bottom: 6rem; }
.p-5          { padding: 1.25rem; }
.p-6          { padding: 1.5rem; }
.p-7          { padding: 1.75rem; }
.p-8          { padding: 2rem; }
.p-10         { padding: 2.5rem; }
.px-3         { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-5         { padding-left: 1.25rem; padding-right: 1.25rem; }
.pt-4         { padding-top: 1rem; }
.pb-2         { padding-bottom: 0.5rem; }
.pl-4         { padding-left: 1rem; }
.py-1         { padding-top: 0.25rem;  padding-bottom: 0.25rem; }
.py-2         { padding-top: 0.5rem;   padding-bottom: 0.5rem; }
.py-2\.5      { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3\.5      { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.px-2         { padding-left: 0.5rem;  padding-right: 0.5rem; }
.py-0\.5      { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.mb-1         { margin-bottom: 0.25rem; }
.mb-2         { margin-bottom: 0.5rem; }
.mb-3         { margin-bottom: 0.75rem; }
.mb-4         { margin-bottom: 1rem; }
.mb-5         { margin-bottom: 1.25rem; }
.mb-6         { margin-bottom: 1.5rem; }
.mb-8         { margin-bottom: 2rem; }
.mb-10        { margin-bottom: 2.5rem; }
.mb-12        { margin-bottom: 3rem; }
.mb-16        { margin-bottom: 4rem; }
.mt-3         { margin-top: 0.75rem; }
.mt-4         { margin-top: 1rem; }
.mt-10        { margin-top: 2.5rem; }
.mt-12        { margin-top: 3rem; }
.gap-1        { gap: 0.25rem; }
.gap-2        { gap: 0.5rem; }
.gap-3        { gap: 0.75rem; }
.gap-4        { gap: 1rem; }
.gap-5        { gap: 1.25rem; }
.gap-6        { gap: 1.5rem; }
.gap-7        { gap: 1.75rem; }
.gap-8        { gap: 2rem; }
.gap-10       { gap: 2.5rem; }
.gap-12       { gap: 3rem; }
.gap-16       { gap: 4rem; }
.space-y-1 > * + *  { margin-top: 0.25rem; }
.space-y-3 > * + *  { margin-top: 0.75rem; }
.space-y-6 > * + *  { margin-top: 1.5rem; }
.mx-2         { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-1         { margin-left: 0.25rem; margin-right: 0.25rem; }

/* Texte */
.uppercase      { text-transform: uppercase; }
.leading-none   { line-height: 1; }
.leading-tight  { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight  { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-wide   { letter-spacing: 0.025em; }
.tracking-wider  { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.font-black  { font-weight: 900; }
.font-bold   { font-weight: 700; }
.font-light  { font-weight: 300; }
.font-normal { font-weight: 400; }
.text-sm     { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs     { font-size: 0.75rem;  line-height: 1rem; }
.text-base   { font-size: 1rem;     line-height: 1.5rem; }
.text-xl     { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl    { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl    { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl    { font-size: 2.25rem;  line-height: 2.5rem; }
.text-5xl    { font-size: 3rem;     line-height: 1; }

/* Borders */
.border        { border-width: 1px;      border-style: solid; }
.border-2      { border-width: 2px;      border-style: solid; }
.border-b      { border-bottom-width: 1px; border-bottom-style: solid; }
.border-b-2    { border-bottom-width: 2px; border-bottom-style: solid; }
.border-t      { border-top-width: 1px;  border-top-style: solid; }
.border-l-4    { border-left-width: 4px; border-left-style: solid; }
.border-dashed { border-style: dashed; }
.border-transparent { border-color: transparent; }

/* Aspect ratio (grille produits) */
.aspect-square { aspect-ratio: 1 / 1; }

/* Object fit */
.object-cover  { object-fit: cover; }

/* Transition de base */
.transition-all    { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

/* Responsive — au-dessus de 1024px (lg) */
@media (min-width: 1024px) {
  .lg\:hidden        { display: none; }
  .lg\:flex          { display: flex; }
  .lg\:flex-row      { flex-direction: row; }
  .lg\:items-start   { align-items: flex-start; }
  .lg\:px-8          { padding-left: 2rem; padding-right: 2rem; }
  .lg\:grid-cols-3   { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:w-1\/3        { width: 33.333%; }
  .lg\:w-2\/3        { width: 66.666%; }
  .lg\:gap-16        { gap: 4rem; }
  .lg\:py-36         { padding-top: 9rem; padding-bottom: 9rem; }
}

/* Responsive — au-dessus de 768px (md) */
@media (min-width: 768px) {
  .md\:inline-block   { display: inline-block; }
  .md\:grid-cols-2    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3    { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4    { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex-row       { flex-direction: row; }
  .md\:text-7xl       { font-size: 4.5rem; line-height: 1; }
  .md\:text-5xl       { font-size: 3rem;   line-height: 1; }
  .md\:text-4xl       { font-size: 2.25rem; line-height: 2.5rem; }
}

/* Responsive — au-dessus de 640px (sm) */
@media (min-width: 640px) {
  .sm\:flex-row       { flex-direction: row; }
  .sm\:grid-cols-2    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* xl */
@media (min-width: 1280px) {
  .xl\:grid-cols-4    { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Arbitrary values manquants dans le build Tailwind ──── */
/* Ces classes utilisent des valeurs arbitraires non générées par le CLI  */
/* Tailwind lors de la compilation (scanning statique insuffisant).       */

/* Padding-top navbar offset — TOUTES les pages */
.pt-\[73px\]  { padding-top: 73px; }

/* Sticky top offset — navbar */
.top-\[73px\] { top: 73px; }

/* Line-height ultra-serré — hero h1 sur toutes les pages */
.leading-\[0\.9\] { line-height: 0.9; }

/* Taille de texte 10px — badges / labels petits */
.text-\[10px\] { font-size: 10px; line-height: 1.4; }

/* letter-spacing personnalisés — badges hero, sous-titres sections */
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }

/* Scale au clic — bouton submit contact */
.active\:scale-\[0\.99\]:active { transform: scale(0.99); }

/* Taille de texte 9px — mentions très petites */
.text-\[9px\]  { font-size: 9px;  line-height: 1.4; }

/* Hauteur fixe 2px — séparateur / trait de décoration */
.h-\[2px\]    { height: 2px; }

/* min-height arbitraires — blocs hero / sections */
.min-h-\[240px\] { min-height: 240px; }
.min-h-\[280px\] { min-height: 280px; }
.min-h-\[320px\] { min-height: 320px; }
.min-h-\[90vh\]  { min-height: 90vh;  }

/* Hauteurs responsive images (lg breakpoint = 1024px) */
@media (min-width: 1024px) {
  .lg\:h-\[460px\] { height: 460px; }
  .lg\:h-\[500px\] { height: 500px; }
}
