/*
Theme Name: Mestria
Theme URI: https://webmestria.fr
Author: webMestria
Author URI: https://webmestria.fr
Description: Thème immersif sur mesure pour webMestria — direction artistique cinématographique inspirée des grandes agences produit : typographie monumentale, canvas génératif "fils tissés", animations profondes au scroll. Sombre, précis, à couper le souffle.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mestria
Tags: dark, one-column, custom-menu, custom-logo, portfolio
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  --encre: #0a0b10;          /* fond principal, bleu-noir profond */
  --encre-2: #101219;        /* panneaux */
  --ivoire: #efede6;         /* texte principal */
  --ivoire-40: rgba(239, 237, 230, 0.4);
  --ivoire-14: rgba(239, 237, 230, 0.14);
  --azur: #4d9fff;           /* accent unique — l'Azur */
  --azur-soft: rgba(77, 159, 255, 0.35);

  --font-display: "Archivo", "Archivo Black", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --w: min(92vw, 1560px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--encre);
  color: var(--ivoire);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--azur); color: var(--encre); }

.wrap { width: var(--w); margin-inline: auto; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

:focus-visible {
  outline: 2px solid var(--azur);
  outline-offset: 3px;
}

/* Étiquette mono — repère de section */
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivoire-40);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 2.5rem;
}
.tag::before {
  content: "";
  width: 2rem; height: 1px;
  background: var(--azur);
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.site-header.is-scrolled {
  padding: 0.9rem 0;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ivoire-14);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand .brand-web { color: var(--ivoire-40); font-weight: 500; }
.brand .custom-logo { max-height: 40px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivoire);
  opacity: 0.75;
  transition: opacity 0.25s;
}
.main-nav a:hover { opacity: 1; }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--encre);
  background: var(--ivoire);
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  transition: background 0.25s, transform 0.25s var(--ease-out);
  will-change: transform;
}
.nav-cta:hover { background: var(--azur); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ivoire-14);
  border-radius: 999px;
  color: var(--ivoire);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--encre);
    display: none;
    align-items: center;
    justify-content: center;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; text-align: center; gap: 2.5rem; }
  .main-nav a { font-size: 1.4rem; }
  .nav-cta { display: none; }
}

/* ==========================================================================
   4. Hero — le métier à tisser
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 8rem 0 4rem;
  overflow: hidden;
}
#loom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero::after { /* voile de lisibilité en bas */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(108, 128, 138, 0.19), transparent);
  z-index: 1;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: var(--w);
  margin-inline: auto;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivoire-40);
  margin: 0 0 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.9rem, 9.5vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease-out) forwards;
}
.hero-title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.24s; }
.hero-title em {
  font-style: italic;
  font-stretch: 100%;
  font-weight: 400;
  color: var(--azur);
  text-transform: none;
}
@keyframes rise { to { transform: translateY(0); } }

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-sub {
  max-width: 34rem;
  margin: 0;
  color: var(--ivoire);
  opacity: 0;
  animation: fade 1s 0.6s forwards;
}
@keyframes fade { to { opacity: 0.85; } }

.scroll-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivoire-40);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  animation: fade 1s 1s forwards;
}
.scroll-hint::after {
  content: "";
  width: 1px; height: 3rem;
  background: linear-gradient(var(--ivoire-40), transparent);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================================================
   5. Marquee
   ========================================================================== */
.marquee {
  border-block: 1px solid var(--ivoire-14);
  padding: 1.1rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: scroll-x 30s linear infinite;
}
.marquee span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ivoire-40);
}
.marquee span b { color: var(--azur); font-weight: 400; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ==========================================================================
   6. Sections communes
   ========================================================================== */
.section { padding: clamp(5rem, 12vh, 9rem) 0; }

.manifesto {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 62rem;
  margin: 0;
}
.manifesto em {
  font-style: italic;
  font-weight: 400;
  color: var(--azur);
}

/* Révélation au scroll */
.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   7. Services — lignes numérotées
   ========================================================================== */
.services { border-top: 1px solid var(--ivoire-14); }
.service-row {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: baseline;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--ivoire-14);
  text-decoration: none;
  position: relative;
  transition: padding-left 0.4s var(--ease-out);
}
.service-row:hover { padding-left: 1.5rem; }
.service-row::before {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px; width: 0;
  background: var(--azur);
  transition: width 0.5s var(--ease-out);
}
.service-row:hover::before { width: 100%; }
.service-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ivoire-40);
}
.service-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 115%;
  font-size: clamp(1.7rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.service-desc {
  margin: 0;
  max-width: 40rem;
  color: var(--ivoire-40);
  font-size: 0.98rem;
}
.service-arrow {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--ivoire-40);
  transition: color 0.3s, transform 0.4s var(--ease-out);
}
.service-row:hover .service-arrow {
  color: var(--azur);
  transform: translate(0.4rem, -0.4rem);
}
@media (max-width: 700px) {
  .service-row { grid-template-columns: 3rem 1fr; }
  .service-arrow { display: none; }
}

