/* Identité propre au projet Portfolio web : terminal Linux et architecture serveur. */
.pw-card-visual {
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 20%, rgba(68, 214, 154, 0.16), transparent 42%),
    linear-gradient(rgba(68, 214, 154, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 214, 154, 0.045) 1px, transparent 1px),
    #0b1117;
  background-size: auto, 32px 32px, 32px 32px, auto;
}

.pw-card-window {
  width: min(78%, 25rem);
  overflow: hidden;
  border: 1px solid rgba(68, 214, 154, 0.34);
  border-radius: 0.75rem;
  background: rgba(7, 12, 16, 0.94);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.48), 0 0 2rem rgba(68, 214, 154, 0.08);
  font-family: monospace;
  transform: rotate(-2deg);
}

.pw-card-window__bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem;
  border-bottom: 1px solid rgba(233, 236, 239, 0.08);
  background: #121a22;
}

.pw-card-window__bar span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #60707d;
}

.pw-card-window__bar span:first-child {
  background: #db7e61;
}

.pw-card-window__bar span:last-child {
  background: #44d69a;
}

.pw-card-window__body {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  gap: 0.55rem;
  justify-content: center;
  padding: 1.2rem;
  font-size: clamp(0.62rem, 1.3vw, 0.8rem);
  color: #a8b4bd;
}

.pw-card-window__body strong {
  color: #e9ecef;
}

.pw-card-window__body i {
  font-style: normal;
}

.pw-card-window__body em,
.pw-card-prompt {
  color: #44d69a;
  font-style: normal;
}

.pw {
  --pw-green: #44d69a;
  --pw-green-soft: #8ae8be;
  --pw-copper: #d88b62;
  position: relative;
  overflow: hidden;
  padding: 8.5rem 1.25rem 6rem;
  background: #080d12;
  color: #e9ecef;
}

.pw::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 7%, rgba(68, 214, 154, 0.11), transparent 28rem),
    radial-gradient(circle at 5% 35%, rgba(216, 139, 98, 0.07), transparent 25rem),
    linear-gradient(rgba(68, 214, 154, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 214, 154, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  content: "";
  pointer-events: none;
}

.pw__wrap {
  position: relative;
  width: 100%;
  max-width: 100rem;
  margin: 0 auto;
}

.pw__hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  min-height: 34rem;
}

.pw__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: monospace;
  font-size: 0.7rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--pw-green);
}

.pw__eyebrow::before {
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.pw__title {
  max-width: 48rem;
  margin-top: 1rem;
  font-size: clamp(3.7rem, 10vw, 8.5rem);
  font-weight: 650;
  line-height: 0.84;
  letter-spacing: -0.065em;
  color: #f1f4f5;
}

.pw__title span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px var(--pw-green);
}

.pw__lead {
  max-width: 44rem;
  margin-top: 1.8rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
  color: #a5afb8;
}

.pw__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pw__tags span {
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(68, 214, 154, 0.24);
  border-radius: 9999px;
  background: rgba(68, 214, 154, 0.055);
  font-family: monospace;
  font-size: 0.66rem;
  color: #b9c3ca;
}

.pw__terminal {
  overflow: hidden;
  border: 1px solid rgba(68, 214, 154, 0.28);
  border-radius: 1rem;
  background: rgba(5, 9, 12, 0.94);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.5), 0 0 4rem rgba(68, 214, 154, 0.06);
  font-family: monospace;
}

.pw__terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(233, 236, 239, 0.08);
  background: #111922;
}

.pw__terminal-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #64717d;
}

.pw__terminal-bar span:first-child {
  background: #d96f57;
}

.pw__terminal-bar span:nth-child(2) {
  background: #d6a64f;
}

.pw__terminal-bar span:nth-child(3) {
  background: var(--pw-green);
}

.pw__terminal-bar strong {
  min-width: 0;
  margin-left: 0.5rem;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #87939d;
}

