/*
Theme Name: AppStudio
Theme URI: https://appstudio.agency
Author: AppStudio
Description: Theme hybride pour studio de developpement mobile. Gabarits PHP + blocs pour le corps des articles. Variante corporate (hero bleu profond, fond creme).
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: appstudio
Tags: business, portfolio, block-styles, translation-ready, custom-logo
*/

:root {
  --cream: #F6F2EA;
  --cream-2: #F1ECE2;
  --cream-3: #FBF9F4;
  --line: #E2DACA;
  --line-2: #DED5C2;
  --ink: #16181C;
  --ink-2: #2A2D33;
  --muted: #4A4E57;
  --muted-2: #6B6459;
  --mono-muted: #8A8172;
  --blue: #1D3A8A;
  --blue-dark: #16296B;
  --navy: #0F1730;
  --navy-line: #29324D;
  --navy-muted: #B7BDCC;
  --navy-accent: #8DA2E0;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipeIn { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.site-logo { display: block; }
.site-logo img { height: 30px; width: auto; display: block; }
.site-logo .wordmark { font-family: var(--serif); font-size: 25px; letter-spacing: -0.01em; color: var(--ink); }
.nav { flex: 1; }
.nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { font-size: 14.5px; color: var(--muted); }
.nav a:hover, .nav .current-menu-item > a { color: var(--ink); }
.header-side { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; }
.lang a { color: #A69C88; }
.lang .current-lang a, .lang a:hover { color: var(--ink); }
.lang .sep { color: #C9BFA9; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border-radius: 2px; font-weight: 500; font-size: 15px;
  padding: 15px 26px; cursor: pointer; border: 0;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.btn--primary { background: var(--blue); color: var(--cream); }
.btn--primary:hover { background: var(--blue-dark); color: var(--cream); transform: translateY(-2px); }
.btn--ghost { border: 1px solid #CFC6B2; color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.btn--light { background: var(--cream); color: var(--navy); }
.btn--light:hover { background: #FFFFFF; color: var(--navy); transform: translateY(-2px); }
.btn--sm { font-size: 14px; padding: 11px 20px; }
.btn--block { display: block; text-align: center; width: 100%; }

/* ---------- hero (corporate) ---------- */
.hero { background: var(--navy); color: #EDEAE3; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 72px; align-items: center; padding-top: 84px; padding-bottom: 84px; }
.kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 28px; color: var(--blue); }
.hero .kicker { color: var(--navy-accent); animation: riseIn 0.6s var(--ease) both; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: 72px; line-height: 1.04; letter-spacing: -0.02em; color: #FBF9F4; margin: 0 0 26px; animation: wipeIn 0.9s var(--ease) 0.08s both; }
.hero__sub { font-size: 18px; line-height: 1.6; color: var(--navy-muted); max-width: 46ch; margin: 0; animation: riseIn 0.7s var(--ease) 0.26s both; }
.hero-card {
  background: var(--cream); color: var(--ink); border-radius: 3px; padding: 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: riseIn 0.8s var(--ease) 0.34s both;
}
.hero-card__title { font-family: var(--serif); font-size: 27px; margin-bottom: 10px; }
.hero-card p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 24px; }
.hero-card ul { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-card li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.hero-card li::before { content: "—"; color: var(--blue); }

/* ---------- stats ---------- */
.stats { background: var(--cream-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-top: 30px; padding-bottom: 30px; animation: fadeIn 0.9s ease 0.4s both; }
.stat__n { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--blue); }
.stat__l { font-size: 13.5px; color: var(--muted-2); margin-top: 4px; }

/* ---------- sections ---------- */
.section { padding-top: 80px; padding-bottom: 80px; }
.section--tint { background: var(--cream-2); border-top: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 40px; margin-bottom: 44px; }
.section__head--ruled { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 40px; }
.h2 { font-family: var(--serif); font-weight: 300; font-size: 44px; letter-spacing: -0.015em; color: var(--ink); margin: 0; }
.h1 { font-family: var(--serif); font-weight: 300; font-size: 60px; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 16px; animation: wipeIn 0.8s var(--ease) both; }
.lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 56ch; margin: 0 0 48px; }
.more { font-size: 14.5px; color: var(--blue); white-space: nowrap; }

/* ---------- case studies ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.case-card { display: flex; flex-direction: column; gap: 16px; transition: transform 0.45s var(--ease); }
.case-card:hover { transform: translateY(-8px); }
.slot {
  background: repeating-linear-gradient(135deg, #E6DECD 0 7px, #EFE9DD 7px 14px);
  border: 1px solid var(--line-2); border-radius: 2px;
  display: flex; align-items: flex-end; padding: 14px;
  transition: border-color 0.35s ease, box-shadow 0.45s ease;
  overflow: hidden;
}
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot--3x4 { aspect-ratio: 3 / 4; }
.slot--16x10 { aspect-ratio: 16 / 10; }
.slot--16x11 { aspect-ratio: 16 / 11; }
.case-card:hover .slot, .work-row:hover .slot, .blog-featured:hover .slot { border-color: var(--blue); box-shadow: 0 18px 40px rgba(29, 58, 138, 0.14); }
.slot__label { font-family: var(--mono); font-size: 10.5px; color: #7A7365; background: var(--cream); padding: 4px 7px; }
.case-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.case-name { font-family: var(--serif); font-size: 24px; color: var(--ink); }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mono-muted); }
.case-card p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 8px 0 12px; }
.metric-inline { font-size: 14px; color: var(--blue); font-weight: 500; }

.work-list { display: flex; flex-direction: column; gap: 40px; }
.work-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 36px; align-items: start; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.work-row h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--ink); margin: 10px 0 12px; }
.work-row p { font-size: 16.5px; line-height: 1.65; color: var(--muted); margin: 0 0 22px; max-width: 60ch; }
.metrics { display: flex; gap: 44px; flex-wrap: wrap; }
.metric__n { font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--blue); }
.metric__l { font-size: 13px; color: var(--muted-2); margin-top: 5px; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.plan {
  background: var(--cream); border: 1px solid var(--line-2); border-radius: 3px; padding: 30px;
  display: flex; flex-direction: column; gap: 18px;
  transition: transform 0.45s var(--ease), border-color 0.35s ease;
}
.plan:hover { transform: translateY(-6px); border-color: #C6BBA3; }
.section--tint .plan { background: var(--cream); }
.plan--dark { background: var(--navy); border-color: var(--navy); color: #EDEAE3; }
.plan--dark:hover { transform: translateY(-10px); box-shadow: 0 26px 60px rgba(15, 23, 48, 0.3); }
.plan__tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mono-muted); }
.plan--dark .plan__tag { color: var(--navy-accent); }
.plan__name { font-family: var(--serif); font-size: 30px; color: var(--ink); }
.plan--dark .plan__name { color: #FBF9F4; }
.plan__price { font-size: 26px; font-weight: 500; color: var(--blue); }
.plan--dark .plan__price { color: #FBF9F4; }
.plan p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.plan--dark p { color: var(--navy-muted); }
.plan__list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; color: var(--ink-2); }
.plan--dark .plan__list { border-color: var(--navy-line); color: #D8DBE4; }
.included { border-top: 1px solid var(--line); padding-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.included h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ink); margin: 0 0 10px; }
.included p { font-size: 15.5px; line-height: 1.65; color: var(--muted); margin: 0; }
.included ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--ink-2); }
.included li { display: flex; gap: 12px; }
.included li::before { content: "—"; color: var(--blue); }

/* ---------- journal ---------- */
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post-card { display: flex; flex-direction: column; gap: 12px; transition: transform 0.45s var(--ease); }
.post-card:hover { transform: translateY(-6px); }
.post-meta { display: flex; gap: 14px; align-items: baseline; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mono-muted); flex-wrap: wrap; }
.post-meta .cat { color: var(--blue); }
.post-card h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--ink); margin: 0; }
.post-card p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.blog-featured { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding-bottom: 56px; border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.blog-featured h2 { font-family: var(--serif); font-weight: 300; font-size: 42px; line-height: 1.12; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 16px; }
.blog-featured p { font-size: 17px; line-height: 1.65; color: var(--muted); margin: 0 0 26px; max-width: 52ch; }
.blog-featured .post-meta { font-size: 11px; letter-spacing: 0.1em; margin-bottom: 16px; }
.blog-list { display: flex; flex-direction: column; }
.blog-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); transition: background 0.3s ease; }
.blog-row:hover { background: var(--cream-2); }
.blog-row__meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mono-muted); display: flex; flex-direction: column; gap: 6px; }
.blog-row__meta .cat { color: var(--blue); }
.blog-row h2 { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.2; color: var(--ink); margin: 0 0 8px; }
.blog-row p { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 62ch; }
.blog-row__read { font-family: var(--mono); font-size: 11px; color: var(--mono-muted); text-align: right; }

