:root {
  --nuit-950: #12161f;
  --nuit-800: #202836;
  --nuit-700: #313c4e;
  --nuit-600: #4b5768;
  --nuit-400: #8992a3;
  --nuit-200: #dadfe6;
  --nuit-100: #eef0f4;
  --ivoire: #faf7f2;
  --or-700: #a9743f;
  --or-600: #bf8b4f;
  --or-100: #f3e6d3;
  --sauge-700: #35594c;
  --sauge-100: #e3ede8;
  --blanc: #ffffff;
  --erreur: #a5453a;
  --succes: #2f6b3a;
  --radius: 10px;
  --radius-sm: 6px;
  --ombre: 0 2px 12px rgba(18, 22, 31, .07);
  --ombre-hover: 0 10px 28px rgba(18, 22, 31, .12);
  --font-titres: Georgia, 'Times New Roman', serif;
  --font-texte: 'Segoe UI', Arial, sans-serif;
  --transition: .18s ease;

  /* Alias legacy */
  --gris-950: var(--nuit-950);
  --gris-900: var(--nuit-800);
  --gris-700: var(--nuit-600);
  --gris-500: var(--nuit-400);
  --gris-300: var(--nuit-200);
  --gris-100: var(--nuit-100);
  --gris-050: var(--ivoire);
  --accent: var(--or-700);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-texte);
  color: var(--nuit-800);
  background: var(--ivoire);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-titres);
  font-weight: 400;
  color: var(--nuit-950);
  line-height: 1.25;
}

a {
  color: var(--nuit-800);
  transition: color var(--transition);
}

a:hover {
  color: var(--or-700);
}

.conteneur {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.conteneur-etroit {
  max-width: 640px;
}

.conteneur-moyen {
  max-width: 720px;
}

/* --- Header --- */

.site-header {
  background: var(--blanc);
  box-shadow: 0 1px 0 var(--nuit-100);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--nuit-950);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--nuit-950);
}

.logo strong {
  font-family: var(--font-titres);
  font-size: 1.4rem;
  letter-spacing: .05em;
}

.logo span {
  display: block;
  font-size: .7rem;
  color: var(--nuit-400);
  letter-spacing: .08em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--nuit-200);
  border-radius: var(--radius-sm);
  padding: .45rem .65rem;
  cursor: pointer;
  color: var(--nuit-700);
  font-size: 1.1rem;
  line-height: 1;
}

.nav-toggle:hover {
  background: var(--nuit-100);
}

.nav-principale {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-principale a {
  text-decoration: none;
  font-size: .92rem;
  color: var(--nuit-600);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.nav-principale a:hover,
.nav-principale a.active {
  color: var(--or-700);
  border-color: var(--or-700);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

/* --- Boutons --- */

.btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: .9rem;
  font-family: inherit;
  border: 1px solid var(--nuit-700);
  color: var(--nuit-800);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform .1s, box-shadow var(--transition);
  text-align: center;
}

.btn:hover {
  background: var(--nuit-100);
  color: var(--nuit-800);
}

.btn:active {
  transform: scale(.98);
}

.btn-plein {
  background: var(--or-700);
  color: var(--blanc);
  border-color: var(--or-700);
}

.btn-plein:hover {
  background: var(--or-600);
  border-color: var(--or-600);
  color: var(--blanc);
}

.btn-petit {
  padding: .4rem .85rem;
  font-size: .82rem;
}

/* --- Topbar --- */

.topbar {
  background: var(--nuit-950);
  color: var(--nuit-200);
  font-size: .8rem;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: .45rem 1.5rem;
}

.topbar-item {
  opacity: .9;
}

.topbar-devise {
  font-style: italic;
  color: var(--nuit-400);
}

.topbar-lien {
  color: var(--or-600);
  text-decoration: none;
}

.topbar-lien:hover {
  color: var(--blanc);
}

/* --- Hero accueil (inspiré funeral theme) --- */

.hero-accueil {
  padding: 6rem 0 5rem;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 22, 31, .88), rgba(32, 40, 54, .82)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(160deg, var(--nuit-950), var(--nuit-800));
}

.hero-accueil::after {
  height: 5px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(191, 139, 79, .15), transparent 70%);
  pointer-events: none;
}

