* {
  margin: 0;
  padding: 0;
}

:root {
  --padding: 2rem;
  --color-black: #000;
  --color-white: #fff;
  --color-light: #efefef;
  --color-light-dark: hwb(17 78% 8%); /* 20% plus sombre que light pour sections */
  
  /* Material Design - Opacités pour texte sur fond blanc */
  --color-text: rgba(0, 0, 0, 0.87);           /* High emphasis - texte principal */
  --color-text-secondary: rgba(0, 0, 0, 0.60); /* Medium emphasis - texte secondaire */
  --color-text-disabled: rgba(0, 0, 0, 0.38);  /* Disabled - texte désactivé */
  --color-grey: #777;                          /* Legacy - à remplacer progressivement */
  --color-text-grey: var(--color-text-secondary);
  --color-background: var(--color-white);
  --color-code-light-grey:  #cacbd1;
  --color-code-comment:     #a9aaad;
  --color-code-white:       #c5c9c6;
  --color-code-red:         #d16464;
  --color-code-orange:      #de935f;
  --color-code-yellow:      #f0c674;
  --color-code-green:       #a7bd68;
  --color-code-aqua:        #8abeb7;
  --color-code-blue:        #7e9abf;
  --color-code-purple:      #b294bb;
  --font-family-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  
  /* Nombre d'or (φ = 1.618) - Échelle typographique */
  --phi: 1.618;
  --font-size-base: 1rem;           /* 16px */
  --font-size-small: 0.875rem;      /* 14px */
  --font-size-large: 1.25rem;       /* 20px */
  --font-size-h3: 1.618rem;         /* φ = 26px */
  --font-size-h2: 2.618rem;         /* φ² = 42px */
  --font-size-h1: 4.236rem;         /* φ³ = 68px */
  --line-height-base: 1.618;        /* φ */
  --spacing-small: 0.618rem;        /* 1/φ */
  --spacing-base: 1rem;
  --spacing-medium: 1.618rem;       /* φ */
  --spacing-large: 2.618rem;        /* φ² */
  --spacing-xlarge: 4.236rem;       /* φ³ */
  
  /* Arrondis globaux */
  --border-radius: 0;               /* Pas d'arrondi - angles vifs */
}

* {
  box-sizing: border-box;
}

html {
  font-family: 'TeX Gyre Heros', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-background);
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

/* Typographie globale - Nombre d'or */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 2.618rem; /* φ² */
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.618rem; /* φ */
  margin-bottom: 1rem;
}

h4, h5, h6 {
  font-size: 1rem;
}

/* Sections et contenu gérés directement dans les templates */

/* Texte - taille et aération */
p, li, .text {
  font-size: 1.125rem; /* 18px - Plus grand */
  line-height: 1.7; /* Plus aéré */
}

img {
  width: 100%;
}
li {
  list-style: none;
}
a {
  color: currentColor;
  text-decoration: none;
}
button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}
strong, b {
  font-weight: 600;
}
small {
  font-size: inherit;
  color: var(--color-text-grey);
}

.bg-light {
  background-color: var(--color-light-dark);
}
.color-grey {
  color: var(--color-text-grey);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.75rem 0;
  margin: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

/* Logo à gauche */
.logo {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  line-height: 1.3;
  transition: all 0.3s ease;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  border: 1px solid transparent;
}

.logo:hover {
  border-color: #000;
  transform: scale(1.05);
}

.logo[aria-current="page"] {
  border-color: #000;
}

/* Menu items styling - aligné à droite */
.header .nav-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-left: auto;
}

.header .nav-desktop a {
  color: #000;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  border: 1px solid transparent;
  font-size: 0.8rem;
}

.header .nav-desktop a:hover {
  border-color: #000;
  transform: scale(1.05);
}

.header .nav-desktop a[aria-current="page"] {
  color: #000;
  font-weight: 600;
  border-color: #000;
}

/* Footer styling */
.footer {
  background: var(--color-white);
  padding: 4rem 0;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--color-black);
}

/* Footer rose sur pages (pas home) */
body:not(.home) .footer {
  background: var(--color-light-dark);
}

/* Page transition overlay - CSS pour état initial (évite flickr) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  z-index: 99999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

body.loaded::before {
  opacity: 0;
  pointer-events: none;
}

.footer-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
}

@media (max-width: 768px) {
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-column h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-black);
}

.footer-column p,
.footer-column ul {
  color: var(--color-text);
  line-height: 1.6;
}

.footer-column a,
.footer a,
.footer a[href^="mailto:"],
.footer a[href^="tel:"] {
  color: var(--color-text) !important;
  text-decoration: none;
  border-bottom: 0.125em solid currentColor;
  display: inline;
  line-height: 1.4;
  transition: all 0.2s ease;
  font-weight: inherit !important;
}

.footer-column a:hover,
.footer a:hover,
.footer a[href^="mailto:"]:hover,
.footer a[href^="tel:"]:hover {
  color: var(--color-black);
  opacity: 0.7;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

/* Old logo styles removed - using new simple logo style above */

