:root{
  --red:#7A1028;
  --red-2:#9B1435;
  --stone:#f5f1ee;
  --stone-2:#ece5df;
  --text:#181818;
  --muted:#666;
  --card:#ffffff;
  --line:#e7dfd8;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,var(--stone),var(--stone-2));
}
.page-bg{
  position:fixed;
  inset:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(122,16,40,.08), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(122,16,40,.05), transparent 28%),
    linear-gradient(180deg,#f7f3ef,#eee7e1);
  z-index:-1;
}

.home-shell{
  max-width:1100px;
  margin:auto;
  padding:28px 18px 60px;
}
.home-hero{
  text-align:center;
  padding:36px 18px 24px;
}
.brand-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(122,16,40,.08);
  color:var(--red);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.home-hero h1{
  margin:16px 0 10px;
  font-size:clamp(32px,5vw,60px);
  line-height:1.02;
  letter-spacing:-.04em;
}
.home-hero p{
  margin:0 auto 22px;
  max-width:720px;
  color:var(--muted);
  font-size:16px;
}
.search-input{
  width:100%;
  max-width:440px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:15px 16px;
  font:inherit;
  background:rgba(255,255,255,.85);
  box-shadow:0 10px 30px rgba(0,0,0,.04);
}
.profiles-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
  margin-top:18px;
}
.profile-tile{
  display:block;
  text-decoration:none;
  color:var(--text);
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.7);
  border-radius:28px;
  padding:22px;
  box-shadow:0 20px 50px rgba(0,0,0,.08);
  transition:.2s ease;
}
.profile-tile:hover{transform:translateY(-4px)}
.tile-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}
.tile-avatar{
  width:56px;height:56px;border-radius:50%;
  background:linear-gradient(135deg,var(--red),var(--red-2));
  color:white;display:flex;align-items:center;justify-content:center;
  font-weight:700;overflow:hidden;
}
.tile-avatar img{width:100%;height:100%;object-fit:cover}
.tile-code{
  font-size:12px;
  color:var(--muted);
  background:#f5f1ee;
  padding:8px 10px;
  border-radius:999px;
}
.profile-tile h3{margin:0 0 6px;font-size:22px}
.profile-tile p{margin:0 0 10px;color:var(--muted)}
.profile-tile small{color:var(--muted);line-height:1.5;display:block}

.profile-page{
  max-width:1100px;
  margin:auto;
  padding-bottom:120px;
}
.profile-hero{
position:relative;

width:100vw;
left:50%;
right:50%;
margin-left:-50vw;
margin-right:-50vw;

min-height:420px;

background:
radial-gradient(circle at 70% 20%, rgba(255,255,255,.15), transparent 40%),
linear-gradient(135deg,#6d0f23,#9b1838);

color:white;
text-align:center;

overflow:hidden;
}

.profile-hero h1{
font-size:42px;
font-weight:700;
letter-spacing:-0.02em;
margin:10px 0 6px;
}

.profile-hero.has-hero-image{
  background-size:cover;
  background-position:center;
}
.hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.45));
}
.hero-content{
  position:relative;
  z-index:1;
  max-width:980px;
  margin:auto;
  padding:18px 18px 34px;
  color:white;
  text-align:center;
}
.back-link{
  display:inline-block;
  color:rgba(255,255,255,.85);
  text-decoration:none;
  margin-bottom:28px;
}
.profile-photo{
  width:110px;height:110px;border-radius:50%;
  overflow:hidden;margin:8px auto 18px;
  border:4px solid rgba(255,255,255,.95);
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  display:flex;align-items:center;justify-content:center;
  background:white;color:var(--red);font-size:36px;font-weight:700;
}
.profile-photo img{width:100%;height:100%;object-fit:cover}
.entity-pill{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  backdrop-filter:blur(10px);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.profile-content{
max-width:900px;
margin:-80px auto 0;
padding:0 20px 80px;

display:flex;
flex-direction:column;
gap:24px;

position:relative;
z-index:2;
}
.profile-title{margin:0;font-size:18px;opacity:.92}
.profile-summary{
max-width:640px;
margin:10px auto 0;
opacity:.9;
}

.back-link{
position:absolute;
top:20px;
left:20px;
width:44px;
height:44px;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
background:rgba(255,255,255,0.15);
backdrop-filter:blur(10px);
}
.content-card{
background:white;
border-radius:24px;
padding:28px;
margin-bottom:24px;
box-shadow:0 20px 50px rgba(0,0,0,.08);
}
.content-card h2{
  margin:0 0 16px;
  font-size:22px;
}
.info-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}
.info-grid span{
  display:block;
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:8px;
}
.info-grid a,.info-grid strong{
  color:var(--text);
  text-decoration:none;
  font-weight:600;
}
.rich-text{
  line-height:1.7;
  color:#333;
}
.timeline-list{
  margin:0;
  padding-left:18px;
  color:#333;
  line-height:1.7;
}