.pw__terminal-body {
  min-height: 20rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  font-size: clamp(0.7rem, 1.6vw, 0.88rem);
  line-height: 1.85;
  color: #dbe1e4;
}

.pw__terminal-body p {
  overflow-wrap: anywhere;
}

.pw__prompt,
.pw__terminal-success {
  color: var(--pw-green);
}

.pw__terminal-muted {
  color: #788791;
}

.pw__cursor {
  display: inline-block;
  width: 0.55rem;
  height: 1rem;
  margin-top: 0.6rem;
  background: var(--pw-green);
  animation: pw-blink 1s steps(1) infinite;
}

@keyframes pw-blink {
  50% {
    opacity: 0;
  }
}

.pw__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2.5rem;
  overflow: hidden;
  border: 1px solid rgba(233, 236, 239, 0.1);
  border-radius: 0.9rem;
  background: rgba(15, 23, 30, 0.78);
}

.pw__facts div {
  padding: 1.15rem;
  border-right: 1px solid rgba(233, 236, 239, 0.08);
  border-bottom: 1px solid rgba(233, 236, 239, 0.08);
}

.pw__facts strong {
  display: block;
  font-family: monospace;
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  color: var(--pw-green);
}

.pw__facts span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: #87939d;
}

.pw__site-preview {
  width: min(100%, 76rem);
  margin-top: clamp(3rem, 7vw, 5rem);
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(233, 236, 239, 0.12);
  border-radius: 1rem;
  background: #101820;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.34);
}

.pw__browser-bar {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(233, 236, 239, 0.08);
  background: #131d25;
}

.pw__browser-bar span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #62707b;
}

.pw__browser-bar span:first-child {
  background: #d96f57;
}

.pw__browser-bar span:nth-child(2) {
  background: #d6a64f;
}

.pw__browser-bar span:nth-child(3) {
  background: var(--pw-green);
}

.pw__browser-bar strong {
  margin-left: 0.5rem;
  font-family: monospace;
  font-size: 0.66rem;
  font-weight: 400;
  color: #87939d;
}

.pw__site-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.pw__site-preview img.pw__site-preview-image--light {
  display: none;
}

.pw__site-preview figcaption {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(233, 236, 239, 0.08);
  font-family: monospace;
  font-size: 0.65rem;
  color: #87939d;
}

.pw__section {
  padding-top: clamp(5rem, 10vw, 8rem);
}

.pw__section-head {
  max-width: 53rem;
}

.pw__heading {
  margin-top: 0.8rem;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #edf1f2;
}

.pw__text,
.pw__prose p {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #98a3ac;
}

.pw__origin {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.pw__ai-path {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.pw__ai-path article {
  min-height: 14rem;
  padding: 1.4rem;
  border: 1px solid rgba(68, 214, 154, 0.16);
  border-radius: 0.85rem;
  background: linear-gradient(145deg, rgba(68, 214, 154, 0.06), rgba(15, 23, 30, 0.8));
}

.pw__ai-path article > span {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--pw-copper);
}

.pw__ai-path h3 {
  margin-top: 2rem;
  font-size: 1.35rem;
  color: #edf1f2;
}

.pw__ai-path p {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #929da6;
}

.pw__notice,
.pw__privacy {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 2px solid var(--pw-copper);
  background: linear-gradient(90deg, rgba(216, 139, 98, 0.09), transparent);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #aab3ba;
}

.pw__architecture {
  display: grid;
  gap: 0.8rem;
  align-items: stretch;
  margin-top: 2.5rem;
}

.pw__node {
  padding: 1.35rem;
  border: 1px solid rgba(233, 236, 239, 0.11);
  border-radius: 0.8rem;
  background: #101820;
}

.pw__node--server {
  border-color: rgba(68, 214, 154, 0.42);
  box-shadow: inset 0 0 2rem rgba(68, 214, 154, 0.035);
}

.pw__node span,
.pw__stack-grid article > span {
  display: block;
  font-family: monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--pw-green);
}

