:root{
  --bg: #f8f3f3;
  --text: #0b1220;
  --muted: #6b7280;
  --accent: #0ea5a4;
  --accent-2: #0b4f6c; 
  --radius: 12px;
  --maxw: 1100px;
  --header-h: 72px;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0
}
html,body{
  height:100%;
  color-scheme: light;
  background: var(--bg);
}
body{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  font-size:16px;
}

.container{
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 20px;
}

/* Header / Navigation */
header{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(255,255,255,0.6);
  backdrop-filter:blur(6px);
  border-bottom:1px solid rgba(11,18,32,0.04);
}

nav{
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:center;
}
nav > .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

nav img{
  height:44px;
  width:auto;
  display:block;
}

nav .links{
  display:flex;
  gap:18px;
  align-items:center;
}

nav .links a{
  text-decoration:none;
  padding:8px 10px;
  border-radius:8px;
  font-weight:600;
  font-size:0.95rem;
  color:var(--text);
  opacity:0.92;
}

nav .links a:hover, nav .links a:focus{
  background:linear-gradient(90deg,var(--accent) 0%, rgba(14,165,164,0.06) 100%);
}

nav .links a.cta:hover{
  filter:brightness(.98);
  transform:translateY(-2px);
}

.intro{
  min-height:calc(70vh - var(--header-h));
  display:flex;
  align-items:center;
  justify-content:center;
  padding:56px 20px;
}

.intro .container{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:18px;
}

.intro h1{
  font-size:clamp(28px,6vw,56px);
  line-height:1.02;
  font-weight:800;
  margin-bottom:6px;
  color:var(--text);
}

.intro h1 span{
  display:block;
  font-weight:600;
  color:var(--muted);
  font-size:0.95rem};

.intro h1 em.Acueil{
  font-style:normal;
  color:var(--muted);
  display:block;
  font-weight:500;
  margin-top:6px;
}

.boutonacueil{
  display:inline-block;
  margin-top:8px;
  padding:12px 18px;
  border-radius:12px;
  background:linear-gradient(90deg,var(--accent-2),var(--accent));
  color:white;
  text-decoration:none;
  font-weight:700;box-shadow:0 10px 30px rgba(11,18,32,0.06);
  transition:transform .18s ease,box-shadow .18s ease;align-self:flex-start;
}

.boutonacueil:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(11,18,32,0.08);
}

/* Footer */
footer{
  padding:28px 20px;
  border-top:1px solid rgba(0, 0, 0, 0.04);
  margin-top:40px;
}

footer p{
  text-align:center;
  font-weight:600;
}

/* Utility classes commonly useful across pages */
.section{
  padding:56px 0;
}

.section .container{
  display:block;
}

.hint{
  color:var(--muted);
  font-size:0.95rem;
}

/* Cards / Portfolio grid (ready for upcoming pages) */
.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
  gap:20px; 
  margin-top:18px;
}

.portfolio-card {
  display: flex;
  align-items: stretch;
  gap: 24px;  /* espace entre image et texte */
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #eaeaea;
  transition: 0.2s ease-in-out;
}

.portfolio-img {
  width: 40%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}


.portfolio-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Lien en bas */
.portfolio-link a {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: #0ea5a4;
  text-decoration: none;
  border-top: 1px solid #f2f2f2;
  padding-top: 10px;
  width: 100%;
}

.portfolio-link a:hover {
  color: #0b1220;
}

.portfolio-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 60%;
}

/*Changes the gaps of portfolio grid */
.certification{
  grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
}

.card{
  background:var(--surface);
  padding:18px;
  border-radius:12px;
  box-shadow:0 6px 24px rgba(11,18,32,0.04);
  transition:transform .18s ease,box-shadow .18s ease;
  text-align:center
}

.card:hover{
  transform:translateY(-6px);
  box-shadow:0 22px 48px rgba(11,18,32,0.06);
}

.card img{
  width:100%;
  height:160px;
  object-fit:cover;
  border-radius:8px;
  margin-bottom:12px;
}

.card h3{
  margin-bottom:6px;
  font-size:1.05rem;
}

.card p{
  color:var(--muted);
  font-size:0.95rem;
}

/* --- Styles pour le formulaire de contact --- */
.contact-form{
  max-width:820px;
  margin:28px auto;
  padding:22px;
  background:var(--surface);
  border-radius:16px;
  box-shadow:0 8px 30px rgba(11,18,32,0.04);
}
.contact-form fieldset{
  border:0;
  padding:0;
}

.contact-form legend{
  font-weight:800;
  font-size:1.25rem;
  margin-bottom:12px;
  color:var(--accent-2);
}
.contact-form .form-div{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:14px;
}

.contact-form label{
  font-weight:600;
  color:var(--muted);
  font-size:0.95rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea{
  padding:12px 14px;border-radius:10px;border:1px solid rgba(11,18,32,0.06);
  background:transparent;font-size:1rem;
}
.contact-form input:focus, .contact-form textarea:focus{
  outline:none;box-shadow:0 6px 24px rgba(14,165,164,0.06);border-color:var(--accent);
}
.bouton-env{
  display:inline-block;padding:12px 18px;border-radius:12px;
  background:linear-gradient(90deg,var(--accent-2),var(--accent));
  color:#fff;border:0;font-weight:700;cursor:pointer;
}
.bouton-env:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 36px rgba(11,18,32,0.06);
}

/* Carrousel normal */
.cnil-carousel {
  text-align: center;
}

.cnil-carousel .slide {
  height: 160px;
  width: auto;
  object-fit: cover;
  margin: 5px;
  cursor: pointer;
  border-radius: 8px;

  /* Ne montrer qu’une seule image avant le clic */
  display: none;
}


.cnil-carousel .slide:first-child {
  display: inline-block; /* On affiche seulement la première image */
}

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.lightbox .prev,
.lightbox .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  color: #fff;
  background: rgba(0,0,0,0.4);
  border: none;
  padding: 10px;
  cursor: pointer;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

strong {
  font-weight: inherit;
  color: inherit;
}

/* Carte normale */
.doc-card .doc-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
}

/* Lightbox overlay */
#doc-lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  overflow: auto;
}

#doc-lightbox .lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

#doc-lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

@media (max-width:980px){
  .portfolio-grid{grid-template-columns:repeat(2,1fr); gap : 28px;}
}
@media (max-width:700px){
  nav > .container{flex-direction:row;align-items:center}
  nav .links{gap:10px;flex-wrap:wrap}
  nav .links a{font-size:0.95rem;padding:8px}
  .intro .container{align-items:center;text-align:center}
  .boutonacueil{width:100%;max-width:320px}
  .portfolio-grid{grid-template-columns:1fr; gap : 20px;}
  .contact-form{padding:18px;margin:18px}
  .portfolio-grid{gap:16px}
}

/* Prevent color changes in dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #f8f3f3;
    --text: #0b1220;
    --muted: #6b7280;
    --accent: #0ea5a4;
    --accent-2: #0b4f6c;
  }

  body {
    background: var(--bg);
    color: var(--text);
  }

  header,
  footer,
  .card,
  .portfolio-card,
  .contact-form {
    background: white;
    color: var(--text);
  }

  a,
  p,
  h1, h2, h3, h4, h5, h6,
  label,
  span,
  strong {
    color: inherit;
  }
}