/* ==========================================================================
   8. Projets / études de cas
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.project-card {
  position: relative;
  display: block;
  text-decoration: none;
  border: 1px solid var(--ivoire-14);
  border-radius: 6px;
  overflow: hidden;
  background: var(--encre-2);
  transition: border-color 0.35s;
}
.project-card:hover { border-color: var(--azur-soft); }
.project-card:nth-child(3n) { grid-column: span 2; }
.project-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(77,159,255,0.16), transparent 55%),
    var(--encre-2);
}
.project-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), opacity 0.4s;
}
.project-card:hover .project-media img { transform: scale(1.04); }
.project-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
}
.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.project-cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ivoire-40);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card:nth-child(3n) { grid-column: auto; }
}

/* ==========================================================================
   9. Chiffres / réassurance
   ========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--ivoire-14);
}
.stat {
  padding: 3rem 2rem;
  border-left: 1px solid var(--ivoire-14);
}
.stat:first-child { border-left: 0; }
.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 120%;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
  margin: 0 0 0.6rem;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ivoire-40);
  margin: 0;
}
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--ivoire-14); }
  .stat:first-child { border-top: 0; }
}

/* ==========================================================================
   10. Contact final
   ========================================================================== */
.contact-final {
  position: relative;
  overflow: hidden;
  text-align: left;
}
.contact-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(3rem, 12vw, 11rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 3rem;
}
.contact-title em {
  font-style: italic;
  font-stretch: 100%;
  font-weight: 400;
  text-transform: none;
  color: var(--azur);
}
.contact-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.contact-links a {
  text-decoration: none;
  border-bottom: 1px solid var(--ivoire-14);
  padding-bottom: 0.3rem;
  transition: border-color 0.3s, color 0.3s;
}
.contact-links a:hover { color: var(--azur); border-color: var(--azur); }

.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--encre);
  background: var(--ivoire);
  text-decoration: none;
  padding: 1.1rem 2.4rem;
  border-radius: 999px;
  transition: background 0.25s;
  will-change: transform;
}
.btn-primary:hover { background: var(--azur); }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--ivoire-14);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ivoire-40);
}
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--ivoire); }
.footer-nav ul {
  display: flex; gap: 1.8rem;
  list-style: none; margin: 0; padding: 0;
}

/* ==========================================================================
   12. Pages internes & blog
   ========================================================================== */
.page-plain { padding: 10rem 0 6rem; }
.page-plain .entry-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 120%;
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 3rem;
}
.entry-content { max-width: 46rem; }
.entry-content a { color: var(--azur); }
.entry-content h2, .entry-content h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin-top: 2.5em;
}
.entry-content blockquote {
  border-left: 2px solid var(--azur);
  margin-left: 0;
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--ivoire-40);
}
.entry-content input,
.entry-content textarea {
  width: 100%;
  background: var(--encre-2);
  border: 1px solid var(--ivoire-14);
  border-radius: 4px;
  color: var(--ivoire);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.entry-content input:focus,
.entry-content textarea:focus {
  outline: none;
  border-color: var(--azur);
}
.entry-content input[type="submit"],
.entry-content button[type="submit"] {
  width: auto;
  cursor: pointer;
  background: var(--ivoire);
  color: var(--encre);
  border: 0;
  border-radius: 999px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 1rem 2.2rem;
  transition: background 0.25s;
}
.entry-content input[type="submit"]:hover { background: var(--azur); }

.post-list { display: grid; gap: 0; }
.post-item {
  border-bottom: 1px solid var(--ivoire-14);
  padding: 2.5rem 0;
}
.post-item a { text-decoration: none; }
.post-item h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0 0 0.5rem;
  transition: color 0.3s;
}
.post-item a:hover h2 { color: var(--azur); }
.post-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ivoire-40);
}

/* Curseur halo (desktop uniquement) */
.cursor-glow {
  position: fixed;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--azur-soft), transparent 65%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}
@media (hover: none), (max-width: 860px) {
  .cursor-glow { display: none; }
}

/* ==========================================================================
   13. Accessibilité — mouvement réduit
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}




/*----------------------------------------------------------------------------------------*/

:root {
    --bg-color: #0a0a0c; /* Très sombre, très chic */
    --text-main: #f4f4f5;
    --text-muted: #8b8b93;
    --accent: #2e8fff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Space Grotesk', sans-serif;
}

/* Typographie Massive */
.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
}

/* La Grille Bento */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.bento-item {
    background: #151518;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px; /* Un radius généreux comme Apple */
    padding: 3rem 2rem;
    transition: transform 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
}

.bento-item.span-2 {
    grid-column: span 2;
}

/* Études de cas "Deep Dive" */
.case-study-hero {
    display: flex;
    flex-direction: column;
    margin-bottom: 6rem;
}

.case-visual {
    width: 100%;
    height: 70vh;
    border-radius: 24px;
    overflow: hidden;
    background: #1a1a1d;
}

.case-details {
    padding-top: 2rem;
    max-width: 800px;
}

.case-metric {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--accent);
}