.pw__node strong {
  display: block;
  margin-top: 0.7rem;
  font-size: 1.1rem;
  color: #e9edef;
}

.pw__node small {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #85919b;
}

.pw__connector {
  align-self: center;
  justify-self: center;
  font-family: monospace;
  font-size: 1.4rem;
  color: var(--pw-copper);
  transform: rotate(90deg);
}

.pw__stack-grid {
  display: grid;
  gap: 1px;
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(233, 236, 239, 0.1);
  border-radius: 1rem;
  background: rgba(233, 236, 239, 0.08);
}

.pw__stack-grid article {
  padding: 1.4rem;
  background: #101820;
}

.pw__stack-grid h3 {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: #e5eaec;
}

.pw__stack-grid p {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #8e99a2;
}

.pw__admin-section {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.pw__admin {
  overflow: hidden;
  border: 1px solid rgba(68, 214, 154, 0.28);
  border-radius: 1rem;
  background: #0c1319;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.35);
  font-family: monospace;
}

.pw__admin-top {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(233, 236, 239, 0.08);
  background: #131d25;
  font-size: 0.66rem;
  color: #9ba6ae;
}

.pw__live {
  color: var(--pw-green);
}

.pw__admin-block {
  padding: 1.2rem;
  border-bottom: 1px solid rgba(233, 236, 239, 0.08);
}

.pw__admin-block > p {
  margin-bottom: 0.9rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #74828d;
}

.pw__admin-block > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(233, 236, 239, 0.05);
  font-size: 0.74rem;
  color: #b5bec5;
}

.pw__toggle {
  flex: 0 0 auto;
  padding: 0.25rem 0.45rem;
  border: 1px solid #596774;
  border-radius: 9999px;
  font-size: 0.58rem;
  font-style: normal;
  text-transform: uppercase;
  color: #8d99a3;
}

.pw__toggle.is-on {
  border-color: rgba(68, 214, 154, 0.55);
  background: rgba(68, 214, 154, 0.08);
  color: var(--pw-green-soft);
}

.pw__logs code {
  display: block;
  padding: 0.3rem 0;
  font-family: monospace;
  font-size: 0.68rem;
  color: #89969f;
}

.pw__logs b {
  color: var(--pw-green);
}

.pw__logs em {
  color: var(--pw-copper);
  font-style: normal;
  font-weight: 700;
}

.pw__skills {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.pw__skills article {
  padding: 1.35rem;
  border-top: 1px solid rgba(68, 214, 154, 0.3);
  background: rgba(15, 23, 30, 0.72);
}

.pw__skills strong {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--pw-copper);
}

.pw__skills h3 {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #e6ebed;
}

.pw__skills p {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #909ba4;
}

.pw__closing {
  margin-top: clamp(5rem, 10vw, 8rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid rgba(68, 214, 154, 0.24);
  border-radius: 1.2rem;
  background: radial-gradient(circle at 90% 10%, rgba(68, 214, 154, 0.13), transparent 25rem), #101820;
}

.pw__closing h2 {
  max-width: 55rem;
  margin-top: 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #edf1f2;
}

.pw__closing > p:not(.pw__eyebrow) {
  max-width: 48rem;
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #99a4ad;
}

.pw__back {
  display: inline-flex;
  margin-top: 2rem;
  font-family: monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pw-green);
  text-decoration: none;
}

.pw__back:hover,
.pw__back:focus-visible {
  text-decoration: underline;
}

/*
 * Le thème clair conserve l'identité terminal du projet tout en l'intégrant à
 * la palette ivoire, graphite et cuivre utilisée sur le reste du portfolio.
 * Le vert est assombri afin de rester lisible sur les surfaces claires.
 */