.menu {
  display: flex;
  column-gap: 0rem; /* 16px */
}
.menu a.logo {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  color: #000;
  font-size: 1rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.7;
}

.menu a {
  padding: 0.5rem 0.25rem; /* Padding horizontal réduit */
  display: block;
  color: var(--color-black);
  font-size: 0.8rem; /* Réduit à 12.8px */
  font-weight: 400;
  text-shadow: 0 0 0 transparent;
  transition: text-shadow 0.2s ease;
}
.menu a:hover {
  text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
}
.menu a[aria-current] {
  text-decoration: underline;
}

.social {
  display: flex;
  padding: 0 .5rem;
}
.social a {
  padding: 1rem .5rem;
}

.section {
  padding: 3rem 0;
}

.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}
.grid > .column {
  margin-bottom: var(--gutter);
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

.text a {
  text-decoration: none;
  border-bottom: 0.125em solid currentColor;
  display: inline;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.text a:hover {
  transform: scale(1.05);
  opacity: 0.7;
}
.text :first-child {
  margin-top: 0;
}
.text :last-child {
  margin-bottom: 0;
}
.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}
.text ul,
.text ol {
  margin-left: 1rem;
}
.text ul p,
.text ol p {
  margin-bottom: 0;
}
.text ul > li {
  list-style: disc;
}
.text ol > li {
  list-style: decimal;
}
.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}
.text h1,
.intro {
  margin-bottom: 3rem;
}
/* h2 et h3 margin-bottom définis globalement */
.text .codeblock {
  display: grid;
}
.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}
.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}
.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}
.text hr {
  margin: 6rem 0;
}
.text dt {
  font-weight: 600;
}
.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}
.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}
.text figure {
  margin: 3rem 0;
}
.text figcaption {
  padding-top: .75rem;
  color: var(--color-text-grey);
}
.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.text figure ul li {
  list-style: none;
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

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

.intro {
  max-width: 40rem;
}
.intro *:not(:last-child) {
  margin-bottom: 1em;
}

.cta {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: .75rem 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-black);
}

.box {
  background: var(--color-light-dark);
  padding: 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-light-dark);
}

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-black);
}
.img img,
.video iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.img[data-contain] img {
  object-fit: contain;
}
.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

.footer {
  padding: 6rem var(--padding);
  line-height: 1.5em;
  background: var(--color-white);
  position: relative;
  z-index: 3;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  border-top: 1px solid var(--color-black);
}

.footer-content {
  max-width: 70rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media screen and (min-width: 60rem) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }
}
.footer:before {
  display: none;
}

.footer h2 {
  font-weight: 600;
  margin-bottom: .75rem;
}
.footer ul,
.footer p {
  color: var(--color-text);
}
.footer p {
  max-width: 15rem;
}

/* Footer : texte plus petit et plus serré */
.footer p,
.footer li {
  font-size: 0.875rem; /* 14px */
  line-height: 1.5;    /* Plus serré */
}

.footer-column p,
.footer-column li {
  font-size: 0.875rem; /* 14px */
  line-height: 1.5;    /* Plus serré */
}


.map {
  --w: 2;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  position: relative;
  overflow: hidden;
  background: var(--color-black);
}
.map iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.margin-s {
  margin-bottom: .75rem;
}
.margin-m {
  margin-bottom: 1.5rem;
}
.margin-l {
  margin-bottom: 3rem;
}
.margin-xl {
  margin-bottom: 4.5rem;
}
.margin-xxl {
  margin-bottom: 6rem;
}

/* Mobile - ensure minimum padding */
@media screen and (max-width: 768px) {
  .header-inner {
    padding: 0 1.5rem;
  }
  
  .footer-inner {
    padding: 0 1.5rem;
    text-align: center;
  }
  
  .footer-columns {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .footer-column {
    width: 100%;
    text-align: center;
  }
  
  .footer-column p,
  .footer p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Mobile - Même typographie que desktop
@media (max-width: 768px) {
  - Tailles identiques au desktop par défaut
  - Pas de réduction sur mobile
} */

/* Grand écran - Typographie augmentée (nombre d'or amplifié) */
@media screen and (min-width: 60rem) {
  body {
    --padding: 3rem;
  }

  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .grid > .column {
    grid-column: span var(--columns);
  }

  h1 {
    font-size: 5rem; /* φ³ × 1.18 */
  }

  h2 {
    font-size: 3.09rem; /* φ² × 1.18 */
  }

  h3 {
    font-size: 1.91rem; /* φ × 1.18 */
  }

  p, li, .text {
    font-size: 1.125rem; /* 18px - taille intermédiaire */
  }
}

.pagination {
  display: flex;
  padding-top: 6rem;
}
.pagination > span {
  color: var(--color-text-grey);
}
.pagination > * {
  padding: .5rem;
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: 1.5rem;
}
.pagination > a:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.note-excerpt {
  line-height: 1.5em;
}
.note-excerpt header {
  margin-bottom: 1.5rem;
}
.note-excerpt figure {
  margin-bottom: .5rem;
}
.note-excerpt-title {
  font-weight: 600;
}
.note-excerpt-date {
  color: var(--color-text-grey);
}


