/*
Theme Name: NTournaux Sombre
Theme URI: https://ntournaux.fr
Author: Nathan Tournaux
Author URI: https://ntournaux.fr
Description: Thème minimaliste sombre pour le portfolio d'un étudiant en BTS SIO. Renvoie vers le blog Dotclear (blog.ntournaux.fr) et le projet brasserie (brasserie.ntournaux.fr).
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ntournaux-sombre
*/

:root {
  --bg: #0f1115;
  --surface: #161a20;
  --surface-2: #1c2129;
  --text: #d7dae0;
  --muted: #8b93a1;
  --border: #232830;
  --accent: #7aa2f7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover,
a:focus {
  color: var(--text);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- En-tête ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg);
}
.site-header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.site-title a {
  color: var(--text);
}
.site-description {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.2rem 0 0;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: var(--text);
}
.main-nav a.is-external {
  color: var(--muted);
}
.main-nav span.nav-sep {
  color: var(--border);
}

/* ---------- Contenu ---------- */
.site-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

blockquote {
  border-left: 2px solid var(--accent);
  background: var(--surface);
  color: var(--muted);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
}

code, pre {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code { padding: 0.1em 0.4em; }
pre { padding: 1rem; overflow-x: auto; }
pre code { border: 0; padding: 0; background: transparent; }

table, th, td { border-color: var(--border); }
th { background: var(--surface-2); color: var(--text); }

/* ---------- Formulaires ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
input[type="password"],
textarea,
select {
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
::placeholder { color: var(--muted); opacity: 1; }

button,
input[type="submit"],
input[type="button"],
.wp-block-button__link,
.wpcf7-submit {
  background-color: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.wpcf7-submit:hover {
  background-color: transparent;
  color: var(--accent);
}

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 1.5rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.site-footer-links span { color: var(--border); }

/* =====================================================
   Composants des pages personnalisées
   (Accueil, À propos, Compétences, Contact)
   ===================================================== */

.nt-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.nt-lead {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.nt-section {
  margin: 2.5rem 0;
}

.nt-section h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.nt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.nt-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.nt-card p {
  margin: 0;
  color: var(--muted);
}

.nt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.nt-grid .nt-card {
  margin-bottom: 0;
}

/* --- Barres de compétences --- */
.nt-skill {
  margin-bottom: 1.15rem;
}
.nt-skill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.nt-skill-head span:first-child { color: var(--text); }
.nt-skill-head span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nt-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.nt-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

/* --- Contact --- */
.nt-contact-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.nt-contact-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.nt-contact-list li span:first-child { color: var(--muted); }

.nt-btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nt-btn:hover {
  background: transparent;
  color: var(--accent);
  text-decoration: none;
}

/* --- Sections de la page d'accueil (une page, défilement + ancres) --- */
.nt-page-section {
  scroll-margin-top: 84px;
  padding: 4rem 0;
}
.nt-page-section + .nt-page-section {
  border-top: 1px solid var(--border);
}
.nt-page-section h2.nt-section-title {
  font-size: 1.6rem;
  margin: 0 0 2rem;
}

/* --- Accueil --- */
.nt-hero {
  text-align: center;
  padding: 2.5rem 0 1rem;
}
.nt-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.nt-hero-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.nt-hero-links a.nt-btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
}
.nt-hero-links a.nt-btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Contact Form 7 (si installé) --- */
.wpcf7 label { display: block; margin-bottom: 1rem; color: var(--muted); }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea { width: 100%; margin-top: 0.35rem; }
.wpcf7-response-output { border-color: var(--border); color: var(--text); }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .nt-lead { font-size: 1.05rem; }
  .nt-card { padding: 1rem 1.15rem; }
  .nt-hero h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
