/* ==========================================================================
   Système de design partagé — IA Recherche Emploi (Lavida Productions)
   Chargé par toutes les pages du SaaS via <link rel="stylesheet">.
   Objectif : une seule source de vérité pour la police, les couleurs et les
   composants réutilisés sur plusieurs pages (bouton, carte, encarts d'état,
   en-tête). Les styles strictement propres à une page (largeur de son
   .conteneur, grille spécifique...) restent dans un <style> local à cette
   page — ce fichier ne couvre que ce qui est partagé.
   ========================================================================== */

/* --- Police Rubik (identité Lavida Productions), auto-hébergée : évite
   d'ouvrir le CSP à fonts.googleapis.com/fonts.gstatic.com pour un simple
   choix typographique. Fichiers variables (couvrent 300-900 en un seul
   fichier par sous-ensemble de caractères). --- */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/rubik-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/rubik-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Palette et jetons partagés --- */
:root {
  --bleu: #1a73e8;
  --bleu-fonce: #1558b0;
  --bleu-clair: #f0f4ff;
  --vert: #188038;
  --vert-clair: #e6f4ea;
  --rouge: #c5221f;
  --rouge-clair: #fdecea;
  --or: #f9ab00;
  --or-clair: #fff8e1;
  --bg: #f6f8fb;
  --carte: #ffffff;
  --texte: #1f2430;
  --sous: #5f6b7a;
  --bord: #e1e6ee;
  --rayon: 12px;
  --ombre: 0 4px 16px rgba(20, 30, 60, .06);
  --ombre-hover: 0 8px 24px rgba(20, 30, 60, .10);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--texte);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; line-height: 1.25; }
a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }

/* --- En-tête commun (logo + nav), présent sur toutes les pages --- */
.entete-site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--bord);
}
.entete-site__barre {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.entete-site__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--texte);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  flex-shrink: 0;
}
.entete-site__logo img { display: block; width: 32px; height: 32px; }
.entete-site__logo:hover { color: var(--texte); }
.entete-site__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.entete-site__nav a {
  color: var(--sous);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.entete-site__nav a:hover { background: var(--bleu-clair); color: var(--bleu-fonce); }
.entete-site__nav a.entete-site__nav-premium {
  background: var(--bleu);
  color: #fff;
}
.entete-site__nav a.entete-site__nav-premium:hover { background: var(--bleu-fonce); color: #fff; }
@media (max-width: 480px) {
  .entete-site__nav a { padding: 8px 10px; font-size: .86rem; }
}

/* --- Composants réutilisés tels quels sur plusieurs pages --- */
.conteneur { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }

/* --- Wordmark "AI Job Search" (nom officiel de l'outil, 2026-09-09) ---
   Icône étincelle + texte en dégradé, en haut de la page d'accueil,
   au-dessus du H1. Pas une image : rendu vectoriel/CSS pour rester net à
   toute résolution/zoom et ne pas dépendre d'un asset binaire de plus. */
.logo-produit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.logo-produit__icone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--bleu), var(--bleu-fonce));
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 115, 232, .32);
}
.logo-produit__icone svg { width: 20px; height: 20px; }
.logo-produit__texte {
  font-family: 'Rubik', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu) 65%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 480px) {
  .logo-produit__texte { font-size: 1.2rem; }
}

.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--ombre);
}

.intro { color: var(--sous); margin-top: 0; }
.aide { color: var(--sous); font-size: .85rem; margin: 4px 0 0; }
.lien-externe, .lien-danger.discret { color: var(--bleu); }
.lien-danger { color: var(--rouge); }