html[data-theme="light"] .pw-card-visual {
  background-color: #ebe6de !important;
  background-image:
    radial-gradient(circle at 75% 20%, rgba(8, 122, 85, 0.14), transparent 42%),
    linear-gradient(rgba(77, 66, 54, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 66, 54, 0.07) 1px, transparent 1px) !important;
}

html[data-theme="light"] .pw-card-window {
  border-color: rgba(8, 122, 85, 0.42);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 1.5rem 4rem rgba(50, 43, 34, 0.18), 0 0 2rem rgba(8, 122, 85, 0.08);
}

html[data-theme="light"] .pw-card-window__bar {
  border-color: rgba(32, 37, 43, 0.12);
  background: #e4ded5;
}

html[data-theme="light"] .pw-card-window__bar span {
  background: #7a858d;
}

html[data-theme="light"] .pw-card-window__bar span:first-child {
  background: #b85d45;
}

html[data-theme="light"] .pw-card-window__bar span:last-child,
html[data-theme="light"] .pw-card-window__body em,
html[data-theme="light"] .pw-card-prompt {
  color: #087a55;
}

html[data-theme="light"] .pw-card-window__bar span:last-child {
  background: #087a55;
}

html[data-theme="light"] .pw-card-window__body {
  color: #4d555d;
}

html[data-theme="light"] .pw-card-window__body strong {
  color: #20252b;
}

html[data-theme="light"] .pw {
  --pw-green: #087a55;
  --pw-green-soft: #0b6b4d;
  --pw-copper: #8b4f1f;
  background: #f4f1eb;
  color: #20252b;
}