.floating-actions{
position:fixed;
left:50%;
bottom:32px;
transform:translateX(-50%);

display:flex;
gap:14px;

padding:12px 16px;

background:rgba(255,255,255,0.75);
backdrop-filter:blur(20px);

border-radius:40px;

box-shadow:0 12px 40px rgba(0,0,0,0.15);

z-index:9999;
}
.floating-btn{
display:flex;
align-items:center;
gap:8px;

padding:12px 20px;

border-radius:30px;
background:white;

font-size:14px;
font-weight:500;

color:#222;
text-decoration:none;

transition:all .2s ease;
}

.floating-btn.primary{
background:#7e1f2a;
color:white;
}

.floating-btn:hover{
transform:translateY(-2px);
}
.floating-btn.medium{
  background:rgba(255,255,255,.92);
  color:var(--text);
  border:1px solid rgba(255,255,255,.7);
  font-weight:600;
}

.admin-shell{
  max-width:1100px;
  margin:auto;
  padding:26px 18px 60px;
}
.admin-wide{max-width:1200px}
.admin-card{
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.7);
  border-radius:30px;
  padding:26px;
  box-shadow:0 22px 70px rgba(0,0,0,.08);
}
.admin-card h1{
  margin:12px 0 0;
  font-size:34px;
  letter-spacing:-.03em;
}
.admin-error{color:#a31535}
.dashboard-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}
.dashboard-actions,.form-actions,.item-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.admin-main-btn,.admin-secondary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  padding:0 18px;
  border-radius:18px;
  text-decoration:none;
  font-weight:700;
  border:none;
  cursor:pointer;
}
.admin-main-btn{
  background:linear-gradient(135deg,var(--red),var(--red-2));
  color:white;
}
.admin-secondary-btn{
  background:#f5f1ee;
  color:var(--text);
}
.stats-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
  margin:24px 0;
}
.stat-box{
  background:white;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
}
.stat-box span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:8px;
}
.stat-box strong{
  font-size:30px;
}
.chart-card{
  background:white;
  border:1px solid var(--line);
  border-radius:24px;
  padding:18px;
  margin-bottom:22px;
}
.profiles-admin-list{
  display:grid;
  gap:12px;
}
.profiles-admin-item{
  background:white;
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.item-meta{
  color:var(--muted);
  font-size:14px;
  margin-top:4px;
}
.admin-form{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:18px;
}
.admin-form.two-cols{
  grid-template-columns:1fr 1fr;
}
.admin-form .full{
  grid-column:1 / -1;
}
.admin-form input,
.admin-form textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 16px;
  font:inherit;
  background:white;
}
.checkbox-line{
  display:flex;
  align-items:center;
  gap:10px;
}
.checkbox-line input{
  width:auto;
}

.back-home{
  display:inline-block;
  padding:12px 16px;
  border-radius:16px;
  background:white;
  color:var(--text);
  text-decoration:none;
  margin-top:14px;
}

@media (min-width:900px){
  .profile-page{
    padding-top:0;
  }
  .profile-content{
    grid-template-columns:1fr 1fr;
  }
  .profile-content .content-card:first-child,
  .profile-content .content-card:nth-child(2){
    grid-column:span 2;
  }
}

@media (max-width:700px){
  .home-shell,.admin-shell{padding:20px 14px 54px}
  .hero-content h1{font-size:40px}
  .profile-content{padding:0 14px}
  .content-card,.admin-card{padding:18px}
  .floating-actions{
    width:calc(100% - 16px);
    grid-template-columns:1fr 1.5fr 1fr;
    bottom:10px;
  }
  .floating-btn{
    min-height:54px;
    font-size:14px;
    padding:10px;
  }
  .admin-form.two-cols{
    grid-template-columns:1fr;
  }
  .profiles-admin-item{
    flex-direction:column;
  }
}



/* ===== Timeline fix Maison Burdigala ===== */

.timeline-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:28px;
margin-top:24px;
}

.timeline{
position:relative;
padding-left:36px;
}

.timeline::before{
content:"";
position:absolute;
left:6px;
top:8px;
bottom:8px;
width:2px;
background:#e5e5e5;
}

.timeline-item{
position:relative;
margin-bottom:26px;
}

.timeline-dot{
position:absolute;
left:-30px;
top:6px;
width:12px;
height:12px;
background:#9b1838;
border-radius:50%;
}

.timeline-content{
padding-left:4px;
}

.timeline-meta{
font-size:14px;
opacity:.85;
margin-top:2px;
}

.timeline-period{
font-size:13px;
color:#666;
margin-top:3px;
}

