/* Besma Lola Khalfa — v4 "planche contact". Papier, film, crayon gras. IBM Plex (latin, arabe, mono). */
@font-face { font-family: "Plex"; src: url("fonts/plex-sans.woff2") format("woff2"); font-weight: 100 700; font-stretch: 85% 100%; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/plex-arabic-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex"; src: url("fonts/plex-arabic-medium.woff2") format("woff2"); font-weight: 500 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Layout: une colonne éditoriale + une bande de film pleine largeur. Gras = seulement le crayon. */
:root {
  --paper: #FFFFFF;
  --ink: #141414;
  --ink-2: #5A5A56;
  --rule: #E4E4E0;
  --film: #0C0C0B;
  --edge: #E8A23A;
  --pencil: #D4261C;
  --hole: #FFFFFF;
  --font: "Plex", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --s-0: 1.0625rem;
  --s-1: 1.2rem;
  --s-2: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --s-3: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  --s-4: clamp(2.6rem, 1.1rem + 5.4vw, 5.8rem);
  --gut: max(16px, env(safe-area-inset-left, 0px), clamp(1rem, 4vw, 3rem));
  --gut-r: max(16px, env(safe-area-inset-right, 0px), clamp(1rem, 4vw, 3rem));
  --max: 74rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #151514; --ink: #ECECE8; --ink-2: #A6A6A0; --rule: #2B2B29; --film: #050505; --edge: #E8A23A; --pencil: #FF5B4F; --hole: #3A3A36; color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #151514; --ink: #ECECE8; --ink-2: #A6A6A0; --rule: #2B2B29; --film: #050505; --edge: #E8A23A; --pencil: #FF5B4F; --hole: #3A3A36; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--s-0); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .24em; }
a:hover { text-decoration-color: var(--pencil); }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
p { text-wrap: pretty; }
.wrap { max-width: var(--max); margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 16px; top: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--ink-2); }

/* En-tête */
.head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.name { text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.nav { display: flex; align-items: center; gap: clamp(.5rem, 2.2vw, 1.75rem); }
.nav a { text-decoration: none; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.theme { width: 44px; height: 44px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.theme:hover { color: var(--ink); }
.theme svg { width: 18px; height: 18px; }
.theme .sun, :root[data-theme="dark"] .theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun { display: block; } :root:not([data-theme="light"]) .theme .moon { display: none; } }
@media (max-width: 560px) { .nav .opt { display: none; } }

/* Intro */
.intro { padding-block: clamp(2.5rem, 8vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.who { color: var(--ink-2); }
.intro h1 { margin-top: 1.25rem; font-size: var(--s-4); font-stretch: 85%; font-weight: 500; line-height: .98; letter-spacing: -.035em; max-width: 15ch; }
.intro .facts { margin-top: 1.75rem; max-width: 40rem; font-size: var(--s-1); line-height: 1.55; color: var(--ink-2); }

/* Planche contact */
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1.25rem; }
.sheet-head h2 { font-size: var(--s-0); font-weight: 500; letter-spacing: 0; }
.sheet-head p { color: var(--ink-2); max-width: 34rem; }
.sheet { list-style: none; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16rem, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 1rem; }
.sheet li { scroll-snap-align: start; }
@media (max-width: 700px) { .sheet { grid-auto-columns: 80vw; } .pic { height: 52vw; } }
.frame { display: block; text-decoration: none; position: relative; }
.film { position: relative; background: var(--film); padding: 36px 7px; }
.sheet li:first-child .film { padding-left: var(--gut); }
.sheet li:last-child .film { padding-right: var(--gut-r); }
.film::before, .film::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: var(--hole);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='10'%3E%3Crect x='5' y='0' width='12' height='10' rx='2.5'/%3E%3C/svg%3E") repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='10'%3E%3Crect x='5' y='0' width='12' height='10' rx='2.5'/%3E%3C/svg%3E") repeat-x; }
.film::before { top: 8px; }
.film::after { bottom: 8px; }
.pic { position: relative; height: clamp(150px, 15vw, 230px); overflow: hidden; background: #1E1E1C; border-radius: 2px; }
.pic img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: filter .3s; }
.no { position: absolute; bottom: 21px; z-index: 1; font: 11px/1 var(--mono); color: var(--edge); letter-spacing: .04em; }
.no.l { left: 14px; } .no.r { right: 14px; }
.sheet li:first-child .no.l { left: calc(var(--gut) + 7px); }
.mark { position: absolute; z-index: 2; left: 0; top: 26px; width: 100%; height: calc(100% - 52px); overflow: visible; pointer-events: none; }
.mark path { fill: none; stroke: var(--pencil); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.frame.on .mark path, .frame:hover .mark path, .frame:focus-visible .mark path { opacity: 1; animation: draw .75s cubic-bezier(.55, 0, .25, 1) forwards; }
.sheet:hover .frame.on:not(:hover) .mark path, .sheet:focus-within .frame.on:not(:focus-visible) .mark path { animation: none; opacity: 0; }
.sheet:hover .frame:not(:hover) .pic img { filter: grayscale(1) brightness(.85); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .frame.on .mark path, .frame:hover .mark path, .frame:focus-visible .mark path { animation: none; stroke-dashoffset: 0; }
  .pic img { transition: none; }
}
.cap { padding: 1rem 7px 0; display: grid; gap: .3rem; }
.sheet li:first-child .cap { padding-left: var(--gut); }
.cap .co { color: var(--ink-2); font-size: .92rem; }
.cap h3 { font-size: var(--s-1); line-height: 1.25; letter-spacing: -.01em; padding-right: 1rem; }
.cap .kw { color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
.frame:hover h3, .frame:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--pencil); text-decoration-thickness: 2px; text-underline-offset: .2em; }

/* Blocs */
.block { padding-block: clamp(3.5rem, 8vw, 6rem); }
.block + .block { border-top: 1px solid var(--rule); }
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2.5rem clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.print { background: var(--film); padding: 10px 10px 34px; position: relative; }
.print img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.print figcaption { position: absolute; left: 12px; bottom: 11px; font: 11px/1 var(--mono); color: var(--edge); }
.about-text { display: grid; gap: 1.1rem; max-width: 40rem; }
.about-text h2 { font-size: var(--s-3); font-stretch: 85%; letter-spacing: -.03em; }
.about-text > p { color: var(--ink-2); font-size: var(--s-1); line-height: 1.6; }
.xp { list-style: none; padding: 0; margin-top: .5rem; }
.xp li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .1rem 1rem; padding-block: .9rem; border-top: 1px solid var(--rule); }
.xp li:last-child { border-bottom: 1px solid var(--rule); }
.xp .yr { font: .85rem/1.9 var(--mono); color: var(--ink-2); }
.xp b { font-weight: 500; }
.xp span span { display: block; color: var(--ink-2); font-size: .95rem; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.links a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .print { max-width: 20rem; } }
@media (max-width: 460px) { .xp li { grid-template-columns: 1fr; } }

.contact h2 { font-size: var(--s-4); font-stretch: 85%; line-height: .98; letter-spacing: -.035em; max-width: 13ch; }
.contact p { margin-top: 1.25rem; color: var(--ink-2); max-width: 34rem; font-size: var(--s-1); }
.mail { display: inline-block; margin-top: 1.5rem; font-size: var(--s-2); word-break: break-all; user-select: all; text-decoration-color: var(--pencil); text-decoration-thickness: 2px; }
.contact .links { margin-top: 1rem; }
.foot { border-top: 1px solid var(--rule); padding-block: 1.5rem 2.5rem; color: var(--ink-2); font-size: .9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }

/* Étude de cas */
.cs-top { padding-block: clamp(1rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem); }
.back { color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.cs-meta { margin-top: 1.25rem; color: var(--ink-2); }
.cs-top h1 { margin-top: .6rem; font-size: var(--s-4); font-stretch: 85%; line-height: .98; letter-spacing: -.035em; max-width: 16ch; }
.lede { margin-top: 1.25rem; max-width: 42rem; font-size: var(--s-1); line-height: 1.6; color: var(--ink-2); }
.tl { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1.5rem; margin-top: 2rem; border-top: 1px solid var(--rule); }
.tl div { padding-block: .9rem; border-bottom: 1px solid var(--rule); }
.tl dt { font: .8rem/1.6 var(--mono); color: var(--ink-2); }
.tl dd { margin: .2rem 0 0; font-size: .97rem; line-height: 1.45; }
.tl .imp dd { font-weight: 500; }
.big { background: var(--film); padding: 26px; position: relative; }
.big img { width: 100%; }
.big .no { bottom: 8px; }
.sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1rem clamp(1.5rem, 5vw, 4rem); padding-block: clamp(2.25rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); }
.sec:first-of-type { border-top: 0; }
.sec > h2 { font: .85rem/1.9 var(--mono); color: var(--ink-2); letter-spacing: 0; }
.sec-body { display: grid; gap: 1.25rem; max-width: 42rem; }
.sec-body > p { font-size: var(--s-1); line-height: 1.6; }
.sec-body ul { padding-left: 1.1rem; display: grid; gap: .4rem; color: var(--ink-2); }
.idea { font-size: var(--s-2); line-height: 1.3; letter-spacing: -.015em; padding-left: 1rem; border-left: 3px solid var(--pencil); }
.dec { display: grid; gap: 0; }
.dec article { display: grid; gap: .6rem; padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.dec article:first-child { border-top: 0; padding-top: 0; }
.dec h3 { font-size: var(--s-2); }
.dec p { color: var(--ink-2); }
.dec .why { color: var(--ink); }
.dec .why b { color: var(--pencil); font-weight: 500; margin-right: .35rem; }
.fig img { width: 100%; border: 1px solid var(--rule); }
.fig figcaption { margin-top: .5rem; color: var(--ink-2); font-size: .9rem; }
.note { color: var(--ink-2); font-size: .95rem; }
.next { display: block; text-decoration: none; padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--rule); }
.next span { color: var(--ink-2); }
.next b { display: block; font-weight: 500; font-size: var(--s-3); font-stretch: 85%; letter-spacing: -.03em; line-height: 1.05; margin-top: .4rem; max-width: 20ch; }
.next:hover b { text-decoration: underline; text-decoration-color: var(--pencil); text-decoration-thickness: 3px; }
@media (max-width: 820px) { .sec { grid-template-columns: 1fr; } }

/* Démo RTL (cas SEFAR) */
.flip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.flip-text { display: grid; gap: .9rem; color: var(--ink-2); }
.flip-btn { justify-self: start; font: inherit; color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; padding: .6rem 1.15rem; min-height: 44px; cursor: pointer; }
.phone { background: var(--paper); border: 1px solid var(--rule); border-radius: 26px; padding: 1.1rem; width: 100%; max-width: 21rem; }
.ph-top { display: flex; align-items: center; gap: .6rem; }
.ph-top strong { font-weight: 500; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .mirror { transform: scaleX(-1); }
.ph-step { margin-top: 1rem; color: var(--ink-2); font-size: .85rem; }
.ph-bar { height: 5px; border-radius: 5px; background: var(--rule); margin-top: .4rem; overflow: hidden; }
.ph-bar i { display: block; height: 100%; width: 66%; background: var(--ink); }
.ph-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.ph-amt { font-variant-numeric: tabular-nums; font-weight: 500; }
.ph-voice { display: flex; align-items: center; gap: .6rem; }
.ph-play { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; flex: none; }
.ph-play svg { width: 11px; height: 11px; fill: var(--paper); }
.ph-wave { display: flex; align-items: center; gap: 2px; height: 20px; }
.ph-wave i { width: 3px; border-radius: 2px; background: var(--ink-2); }
.ph-cta { margin-top: 1rem; background: var(--ink); color: var(--paper); border-radius: 12px; text-align: center; padding: .7rem; font-weight: 500; }
@media (max-width: 760px) { .flip { grid-template-columns: 1fr; } }

/* CV */
.cv { padding-block: clamp(1rem, 4vw, 3rem); max-width: 48rem; }
.cv h1 { font-size: var(--s-3); font-stretch: 85%; }
.cv .sub { margin-top: .4rem; font-size: var(--s-1); }
.cv .cl { margin-top: 1rem; color: var(--ink-2); display: grid; gap: .15rem; font-size: .95rem; }
.cv h2 { font: .85rem/1.9 var(--mono); color: var(--ink-2); letter-spacing: 0; margin: 2rem 0 .6rem; padding-top: .8rem; border-top: 1px solid var(--rule); }
.cv h3 { font-size: var(--s-0); }
.cv .job { margin-bottom: 1.1rem; }
.cv .job p { margin-top: .2rem; }
.cv .pdf { margin-top: 1.25rem; }
.cv .pdf a { min-height: 44px; display: inline-flex; align-items: center; }
@media print {
  @page { margin: 14mm; }
  :root, :root[data-theme] { --paper: #fff; --ink: #000; --ink-2: #333; --rule: #bbb; color-scheme: light; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .head, .foot, .no-print, .skip { display: none !important; }
  .cv { padding: 0; max-width: none; }
  .cv h2 { font-family: var(--font); font-weight: 600; color: #000; margin-top: 1rem; }
  a { text-decoration: none; }
}
.nf { padding-block: clamp(4rem, 14vw, 10rem); }
.nf h1 { font-size: var(--s-4); font-stretch: 85%; letter-spacing: -.035em; }
.nf p { margin-top: 1rem; color: var(--ink-2); font-size: var(--s-1); }