html[data-theme="light"] .pw::before {
  background:
    radial-gradient(circle at 82% 7%, rgba(8, 122, 85, 0.1), transparent 28rem),
    radial-gradient(circle at 5% 35%, rgba(184, 115, 51, 0.09), transparent 25rem),
    linear-gradient(rgba(77, 66, 54, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 66, 54, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}

html[data-theme="light"] .pw__title,
html[data-theme="light"] .pw__heading,
html[data-theme="light"] .pw__ai-path h3,
html[data-theme="light"] .pw__node strong,
html[data-theme="light"] .pw__stack-grid h3,
html[data-theme="light"] .pw__skills h3,
html[data-theme="light"] .pw__closing h2 {
  color: #20252b;
}

html[data-theme="light"] .pw__lead,
html[data-theme="light"] .pw__text,
html[data-theme="light"] .pw__prose p,
html[data-theme="light"] .pw__ai-path p,
html[data-theme="light"] .pw__node small,
html[data-theme="light"] .pw__stack-grid p,
html[data-theme="light"] .pw__skills p,
html[data-theme="light"] .pw__closing > p:not(.pw__eyebrow) {
  color: #4d555d;
}

html[data-theme="light"] .pw__tags span {
  border-color: rgba(8, 122, 85, 0.3);
  background: rgba(8, 122, 85, 0.07);
  color: #384148;
}

html[data-theme="light"] .pw__terminal {
  border-color: rgba(8, 122, 85, 0.35);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 2rem 5rem rgba(50, 43, 34, 0.18), 0 0 3rem rgba(8, 122, 85, 0.07);
}

html[data-theme="light"] .pw__terminal-bar,
html[data-theme="light"] .pw__browser-bar,
html[data-theme="light"] .pw__admin-top {
  border-color: rgba(32, 37, 43, 0.12);
  background: #e4ded5;
}

html[data-theme="light"] .pw__terminal-bar strong,
html[data-theme="light"] .pw__browser-bar strong,
html[data-theme="light"] .pw__admin-top {
  color: #59636b;
}

html[data-theme="light"] .pw__terminal-body {
  color: #293037;
}

html[data-theme="light"] .pw__terminal-muted {
  color: #59636b;
}

html[data-theme="light"] .pw__facts {
  border-color: #d4cdc2;
  background: rgba(255, 253, 249, 0.86);
}

html[data-theme="light"] .pw__facts div {
  border-color: #d4cdc2;
}

html[data-theme="light"] .pw__facts span {
  color: #4d555d;
}

html[data-theme="light"] .pw__site-preview {
  border-color: #d4cdc2;
  background: #fffdf9;
  box-shadow: 0 2rem 5rem rgba(50, 43, 34, 0.14);
}

html[data-theme="light"] .pw__site-preview-image--dark {
  display: none;
}

html[data-theme="light"] .pw__site-preview-image--light {
  display: block;
}

html[data-theme="light"] .pw__site-preview figcaption {
  border-color: #d4cdc2;
  color: #4d555d;
}

html[data-theme="light"] .pw__ai-path article {
  border-color: rgba(8, 122, 85, 0.22);
  background: linear-gradient(145deg, rgba(8, 122, 85, 0.07), rgba(255, 253, 249, 0.92));
}

html[data-theme="light"] .pw__notice,
html[data-theme="light"] .pw__privacy {
  background: linear-gradient(90deg, rgba(184, 115, 51, 0.12), transparent);
  color: #424950;
}

html[data-theme="light"] .pw__node,
html[data-theme="light"] .pw__stack-grid article,
html[data-theme="light"] .pw__skills article {
  border-color: #d4cdc2;
  background: #fffdf9;
}

html[data-theme="light"] .pw__node--server {
  border-color: rgba(8, 122, 85, 0.48);
  box-shadow: inset 0 0 2rem rgba(8, 122, 85, 0.05);
}

html[data-theme="light"] .pw__stack-grid {
  border-color: #d4cdc2;
  background: #d4cdc2;
}

html[data-theme="light"] .pw__admin {
  border-color: rgba(8, 122, 85, 0.35);
  background: #fffdf9;
  box-shadow: 0 2rem 5rem rgba(50, 43, 34, 0.16);
}

html[data-theme="light"] .pw__admin-block {
  border-color: #d4cdc2;
}

html[data-theme="light"] .pw__admin-block > p,
html[data-theme="light"] .pw__logs code {
  color: #59636b;
}

html[data-theme="light"] .pw__admin-block > div {
  border-color: rgba(32, 37, 43, 0.1);
  color: #343b42;
}

html[data-theme="light"] .pw__toggle {
  border-color: #8d969d;
  color: #59636b;
}

html[data-theme="light"] .pw__toggle.is-on {
  border-color: rgba(8, 122, 85, 0.5);
  background: rgba(8, 122, 85, 0.08);
  color: #0b6b4d;
}

html[data-theme="light"] .pw__skills article {
  border-top-color: rgba(8, 122, 85, 0.38);
}

html[data-theme="light"] .pw__closing {
  border-color: rgba(8, 122, 85, 0.28);
  background: radial-gradient(circle at 90% 10%, rgba(8, 122, 85, 0.11), transparent 25rem), #fffdf9;
  box-shadow: 0 1.5rem 4rem rgba(50, 43, 34, 0.1);
}

@media (min-width: 768px) {
  .pw {
    padding: 10rem 2rem 7rem;
  }

  .pw__hero {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .pw__facts {
    grid-template-columns: repeat(4, 1fr);
  }

  .pw__facts div {
    border-bottom: 0;
  }

  .pw__origin,
  .pw__admin-section {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .pw__ai-path {
    grid-template-columns: repeat(3, 1fr);
  }

  .pw__architecture {
    grid-template-columns: 1fr auto 1.15fr auto 1fr;
  }

  .pw__connector {
    transform: none;
  }

  .pw__stack-grid,
  .pw__skills {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pw {
    padding-right: 3rem;
    padding-left: 3rem;
  }
}

@media (max-width: 480px) {
  .pw__title {
    font-size: clamp(3.1rem, 18vw, 4.6rem);
  }

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

  .pw__facts div {
    border-right: 0;
  }

  .pw__terminal-body {
    min-height: 18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw__cursor {
    animation: none;
  }
}