.timeline-location{
font-size:13px;
opacity:.6;
}

/* mobile */
@media(max-width:900px){
.timeline-grid{
grid-template-columns:1fr;
}
}

.share-link{
position:absolute;
right:24px;
top:24px;

width:44px;
height:44px;

border-radius:50%;
background:rgba(255,255,255,0.2);

display:flex;
align-items:center;
justify-content:center;

backdrop-filter:blur(10px);
transition:all .2s ease;
}

.share-link:hover{
background:rgba(255,255,255,0.35);
transform:scale(1.05);
}

.profile-footer{
margin-top:60px;
padding:40px 20px 120px;

text-align:center;

color:#6b6b6b;
font-size:13px;
}

.profile-footer::before{
content:"";
display:block;
width:40px;
height:2px;

background:#7e1f2a;
opacity:.3;

margin:0 auto 20px;
}

.footer-signature{
font-size:14px;
font-weight:600;
letter-spacing:0.12em;
text-transform:uppercase;

color:#7e1f2a;

margin-bottom:10px;
}

.footer-links{
display:flex;
justify-content:center;
gap:8px;
flex-wrap:wrap;
}

.footer-links a{
color:#6b6b6b;
text-decoration:none;
transition:opacity .2s ease;
}

.footer-links a:hover{
opacity:.6;
}

.ecosystem-footer{

margin-top:90px;
padding:50px 20px 80px;

border-top:1px solid rgba(0,0,0,0.06);

text-align:center;

color:#666;

font-size:13px;

}

.ecosystem-inner{

max-width:700px;
margin:auto;

}

.ecosystem-brand img{

height:30px;
margin-bottom:12px;

opacity:.9;

}

.ecosystem-brand p{

line-height:1.6;
margin-bottom:25px;

}

.ecosystem-brand span{

opacity:.8;

}

.ecosystem-sites{

display:flex;
justify-content:center;
flex-wrap:wrap;

gap:18px;

margin-bottom:22px;

}

.ecosystem-sites a{

color:#7e1f2a;

font-weight:500;

text-decoration:none;

transition:opacity .2s ease;

}

.ecosystem-sites a:hover{

opacity:.6;

}

.ecosystem-legal{

font-size:12px;
opacity:.7;

}

.ecosystem-legal a{

color:inherit;
text-decoration:none;

}

.footer-logo{
height:32px;
color:#7e1f2a;
opacity:.9;
}

.ecosystem-brand:hover .footer-logo{
opacity:1;
}

.profile-roles{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:8px 0 0;
}
.profile-role{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#fff;
  text-decoration:none;
  font-size:18px;
  line-height:1.5;
}
.profile-role-entity{
  text-decoration:underline;
  text-underline-offset:3px;
}
.profile-role:hover{
  opacity:.86;
}
@media (max-width:680px){
  .profile-role{
    font-size:16px;
    flex-wrap:wrap;
  }
}

.home-link{
position:absolute;
top:20px;
left:20px;
width:44px;
height:44px;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
background:rgba(255,255,255,.18);
backdrop-filter:blur(10px);
}

.entities-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
gap:18px;
margin-top:18px;
}

.entity-tile{
display:flex;
gap:14px;
align-items:center;
background:white;
padding:18px;
border-radius:20px;
text-decoration:none;
color:var(--text);
box-shadow:0 10px 30px rgba(0,0,0,.06);
}

.entity-avatar{
width:42px;
height:42px;
border-radius:50%;
background:linear-gradient(135deg,var(--red),var(--red-2));
color:white;
display:flex;
align-items:center;
justify-content:center;
font-weight:700;
}

.entity-content{
  max-width:1120px;
  margin:0 auto;
  padding:36px 20px 80px;
}

.entity-block{
  margin-bottom:32px;
}

.entity-members-head{
  margin-bottom:18px;
}

.entity-members-head h2{
  margin:0 0 8px;
  font-size:34px;
}

.entity-members-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.entity-member-card{
  display:flex;
  gap:16px;
  align-items:center;
  text-decoration:none;
  color:#161616;
  background:#fff;
  border-radius:24px;
  padding:20px;
  box-shadow:0 12px 30px rgba(0,0,0,.06);
}

.entity-member-avatar{
  width:64px;
  height:64px;
  border-radius:50%;
  background:#7e1f2a;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  font-weight:700;
  overflow:hidden;
  flex-shrink:0;
}

.entity-member-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.entity-member-meta strong{
  display:block;
  font-size:20px;
  margin-bottom:4px;
}

.entity-member-meta span{
  display:block;
  color:#666;
  line-height:1.4;
}

@media (max-width:980px){
  .entity-members-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:680px){
  .entity-members-grid{
    grid-template-columns:1fr;
  }
}