.hero-contenu {
  position: relative;
  z-index: 1;
}

.hero-surtitre {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  color: var(--or-600);
  margin: 0 0 1rem;
}

.hero-accueil h1 {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.hero-accueil h1 span {
  color: var(--or-600);
}

.hero-texte {
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-cta-groupe {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  align-items: stretch;
}

.hero-recherche-large {
  max-width: 520px;
  margin: 0;
  flex: 1 1 320px;
}

.hero-recherche-large input {
  padding: .8rem 1rem;
}

.btn-hero {
  padding: .8rem 1.5rem;
  font-size: .95rem;
  white-space: nowrap;
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, .5);
  color: var(--blanc);
  text-decoration: none;
  font-size: .95rem;
  transition: background var(--transition), border-color var(--transition);
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, .1);
  border-color: var(--blanc);
  color: var(--blanc);
}

.hero-page h1 {
  margin-bottom: .5rem;
}

/* --- Sections typées --- */

.section-claire {
  background: var(--blanc);
}

.section-entete {
  margin-bottom: 2.5rem;
}

.section-entete-centre {
  text-align: center;
}

.section-entete-centre h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 .5rem;
}

.section-entete-centre p {
  color: var(--nuit-600);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
}

.section-entete-centre h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--or-700);
  margin: .75rem auto 0;
}

.texte-centre {
  text-align: center;
}

/* --- Cartes hommages horizontales --- */

.liste-hommages {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.carte-hommage {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--blanc);
  border: 1px solid var(--nuit-100);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--ombre);
  transition: box-shadow var(--transition), transform var(--transition);
}

.section-claire .carte-hommage {
  background: var(--ivoire);
}

.carte-hommage:hover {
  box-shadow: var(--ombre-hover);
  transform: translateY(-2px);
}

.carte-hommage-photo {
  flex-shrink: 0;
}

.carte-hommage-photo img,
.carte-hommage-photo .placeholder-portrait {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  display: block;
  border: 3px solid var(--or-100);
}

.carte-hommage-corps {
  flex: 1;
  min-width: 0;
}

.carte-hommage-corps h3 {
  margin: 0 0 .35rem;
  font-size: 1.25rem;
}

.carte-hommage-dates {
  color: var(--nuit-600);
  font-size: .9rem;
  margin: 0 0 .5rem;
}

.carte-hommage-extrait {
  color: var(--nuit-600);
  font-style: italic;
  margin: 0 0 .85rem;
  font-size: .92rem;
}

/* --- Grille icônes ressources --- */

.grille-icones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.carte-icone {
  display: block;
  text-align: center;
  padding: 2rem 1.25rem;
  background: var(--blanc);
  border: 1px solid var(--nuit-100);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--ombre);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.carte-icone:hover {
  color: inherit;
  border-color: var(--or-100);
  box-shadow: var(--ombre-hover);
  transform: translateY(-4px);
}

.icone-rond {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--or-100);
  font-size: 1.6rem;
}

.carte-icone h3 {
  margin: 0 0 .4rem;
  font-size: 1.05rem;
}

.carte-icone p {
  margin: 0;
  font-size: .88rem;
  color: var(--nuit-600);
  line-height: 1.5;
}

/* --- Bandeau présentation --- */

.bandeau-presentation {
  background: var(--nuit-950);
  color: var(--nuit-200);
  padding: 4rem 0;
}

.bandeau-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.bandeau-texte h2 {
  color: var(--blanc);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.bandeau-texte p {
  color: var(--nuit-200);
  margin: 0 0 1rem;
}

.bandeau-devise {
  color: var(--or-600) !important;
  font-size: 1.05rem;
  margin-bottom: 1.5rem !important;
}

.bandeau-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.bandeau-actions .btn {
  border-color: var(--nuit-400);
  color: var(--blanc);
}

.bandeau-actions .btn:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--blanc);
}

