/* je hais les CSS */


/* https://ateliers.esad-pyrenees.fr/web/pages/ressources/css/reset/ */
/* Reinitialiser le modele, afin que `padding` et `border` soient contenus dans le `width` d'un élément*/
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* Autoriser des hauteurs en pourcentage dans le site ; adapte pour les sites applications*/
/*html, body { height: 100%; }*/

/* Hauteur de ligne et amelioration du rendu typographique */
/* body { line-height: 1.7; -webkit-font-smoothing: antialiased; } */

/* Amelioration des comportement par defaut des medias */
img, picture, video, canvas, svg { display: block; height: auto; max-width: 100%; }

/* Suppressions des margin et padding ; implique que toutes les marges naturelles des elements soient redéfinines */
html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }

/* Suppression des difference de corps et de graisse sur les titres */
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }

/* Reinitialisation des proprietes typographiques sur les elemments de formulaire */
input, button, textarea, select { font: inherit; margin: 0; }

/* suppression des bordures sur les iframes */
iframe { border: 0; }


:root {
    --background-color-1: white;
    --background-color-2: #eee; /* pre et code */
    --text-color-1: black;
    --link-color-1: blue; /* link */
    --link-color-2: #c00; /* hover, active */
    --link-color-3: #7D457D; /* visited */
    --link-underline-color: #707070;
    --border-color: #c0c0c0;
    --max-width: 45em;
}

html { 
    background: var(--background-color-2);
    height: 100%;
}

body{
    background-color: var(--background-color-1);
    color: var(--text-color-1);
    font-family: serif;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 45em;
    min-height: 100%;
    padding:  1rem;
}

/* PARAGRAPHES */

p {
    margin: 1rem 0 ;
}

/* MENUS */

ul  {
    margin: 1rem 0 1rem 2rem;
}

li p {
    margin: 0;
    padding: 0;
}

/* TITRES */

h1, h2, h3,h4 {
    font-weight: bold;
    line-height: 1.2;
    font-family: sans-serif;
}

h1 {
    font-size: 1.8rem;
    margin: 2rem 0 0 0;
}

body > main:first-child > h1:first-child {
    margin-top: 0;
}
h1 + p#meta {            /* pour les info méta sur chaque note */
    margin-top: 2rem;
}

h1 + :not(p#meta){
    margin-top: 2rem;
}

h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1.5rem 0;
}
h3 {
    font-size: 1rem;
    margin: 2rem 0 1.5rem 0;
}

h4 {
    font-size: 1rem;
    font-style: italic;
    font-weight: normal;
}

/* LIENS */

a:link, a:visited {
    border-bottom: 1px var(--link-underline-color) solid;
    color: var(--link-color-1) ; 
    text-decoration-color: var(--link-color-1);
    text-decoration: none;
}

a:hover {
    border-bottom: 1px var(--link-underline-color) solid;
    color: var(--link-color-2);
}
a:active {
    border-bottom: 1px var(--link-color-2) solid;
    color: var(--link-color-2);
}

/* PRE CODE KBD */

pre, code, kbd {
    background-color: var(--background-color-2);
    font-family: monospace;
    font-size: .8rem;
}
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

code, kbd {
    padding: 0 0.3rem;
}

a code {
    padding: 0;
    background-color: var(--background-color-1);
}

pre code {
    border: 1px solid var(--border-color);
    display: block;
    line-height:1.5;
    margin: 1.5rem 0;
    padding: .5rem;
}


/* BLOCKQUOTE */

blockquote{
    border-left: thin solid var(--border-color) ;
    padding: 0 1rem;
    margin: 2rem 0 2rem 0;
}
blockquote p{
}

/* FIGURES ET IMAGES */

figure {
    text-align: center;
}

figcaption {
    font-style: italic;
    font-size: small;
    text-indent: 0;
}

img {
    max-width: 100%;
    border: 1px solid var(--border-color);
    margin: auto;
}


/* FIL D'ARIANE */

.breadcrumb ul {
    list-style:none;
    margin:0;
    padding:0
}
.breadcrumb li {
    margin:0;
    display: inline;
}
.breadcrumb li::after {
}
.breadcrumb li:not(:last-child)::after {
    content:": "
}

/* META PAGE */

p#meta {
    margin-bottom: 2rem;
}
p.auteur-poeme {
    font-style: italic;
}
/* PIED DE PAGE */

footer {
    margin-top: 1rem;
    border-top: solid 1px;
    line-height: 1.5;
    padding: 1rem 0;
}

/* QUESTIONS */

article.question {
  margin: 2rem 0;
  }

.question details summary {
  cursor: pointer;
  border: 1px solid #ccc;
  padding: .5rem;
background: #F0F0F0;
}
.question details summary > * { /* https://css-tricks.com/two-issues-styling-the-details-element-and-how-to-solve-them/ */
  display: inline;
}
.question details .reponse {
  border: 1px solid #ccc;
  padding: .5rem;
  }
.question .meta-question {
  font-size: .9rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.question .source {
  border-top: 1px solid #ccc;
}
.question details[open] {
  border: 1px solid grey;
}
.question details[open] summary {
background: #F0F0F0;
}
.question blockquote {
  border-left: medium solid #ccc;
  margin: 0;
  padding-left: 1em;
}
.question blockquote :first-child {
  margin-top: 0;
}
.question blockquote :last-child {
  margin-bottom: 0;
}

button {
    display: block;
    margin-bottom: 1rem;
border: 1px solid #ccc;
background: #F0F0F0;
}