.bouton {
  background: var(--bleu);
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.bouton:hover { background: var(--bleu-fonce); box-shadow: var(--ombre-hover); }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { background: #b7c3d6; cursor: not-allowed; box-shadow: none; }
.bouton.secondaire { background: #fff; color: var(--sous); border: 1px solid var(--bord); }
.bouton.secondaire:hover { background: #f0f2f6; color: var(--texte); box-shadow: none; }
.bouton.danger { background: var(--rouge); }
.bouton.danger:hover { background: #9c1a17; }
.bouton.pleine-largeur { width: 100%; }

input[type=text], input[type=email], input[type=number], input[type=file], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bord);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--texte);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}
textarea { resize: vertical; }
fieldset { border: 1px solid var(--bord); border-radius: 10px; margin: 0; padding: 16px; }
legend { font-weight: 600; padding: 0 8px; margin-bottom: 12px; }
label.champ { display: block; font-weight: 600; margin-bottom: 6px; margin-top: 14px; }
label.champ:first-child { margin-top: 0; }
.cases { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.cases label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.ligne2 { display: flex; gap: 12px; align-items: flex-start; }
.ligne2 > div:first-child { flex: 2; }
.ligne2 > div:last-child { flex: 1; }

/* Encarts d'état — mêmes couleurs, noms historiques conservés page par page */
.erreurs, .erreur-page, .resultat-ko { background: var(--rouge-clair); border: 1px solid var(--rouge); color: var(--rouge); padding: 14px 18px; border-radius: 8px; }
.erreurs ul { margin: 6px 0 0; padding-left: 20px; }
.succes, .resultat-ok, .bandeau-confirme { background: var(--vert-clair); border: 1px solid var(--vert); color: var(--vert); padding: 14px 18px; border-radius: 8px; }
.resultat-ok, .resultat-ko, .bandeau-confirme { margin-top: 16px; }
.encart-attente, .alerte-info { background: var(--or-clair); border: 1px solid var(--or); border-radius: 8px; padding: 10px 14px; font-size: .9rem; color: #6b4e00; margin-top: 14px; }
.encart-ia { background: var(--bleu-clair); border: 1px solid #c9d8fc; border-radius: 8px; padding: 12px 14px; font-size: .9rem; color: #334; margin-top: 14px; }
.statut-actif { color: var(--vert); font-weight: 700; }
.statut-inactif { color: var(--rouge); font-weight: 700; }
.statut-attente { color: #b06000; font-weight: 700; }

.badge { display: inline-block; background: var(--vert-clair); color: var(--vert); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; }

/* Barre de progression CV (dupliquée sur index.php et verifier.php) */
.statut-cv { margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-size: .9rem; display: none; }
.statut-cv.chargement { display: block; background: var(--bleu-clair); color: #334; }
.statut-cv.ok { display: block; background: var(--vert-clair); color: var(--vert); }
.statut-cv.erreur { display: block; background: var(--rouge-clair); color: var(--rouge); }
.barre-cv-conteneur { width: 100%; height: 8px; background: #c9d8fc; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.barre-cv-remplissage { height: 100%; width: 0%; background: var(--bleu); border-radius: 4px; transition: width .4s linear; }
.barre-cv-remplissage.animee { background: repeating-linear-gradient(45deg, var(--bleu), var(--bleu) 10px, #4a90f0 10px, #4a90f0 20px); background-size: 28px 28px; animation: barre-cv-defile 1s linear infinite; }
@keyframes barre-cv-defile { from { background-position: 0 0; } to { background-position: 28px 0; } }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--bord); font-size: .92rem; vertical-align: top; }
th { color: var(--sous); font-weight: 600; }

/* --- Pied de page commun --- */
footer.pied-site { text-align: center; color: var(--sous); font-size: .82rem; margin-top: 40px; }
footer.pied-site a { color: var(--sous); }
footer.pied-site a:hover { color: var(--bleu); }

/* --- Pied de PAGE (bas de l'écran, distinct du pied-site ci-dessus qui
   est un texte d'aide local à une carte) : sépare visuellement la fin du
   contenu, mentions légales + copyright, avec assez de respiration pour
   ne jamais coller au dernier élément au-dessus ni au bas de l'écran. --- */
.pied-page { max-width: 880px; margin: 64px auto 0; padding: 32px 20px 60px; text-align: center; color: var(--sous); font-size: .85rem; border-top: 1px solid var(--bord); }
.pied-page a { color: var(--sous); }
.pied-page a:hover { color: var(--bleu); }
.pied-page p { margin: 8px 0 0; }

/* --- FAQ (accordéon natif <details>/<summary>, pas de JS nécessaire) --- */
.section-large { max-width: 880px; margin: 64px auto 0; padding: 0 20px; }
.section-large h2 { font-size: 1.55rem; text-align: center; margin-bottom: 6px; }
.section-large .section-souscription { text-align: center; color: var(--sous); margin: 0 0 32px; }
.faq-groupe { margin-top: 28px; }
.faq-groupe h3 { font-size: 1rem; color: var(--bleu); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.faq-item {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--bleu);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--bord); }
.faq-item p { margin: 0; padding: 14px 18px 18px; color: var(--sous); }
.faq-item p + p { padding-top: 0; }

/* --- Section Premium / tarifs --- */
.tarifs-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; align-items: stretch; }
@media (max-width: 760px) { .tarifs-grille { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; } }
.tarif-carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .15s, transform .15s;
}
.tarif-carte:hover { box-shadow: var(--ombre-hover); transform: translateY(-2px); }
.tarif-carte--vedette { border-color: var(--or); box-shadow: 0 0 0 2px rgba(249, 171, 0, .2); }
.tarif-carte__badge { position: absolute; top: -12px; right: 18px; background: var(--or); color: #3a2a00; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.tarif-carte h3 { font-size: 1.1rem; margin: 0; }
.tarif-carte .tarif-prix { font-size: 2rem; font-weight: 800; color: var(--bleu); margin: 12px 0 2px; }
.tarif-carte .tarif-prix span { font-size: .95rem; font-weight: 500; color: var(--sous); }
.tarif-carte ul { list-style: none; padding: 0; margin: 16px 0; flex: 1; }
.tarif-carte ul li { padding: 5px 0; font-size: .92rem; }
.tarif-carte ul li::before { content: '✓ '; color: var(--vert); font-weight: 700; }
.tarif-carte .bouton { margin-top: auto; }