.bandeau-visuel {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bandeau-motif {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(169, 116, 63, .25), rgba(53, 89, 76, .2)),
    linear-gradient(160deg, var(--nuit-800), var(--nuit-700));
  border: 1px solid rgba(255, 255, 255, .08);
  position: relative;
}

.bandeau-motif::before {
  content: 'NAÏDYA';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-titres);
  font-size: 2rem;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .12);
}

/* --- Triple CTA --- */

.grille-cta-triple {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.carte-cta-bloc {
  padding: 2rem;
  background: var(--ivoire);
  border: 1px solid var(--nuit-100);
  border-radius: var(--radius);
  border-top: 4px solid var(--or-700);
}

.carte-cta-bloc h3 {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
}

.carte-cta-bloc p {
  margin: 0 0 1rem;
  color: var(--nuit-600);
  font-size: .92rem;
}

.lien-fleche {
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  color: var(--or-700);
}

.lien-fleche:hover {
  text-decoration: underline;
}

/* --- Footer enrichi --- */

.footer-grille {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-logo {
  font-family: var(--font-titres);
  font-size: 1.3rem;
  margin: 0 0 .75rem;
  color: var(--blanc);
}

.footer-titre {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nuit-400);
  margin: 0 0 .75rem;
}

.footer-liens {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-liens li {
  margin-bottom: .4rem;
}

.footer-bas {
  padding-top: 1.25rem;
  text-align: center;
  font-size: .82rem;
  color: var(--nuit-400);
}

.footer-bas p {
  margin: 0;
}

.hero {
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(191, 139, 79, .18), transparent),
    linear-gradient(160deg, var(--nuit-950), var(--nuit-800) 70%);
  padding: 5rem 0 4.5rem;
  text-align: center;
  color: var(--blanc);
  position: relative;
}

.hero-compact {
  padding: 3.5rem 0;
}

.hero::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--or-700), var(--sauge-700));
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  margin-bottom: .6rem;
  color: var(--blanc);
}

.hero p {
  color: var(--nuit-200);
  max-width: 640px;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
}

.hero .btn {
  border-color: rgba(255, 255, 255, .35);
  color: var(--blanc);
  margin: .25rem;
}

.hero .btn:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--blanc);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}

.hero-recherche {
  display: flex;
  gap: .5rem;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

.hero-recherche input {
  flex: 1;
  padding: .65rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08);
  color: var(--blanc);
  font-family: inherit;
  font-size: .95rem;
}

.hero-recherche input::placeholder {
  color: rgba(255, 255, 255, .55);
}

.hero-recherche input:focus {
  outline: none;
  border-color: var(--or-600);
  background: rgba(255, 255, 255, .12);
}

/* --- Sections --- */

.section {
  padding: 3.5rem 0;
}

.section > h2 {
  font-size: 1.7rem;
  margin-bottom: 1.5rem;
}

.section-intro {
  color: var(--nuit-600);
  max-width: 640px;
  margin-bottom: 2rem;
}

.grille-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* --- Cartes --- */

.carte {
  background: var(--blanc);
  border: 1px solid var(--nuit-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--ombre);
  transition: box-shadow var(--transition), transform var(--transition);
}

a.carte {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.carte:hover {
  color: inherit;
  box-shadow: var(--ombre-hover);
  transform: translateY(-3px);
}

.carte-defunt {
  text-align: center;
}

.carte-defunt .portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto .75rem;
  display: block;
}

.carte h3 {
  margin: .6rem 0 .3rem;
  font-size: 1.15rem;
}

.carte-prix {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--or-700);
  margin-bottom: 0;
}

.carte-centree {
  margin-top: 2.5rem;
  text-align: center;
}

.carte-cta h3 {
  margin-top: 0;
}

.placeholder-portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto .75rem;
  background: linear-gradient(160deg, var(--or-100), var(--nuit-200));
}

.placeholder-portrait.grand {
  width: 140px;
  height: 140px;
}

/* --- Badges & texte --- */

.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  background: var(--sauge-100);
  color: var(--sauge-700);
}

.devise {
  color: var(--nuit-400);
  font-style: italic;
}

