/* ==========================================================================
   Commito — système graphique
   Palette : bleu nuit (encre) + bleu GAM-Tech (action) sur fonds clairs.
   ========================================================================== */

:root {
  --ink: #0b1526;          /* bleu nuit — titres, texte fort */
  --body: #33404f;         /* texte courant */
  --muted: #64748b;        /* texte secondaire */
  --accent: #1656a0;       /* bleu GAM-Tech — actions */
  --accent-dark: #104176;
  --accent-soft: #e8f0f9;  /* fonds teintés */
  --bg: #f6f8fa;
  --card: #ffffff;
  --line: #e4e9ee;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 21, 38, 0.06);
  --shadow-md: 0 6px 24px -8px rgba(11, 21, 38, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  /* Deux mondes qui se rejoignent : une planète partielle sur chaque bord
     (porteurs de projets à gauche, sociétés de dev à droite), reliées par
     des fils courbes fins. Filigrane bleu Commito, derrière le contenu. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' fill='none'%3E%3Ccircle cx='-130' cy='430' r='330' fill='%231656a0' fill-opacity='0.05'/%3E%3Ccircle cx='-130' cy='430' r='330' stroke='%231656a0' stroke-opacity='0.20' stroke-width='2'/%3E%3Ccircle cx='-130' cy='430' r='385' stroke='%231656a0' stroke-opacity='0.10' stroke-width='1.4'/%3E%3Ccircle cx='1730' cy='400' r='300' fill='%231656a0' fill-opacity='0.05'/%3E%3Ccircle cx='1730' cy='400' r='300' stroke='%231656a0' stroke-opacity='0.20' stroke-width='2'/%3E%3Ccircle cx='1730' cy='400' r='355' stroke='%231656a0' stroke-opacity='0.10' stroke-width='1.4'/%3E%3Cg stroke='%231656a0' fill='none'%3E%3Cpath d='M146 250 C 520 150, 1080 160, 1465 260' stroke-opacity='0.12' stroke-width='1.5'/%3E%3Cpath d='M190 350 C 560 290, 1040 280, 1436 340' stroke-opacity='0.16' stroke-width='1.6'/%3E%3Cpath d='M199 460 C 560 430, 1040 470, 1432 430' stroke-opacity='0.18' stroke-width='1.6'/%3E%3Cpath d='M173 560 C 550 620, 1050 600, 1455 520' stroke-opacity='0.16' stroke-width='1.6'/%3E%3Cpath d='M116 650 C 520 760, 1080 730, 1506 600' stroke-opacity='0.12' stroke-width='1.5'/%3E%3C/g%3E%3Cg fill='%231656a0' fill-opacity='0.25'%3E%3Ccircle cx='146' cy='250' r='3.5'/%3E%3Ccircle cx='190' cy='350' r='3.5'/%3E%3Ccircle cx='199' cy='460' r='3.5'/%3E%3Ccircle cx='173' cy='560' r='3.5'/%3E%3Ccircle cx='116' cy='650' r='3.5'/%3E%3Ccircle cx='1465' cy='260' r='3.5'/%3E%3Ccircle cx='1436' cy='340' r='3.5'/%3E%3Ccircle cx='1432' cy='430' r='3.5'/%3E%3Ccircle cx='1455' cy='520' r='3.5'/%3E%3Ccircle cx='1506' cy='600' r='3.5'/%3E%3C/g%3E%3C/svg%3E") center 60px / 100% auto no-repeat,
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 5vw;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { display: block; }
header.site nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
header.site nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
header.site nav a:hover { color: var(--accent); }
header.site nav a.btn { color: #fff; }

main { max-width: 68rem; margin: 0 auto; padding: 0 5vw 4rem; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 650;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { padding: 0.35rem 0.85rem; font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Héro
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 4.5rem 0 3rem;
  background: radial-gradient(42rem 22rem at 50% -6rem, rgba(22, 86, 160, 0.08), transparent 70%);
}
.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid #c9dcf2;
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; margin: 0 0 1rem; }
.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--muted);
  max-width: 44rem;
  margin: 0 auto 1.8rem;
}
.hero .cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.6rem; }
.trustline {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
}
.trustline span::before { content: "✓ "; color: var(--accent); font-weight: 800; }

/* --------------------------------------------------------------------------
   Cartes deux parcours
   -------------------------------------------------------------------------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.4rem; margin: 1.6rem 0 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .picto {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.card h2 { margin: 0 0 0.7rem; font-size: 1.25rem; }
.card ul { padding-left: 0; margin: 0 0 1.3rem; list-style: none; color: var(--body); }
.card ul li { padding-left: 1.5rem; position: relative; margin-bottom: 0.45rem; }
.card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
section { margin-top: 4rem; }
.section-title { text-align: center; font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.6rem; }
.section-sub { text-align: center; color: var(--muted); max-width: 40rem; margin: 0 auto 2.2rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem; }
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.step .num {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}
.step h3 { margin: 0 0 0.45rem; font-size: 1.06rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Bande engagements (fond nuit) */
.band {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 2.6rem 2rem;
  color: #e6ecf3;
}
.band h2 { color: #fff; text-align: center; margin: 0 0 1.8rem; font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.band .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.6rem; }
.band h3 { color: #fff; font-size: 1.02rem; margin: 0 0 0.4rem; }
.band p { margin: 0; color: #aab7c6; font-size: 0.93rem; }

/* CTA final */
.cta-final {
  text-align: center;
  background: var(--accent-soft);
  border: 1px solid #c9dcf2;
  border-radius: var(--radius);
  padding: 2.6rem 1.6rem;
}
.cta-final h2 { margin: 0 0 0.5rem; }
.cta-final p { color: var(--muted); margin: 0 0 1.4rem; }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
.form-wrap { max-width: 46rem; margin: 2.5rem auto 0; }
.form-wrap h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 0.5rem; }
.form-wrap > p { color: var(--muted); margin-bottom: 1.8rem; }

form.stack {
  display: grid;
  gap: 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
form.stack > div { display: grid; gap: 0.35rem; }
form.stack label { font-weight: 600; font-size: 0.93rem; color: var(--ink); }
form.stack input[type=text], form.stack input[type=email], form.stack input[type=tel],
form.stack input[type=url], form.stack input[type=password],
form.stack select, form.stack textarea {
  font: inherit;
  color: var(--ink);
  padding: 0.62rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form.stack input:focus, form.stack select:focus, form.stack textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 86, 160, 0.15);
}
form.stack textarea { min-height: 7.5rem; resize: vertical; }
form.stack ul { margin: 0; padding-left: 1.1rem; color: var(--danger); font-size: 0.87rem; }
form.stack .consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.85rem 1rem;
}
form.stack .consent label { font-weight: 450; font-size: 0.88rem; color: var(--muted); }
form.stack .consent input { margin-top: 0.3rem; accent-color: var(--accent); }
/* Bouton œil ajouté par app.js sur les champs mot de passe (amélioration
   progressive : sans JavaScript, champ classique inchangé). */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input[type=password], .pwd-wrap input[type=text] { padding-right: 2.9rem; }
.pwd-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
}
.pwd-toggle:hover { color: var(--accent); }
.hp { position: absolute; left: -9999px; top: -9999px; }
.error { background: var(--danger-soft); border: 1px solid #f5c6c2; color: var(--danger); border-radius: 9px; padding: 0.75rem 1rem; }
.notice { background: var(--accent-soft); border: 1px solid #c9dcf2; color: var(--accent-dark); border-radius: 9px; padding: 0.9rem 1.1rem; }
.help { font-weight: 450; font-size: 0.84rem; color: var(--muted); }

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

/* --------------------------------------------------------------------------
   Back-office
   -------------------------------------------------------------------------- */
table.admin {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.88rem;
}
table.admin th, table.admin td { border: 1px solid var(--line); padding: 0.55rem 0.65rem; text-align: left; vertical-align: top; }
table.admin th { background: #eef2f5; color: var(--ink); font-weight: 650; }
table.admin form { display: flex; gap: 0.35rem; margin-top: 0.45rem; }
table.admin select { font: inherit; font-size: 0.82rem; border: 1px solid var(--line); border-radius: 7px; padding: 0.2rem 0.35rem; }
.tag { display: inline-block; border-radius: 999px; padding: 0.12rem 0.65rem; font-size: 0.77rem; font-weight: 650; background: #eef2f5; color: var(--muted); }
.tag.nouveau, .tag.en_verification { background: #fff3cd; color: #7a5b00; }
.tag.qualifie, .tag.verifiee { background: var(--accent-soft); color: var(--accent-dark); }
.tag.transmis { background: #e2ecfb; color: #1b4d8f; }
.tag.clos, .tag.rejetee { background: #f1f1f1; color: var(--muted); }

/* --------------------------------------------------------------------------
   Espaces connectés (client et société)
   -------------------------------------------------------------------------- */
.espace-wrap { max-width: 62rem; margin: 2.5rem auto 3rem; padding: 0 1.2rem; }
.espace-wrap h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.4rem; }
.espace-wrap > p.sous-titre { color: var(--muted); margin: 0 0 1.6rem; }
.bloc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.bloc h2 { margin: 0 0 0.9rem; font-size: 1.15rem; }
.bloc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bloc th { text-align: left; color: var(--muted); font-size: 0.8rem; font-weight: 650; padding: 0.3rem 0.6rem 0.3rem 0; }
.bloc td { padding: 0.45rem 0.6rem 0.45rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.tag.transmise, .tag.en_attente { background: #fff3cd; color: #7a5b00; }
.tag.en_etude { background: #e2ecfb; color: #1b4d8f; }
.tag.acceptee { background: #e3f4e6; color: #1d6b2f; }
.tag.refusee, .tag.declinee { background: var(--danger-soft); color: var(--danger); }
.tag.annulee { background: #f1f1f1; color: var(--muted); }
.tag.offre_envoyee { background: var(--accent-soft); color: var(--accent-dark); }
.compte-a-rebours { font-weight: 650; color: var(--accent-dark); }
.compte-a-rebours.urgent { color: var(--danger); }
.actions-offre { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.9rem; }
.actions-offre form { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #8f1e18; }
.champ-motif { font: inherit; font-size: 0.88rem; padding: 0.42rem 0.6rem; border: 1.5px solid var(--line); border-radius: 8px; min-width: 14rem; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
footer.site { border-top: 1px solid var(--line); background: var(--card); margin-top: 4rem; }
footer.site .cols {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.6rem 5vw 1.6rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
footer.site h4 { color: var(--ink); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.7rem; }
footer.site p { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 0; max-width: 26rem; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 0.45rem; }
footer.site a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
footer.site a:hover { color: var(--accent); }
footer.site .bottom {
  border-top: 1px solid var(--line);
  padding: 1rem 5vw;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  footer.site .cols { grid-template-columns: 1fr; gap: 1.4rem; }
  .hero { padding-top: 3rem; }
}