/* ---------- single article (blocks) ---------- */
.entry { max-width: 780px; margin: 0 auto; }
.entry__header { margin-bottom: 40px; }
.entry__header h1 { font-family: var(--serif); font-weight: 300; font-size: 52px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); margin: 16px 0 0; }
.entry-content { font-size: 18px; line-height: 1.72; color: var(--ink-2); }
.entry-content > * { margin-top: 0; margin-bottom: 1.5em; }
.entry-content h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.2; color: var(--ink); margin-top: 2em; }
.entry-content h3 { font-family: var(--serif); font-weight: 400; font-size: 25px; color: var(--ink); margin-top: 1.8em; }
.entry-content blockquote { border-left: 2px solid var(--blue); margin-left: 0; padding-left: 24px; font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--ink); }
.entry-content figcaption { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.entry-content code { font-family: var(--mono); font-size: 0.9em; background: var(--cream-2); padding: 2px 5px; }
.entry-content pre { background: var(--navy); color: #E7EAF2; padding: 22px; overflow: auto; font-family: var(--mono); font-size: 14px; }
.entry-nav { max-width: 780px; margin: 64px auto 0; border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; gap: 24px; font-size: 15px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.contact-grid h1, .contact-grid .h2 { margin-bottom: 18px; }
.contact-grid .intro { font-size: 17.5px; line-height: 1.6; color: var(--muted); margin: 0 0 36px; max-width: 40ch; }
.contact-lines { display: flex; flex-direction: column; gap: 7px; font-size: 15.5px; color: var(--ink-2); margin-bottom: 36px; }
.contact-lines .addr { color: var(--muted-2); }
.contact-note { border-top: 1px solid var(--line); padding-top: 24px; font-size: 14.5px; line-height: 1.65; color: var(--muted-2); max-width: 38ch; }
.form-card { background: var(--cream-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 36px; }
.section--tint .form-card { background: var(--cream); }
.form-card label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted-2); }
.form-card input[type="text"], .form-card input[type="email"], .form-card input[type="tel"], .form-card select, .form-card textarea {
  border: 1px solid var(--line-2); background: var(--cream-3); padding: 12px; border-radius: 2px;
  font-size: 15px; color: var(--ink); outline: none; width: 100%;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: var(--blue); }
.form-card textarea { resize: vertical; }
.form-card .wpcf7-form-control-wrap { display: block; }
.form-card .wpcf7-submit { background: var(--blue); color: var(--cream); border: 0; border-radius: 2px; padding: 14px 26px; font-size: 15px; font-weight: 500; cursor: pointer; transition: background 0.3s ease, transform 0.3s ease; }
.form-card .wpcf7-submit:hover { background: var(--blue-dark); transform: translateY(-2px); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-hint { font-size: 13.5px; color: var(--muted-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--cream-2); }
.site-footer__inner { display: flex; justify-content: space-between; align-items: baseline; gap: 40px; flex-wrap: wrap; padding-top: 40px; padding-bottom: 40px; }
.site-footer .site-logo img { height: 24px; }
.site-footer ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer a { font-size: 14px; color: var(--muted-2); }
.site-footer a:hover { color: var(--ink); }
.legal { font-family: var(--mono); font-size: 11px; color: var(--mono-muted); letter-spacing: 0.04em; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  :root { --pad: 30px; }
  .hero__inner, .blog-featured, .contact-grid, .pricing-grid, .work-row, .included { grid-template-columns: 1fr; gap: 40px; }
  .hero__inner { gap: 40px; }
  .blog-row { grid-template-columns: 1fr; gap: 10px; }
  .blog-row__read { text-align: left; }
  .cases-grid, .journal-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 52px; }
  .h1 { font-size: 48px; }
  .h2, .blog-featured h2 { font-size: 36px; }
  .entry__header h1 { font-size: 40px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero__inner { padding-top: 64px; padding-bottom: 64px; }
}

@media (max-width: 680px) {
  :root { --pad: 20px; }
  .cases-grid, .journal-grid, .form-grid-2 { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .nav ul { gap: 16px; }
  .header-side .btn { display: none; }
  .site-logo img { height: 24px; }
  .hero h1 { font-size: 38px; }
  .h1 { font-size: 36px; }
  .h2, .blog-featured h2 { font-size: 30px; }
  .entry__header h1 { font-size: 32px; }
  .entry-content { font-size: 17px; }
  .section__head { flex-direction: column; gap: 12px; margin-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