.texte-muted {
  color: var(--nuit-600);
}

.vide {
  color: var(--nuit-400);
  font-style: italic;
}

/* --- Formulaires (partagés public + backoffice) --- */

.formulaire {
  background: var(--blanc);
  border: 1px solid var(--nuit-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 480px;
  box-shadow: var(--ombre);
}

.formulaire-large {
  max-width: 100%;
}

.formulaire-inline {
  display: flex;
  gap: .5rem;
  max-width: 480px;
  padding: 1rem;
  align-items: center;
}

.formulaire-inline input {
  margin: 0;
  flex: 1;
}

.formulaire-inline button {
  margin: 0;
  white-space: nowrap;
}

.formulaire label {
  display: block;
  font-size: .85rem;
  color: var(--nuit-600);
  margin: .75rem 0 .25rem;
}

.formulaire input,
.formulaire select,
.formulaire textarea {
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid var(--nuit-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.formulaire button {
  margin-top: 1rem;
  cursor: pointer;
}

.formulaire input:focus,
.formulaire select:focus,
.formulaire textarea:focus {
  outline: none;
  border-color: var(--or-700);
  box-shadow: 0 0 0 3px rgba(169, 116, 63, .15);
}

/* --- Messages flash --- */

.flash {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin: 1rem 1.5rem 0;
  font-size: .92rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.flash-succes {
  background: var(--sauge-100);
  color: var(--sauge-700);
  border: 1px solid rgba(53, 89, 76, .2);
}

.flash-erreur {
  background: #fbeae8;
  color: var(--erreur);
  border: 1px solid rgba(165, 69, 58, .2);
}

.alerte {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.alerte-erreur {
  background: #fbeae8;
  color: var(--erreur);
}

.alerte-succes {
  background: var(--sauge-100);
  color: var(--succes);
}

/* --- Page mémoriale --- */

.memoire-entete {
  text-align: center;
}

.memoire-entete h1 {
  margin: .5rem 0;
}

.memoire-portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
}

.memoire-biographie {
  margin-top: 2rem;
}

.memoire-section {
  margin-top: 2.5rem;
}

.memoire-galerie img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--ombre);
}

.message-hommage {
  margin-bottom: 1rem;
}

.message-hommage .auteur {
  margin: 0;
}

/* --- FAQ --- */

.faq-liste {
  max-width: 720px;
}

.faq-item {
  margin-bottom: .75rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin-top: .75rem;
  margin-bottom: 0;
}

/* --- Footer --- */

.site-footer {
  background: var(--nuit-950);
  color: var(--nuit-200);
  padding: 3rem 0 1.5rem;
  margin-top: 0;
  font-size: .9rem;
}

.site-footer .conteneur {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer .devise {
  color: var(--nuit-400);
  font-style: italic;
}

.site-footer a {
  color: var(--nuit-200);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--or-600);
}

/* --- Erreurs --- */

.page-erreur {
  text-align: center;
  padding: 5rem 1.5rem;
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-header .conteneur {
    flex-wrap: wrap;
  }

  .nav-principale {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    order: 3;
    gap: 0;
    padding: .5rem 0;
    border-top: 1px solid var(--nuit-100);
    margin-top: .25rem;
  }

  .nav-principale.ouverte {
    display: flex;
  }

  .nav-principale li {
    width: 100%;
  }

  .nav-principale a {
    display: block;
    padding: .65rem 0;
    border-bottom: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .btn {
    font-size: .82rem;
    padding: .5rem .85rem;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero-recherche {
    flex-direction: column;
  }

  .section {
    padding: 2.5rem 0;
  }

  .grille-3 {
    grid-template-columns: 1fr;
  }

  .carte-hommage {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bandeau-grille {
    grid-template-columns: 1fr;
  }

  .bandeau-visuel {
    order: -1;
  }

  .footer-grille {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .topbar-inner {
    justify-content: center;
    text-align: center;
  }

  .topbar-devise {
    display: none;
  }
}

@media (max-width: 480px) {
  .conteneur {
    padding: 0 1rem;
  }

  .flash {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}
